Dayofweek

smoochy boys on tour

hallmat

LOMCN Veteran
Veteran
Feb 19, 2007
555
1
125
i cant seem to get this correct i have fiddled with it and it wont work
what i want to do is just check for a day in the week and then give out a quest or item or other

here are some of the scripts i have

Code:
;;; Riddles - solve them - Eviltwin ;;;
[@main]
#IF
DAYOFWEEK MON
DAYOFWEEK TUE 
DAYOFWEEK WED 
DAYOFWEEK THU 
DAYOFWEEK FRI 
DAYOFWEEK SAT 
DAYOFWEEK SUN 
#ACT
Goto @monday
#ESLEACT
goto @nextIF
[@nextif]
#IF
DAYOFWEEK MON
DAYOFWEEK TUE 
DAYOFWEEK WED 
DAYOFWEEK THU 
DAYOFWEEK FRI 
DAYOFWEEK SAT 
DAYOFWEEK SUN 
#ACT
Goto @TUE
#ESLEACT
goto @nextIF1
[@nextif1]
#IF
DAYOFWEEK MON
DAYOFWEEK TUE 
DAYOFWEEK WED 
DAYOFWEEK THU 
DAYOFWEEK FRI 
DAYOFWEEK SAT 
DAYOFWEEK SUN 
#ACT
Goto @WED
#ESLEACT
goto @nextIF2

[@nextif2]
#IF
DAYOFWEEK MON
DAYOFWEEK TUE 
DAYOFWEEK WED 
DAYOFWEEK THU 
DAYOFWEEK FRI 
DAYOFWEEK SAT 
DAYOFWEEK SUN 
#ACT
Goto @THU
#ESLEACT
goto @nextIF3
[@nextif3]
#IF
DAYOFWEEK MON
DAYOFWEEK TUE 
DAYOFWEEK WED 
DAYOFWEEK THU 
DAYOFWEEK FRI 
DAYOFWEEK SAT 
DAYOFWEEK SUN 
#ACT
Goto @FRI
#ESLEACT
goto @nextIF4
[@nextif4]
#IF
DAYOFWEEK MON
DAYOFWEEK TUE 
DAYOFWEEK WED 
DAYOFWEEK THU 
DAYOFWEEK FRI 
DAYOFWEEK SAT 
DAYOFWEEK SUN 
#ACT
Goto @SAT
#ESLEACT
goto @nextIf6
[@nextif6]
#IF
DAYOFWEEK MON
DAYOFWEEK TUE 
DAYOFWEEK WED 
DAYOFWEEK THU 
DAYOFWEEK FRI 
DAYOFWEEK SAT 
DAYOFWEEK SUN 
#ACT
Goto @SUN
#ELSEACT
goto @main


[@mon]
#say
worked

[@tue]
#say
worked

[@WED]
#say
worked

[@THU]
#say
worked

[@FRI]
#say
worked

[@SAT]
#say
worked

[@SUN]
#say
worked

that is one of them that i have tested and it didnt work :(

ok next one is here

Code:
#IF
DAYOFWEEK MON
#ACT
goto @MON
#SAY
#ELSEACT
goto day1
[@day1]
#IF
DAYOFWEEK TUE
#ACT
GOto @TUE
#SAY
#ELSEACT
GOTO @day2
[@DAY2]
#IF
DAYOFWEEK WED
#ACT
goto @wed
#SAY
#ELSEACT
goto @day3
[@day3]
#IF
DAYOFWEEK THU
#ACT
goto @THU
#SAY
#ELSEACT
goto @day4
[@day4]
#IF
DAYOFWEEK fri
#ACT
goto FRI
#SAY
#ACT
goto FRI

[@mon]
#say
worked

[@tue]
#SAY
hello
[@WED]
#SAY
Hello
[@Thu]
#SAY
hello
[@fri]
#SAY
hello

the day i checked it on was friday

the only time it worked was if i didnt check them all also this didnt work

Code:
#IF
DAYOFWEEK MON
DAYOFWEEK TUE
DAYOFWEEK WED
DAYOFWEEK THU
DAYOFWEEK FRI
DAYOFWEEK SAT
DAYOFWEEK SUN

then rest of script and that didnt work

many thanks if somone can help me
 

MasterQ

LOMCN Veteran
Veteran
Loyal Member
Aug 6, 2006
462
0
62
London
It cant be Mon Tue Wed Thur Fri Sat Sun all in one day, you need to seperate it out.

[@main]
#IF
DAYOFWEEK MON
#act
goto @watever
#elseact
goto @checktue

[@checktue]
#if
DAYOFWEEK TUE
#act
goto @watever
#elseact
goto @checkwed

[@checkwed]
#if
DAYOFWEEK WED
#act
goto @watever
#elseact
goto @checkthu

and so on

[@watever]
#if
#act
whatever it is you want done.
 
Upvote 0

CheekyVimto

It's my Precious!
Veteran
Mar 8, 2005
396
170
130
Here you go.

/cheeky

Code:
[@checkday]
#ACT
MOV A1 ""

#IF
DAYOFWEEK MON
#ACT
MOV A1 "Monday!"
goto @textdisplay
break

#IF
DAYOFWEEK TUE
#ACT
MOV A1 "Tuesday!"
goto @textdisplay
break

#IF
DAYOFWEEK WED
#ACT
MOV A1 "Wednesday!"
goto @textdisplay
break

#IF
DAYOFWEEK THU
#ACT
MOV A1 "Thursday!"
goto @textdisplay
break

#IF
DAYOFWEEK FRI
#ACT
MOV A1 "Friday!"
goto @textdisplay
break

#IF
DAYOFWEEK SAT
#ACT
MOV A1 "Saturday!"
goto @textdisplay
break

#IF
DAYOFWEEK SUN
#ACT
MOV A1 "Sunday!"
goto @textdisplay
break

#ELSEACT
MOV A1 "Error in Code"
goto @textdisplay
break

[@textdisplay]
#SAY
It's <$OUTPUT(A1)>\\
< Exit/@EXIT>
 
Upvote 0

hallmat

LOMCN Veteran
Veteran
Feb 19, 2007
555
1
125
ty cheeky i found it was my fault i dont know what i did

but i rewrote the script and it now works :D
 
Upvote 0