Time and Day added to Game :DDDDDD

Mu online season 21 - grand opening

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,683
34
3,288
520
wasn't this always built in to the npc commands? i know day, hour and minute always have. I'm guessing you just made a simple npc which checks it and displays?

congrats.
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,683
34
3,288
520
pretty sure theres an npc command to check minute, hour, day. always has been.

Yeah, just checked.

#IF
DAYOFWEEK sun

Theres one for hour and minute too. Just don't have an NPC script to hand with it in.

edit. just checked mir sources.

#IF
HOUR 5

#IF
MIN 10
 
Last edited:

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,683
34
3,288
520
reading time and displaying it are pretty much the same thing. mir3 has full access to variables, so with a little magic you could write a script for a fully working clock. without variables you could do it with a long winded script.

#IF
DAYOFWEEK sun
#SAY
Its sunday!
#IF
DAYOFWEEK mon
#SAY
Its monday!
#IF
HOUR 05
MIN 10
#SAY
Its 10 minutes past 5 in the AM!

Like i said, thats long winded. Using variables you could do it in no time.
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,683
34
3,288
520
if you did it in 20,000 you haven't used variables correctly.

60 minutes, 24 hours, 7 days.

Leaving out the #IF's and #ACT's, it should take you exactly 90 lines. I've not wrote a mir script in about 3 years, however i can't see it being too difficult, just very long winded and losts of copy and pasting.
 
Last edited:

Relentless

LOMCN Veteran
Veteran
Mar 9, 2012
494
35
55
Hull-England
really??, what did i just say?, i tryed using variables and it didnt work, and i corrected myself it was 70,000 lines

EDIT:

if you can do it in 90 lines, wont you be a nice boy and post it on here for all us nubs who cant do it ? pwease pretty pwease :)...
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,683
34
3,288
520
Heres the day of week. It exactly the same for hour and min, just longer. I haven't tested this, and the day names might be wrong (not sure if its THU or THURS etc)

[@main]
#IF
DAYOFWEEK sun
#ACT
mov %A1 Sunday
goto @hour
#IF
DAYOFWEEK mon
#ACT
mov %A1 Monday
goto @hour
#IF
DAYOFWEEK tue
#ACT
mov %A1 Tuesday
goto @hour
#IF
DAYOFWEEK wed
#ACT
mov %A1 Wednesday
goto @hour
#IF
DAYOFWEEK thu
#ACT
mov %A1 Thursday
goto @hour
#IF
DAYOFWEEK fri
#ACT
mov %A1 Friday
goto @hour
#IF
DAYOFWEEK sat
#ACT
mov %A1 Saturday
goto @hour

[@hour]
#SAY
Its <$OUTPUT (A1) > \\
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,683
34
3,288
520
thats days, now do hours and minutes, if im correct theres 24 hours or 3600 minutes

i've told you how its done. You don't check every minute of the day. You check the hour of the day (24) then check the minute of the hour (60). Thats only another 84 lines.
 

TheDayIDie

Banned
Banned
Dedicated Member
Jul 29, 2011
4,071
99
135
UK
Nice one, not a biggie but you need something to aim for in spare time and i guess achieving something is better than nothing ;)

---------- Post Merged at 10:53 PM ---------- Previous Post was at 10:52 PM ----------

i've told you how its done. You don't check every minute of the day. You check the hour of the day (24) then check the minute of the hour (60). Thats only another 84 lines.

true i was thinking this, not sure how ben made up 70k lines though
 

Serane

Dedicated Member
Dedicated Member
Feb 18, 2012
246
5
45
added farphit script , on a npc says Its and nothing more.
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,683
34
3,288
520
Like i said i didn't test it. That took me literly 2 seconds to write from being out of writing scripts for over 3 years.

change

mov %A1 Sunday

to

mov A1 Sunday
 

Relentless

LOMCN Veteran
Veteran
Mar 9, 2012
494
35
55
Hull-England
Right, i made this thread to show i did it and got it working, can you say you have made it and got it working ??? no.... so why dont you just like stop commenting saying you can do it or just do it ??
 

Zisha

Dedicated Member
Dedicated Member
Feb 23, 2012
165
5
44
I have , day and hour + minute in script... is easy..