Professional Documents
Culture Documents
Woe Time Explanation
Woe Time Explanation
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
//|
ion
//|
lse
//|
//|
//|
These 4 labels will run one after the other. It's acomodated so,
The Tuesday at 21:00 and 23:00 they will run, and go to the next
part of the script:
if((gettime(4)==2) && (gettime(3)>=21 && gettime(3)<23)) goto L_Start;
if((gettime(4)==4) && (gettime(3)>=21 && gettime(3)<23)) goto L_Start;
if((gettime(4)==6) && (gettime(3)>=16 && gettime(3)<18)) goto L_Start;
This part will check for the times. Since both Starting and Ending times
run through the same chain of commands, there are necesary checks to ensure
it's the right time. Let's take the following example:
if((gettime(4)==2) && (gettime(3)>=21 && gettime(3)<23))
The first gettime is checking for a type 4, the day of the week, and it's
comparing it to the one desired, which is 2, that's Tuesday. If the comparat
is true and both sides are equal, it will return 1. 1 means true, 0 means fa
in comparations and conditions.
The second gettime is checking for a type 3, which is the hour, and it's
//| comparing it to 21, and if the first part is greater or equal (>=) than the
second,
//| the comparation will return 1.
//|
//| The third and last gettime is checking again for the hour, but the time has
to be less
//| than the said time, in this case, 23.
//|
//| Now, look at the parentheses. Parentheses are very important when making com
parations
//| and conditions. Check the order of these. I'll place dummy characters for th
is example:
//|
//|
if ((X && (Y && Z)) goto L_Start;
//|
//| It's saying, if Y and Z are true, the condition meets. Now let's replace tha
t comparation
//| with another dummy character. We're doing (Y && Z) = G:
//|
//|
if (X && G) goto L_Start;
//|
//| It's saying, if X and G are true, the condition meets, thus it has to go to
L_Start.
//|
//| Now, the last part of the script, regarding the end of WoE time:
//|
//|
if((gettime(4)==2) && (gettime(3)==23)) goto L_End;
//|
if((gettime(4)==4) && (gettime(3)==23)) goto L_End;
//|
if((gettime(4)==6) && (gettime(3)==18)) goto L_End;
//|
end;
//|
//| This is the same as before, but it's checking for the day in the first getti
me, and
//| the hour on the second. If both conditions are true, the WoE will end. We're
checking
//| here for the end time, not the start.
//|
//| Another important thing is OnAgitInit: . This special label will be run as s
oon as the
//| castle data is loaded from the char data. So it will check for the above sta
rt and end time
//| to see if it's in WoE time, hence why the hours has to be checked.
//|
//| Now a example of how to set the WoE so it starts on Monday, at 4 pm and ends
up at 10 pm:
//|
//| OnClock1600: //| 16:00 = 4 pm
//| OnClock2200: //| 22:00 = 10 pm
//|
//| OnAgitInit: //| there has to be ONLY ONE of these labels, so put the OnClock
above this
//|
//| and the checks below.
//|
//| if ((gettime(4)==1) && (gettime(3)>=16 && gettime(3)<22)) goto L_Start;
//|
//| if ((gettime(4)==1) && (gettime(3)==22) goto L_End;
//| end;//| VERY IMPORTANT TO PLACE AND END AFTER THE LAST END CHECK. You don't
want to
//|
//| start the WoE w/o being on the right times/day
//|
//| I hope this has been clear enough. Remember to put the checks in a logical w
ay, e.g:
//| Monday checks first, then Thursday, etc.
//| Any questions Pm me (erKURITA) or go to irc channel on irc.deltaanime.net in
#athena
//| channel. Do not PM on IRC w/o asking please.
//|
//| ~ erKURITA