//===== rAthena Script =======================================
//= Poring Catcher Event
//===== By: ==================================================
//= darristan ([email protected])
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena SVN
//===== Additional Comments: =================================
//= 1.0 Initial Release
//============================================================
// Warp Portals
// aria,92,35,0 warp Poring#Warp 2,2,poring_w01,106,129// NPC Control Panel
aria,95,41,4 script Poring Catcher#CP 497,{
if (getgmlevel() > 60) {
L_GM:
mes "[Poring Catcher]";
mes "Hello, " + strcharinfo(0) + ".";
mes "What can I do for you today?";
next;
switch(select("Standard Menu:Toggle Event [" + (($PoriCatcher == 1)?"ON":"OFF") + "]:Config Prize [" + $PoriPrizeAmt + "x " + getitemname($PoriPrize) + "]:Cancel")) {
case 1:
goto L_SM;
case 2:
if ($PoriCatcher == 1) {
stopnpctimer;
announce "Poring Catcher : A GM has decided to turn the event off. As a result no further prizes will be given.",bc_map | bc_blue;
killmonster "poring_w01","All";
set $PoriCatcher, 0;
disablenpc "Poring Catcher#Evt";
enablenpc "Poring Catcher#Evt";
hideonnpc "Poring Catcher#Evt";
mapwarp "poring_w01","aria",71,68;
} else {
donpcevent "Poring Catcher#CP::OnMinute15";
}
mes "[Poring Catcher]";
mes "Event is now turned " + (($PoriCatcher == 1)?"ON":"OFF") + ".";
close;
case 3:
mes "[Poring Catcher]";
mes "Please insert an item ID:";
mes "^808080Insert 0 to cancel.^000000";
next;
input .PoriPrize;
if (.PoriPrize <= 0) goto L_GM;
mes "[Poring Catcher]";
mes "Please insert an amount:";
mes "^808080Insert 0 to cancel.^000000";
next;
input .PoriPrizeAmt;
mes "[Poring Catcher]";
mes "Alright. So " + .PoriPrizeAmt + " of " + getitemname(.PoriPrize) + " will be given as the prize.";
set $PoriPrize, .PoriPrize;
set $PoriPrizeAmt, .PoriPrizeAmt;
next;
goto L_GM;
case 4:
close;
}
}
L_SM:
if ($PoriCatcher == 1) {
mes "[Poring Catcher]";
mes "The ^ff557fPoring Catcher^000000 is in action now, would you like to join the event?";
next;
if (select("Yes:No") == 2){
mes "[Poring Catcher]";
mes "Alright.";
close;
}
mes "[Poring Catcher]";
mes "Good luck!";
close2;
warp "poring_w01",106,129;
end;
}
mes "[Poring Catcher]";
mes "Have you heard about the game ^ff557fPoring Catcher^000000?";
next;
if (select("Poring Catcher?:Cancel") == 2) {
mes "[Young Man]";
mes "Ohh, okay...";
close;
}
mes "[Poring Catcher]";
mes "^ff557fPoring Catcher^000000 is a fun event game in ^0000FFFlarism Ragnarok Online^000000 that hosted automatically every hours.";
next;
menu "But how to play?",-;
mes "[Poring Catcher]";
mes "There is only one rule, you have to find the right ^ff557fPoring^000000 instead of 99 false ^0000FFPorings^000000 in the map.";
next;
mes "[Poring Catcher]";
mes "And the rewards are great too, you will get ^0055ff" + $PoriPrizeAmt + "x " + getitemname($PoriPrize) + "^000000 for each win. But for those who loses the game will be warped back to town instead.";
close2;
emotion 32;
end;
OnMinute15:
announce "Poring Catcher : It's time to play Poring Catcher! Please visit me at the South of Aria. The event will begin in 2 minutes!",bc_all | bc_blue;
killmonster "poring_w01","All";
set $PoriCatcher, 1;
initnpctimer;
end;
OnTimer60000:
announce "Poring Catcher : The event will start very soon! If you want to join, please make your way to South of Aria now!",bc_all | bc_blue;
end;
OnTimer120000:
announce "Poring Catcher : Time's up! Event will open again in next hour!",bc_all | bc_blue;
donpcevent "Poring Catcher#Evt::OnEnable";
stopnpctimer;
end;
OnInit:
hideonnpc "Poring Catcher#Evt";
end;
}// Poring Catcher
poring_w01,100,127,4 script Poring Catcher#Evt 497,{
if ($Winner != 1) {
mes "[Poring Catcher]";
mes "Bugged! Please kindly contact GM at";
mes "flarismro[at]gmail[dot]com";
close2;
warp "aria",71,68;
end;
} else {
mes "[Poring Catcher]";
mes "Congratulations! You've won the event!";
close2;
getitem $PoriPrize, $PoriPrizeAmt;
set $PoriCatcher, 0;
set $Winner, 0;
warp "aria",71,68;
hideonnpc "Poring Catcher#Evt";
end;
}
end;
OnEnable:
sleep2 5000;
announce "Poring Catcher : I will be summoning 100 different Porings.",bc_map | bc_blue;
sleep2 3000;
announce "Poring Catcher : Only one of these Porings is the correct Poring.",bc_map | bc_blue;
sleep2 3000;
announce "Poring Catcher : The correct Porings are called [Poring], all the other Porings have different names.",bc_map | bc_blue;
sleep2 3000;
announce "Poring Catcher : The first five to kill the correct Porings win!",bc_map | bc_blue;
sleep2 3000;
announce "Poring Catcher : That's that.. Now let's play...",bc_map | bc_blue;
sleep2 3000;
goto OnStart;
end;
OnStart:
announce "Poring Catcher : I will start summoning in 5 seconds.",bc_map | bc_blue;
sleep2 2000;
announce "Poring Catcher : 3",bc_map | bc_blue;
sleep2 1000;
announce "Poring Catcher : 2",bc_map | bc_blue;
sleep2 1000;
announce "Poring Catcher : 1",bc_map | bc_blue;
sleep2 1000;
announce "Poring Catcher : Now let's do this!",bc_map | bc_blue;
areamonster "poring_w01",84,119,121,90,"Poring",1002,1,"Poring Catcher::OnRight";
areamonster "poring_w01",84,119,121,90,"Pouring",1002,10,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Proing",1002,10,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Poiring",1002,10,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Poing",1002,10,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"I am not Poring",1002,5,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Gniriop",1002,1,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Poring",1113,1,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Poring",1062,1,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Poriiing",1002,10,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"PoriNg",1002,10,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Porong",1002,10,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"P0ring",1002,10,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Por1ng",1002,10,"Poring Catcher::OnWrong";
areamonster "poring_w01",84,119,121,90,"Porng",1002,1,"Poring Catcher::OnWrong";
end;
OnRight:
dispbottom "Poring : Congratulations! You've found me. Please talk to Poring Catcher for your reward.";
hideoffnpc "Poring Catcher#Evt";
set $Winner, 1;
atcommand "@doommap";
end;OnWrong:
dispbottom "P0ring : I wasn't the correct Poring. Better luck next time!";
sc_start SC_Stone,10000,0;
warp "aria",71,68;
end;
}
// Mapflags
poring_w01 mapflag nowarp
poring_w01 mapflag nowarpto
poring_w01 mapflag noteleport
poring_w01 mapflag nosave
poring_w01 mapflag nomemo
poring_w01 mapflag nobranch
poring_w01 mapflag noloot
poring_w01 mapflag noskill
poring_w01 mapflag nopenalty
Error shown:
[Debug]: NPCEvent 'Poring Catcher::OnEnable' not found! (source: Poring Catcher#CP)
[Error]: npc_enable: Attempted to hide a non-existing NPC 'Poring Catcher#Evt' (flag=4).
[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: announce (2 parameters):
[Debug]: Data: string value="Poring Catcher : I will be summoning 100 different Porings."
[Debug]: Data: number value=17
[Debug]: Source (NPC): Poring Catcher#Evt at poring_w01 (100,127)
Question
Bin4ry
The script:
Error shown:
Edited by darristan1 answer 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.