Jump to content
  • 0

Npc Spawn and respawn Mobs


badneko

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   1
  • Joined:  06/09/14
  • Last Seen:  

HI!

Im trying to get a npc how spawn mobs for a event.

But also resapwn they when die with no delay.

 

so this the idea:

1- talk to npc, the npc spawn the mobs in 2 maps at the same time.

When mobs a mob died, respawn it without delay.

 

after the event ends

 

2-Talk to the npc, and finish the spawn and respawn.

 

Im trying to modify the cool WhiteEagle script.

 

 

//===== eAthena Script =======================================

//= Monster Spawn Event
//===== By ===================================================
//= WhiteEagle
//===== Version ==============================================
//= 1.0
//============================================================
- script MSE -1,{
 
set .gm,99; // GM Level
 
OnWhisperGlobal:
if(getgmlevel() >= .gm) {
if (.mob_left) {
mes "^FF0000[Monsterspawn Event CP]^000000";
mes "The Monsterspawn Event is already in progress!";
mes "Would you stop it?";
switch(select("Yes:No")){
case 1:
close2;
goto OnStop2;
case 2:
close;
}
}
mes "^FF0000[Monsterspawn Event CP]^000000";
mes "This is the Control Panel for the Monster Spawn Event.";
mes "How can I help you?";
next;
switch(select("Start:Stop:Cancel")){
 
case 1:
mes "^FF0000[Monsterspawn Event CP]^000000";
mes "The Monster Spawn Event will now start.";
close2;
goto OnStart;
 
case 2:
 
case 3:
close;
}
}
close;
 
OnStart:
donpcevent "MSE::OnTimer1800000";
set (.mobid,1002); //Monster ID
set (.mobname$,"EventMonster"); //Monster Name
set (.moba,500); //Monster Anzahl
set .@rand,rand(1,2);
if (.@rand == 1) set .map$,"prontera";
if (.@rand == 2) set .map$,"izlude";
sleep2 1000;
announce ("[Monsterspawn Event]: "+.moba+" "+.mobname$+" spawn at "+.map$+"",bc_all);
monster(.map$,0,0,.mobname$,.mobid,.moba,"MSE::OnMyMobDead");
set .mob_left,.moba;
sleep2 1798000;
donpcevent "MSE::OnTimer1800000";
end;
 
OnTimer1800000:
killmonster .map$,"MSE::OnMyMobDead";
set .mob_left,0;
end;
 
OnStop2:
killmonster .map$,"MSE::OnMyMobDead";
announce "The Event was stopped by an Admin.",bc_all;
set .mob_left,0;
end;
 
OnStop:
sleep2 2000;
announce "The Event start every half and full hour.",bc_all;
end;
 
OnMyMobDead:
set .mob_left,.mob_left-1;
if (.mob_left == 0) {
               announce "[Monsterspawn Event]: "+strcharinfo(0)+" has killed the last "+.mobname$+".",bc_all;
               donpcevent "MSE::OnStop";
        } else {
               announce "["+.mob_left+"/"+.moba+"] "+.mobname$+" left.",bc_all;
        }
        end;
}
 
 
 
Edited by badneko
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...