
While refactoring those events the following other changes were made: Introducing OnInstanceDestroy event. This event can be used to hook script code right in front of the instance destruction. This can be useful if you have any stored references to an instance id for example. The script command cmdothernpc will now check if the target event exists and report failures. Therefore it now returns true or false. All agit(FE,SE,TE) start and end commands from atcommand and script commands have been merged in their respective guild function which now returns a bool value of true for successful actions and false if it did not succeed(if the specific WoE was [not] running). All global triggered events with mapserver status output now call the same function and therefore have the same mapserver output(including their respective event name of course). Renamed a few events in the script configuration to match the other names Added constants for months and weekdays Additionally added constants for gettime types to make it easier to read. Replaced all existing usages I found with their proper new syntax or better fitting functions.
46 lines
1.5 KiB
Plaintext
46 lines
1.5 KiB
Plaintext
//===== rAthena Script =======================================
|
|
//= War of Emperium SE - Auto-Start
|
|
//===== By: ==================================================
|
|
//= L0ne_W0lf
|
|
//===== Current Version: =====================================
|
|
//= 1.0
|
|
//===== Compatible With: =====================================
|
|
//= rAthena Project; RO Episode 11.3
|
|
//===== Description: =========================================
|
|
//= Auto-start for War of Emperium SE.
|
|
//= For instructions, see doc/woe_time_explanation.txt.
|
|
//===== Additional Comments: =================================
|
|
//= 1.0 Copy/Paste of the original setter.
|
|
//============================================================
|
|
|
|
- script Agit2_Event -1,{
|
|
end;
|
|
|
|
OnClock1800: //start time for Tuesday and Thursday
|
|
OnClock2000: //end time for Tuesday and Thursday
|
|
OnClock2100: //start time for Saturday
|
|
OnClock2300: //end time for Saturday
|
|
|
|
OnAgitInit2:
|
|
// starting time checks
|
|
if((gettime(DT_DAYOFWEEK)==TUESDAY) && (gettime(DT_HOUR)>=18 && gettime(DT_HOUR)<21) ||
|
|
(gettime(DT_DAYOFWEEK)==THURSDAY) && (gettime(DT_HOUR)>=18 && gettime(DT_HOUR)<21) ||
|
|
(gettime(DT_DAYOFWEEK)==SATURDAY) && (gettime(DT_HOUR)>=22 && gettime(DT_HOUR)<23)) {
|
|
if (!agitcheck2()) {
|
|
AgitStart2;
|
|
}
|
|
end;
|
|
}
|
|
|
|
// end time checks
|
|
if ((gettime(DT_DAYOFWEEK)==TUESDAY) && (gettime(DT_HOUR)==21) ||
|
|
(gettime(DT_DAYOFWEEK)==THURSDAY) && (gettime(DT_HOUR)==21) ||
|
|
(gettime(DT_DAYOFWEEK)==SATURDAY) && (gettime(DT_HOUR)==23)) {
|
|
if (agitcheck2()) {
|
|
AgitEnd2;
|
|
}
|
|
end;
|
|
}
|
|
end;
|
|
}
|