- script TownInvasion -1,{
OnClock0100:
OnClock0500:
OnClock1033:
OnClock1300:
OnClock1700:
OnClock2100:
for(.@i = 0; .@i < 1; .@i++) { //Spawn on 4 towns
.Town_Invade$ = .Town$[rand(getarraysize(.Town$))];
announce Guardia de .Town_Invade$+": ¡Ayuda! nos han invadido",bc_blue|bc_all;
for(.@ix = 0; .@ix < 1; .@ix++) { //MvP spawner
monster .Town_Invade$,0,0,"--ja--",.MvP[rand(getarraysize(.MvP))],1,strnpcinfo(1)+"::OnInvadeDeath";
}
for(.@iy = 0; .@iy < 400; .@iy++) { //Mob spawner
monster .Town_Invade$,0,0,"--ja--",-1,1,strnpcinfo(1)+"::OnMobsDeath";
}
}
end;
OnInvadeDeath:
.@RandMvP = rand(getarraysize(.Prize));
getitem .Prize[.@RandMvP],.PAmt[.@RandMvP];
end;
OnMobsDeath:
.@RandMob = rand(getarraysize(.Prize2));
getitem .Prize2[.@RandMob],.PAmt2[.@RandMob];
end;
OnInit:
//Towns to Invade
setarray .Town$[0],"prontera","izlude","geffen","payon","alberta","aldebaran","yuno","lighthalzen","einbroch","einbech","comodo","umbala","amatsu","gonryun","ayothaya","louyang","hugel","rachel","veins";
//MvPs to summon
setarray .MvP[0],1630,1885,1389,1583,1418;
//Prize to give MVP
setarray .Prize[0],604,607,608,501,502,503,504,505,506,507,508,509,510,511,512;
setarray .PAmt[0],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
//Prize to give Mobs
setarray .Prize2[0],604,607,608,501,502,503,504,505,506,507,508,509,510,511,512;
setarray .PAmt2[0],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
end;
}
if(gettime(3) % 2 == 1 && !agitcheck() && !agitcheck2()) - This line checked if your script met the conditions before starting it.
Breaking it down one by one;
if(gettime(3) % 2 == 1 -> If the HOUR is ODD (1,3,5,7,9,etc).
&& !agitcheck() -> If WoE is currently off.
&& !agitcheck2() -> If WoE:SE is currently off.
If any of the above checks didn't meet the condition, your script wont start.