Jump to content
  • 0
Sign in to follow this  
- Mariel

Stalao's Auto Event

Question

How to fix this error ?

[Error]: npc_enable: Attempted to hide a non-existing NPC 'PvpEventPrize' (flag=0).[Error]: npc_enable: Attempted to hide a non-existing NPC 'ZombiePrize' (flag=0).[Error]: npc_enable: Attempted to hide a non-existing NPC '1234-Prize' (flag=0).[Error]: npc_enable: Attempted to hide a non-existing NPC 'MazePrize' (flag=0).[Error]: npc_enable: Attempted to hide a non-existing NPC 'ManhuntPrize' (flag=0).[Error]: npc_read_event_script: detected possible use of wrong case in a script. Found '::OnPCLogOutEvent', probably meant to be '::OnPCLogoutEvent' (in 'OnPCLogoutEvent').

 

post-442-0-72080500-1424414273_thumb.png

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

 

How to fix this error ?

[Error]: npc_enable: Attempted to hide a non-existing NPC 'PvpEventPrize' (flag=0).[Error]: npc_enable: Attempted to hide a non-existing NPC 'ZombiePrize' (flag=0).[Error]: npc_enable: Attempted to hide a non-existing NPC '1234-Prize' (flag=0).[Error]: npc_enable: Attempted to hide a non-existing NPC 'MazePrize' (flag=0).[Error]: npc_enable: Attempted to hide a non-existing NPC 'ManhuntPrize' (flag=0).[Error]: npc_read_event_script: detected possible use of wrong case in a script. Found '::OnPCLogOutEvent', probably meant to be '::OnPCLogoutEvent' (in 'OnPCLogoutEvent').

I tried giving NPCs unique name but still, it can't be disabled. 

Share this post


Link to post
Share on other sites
  • 0

@- Mariel thanks really appreciate ! waiting for you. hehe

Here !

 

//===== EinherjarRO Scripts ==================================

//= Auto-Event System

//===== By: ==================================================

//= Stolao

//===== Current Version: =====================================

//= 1.5C

//===== Compatible With: =====================================

//= rAthena SVN

//===== Description: =========================================

//= Will Automatically pick one event from the events in its

//= list every hour and run it. Giving out an Item and

//= Announcing the Winner.

//=

//= Manhunt event origionally a release by stydianx

//= from http://rathena.org/board/topic/83791-man-hunt-event/

//===== Uses: ================================================

//= The Maze event is held on a custom map, you will need to install

//===== Comments: ============================================

//= [stolao]

//= Optimize

//= Add more events

//= Spell Check

//= Make customisable in game by gm

//= Make "Zeny" changable for Points

//= Add a Shop

//= Add a vote for event option

//= Add Events Lucky Pick, DB Event, MVP Arena, Invasion, Ragnarok Training

//===== Additional Comments: =================================

//= 1.00 -> 1.4B See Chagelogs on forums

//= 1.4C Fixed an extra '{' added by mistake

//= 1.4D Condenced @$MobsUsed + @$MobsRate -> @$Mobs

//= 1.4E Removed Unessisare stopnpctimer (from pre 1.0F)

//= 1.4F Added Poring Event

//= 1.50 Optimized PVP and Maze a little

//= 1.51 Added $@SpecialConditions Check for all events on initiation (future in game gm config)

//= 1.52 Fixed Time Remaining Countdown, was dispalying +1 min off

//= 1.53 Replace 99_pvp for pvp_n_1-5, bug on my client

//= 1.54 Replaced areawards with mapwarp when suitable

//= 1.55 Added mapwarp to initiation of scripts

//= 1.56 Fixed a bug in Poring, not summoning wrong Poring

//= 1.57 Changed $@CurrentEvent -1 -> -1*$@CurrentEvent after start of event

//= 1.58 Added $@Conditions&2 (precentheal 100,100) to PvPEvent

//= 1.59 Added Manhunt Event

//= 1.5A Fixed bug with Manhunt Target being killable after event still

//= 1.5B Fixed a bug with storeall and item check -[Thanks Digos]

//= 1.5C Fixed a hang screen in ( $@Cost[0] && $@Cost[1] ) -[Thanks Digos]

//===== Contact Ifo: =========================================

//= [stolao]

//= Email: [email protected]

//============================================================

 

- script Event_Management -1,{

OnWhisperGlobal:

mes "[Event Management]";

if(getgroupid() >= 60) {

mes "What would you like to do?";

menu "Join Event",-,"RunEvent",OnRunEvent;

} else {

mes "Would you like to try and Join the event?";

if(select("Yes:No") > 1) close;

}

next;

OnJoinEvent:

mes "[Event Management]";

if($@CurrentEvent <= 0 ){ mes "No events to join at the moment."; close;

} else {

mes "This is a "+$@Eventname$+" Event for "+(($@ReqJob >= 0)?jobname($@ReqJob):"Players")+" between Levels "+$@LvReq[0]+"/"+$@LvReq[1]+" and "+$@LvReq[2]+"/"+$@LvReq[3]+"";

if($@Players[0]) mes "Must be at least "+$@Players[0]+" players for event to take place";

if($@Cost[0] > 0 && $@Cost[1] > 0) mes "You will also need "+$@Cost[1]+" "+getitemname($@Cost[0])+" to join.";

if($@Cost[2] > 0) mes "You will also need "+$@Cost[2]+"z to join.";

mes "Would you like to Join?";

if(select("No:Yes") == 1){

mes "Ok come back later";

close;

} else if(BaseLevel < $@LvReq[0] || JobLevel < $@LvReq[1] || BaseLevel > $@LvReq[2] || JobLevel > $@LvReq[3] || ($@ReqJob >= 0 && BaseClass != $@ReqJob)){

mes "Sorry this is an Event for "+(($@ReqJob >= 0)?jobname($@ReqJob):"Players")+" between Levels "+$@LvReq[0]+"/"+$@LvReq[1]+" and "+$@LvReq[2]+"/"+$@LvReq[3]+"";

close;

} else if ( $@Cost[0] && $@Cost[1] && (countitem($@Cost[0]) < $@Cost[1]) ) {

if(countitem($@Cost[0]) < $@Cost[1]){

mes "Sorry but, You will need "+$@Cost[1]+" "+getitemname($@Cost[0])+" to join.";

close;

}

} else if($@Cost[2] > Zeny){

mes "Sorry but, You will need "+$@Cost[2]+"z to join.";

close;

} else if($@Players[1] && getmapusers($@Map$) >= $@Players[1]){

mes "Sorry event is full, try again next time.";

close;

} else {

if($@Conditions & 1) sc_end SC_ALL;

if($@Conditions & 2) percentheal 100,100;

if($@Conditions & 4) sc_start SC_DECREASEAGI,300000+$@MaxTime*60000,10;

if(($@Conditions & 16) && getarraysize($@PlayerIDList) < $@Players[1]){

set $@PlayerNameList$[$@SaveChars[1]],strcharinfo(0);

set $@SaveChars[1],$@SaveChars[1]+1;

}

if($@Cost[0] && $@Cost[1]){ delitem $@Cost[0],$@Cost[1]; set $@Pool[0],$@Pool[0]+$@Cost[1]; }

if($@Cost[2]){ set Zeny,Zeny-$@Cost[2]; set $@Pool[1],$@Pool[1]+$@Cost[2]; }

if($@Conditions & 8) atcommand "@storeall";

warp $@Map$,$@XY[0],$@XY[1];

}

}

end;

OnRunEvent:

mes "[Event Management]";

if($@CurrentEvent){ mes "Sorry an event is already running"; close;

} else if(agitcheck()||agitcheck2()){ mes "Sorry cannot run event during woe"; end;

} else {

mes "Ok boss what event should we run today?";

switch(select("PVP:Zombie:Dice:Maze::Poring::::Man-Hunt")){

case 1:

if(getgroupid()<60) delitem 26504,1;

close2;

detachrid;

callfunc("CleanEvents");

callfunc("PvpEventRUN");

break;

case 2:

if(getgroupid()<60) delitem 26504,1;

close2;

detachrid;

callfunc("CleanEvents");

callfunc("ZombieRUN");

break;

case 3:

if(getgroupid()<60) delitem 26504,1;

close2;

detachrid;

callfunc("CleanEvents");

callfunc("1234RUN");

break;

case 4:

if(getgroupid()<60) delitem 26504,1;

close2;

detachrid;

callfunc("CleanEvents");

callfunc("MazeRUN");

break;

case 6:

if(getgroupid()<60) delitem 26504,1;

close2;

detachrid;

callfunc("CleanEvents");

callfunc("PoringRUN");

break;

case 10:

if(getgroupid()<60) delitem 26504,1;

close2;

detachrid;

callfunc("CleanEvents");

callfunc("ManHuntRUN");

break;

default: break;

}

}

end;

OnMinute55:

if(agitcheck()||agitcheck2()) end;

callfunc("CleanEvents");

switch(rand(1,4)){

case 1: callfunc("1234RUN"); break;

case 2: callfunc("ZombieRUN"); break;

case 3: callfunc("PvpEventRUN"); break;

case 4: callfunc("MazeRUN"); break;

case 5: //Invasion break; //save old_morocc from satan morroc

case 6: callfunc("PoringRUN"); break;

case 7: //Mvp Arena break; //Summons a random mvps and turns pvp on

case 8: //Rag-narok training break; //Summons a random mvps (no drops) from list continuesly with pvp on, res and gives buffs to all after and prize last man standing

case 9: //X-O quiz_01 140 277 break; //like 1234 but just 2 squares

case 10://Manhunt break; //Someone elses event

case 11://lucky Pick break; //pick one person who enters map and gives them a prize

case 12://DB event break: //Auto summons monsters from dead branches (pvp on)

}

end;

OnInit:

bindatcmd("joinevent","Event_Management::OnJoinEvent",0,99);

bindatcmd("runevent","Event_Management::OnRunEvent",60,99);

set $@CurrentEvent,0;

end;

}

 

function script CleanEvents {

set $@ReturnMap$[0],"invek";

setarray $@ReturnXY[0],146,166;

set $@SpecialConditions,0;

set $@Eventname$,"";

setarray $@Map$,"invek";

setarray $@XY[0],146,166;

setarray $@LvReq[0],0,0,5000,5000;

set $@ReqJob,-1;

setarray $@Prizes[0],0,0,0;

setarray $@Cost[0],0,0,0;

setarray $@PrizePool[0],0,0;

setarray $@Pool[0],0,0;

setarray $@PrizeMap$,"";

set $@JobGroup,0;

setarray $@PrizeXY[0],0,0;

set $@Conditions,0;

setarray $@Players[0],0,0;

set $@MaxTime,0;

set $@Winers,0;

setarray $@OOB[0],0,0,0,0;

setarray $@StairsX[0],0,0,0,0,0,0,0,0;

setarray $@StairsY[0],0,0;

setarray $@Box1[0],0,0;

setarray $@Box2[0],0,0;

setarray $@Box3[0],0,0;

setarray $@Box4[0],0,0;

setarray $@BoxY[0],0,0;

cleararray $@Mobs[0],0,127;

setarray $@SaveChars,0,0;

set $@Target,-1;

cleararray $@PlayerNameList$[0],0,127;

set $@CurrentEvent,0;

set $@ReturnMap$[0],"invek"; //Map Warped to after Events

setarray $@ReturnXY[0],146,166; //X, Y Warped to after Events

return;

}

 

//========================= Running Event ===============================

 

function script ZombieRUN {

if($@CurrentEvent||agitcheck()||agitcheck2()){ end; }

if(!$@SpecialConditions){

set $@Eventname$,"Zombie Survival";

set $@CurrentEvent,1;

setarray $@Map$,"1@zombie"; //Zombie Event Map

setarray $@Players[0],2,0; //Min,Max Players

setarray $@XY[0],0,0; //Zombie Event X, Y

setarray $@LvReq[0],0,0,10,10; //Max Base,Job Levels for Zombies

set $@ReqJob,0; //Base Job Required to Play

set $@MaxTime,10; //Zombie Waves Times (Suggest Less then 50)

setarray $@Mobs,1394,50,1423,30,1298,10; //MobID,Amount Per Wave

setarray $@PrizeMap$,"1@zombie"; //Zombie Prize Map

setarray $@PrizeXY,175,120; //Zombie Prize X, Y

setarray $@Prizes,14001,10,50000; //Prize - Item, Amount, Zeny

setarray $@Cost,0,0,1000; //Join Cost - Item, Amount, Zeny

setarray $@PrizePool,0,0; //100 = 1% Prizes pooled from players - Items, Zeny

set $@Conditions,1|2|8; //Bitwise

//1 sc_end SC_ALL;

//2 percentheal 100,100;

//4 sc_start SC_DECREASEAGI,300000+$@MaxTime*60000,10;

//8 atcommand "@storeall";

}

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

disablenpc "ZombiePrize";

for(set .@i,2; .@i > 0; set .@i,.@i-1){

announce ""+$@Eventname$+" Event Will begin in "+.@i+" Mins!",8;

announce "Please type @joinevent to join",8;

sleep 60000;

}

announce ""+$@Eventname$+" Event Has Begun!",8;

set $@CurrentEvent,$@CurrentEvent*-1;

if(getmapusers($@Map$)<$@Players[0]){

mapannounce $@Map$,"Sorry there are not enough players for this event to take place",8;

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

set $@CurrentEvent,0;

end;

} else {

sleep 25000;

monster $@Map$,$@PrizeXY[0],$@PrizeXY[1],"--ja--",1394,10,"ZombiePrize::OnKillZombie";

for(set .@@Wave,0; .@@Wave < $@MaxTime; set .@@Wave,.@@Wave+1){

if(.@@Wave < $@MaxTime){ mapannounce $@Map$,"Wave "+.@@Wave+"!",8;

} else { mapannounce $@Map$,"FIANL WAVE!",8; }

sleep 1000;

for(set .@i,5; .@i > 0; set .@i,.@i-1){

mapannounce $@Map$,""+.@i+"...",8;

sleep 1000;

}

mapannounce $@Map$,"Begin Wave!",8;

for(set .@i,0; (.@i < getarraysize($@Mobs)); set .@i,.@i+2){

monster $@Map$,0,0,"--ja--",$@Mobs[.@i],.@@Wave*$@Mob[.@i+1],"ZombiePrize::OnKillZombie";

}

if(!getmapusers($@Map$)){ set .@@Wave,$@MaxTime+.@@Wave;

} else {

mapannounce $@Map$,"There are "+getmapusers($@Map$)+" Players",8;

sleep 56000;

}

}

mapannounce $@Map$,"Zombie Survival is now over!",8;

mapwarp $@Map$,$@PrizeMap$,$@PrizeXY[0],$@PrizeXY[1];

enablenpc "ZombiePrize";

killmonster $@Map$,"ZombieRUN::OnKillZombie";

set $@CurrentEvent,0;

end;

}

end;

}

 

function script 1234RUN {

if($@CurrentEvent||agitcheck()||agitcheck2()){ end; }

if(!$@SpecialConditions){

set $@Eventname$,"Dice";

set $@CurrentEvent,2;

setarray $@Map$,"quiz_01"; //1234 Event Map

setarray $@XY,205,92; //1234 X, Y

setarray $@Players[0],1,0; //Min,Max Players

set $@Winers,1; //Number of Winers

set $@MaxTime,100; //Max rolls before tie (suggest 100 max)

setarray $@OOB[0],182,94,228,88; //Out of bounds upper area x1, y1, x2, y2

setarray $@StairsX[0],185,188,197,200,209,212,221,224; //Area stairs x1, x2, x3, x4, x5, x6, x7, x8

setarray $@StairsY[0],87,82; //Out of bounds area stairs y1, y2

setarray $@Box1[0],183,191; //Box 1 x1, x2

setarray $@Box2[0],195,203; //Box 2 x1, x2

setarray $@Box3[0],207,215; //Box 3 x1, x2

setarray $@Box4[0],219,227; //Box 4 x1, x2

setarray $@BoxY[0],81,59; //Boxs y1, y2

setarray $@Prizes[0],0,0,3000000; //Prize - Item, Amount, Zeny

setarray $@Cost[0],0,0,0; //Join Cost - Item, Amount, Zeny

setarray $@PrizePool[0],0,0; //100 = 1% Prizes pooled from players - Items,Zeny

}

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

disablenpc "1234-Prize";

for(set .@i,2; .@i > 0; set .@i,.@i-1){

announce ""+$@Eventname$+" Event Will begin in "+.@i+" Mins!",8;

announce "Please type @joinevent to join",8;

sleep 60000;

}

announce ""+$@Eventname$+" Event Has Begun!",8;

set $@CurrentEvent,$@CurrentEvent*-1;

sleep 9000;

if(getmapusers($@Map$)<$@Players[0]){

mapannounce $@Map$,"Sorry there are not enough players for this event to take place",8;

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

set $@CurrentEvent,0;

end;

} else {

mapannounce $@Map$,"Ok the rules of this "+$@Eventname$+" Event are as follows",8;

sleep 5000;

mapannounce $@Map$,"Each player picks a box 1, 2, 3 or 4",8;

sleep 5000;

mapannounce $@Map$,"There will be a count down from 10 to 0",8;

sleep 5000;

mapannounce $@Map$,"at 0 a four sided die will be rolled",8;

sleep 5000;

mapannounce $@Map$,"Anyone in the box of the number rolled will be warped to town",8;

sleep 5000;

mapannounce $@Map$,"as well as anyone on the stairs or outside the box",8;

sleep 5000;

mapannounce $@Map$,"the number of players remaining will be announced",8;

sleep 5000;

mapannounce $@Map$,"this prosses will repeat till only one player remains",8;

sleep 5000;

mapannounce $@Map$,"take a few moments to fnd a box",8;

sleep 15000;

mapannounce $@Map$,"we will now begin, please find a box",8;

sleep 6000;

for(set .@1234,0; .@1234 < $@MaxTime; set .@1234,.@1234+1){

for(set .@i,10; .@i > 0; set .@i,.@i-1){

mapannounce $@Map$,""+.@i+"...",8;

sleep 1000;

}

set .@i,rand(1,4);

mapannounce $@Map$,"0... Good Bye Box "+.@i+"",8;

switch(.@i){

case 1: areawarp $@Map$,$@Box1[0],$@BoxY[0],$@Box1[1],$@BoxY[1],$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1]; break;

case 2: areawarp $@Map$,$@Box2[0],$@BoxY[0],$@Box2[1],$@BoxY[1],$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1]; break;

case 3: areawarp $@Map$,$@Box3[0],$@BoxY[0],$@Box3[1],$@BoxY[1],$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1]; break;

case 4: areawarp $@Map$,$@Box4[0],$@BoxY[0],$@Box4[1],$@BoxY[1],$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1]; break;

}

areawarp $@Map$,$@OOB[0],$@OOB[1],$@OOB[2],$@OOB[3],$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1]; //Upper Area

areawarp $@Map$,$@StairsX[0],$@StairsY[0],$@StairsX[1],$@StairsY[1],$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1]; //Stairs 1

areawarp $@Map$,$@StairsX[2],$@StairsY[0],$@StairsX[3],$@StairsY[1],$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1]; //Stairs 2

areawarp $@Map$,$@StairsX[4],$@StairsY[0],$@StairsX[5],$@StairsY[1],$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1]; //Stairs 3

areawarp $@Map$,$@StairsX[6],$@StairsY[0],$@StairsX[7],$@StairsY[1],$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1]; //Stairs 4

if(getmapusers($@Map$)<=$@Winers){ set .@1234,$@MaxTime+1;

} else {

mapannounce $@Map$,"There are "+getmapusers($@Map$)+" Players Remaining.",8;

mapannounce $@Map$,"Take a few moments if you want to change boxes.",8;

sleep 20000;

}

}

mapannounce $@Map$,"Event is over",8;

mapannounce $@Map$,"Walk up the stairs and speak with the Npc in the center to collect your prize",8;

enablenpc "1234-Prize";

set $@CurrentEvent,0;

end;

}

}

 

function script PvpEventRUN {

if($@CurrentEvent||agitcheck()||agitcheck2()){ end; }

if(!$@SpecialConditions){

set $@Eventname$,"Last Man Standing";

set $@CurrentEvent,3;

setarray $@Map$,"pvp_n_1-5"; //PVP Event Map

setarray $@XY[0],0,0; //PVP Event X, Y

setarray $@Players[0],2,0; //Min,Max Players

setarray $@LvReq[0],70,1,150,150; //Min Base, Job, Max Base, Job Levels for PVP

set $@MaxTime,20; //PVP Times in Mins (Suggest Less then 50)

set $@JobGroup,7; //Jobs Groups Allowed Bitwise

//[1] Novice, [2] 1st, [4] 2nd, [8] 3rd

set $@Conditions,2; //Bitwise

//1 sc_end SC_ALL;

//2 percentheal 100,100;

//4 sc_start SC_DECREASEAGI,300000+$@MaxTime*60000,10;

//8 atcommand "@storeall";

setarray $@Prizes[0],0,0,1000000; //Prize - Item, Amount, Zeny

setarray $@Cost[0],0,0,2500; //Join Cost - Item, Amount, Zeny

setarray $@PrizePool[0],0,10000; //100 = 1% Prizes pooled from players - Items, Zeny

if(rand(100) < 10 && $@JobGroup){

switch(rand(1,$@JobGroup)){

case 1:

set .i,0;

set $@ReqJob,.i;

set $@Eventname$,"Novice Last Man Standing";

break;

default:

case 2: case 3:

set .i,rand(1,6);

if(rand(7) == 7) set .i,4046;

set $@ReqJob,.i;

set $@Eventname$,""+jobname(.i)+" Class Last Man Standing";

break;

case 4: case 5: case 6: case 7:

set .i,rand(7,12) + rand(1)*7;

if(rand(17) > 14) set .i,rand(23,25);

if(rand(19) > 16) set .i,4047+rand(1)*2;

set $@ReqJob,.i;

set $@Eventname$,""+jobname(.i)+" Class Last Man Standing";

break;

case 8: case 9: case 10: case 11:

case 12: case 13: case 14: case 15:

set .i,rand(4054,4059)+rand(1)*(12+rand(1));

set $@ReqJob,.i;

set $@Eventname$,""+jobname(.i)+" Class Last Man Standing";

break;

}

}

}

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

disablenpc "PvpEventPrize";

for(set .@i,2; .@i > 0; set .@i,.@i-1){

announce ""+$@Eventname$+" Event Will begin in "+.@i+" Mins!",8;

announce "Please type @joinevent to join",8;

sleep 60000;

}

announce ""+$@Eventname$+" Event Has Begun!",8;

set $@CurrentEvent,$@CurrentEvent*-1;

sleep 9000;

if(getmapusers($@Map$)<$@Players[0]){

mapannounce $@Map$,"Sorry there are not enough players for this event to take place",8;

} else {

mapannounce $@Map$,"The Rules of this event are as follows",8;

sleep 5000;

mapannounce $@Map$,"This is a Free for all Last man Standing",8;

sleep 5000;

mapannounce $@Map$,"there is a "+$@MaxTime+" min time limit in place if there is no clear winner within "+$@MaxTime+" mins the Event ends",8;

sleep 5000;

mapannounce $@Map$,"Everyone has 1 Life so Res, Ygg Leafs and Kazail dont work",8;

sleep 5000;

mapannounce $@Map$,"Spread out PVP will begin in 10...",8;

sleep 1000;

for(set .@i,9; .@i > 0; set .@i,.@i-1){

mapannounce $@Map$,""+.@i+"...",8;

sleep 1000;

}

gvgon $@Map$;

mapannounce $@Map$,"Begin",8;

sleep 5000;

for(set .@@pvp,0; .@@pvp < $@MaxTime; set .@@pvp,.@@pvp+1){

if(getmapusers($@Map$)<2){ set .@@pvp,.@@pvp+$@MaxTime;

} else { mapannounce $@Map$,"There are "+getmapusers($@Map$)+" Players Remaining",8; }

sleep 60000;

}

if(getmapusers($@Map$)<2){

mapannounce $@Map$,"We have a winner",8;

pvpoff $@Map$;

enablenpc "PvpEventPrize";

mapannounce $@Map$,"Talk to the Npc in the center of the map for a prize",8;

set $@CurrentEvent,0;

end;

} else { mapannounce $@Map$,"Time Is up",8; }

}

sleep 5000;

gvgoff $@Map$;

set $@CurrentEvent,"0";

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

end;

}

 

function script MazeRUN {

if($@CurrentEvent||agitcheck()||agitcheck2()){ end; }

if(!$@SpecialConditions){

set $@CurrentEvent,4;

set $@Eventname$,"Maze";

setarray $@Map$,"maze";

setarray $@XY,371,143;

setarray $@LvReq[0],0,0,5000,5000;

set $@ReqJob,-1;

setarray $@Prizes[0],7227,25,10000;

setarray $@Cost[0],0,0,1000;

setarray $@PrizePool[0],0,10000;

setarray $@Players[0],1,0;

set $@MaxTime,30; //Number of Mins to complete maze

}

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

enablenpc "mazeroadblock";

disablenpc "MazePrize";

for(set .@i,2; .@i > 0; set .@i,.@i-1){

announce ""+$@Eventname$+" Event Will begin in "+.@i+" Mins!",8;

announce "Please type @joinevent to join",8;

sleep 60000;

}

announce ""+$@Eventname$+" Event Has Begun!",8;

set $@CurrentEvent,$@CurrentEvent*-1;

sleep 9000;

if(getmapusers($@Map$)<$@Players[0]){ mapannounce $@Map$,"Sorry there are not enough players for this event to take place",8;

} else {

mapannounce $@Map$,"Rules are simple first to get to end of maze wins, so begin~",8;

disablenpc "mazeroadblock";

enablenpc "MazePrize";

for(set .@maze,0; .@maze < $@MaxTime; set .@maze,.@maze+1){

if(getmapusers($@Map$)<1) set .@maze,.@maze+$@MaxTime;

mapannounce $@Map$,"There are "+($@MaxTime-.@maze)+" Minuets Remaining",8;

sleep 60000;

}

mapannounce $@Map$,"Time Is up",8;

}

disablenpc "MazePrize";

sleep 5000;

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

set $@CurrentEvent,0;

end;

}

 

function script PoringRUN {

if($@CurrentEvent||agitcheck()||agitcheck2()){ end; }

if(!$@SpecialConditions){

set $@Eventname$,"Poring";

set $@CurrentEvent,6;

setarray $@Map$,"pvp_n_1-5"; //Poring Event Map

setarray $@XY[0],0,0; //Poring Event X, Y

setarray $@Players[0],1,0; //Min,Max Players

setarray $@LvReq[0],0,0,1000,1000; //Min Base, Job, Max Base, Job Levels for PVP

set $@MaxTime,30; //Poring Time in Mins (Suggest Less then 50)

set $@Winers,2; //Number of Winers

setarray $@Mobs,1725,$@Winers,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15,1725,15;

setarray $@MobNames$,"Poring","P0ring","Porlng","Porimg","Porinq","Poporing","This One","Right","Kill Me","Poning","qoring","Pooring","Pouring","Polling","~Poring~","Winner","Prize","Porirg","Paring";

setarray $@Prizes[0],7227,25,100000; //Prize - Item, Amount, Zeny

setarray $@Cost[0],0,0,2500; //Join Cost - Item, Amount, Zeny

setarray $@PrizePool[0],0,10000; //100 = 1% Prizes pooled from players - Items, Zeny

}

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

pvpoff $@Map$;

for(set .@i,2; .@i > 0; set .@i,.@i-1){

announce ""+$@Eventname$+" Event Will begin in "+.@i+" Mins!",8;

announce "Please type @joinevent to join",8;

sleep 60000;

}

announce ""+$@Eventname$+" Event Has Begun!",8;

set $@CurrentEvent,$@CurrentEvent*-1;

if(getmapusers($@Map$)<$@Players[0]){ mapannounce $@Map$,"Sorry there are not enough players for this event to take place",8;

} else {

mapannounce $@Map$,"Rules are simple",8;

sleep 3000;

mapannounce $@Map$,"Kill the 'Poring' with the correct name, and get a warped to town with a prize.",8;

sleep 3000;

mapannounce $@Map$,"Kill the wrong one and get warped to town with nothing.",8;

sleep 3000;

mapannounce $@Map$,"There "+(($@Winers>1)?"are":"is")+" "+$@Winers+" right poring"+(($@Winers>1)?"s":"")+" and a "+$@MaxTime+" min timer.",8;

sleep 3000;

mapannounce $@Map$,"Event will now Begin~",8;

sleep 3000;

for(set .@i,2; .@i < getarraysize($@Mobs); set .@i,.@i+2){

monster $@Map$,0,0,$@MobNames$[.@i/2],$@Mobs[.@i],$@Mobs[.@i+1],"PoringPrize::OnKillWrong";

}

monster $@Map$,0,0,"--ja--",$@Mobs[0],$@Mobs[1],"PoringPrize::OnKillRight";

for(set .@poring,0; .@poring < $@MaxTime; set .@poring,.@poring+1){

if(getmapusers($@Map$)<1) set .@poring,.@poring+$@MaxTime;

mapannounce $@Map$,"There are "+($@MaxTime-.@poring)+" Minuets Remaining",8;

sleep 60000;

}

}

mapannounce $@Map$,"Time Is up",8;

killmonsterall $@Map$;

sleep 5000;

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

end;

}

 

function script ManHuntRUN {

if($@CurrentEvent||agitcheck()||agitcheck2()){ end; }

if(!$@SpecialConditions){

set $@CurrentEvent,10;

set $@Conditions,19; //Bitwise

//1 sc_end SC_ALL;

//2 percentheal 100,100;

//4 sc_start SC_DECREASEAGI,300000+$@MaxTime*60000,10;

//8 atcommand "@storeall";

//16 save player name in array (must be on for manhunt event)

set $@Eventname$,"Man-Hunt";

setarray $@Map$,"pvp_n_1-5"; //Poring Event Map

setarray $@XY,0,0; //Poring Event X, Y

setarray $@Prizes,7227,25,50000; //Prize - Item, Amount, Zeny

setarray $@Cost,0,0,2500; //Join Cost - Item, Amount, Zeny

setarray $@PrizePool[0],0,10000; //100 = 1% Prizes pooled from players - Items, Zeny

setarray $@Players,2,100; // Min,Max PLayers, keep max players no more than 125

set $@MaxTime,10; //Number of Rounds, each round is a 1 min with a 10 second breather suggest under 45

}

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

enablenpc "ManhuntPrize";

for(set .@i,2; .@i > 0; set .@i,.@i-1){

announce ""+$@Eventname$+" Event Will begin in "+.@i+" Mins!",8;

announce "Please type @joinevent to join",8;

sleep 60000;

}

set $@CurrentEvent,$@CurrentEvent*-1;

if(getmapusers($@Map$)<$@Players[0]){ mapannounce $@Map$,"Sorry there are not enough players for this event to take place",8;

} else {

setarray $@Pool,$@Pool[0]/$@MaxTime,$@Pool[1]/$@MaxTime;

mapannounce $@Map$,"The goal is this event is to kill the target within 60 seconds.",8;

sleep 5000;

mapannounce $@Map$,"The one who managed to kill the target will gain a prize",8;

sleep 5000;

mapannounce $@Map$,"But if the target surivived, the target will gain the prize",8;

sleep 5000;

mapannounce $@Map$,"Man-Hunt Event start!",8;

for(set .@round,1; .@round < $@MaxTime; set .@round,.@round+1){

if(getmapusers($@Map$)<$@Players[0]){ mapannounce $@Map$,"Sorry there are not enough players for this event to take place anymore",8;

} else {

if(.@round > 1){ mapannounce $@Map$,"Next Round will begin in 10 seconds!",8; sleep 10000; }

while(attachrid(getcharid(0,$@PlayerNameList$[$@Target])) && strcharinfo(3)!= $@Map$){

set $@Target,rand(getarraysize($@PlayerNameList$));

}

mapannounce $@Map$,"[Round "+.@round+"] Our target is "+$@PlayerNameList$[$@Target]+"!",8;

atcommand "killable "+$@PlayerNameList$[$@Target];

atcommand "size "+$@PlayerNameList$[$@Target]+" 2";

sleep 60000;

if($@Target != -1){

if(attachrid(getcharid(0,$@PlayerNameList$[$@Target])) && strcharinfo(3)== $@Map$){

announce "Congrats to, "+strcharinfo(0)+" a winner in the "+$@Eventname$+" event!",bc_blue|bc_all;

if($@Prizes[0])getitem $@Prizes[0],$@Prizes[1];

if($@PrizePool[0])getitem $@Cost[0],($@Pool[0]*$@PrizePool[0]/10000);

if($@Prizes[2]||$@PrizePool[1])set Zeny,Zeny+$@Prizes[2]+($@Pool[1]*$@PrizePool[1]/10000);

}

}

atcommand "alive "+$@PlayerNameList$[$@Target]+"";

atcommand "killable "+$@PlayerNameList$[$@Target]+"";

atcommand "size "+$@PlayerNameList$[$@Target]+" 0";

}

}

}

disablenpc "ManhuntPrize";

mapannounce $@Map$,"Event is Over",8;

sleep 5000;

mapwarp $@Map$,$@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

}

//========================= Prizes ======================================

 

1@zombie,175,120,4 script ZombiePrize 425,{

mes "[Event Agent]";

mes "So you mangaed to live";

next;

mes "[Event Agent]";

mes "Here is your prize and goodbye";

close2;

announce "Congrats to, "+strcharinfo(0)+" a winner in the "+$@Eventname$+" event!",bc_blue|bc_all;

if($@Prizes[0])getitem $@Prizes[0],$@Prizes[1];

if($@PrizePool[0])getitem $@Cost[0],($@Pool[0]*$@PrizePool[0]/10000);

if($@Prizes[2]||$@PrizePool[1])set Zeny,Zeny+$@Prizes[2]+($@Pool[1]*$@PrizePool[1]/10000);

setarray $@Pool[0],0,0;

warp $@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

end;

OnKillZombie:

getmapxy(.@pc_map$, .@pc_x, .@pc_y, 0);

set .@i,rand(getarraysize($@Mob)/2)*2;

monster $@Map$,.@pc_x+rand(-5,5),.@pc_y+rand(-5,5),"--ja--",$@Mobs[.@i],.@@Wave*$@Mob[.@i+1],"ZombiePrize::OnKillZombie";

dispbottom "Don't do that";

sc_start SC_DECREASEAGI,SC_DECREASEAGI,300000+$@MaxTime*60000,10;

percentheal -20,-100;

end;

}

 

quiz_01,205,92,4 script 1234-Prize 456,{

mes "[Event Agent]";

mes "Your a lucky one";

next;

mes "[Event Agent]";

mes "I guess you get a prize";

close2;

announce "Congrats to, "+strcharinfo(0)+" a winner of the "+$@Eventname$+" event!",bc_blue|bc_all;

if($@Prizes[0])getitem $@Prizes[0],$@Prizes[1];

if($@PrizePool[0])getitem $@Cost[0],($@Pool[0]*$@PrizePool[0]/10000);

if($@Prizes[2]||$@PrizePool[1])set Zeny,Zeny+$@Prizes[2]+($@Pool[1]*$@PrizePool[1]/10000);

setarray $@Pool[0],0,0;

warp $@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

end;

}

 

pvp_n_1-5,99,100,4 script PvpEventPrize 405,{

mes "[Event Agent]";

mes "So your the last one standing";

next;

mes "[Event Agent]";

mes "Your reward";

close2;

announce "Congrats to, "+strcharinfo(0)+" the winner in the "+$@Eventname$+" event!",bc_blue|bc_all;

if($@Prizes[0])getitem $@Prizes[0],$@Prizes[1];

if($@PrizePool[0])getitem $@Cost[0],($@Pool[0]*$@PrizePool[0]/10000);

if($@Prizes[2]||$@PrizePool[1])set Zeny,Zeny+$@Prizes[2]+($@Pool[1]*$@PrizePool[1]/10000);

setarray $@Pool[0],0,0;

warp $@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

disablenpc "PvpEventPrize";

end;

}

 

maze,369,162,4 script MazePrize 405,4,4,{

mes "[Event Agent]";

mes "Walk up to me to claim prize~";

close;

OnTouch:

mes "[Event Agent]";

mes "So you mangaed to reach me";

next;

mes "[Event Agent]";

mes "Here is your prize~";

close2;

announce "Congrats to, "+strcharinfo(0)+" a winner in the "+$@Eventname$+" event!",bc_blue|bc_all;

if($@Prizes[0])getitem $@Prizes[0],$@Prizes[1];

if($@PrizePool[0])getitem $@Cost[0],($@Pool[0]*$@PrizePool[0]/10000);

if($@Prizes[2]||$@PrizePool[1])set Zeny,Zeny+$@Prizes[2]+($@Pool[1]*$@PrizePool[1]/10000);

setarray $@Pool[0],0,0;

warp $@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

end;

}

 

- script PoringPrize -1,{

OnKillWrong:

set .@i,rand(1,(getarraysize($@Mobs)/2))*2;

monster $@Map$,0,0,$@MobNames$[.@i/2],$@Mobs[.@i],$@Mobs[.@i+1],"PoringPrize::OnKillWrong";

warp $@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

end;

OnKillRight:

announce "Congrats to, "+strcharinfo(0)+" a winner in the "+$@Eventname$+" event!",bc_blue|bc_all;

if($@Prizes[0])getitem $@Prizes[0],$@Prizes[1];

if($@PrizePool[0])getitem $@Cost[0],($@Pool[0]*$@PrizePool[0]/10000);

if($@Prizes[2]||$@PrizePool[1])set Zeny,Zeny+$@Prizes[2]+($@Pool[1]*$@PrizePool[1]/10000);

setarray $@Pool[0],0,0;

sleep2 1000;

warp $@ReturnMap$[0],$@ReturnXY[0],$@ReturnXY[1];

end;

}

 

- script ManhuntPrize -1,{

OnPCDieEvent:

if ($@CurrentEvent == -10 && strcharinfo(0) == $@PlayerNameList$[$@Target] ){

if(attachrid(killerrid)) {

announce "Congrats to, "+strcharinfo(0)+" a winner in the "+$@Eventname$+" event!",bc_blue|bc_all;

if($@Prizes[0])getitem $@Prizes[0],$@Prizes[1];

if($@PrizePool[0])getitem $@Cost[0],($@Pool[0]*$@PrizePool[0]/10000);

if($@Prizes[2]||$@PrizePool[1])set Zeny,Zeny+$@Prizes[2]+($@Pool[1]*$@PrizePool[1]/10000);

set $@Target,-1;

}

}

end;

OnPCLogOutEvent:

if($@CurrentEvent == -10 && strcharinfo(0) == $@PlayerNameList$[$@Target]){

mapannounce $@Map$,"The target has logged out of this game. This round will be nulled.",0;

set $@Target,-1;

}

end;

}

//========================= Other =======================================

 

maze,358,148,0 warp mazeroadblock 2,2,maze,371,149

 

1@zombie mapflag gvg

maze mapflag gvg

 

 

Edited by - Mariel

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.