I had left this topic in my open tabs (todo)!
I'll post the version I was working on soon.
1. make sure your settings in trunk/conf/battle/misc.conf are like this:
night_at_start: no
day_duration: 0
night_duration: 0
2. then add this script (see adding a Script)
- script night_mobs -1,{
OnInit:
// Spawn nightmare mobs on which maps?
setarray .maps[0], "prontera","morocc","payon";
OnMinute00:
if (gettime(3)%2 == 0) { // hours: 00, 02, 04, ... (even hours)
if (isnight()) {
day;
announce "The sun is rising.", bc_all;
for (set .@i,0; .@i<getarraysize(.maps); set .@i,.@i+1)
killmonster .maps[.@i], strnpcinfo(3)+"::OnZombieDead";
}
} else if (gettime(3)%2 == 1) { // hours: 01, 03, 05, ... (odd hours)
if (isday()) {
night;
announce "Night has fallen... beware of the undead!", bc_all|bc_blue;
for (set .@i,0; .@i<getarraysize(.maps); set .@i,.@i+1)
monster .maps[.@i],0,0, "Nightmare",1427,30, strnpcinfo(3)+"::OnZombieDead";
}
}
end;
OnZombieDead:
// open 1 Old Purple Box
getrandgroupitem IG_VioletBox,1;
// 2% chance to get Ygg Berry
if (rand(100) < 2) getitem 607,1; // Yggdrasil Berry
// spawn a new mob each time one is killed?
// Delete the next line to have mobs stay dead until the next night cycle.
monster "this",0,0, "Nightmare",1427,1, strnpcinfo(3)+"::OnZombieDead";
end;
}