Before anything else, here's the script I want to edit.
- script respawnMvp -1,{OnInit:
setarray .mob_id[0],1511;set.size, getarraysize(.mob_id);set.random, rand(.size);set.amount,1;// amount of monster spawnedset.monster,.mob_id[.random];
end;OnMinute00:OnMinute01:OnMinute02:OnMinute03:OnMinute04:OnMinute05:OnMinute06:OnMinute07:OnMinute08:OnMinute09:OnMinute10:OnMinute11:OnMinute12:OnMinute13:OnMinute14:OnMinute15:OnMinute16:OnMinute17:OnMinute18:OnMinute19:OnMinute20:OnMinute21:OnMinute22:OnMinute23:OnMinute24:OnMinute25:OnMinute26:OnMinute27:OnMinute28:OnMinute29:OnMinute30:OnMinute31:OnMinute32:OnMinute33:OnMinute34:OnMinute35:OnMinute36:OnMinute37:OnMinute38:OnMinute39:OnMinute40:OnMinute41:OnMinute42:OnMinute43:OnMinute44:OnMinute45:OnMinute46:OnMinute47:OnMinute48:OnMinute49:OnMinute50:OnMinute51:OnMinute52:OnMinute53:OnMinute54:OnMinute55:OnMinute56:OnMinute57:OnMinute58:OnMinute59:
monster "prontera",154,172,getmonsterinfo(.monster,0),.monster,.amount,strnpcinfo(0)+"::OnKill";
announce "O MVP "+getmonsterinfo(.monster,0)+" acabou de nascer!",0;
end;OnKill:
announce "O MVP "+getmonsterinfo(.monster,0)+" foi eliminado "+(Sex?"pelo":"pela")+" "+(Sex?"jogador":"jogadora")+" "+strcharinfo(0)+".",0;
end;}
How does it work?
The script will spawn a random MVP in "prontera 154 172" every minute, such MVPs are stored in an array called .mob_id[0]. The only MVP right now for testing purposes is Amon Ra(1511). When the MVP is spawned, it will show a global message: MPV Amon Ra has been spawned in prontera. Also, when the MVP is killed, it will show the following message: Amon Ra has been killed. It spawns only 1 MVP at a time.
What am I looking for?
I don't want the script to spawn a new MVP every minute when the previous one is still alive.
Case:
If Amon Ra has been spawned, it will only spawn a new Amon Ra when the previous one has been killed. It will keep checking every minute to see if the current Amon Ra(or any MVP in .mob_id[0] array) is alive. If the current MVP is alive, it will spawn a new one, if not, it will hold until the current one is dead.
What have I tried already?
I was checking the MVPs in LHZ_DUN03, but I couldn't understand how they work. A new MVP in lhz_dun03 only spawn after the current MVP is dead.
Also, I was checking how the MVP in other maps works, but they're just using the declaration boss_monster. I've tried to add it to the script above, but I got an error. I changed:
Question
Syon
Hello rAthena Community,
Before anything else, here's the script I want to edit.
How does it work?
The script will spawn a random MVP in "prontera 154 172" every minute, such MVPs are stored in an array called .mob_id[0]. The only MVP right now for testing purposes is Amon Ra(1511). When the MVP is spawned, it will show a global message: MPV Amon Ra has been spawned in prontera. Also, when the MVP is killed, it will show the following message: Amon Ra has been killed. It spawns only 1 MVP at a time.
What am I looking for?
I don't want the script to spawn a new MVP every minute when the previous one is still alive.
Case:
If Amon Ra has been spawned, it will only spawn a new Amon Ra when the previous one has been killed. It will keep checking every minute to see if the current Amon Ra(or any MVP in .mob_id[0] array) is alive. If the current MVP is alive, it will spawn a new one, if not, it will hold until the current one is dead.
What have I tried already?
I was checking the MVPs in LHZ_DUN03, but I couldn't understand how they work. A new MVP in lhz_dun03 only spawn after the current MVP is dead.
Also, I was checking how the MVP in other maps works, but they're just using the declaration boss_monster. I've tried to add it to the script above, but I got an error. I changed:
monster "prontera",154,172,getmonsterinfo(.monster, 0),.monster,.amount,strnpcinfo(0)+ "::OnKill";
to
boss_monster "prontera",154,172,getmonsterinfo(.monster, 0),.monster,.amount,strnpcinfo(0)+ "::OnKill";
Thanks,
respawn-mvp.txt
Edited by Elano5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.