Jump to content
  • 0

Need Auto Stop


Lenya

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  01/25/13
  • Last Seen:  

Hi,

 

I need a auto Stop for this "Find the Mushroom" Event. Mushrooms will be spawned in a random town. But mostly the players can't find all mushrooms. And the Event only finish if every mushroom is killed.

 

Now I want to make a auto event finish script. It should end 30 minutes after the Mushroom event start.

 

But I need our help.

 

Here is the ittle script :=}

 

prt_vilg,122,128,5	script	Mushroom	1084,{
mes "[ Find The Mushroom ]";
if (!.Status)
mes "Im moment ist kein Event!";
else {
mes "Es sind "+.Spawn+" Mushrooms übrig "+.Map$+"!";
mes "Finde und töte die mushrooms um "+getitemname(.Prize)+" zu gewinnen!";
}
if (.Status || getgmlevel() < .GM) close;
mes "Event starten?";
next;
if(select("- Nein:- Ja") == 1) close;
donpcevent strnpcinfo(0)+"::OnMinute10";
mes "[ Find The Mushroom ]";
mes "Event wurde gestartet!";
close;

OnInit:
set .Prize,7539; // Reward item ID
set .Amount,1; // Reward item amount
set .GM,99; // GM level required to access NPC
setarray .Maps$[0],"morocc","prt_vilg","prontera","aldebaran"; // Possible maps
end;

OnMinute10: // Start time (every hour)
if (.Status) end;
set .Status,1;
set .Spawn,rand(4,8); // How many Mushrooms should spawn?
set .Map$,.Maps$[rand(getarraysize(.Maps$))];
killmonster .Map$,"All";
monster .Map$,0,0,"Töte mich!",1084,.Spawn,strnpcinfo(0)+"::OnMobKilled";
announce "Finde den Mushroom : Es wurdem insgesamt "+.Spawn+" Mushrooms in "+.Map$+" gespawnt!",0;
sleep 2500;
announce "Finde den Mushroom : Für jeden Mushroom, den du tötest erhälst du einen "+getitemname(.Prize)+"!",0;
end;

OnMobKilled:
set .Spawn, .Spawn - 1;
getitem .Prize, .Amount;
if (.Spawn) announce "[ "+strcharinfo(0)+" ] hat einen Mushroom getötet. Es sind noch "+.Spawn+" Mushroom(s) übrig.",bc_map;
else {
announce "Das The Find the Mushroom Event ist zu ende. Alle Mushrooms wurden getötet.",0;
set .Status,0;
}
end;
}

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

try this my edit. :P

FindTheMushroom.txt

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Add another label, +30 min from start.

OnMinute40:
killmonster .Map$,"All";
set .Status,0;
end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  01/25/13
  • Last Seen:  

Thank you both. I used the first post :3

Link to comment
Share on other sites

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...