
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.
27 lines
1.2 KiB
Plaintext
27 lines
1.2 KiB
Plaintext
//===== rAthena Script =======================================
|
|
//= Sample: Time Test
|
|
//===== By: ==================================================
|
|
//= rAthena Dev Team
|
|
//===== Last Updated: ========================================
|
|
//= 20161206
|
|
//===== Description: =========================================
|
|
//= Demonstrates time commands.
|
|
//============================================================
|
|
|
|
prontera,157,181,6 script Time Sample 105,{
|
|
mes "[Time Sample]";
|
|
mes "System Tick : " + gettimetick(0);
|
|
mes " Time Tick : " + gettimetick(1);
|
|
mes " Unix Tick : " + gettimetick(2);
|
|
mes " GetTime(DT_SECOND) : " + gettime(DT_SECOND) + " (Sec)";
|
|
mes " GetTime(DT_MINUTE) : " + gettime(DT_MINUTE) + " (Min)";
|
|
mes " GetTime(DT_HOUR) : " + gettime(DT_HOUR) + " (Hour)";
|
|
mes " GetTime(DT_DAYOFWEEK) : " + gettime(DT_DAYOFWEEK) + " (Day of week)";
|
|
mes " GetTime(DT_DAYOFMONTH) : " + gettime(DT_DAYOFMONTH) + " (Day of month)";
|
|
mes " GetTime(DT_MONTH) : " + gettime(DT_MONTH) + " (Month)";
|
|
mes " GetTime(DT_YEAR) : " + gettime(DT_YEAR) + " (Year)";
|
|
mes " GetTime(DT_DAYOFYEAR) : " + gettime(DT_DAYOFYEAR) + " (Day of year)";
|
|
mes " GetTimeStr : " + gettimestr("%Y-%m/%d %H:%M:%S",19);
|
|
close;
|
|
}
|