agreed!
function isLeapYear {
set .@year, getarg(0);
return ( .@year%4 == 0 && (.@year%100 != 0 || .@year%400 == 0) );
}
@Xtremist: here's what I have so far
- script DoubleExp_Last3days -1,{
function getDaysOfMonth;
function isLeapYear;
OnInit:
OnClock0000: // every day, check if it's the last 3 days
if (gettime(5) == 1) {
// if it's the 1st of the month, end the event
} else if (gettime(5) >= (getDaysOfMonth() -3)) {
// start the Double Exp event
}
end;
function getDaysOfMonth {
switch (gettime(6)) {
case 2: // February
set .@days, isLeapYear(gettime(7)) ? 29 : 28;
break;
case 9: // September
case 4: // April
case 6: // June
case 11: // November
set .@days, 30;
break;
default:
set .@days, 31;
break;
}
return .@days;
}
function isLeapYear {
set .@year, getarg(0);
return ( .@year%4 == 0 && (.@year%100 != 0 || .@year%400 == 0) );
}
}
How do you want the Double Exp to work?
1. the script uses 'setbattleflag' then @reloadmobdb (like the /npc/custom/floating_rates.txt example)
2. OR use sc_start SC_EXPBOOST on every player?