Thank you!! i will try it ASAP!Try this one (untested)
- script night_invader -1,{OnInit: if (isday()) donpcevent strcharinfo(3)+"::OnDay"; else donpcevent strcharinfo(3)+"::OnNight"; sleep 10*1000; // Checking every 10 seconds donpcevent strcharinfo(3)+"::OnInit"; end;OnDay: if (.mobout) { announce "The day rises and monsters start to stop invading Prontera.",bc_all; killmonster "prontera",strnpcinfo(3)+"::OnInvasionMobsDead"; set .mobout, 0; } end;OnNight: if (!.mobout){ // Summon your monsters here, by using the monster script command. Make sure that the event label is strnpcinfo(3)+"::OnInvasionMobsDead". // Summon example with 30 orc zombies (ID 1153): monster "prontera",0,0,"--ja--",1153,30,strnpcinfo(3)+"::OnInvasionMobDead"; announce "The night rises and monsters start to attack Prontera!",bc_all; set .mobout, 1; } end;OnInvasionMobDead: if (isnight()) monster "prontera",0,0,"--ja--",1153,1,strnpcinfo(3)+"::OnInvasionMobDead"; // We simply artificially respawn them. end;} If you want to spawn more than one kind of monster and they all be respawning, your script will be a bit more complicated.
For best perfomance of the NPC you should add OnDay and/or OnNight labels to trigger via the src, but this one is still OK.
im having a problem running it, this one appearsjaBote, on 02 Aug 2013 - 21:07, said:
Try this one (untested)
- script night_invader -1,{OnInit: if (isday()) donpcevent strcharinfo(3)+"::OnDay"; else donpcevent strcharinfo(3)+"::OnNight"; sleep 10*1000; // Checking every 10 seconds donpcevent strcharinfo(3)+"::OnInit"; end;OnDay: if (.mobout) { announce "The day rises and monsters start to stop invading Prontera.",bc_all; killmonster "prontera",strnpcinfo(3)+"::OnInvasionMobsDead"; set .mobout, 0; } end;OnNight: if (!.mobout){ // Summon your monsters here, by using the monster script command. Make sure that the event label is strnpcinfo(3)+"::OnInvasionMobsDead". // Summon example with 30 orc zombies (ID 1153): monster "prontera",0,0,"--ja--",1153,30,strnpcinfo(3)+"::OnInvasionMobDead"; announce "The night rises and monsters start to attack Prontera!",bc_all; set .mobout, 1; } end;OnInvasionMobDead: if (isnight()) monster "prontera",0,0,"--ja--",1153,1,strnpcinfo(3)+"::OnInvasionMobDead"; // We simply artificially respawn them. end;} If you want to spawn more than one kind of monster and they all be respawning, your script will be a bit more complicated.
For best perfomance of the NPC you should add OnDay and/or OnNight labels to trigger via the src, but this one is still OK.
lol! I tried it now and it works, but the ting is when day, the monster still stays on the map, how can i make them go away when day come?LoL change all instances of strcharinfo(3) to strnpcinfo(3). Edited on the first reply.
Sorry for the mistake. It should work now I think.
- script night_invader -1,{OnInit: if (isday()) donpcevent strnpcinfo(3)+"::OnDay"; else donpcevent strnpcinfo(3)+"::OnNight"; sleep 10*1000; // Checking every 10 seconds donpcevent strnpcinfo(3)+"::OnInit"; end;OnDay: if (.mobout) { announce "The day rises and monsters start to stop invading Prontera.",bc_all; killmonster "prontera",strnpcinfo(3)+"::OnInvasionMobDead"; set .mobout, 0; } end;OnNight: if (!.mobout){ // Summon your monsters here, by using the monster script command. Make sure that the event label is strnpcinfo(3)+"::OnInvasionMobsDead". // Summon example with 30 orc zombies (ID 1153): monster "prontera",0,0,"--ja--",1153,30,strnpcinfo(3)+"::OnInvasionMobDead"; announce "The night rises and monsters start to attack Prontera!",bc_all; set .mobout, 1; } end;OnInvasionMobDead: if (isnight()) monster "prontera",0,0,"--ja--",1153,1,strnpcinfo(3)+"::OnInvasionMobDead"; // We simply artificially respawn them. end;}
We use essential cookies to make this site work, and optional cookies to enhance your experience.