Updated custom mushroom script (#3202)
* Slight edits of custom Mushroom Event - changed the monster count variable to mobcount script command - changed killmonster label to only kill the mushrooms of the event
This commit is contained in:
parent
967f28ed00
commit
006efe11ed
@ -16,47 +16,58 @@
|
|||||||
|
|
||||||
prontera,142,228,6 script Find the Mushroom 1084,{
|
prontera,142,228,6 script Find the Mushroom 1084,{
|
||||||
mes "[ Find The Mushroom ]";
|
mes "[ Find The Mushroom ]";
|
||||||
if (!.Status)
|
if (.status == 1) {
|
||||||
mes "There is no event at the moment!";
|
.@count = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
|
||||||
else {
|
if (.@count > 0) {
|
||||||
mes "There are "+.Spawn+" Mushrooms left in "+.Map$+"!";
|
mes "There are " + .@count + " Mushrooms left in " + .event_map$ + "!";
|
||||||
mes "Find and kill the mushrooms to gain "+getitemname(.Prize)+"!";
|
mes "Find and kill the mushrooms to gain " + getitemname(.prize) + "!";
|
||||||
|
close;
|
||||||
}
|
}
|
||||||
if (.Status || getgmlevel() < .GM) close;
|
.event_map$ = "";
|
||||||
|
.status = 0;
|
||||||
|
mes "All the mushrooms are killed?";
|
||||||
|
}
|
||||||
|
mes "There is no event at the moment!";
|
||||||
|
if (.status || getgmlevel() < .GM) close;
|
||||||
mes "Start the event?";
|
mes "Start the event?";
|
||||||
next;
|
next;
|
||||||
if(select("- No:- Yes") == 1) close;
|
if (select("- No:- Yes") == 1) close;
|
||||||
donpcevent strnpcinfo(0)+"::OnMinute10";
|
donpcevent strnpcinfo(0) + "::OnMinute10";
|
||||||
mes "[ Find The Mushroom ]";
|
mes "[ Find The Mushroom ]";
|
||||||
mes "Event started!";
|
mes "Event started!";
|
||||||
close;
|
close;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
set .Prize,512; // Reward item ID
|
.prize = 512; // Reward item ID
|
||||||
set .Amount,10; // Reward item amount
|
.amount = 10; // Reward item amount
|
||||||
set .GM,60; // GM level required to access NPC
|
.GM = 60; // GM level required to access NPC
|
||||||
setarray .Maps$[0],"izlude","geffen","morocc","prontera"; // Possible maps
|
setarray .maps_list$[0],"izlude","geffen","morocc","prontera"; // Possible maps
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnMinute10: // Start time (every hour)
|
OnMinute10: // Start time (every hour)
|
||||||
if (.Status) end;
|
if (.status) end;
|
||||||
set .Status,1;
|
.status = 1;
|
||||||
set .Spawn,rand(1,10); // How many Mushrooms should spawn?
|
.@spawn = rand(1,10); // How many Mushrooms should spawn?
|
||||||
set .Map$,.Maps$[rand(getarraysize(.Maps$))];
|
.event_map$ = .maps_list$[ rand(getarraysize(.maps_list$)) ];
|
||||||
killmonster .Map$,"All";
|
.@label$ = strnpcinfo(0) + "::OnMobKilled";
|
||||||
monster .Map$,0,0,"Please don't kill me!",1084,.Spawn,strnpcinfo(0)+"::OnMobKilled";
|
killmonster .event_map$, .@label$;
|
||||||
announce "Find the Mushroom : Total of "+.Spawn+" Mushrooms have been spawned in "+.Map$+"!",0;
|
monster .event_map$,0,0,"Please don't kill me!",1084,.@spawn, .@label$;
|
||||||
|
announce "Find the Mushroom : Total of " + .@spawn + " Mushrooms have been spawned in " + .event_map$ + "!",0;
|
||||||
sleep 2500;
|
sleep 2500;
|
||||||
announce "Find the Mushroom : Every Mushroom you kill will give you "+getitemname(.Prize)+"!",0;
|
announce "Find the Mushroom : Every Mushroom you kill will give you " + getitemname(.prize) + "!",0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnMobKilled:
|
OnMobKilled:
|
||||||
set .Spawn, .Spawn - 1;
|
if (playerattached() == 0)
|
||||||
getitem .Prize, .Amount;
|
end;
|
||||||
if (.Spawn) announce "[ "+strcharinfo(0)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
|
getitem .prize, .amount;
|
||||||
|
.@spawn = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
|
||||||
|
if (.@spawn > 0)
|
||||||
|
announce "[ " + strcharinfo(0) + " ] has killed a Mushroom. There are now " + .@spawn + " Mushroom(s) left.",bc_map;
|
||||||
else {
|
else {
|
||||||
announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
|
announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
|
||||||
set .Status,0;
|
.status = 0;
|
||||||
|
.event_map$ = "";
|
||||||
}
|
}
|
||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user