ERROR after killing the monster
[Error]: npc_event: event not found [Fabre Punch Event#1::OnFabreEvent]
[Error]: npc_event: event not found [Fabre Punch Event#1::OnPupaEvent]
i want to add npc that can check the points of the 10 players and make it 3 winners.
please help thanks.
############################################################
- script FPE_inital -1,{
OnInit:
set $FabreEventChecker, 0;
set $FabreEventPrizeChecker, 0;
set $FPEDefendingChampion$,"secret";
end;
}
prontera,130,205,5 script Fabre Punch Event#1 952,{
mes "[ Fabre Punch Event ]";
mes "Hello, I'm the Fabre Punch Event Manager. My record says that the defending champion on this event was "+$FPEDefendingChampion$+". Anyways, what do you want to do?";
mes " ";
next;
menu "How does this work?",FPE_HowTo,getgmlevel() == 0?"":"Host this Event",FPE_Host,"Join Event Now",FPE_Join,"Claim my reward",FPE_claim,"Nevermind",FPE_nvm;
FPE_HowTo:
mes "[ Fabre Punch Event ]";
mes "This is an event where everyone can join in. All you have to do is to punch the right monsters and to avoid the wrong ones. Each kind of monster has its corresponsing points. You only have 5 minutes to earn points as much as you can. The Highest Scorer at the end of this event shall win Trading Card Game";
mes "Reminder: No weapons, cart, and pets is allowed in this event.";
mes " ";
close;
FPE_Host:
if ( $FabreEventChecker != 0 ) {
mes "[ Fabre Punch Event ]";
mes "There is Fabre Punch Event on-going. You can host this event if it is still on-going.";
mes " ";
close;
} else {
mes "[ Fabre Punch Event ]";
mes "You need to pay 150,000,000 z to host this event. Would you like to pay to host this event?";
next;
menu "Yes",FPE_HostYes,"No",-;
mes "[ Fabre Punch Event ]";
mes "Okay. Maybe next time.";
mes " ";
close;
FPE_HostYes:
if ( Zeny >= 150000000 ){
mes "[ Fabre Punch Event ]";
mes "Thanks "+strcharinfo(0)+", for hosting this event. It will start shortly.";
mes " ";
set Zeny, Zeny-150000000;
close2;
set $FabreEventChecker, 1;
announce ""+strcharinfo(0)+" paid to host Fabre Punch Event!", bc_all;
OnFPE:
killmonsterall "pvp_n_1-2";
sleep2 10000;
initnpctimer;
end;
} else {
mes "[ Fabre Punch Event ]";
mes "Sorry "+strcharinfo(0)+", you dont have enough zenies to host this event.";
mes " ";
close;
} end;
} end;
FPE_Join:
if ( $FabreEventChecker != 0 ){
if (gethominfo(2) != "null"){
mes "[ Fabre Punch Event ]";
mes "No homunculus is allowed in this event! Sorry "+strcharinfo(0)+" but you can't join this event!";
close;
}
if (getpetinfo(2) != "null"){
mes "[ Fabre Punch Event ]";
mes "No pet is allowed in this event! Sorry "+strcharinfo(0)+" but you can't join this event!";
close;
}
if (checkcart()){
mes "[ Fabre Punch Event ]";
mes "[ Fabre Punch Event ]";
mes "No cart is allowed! Sorry "+strcharinfo(0)+" but you can't join this event!";
close;
}
if (checkfalcon()){
mes "[ Fabre Punch Event ]";
mes "No falcon is allowed! Sorry "+strcharinfo(0)+" but you can't join this event!";
close;
}
if (checkriding()){
mes "[ Fabre Punch Event ]";
mes "[ Fabre Punch Event ]";
mes "No riding is allowed! Sorry "+strcharinfo(0)+" but you can't join this event!";
close;
}
mes "[ Fabre Punch Event ]";
mes "Good luck "+strcharinfo(0)+".";
mes " ";
close2;
set $FabrePoints, 0;
warp "pvp_n_1-2.gat",0,0;
end;
}else{
mes "[ Fabre Punch Event ]";
mes "Sorry. No Fabre Punch Event is held at the moment.";
mes " ";
close;
}end;
FPE_claim:
if ($HighestFabrePointsName$ == strcharinfo(0) && $FabreEventPrizeChecker == 1) {
mes "[Fabre Punch Event]";
mes "Congragulations "+strcharinfo(0)+". Here is your reward.";
getitem 7227,1;
set $HighestFabrePointsName$,"";
set $HighestFabrePoints,0;
set $FabreEventPrizeChecker, 0;
close;
} else {
mes "[ Fabre Punch Event ]";
mes "Sorry "+strcharinfo(0)+". You're not the winner so you can't claim anything";
mes " ";
close;
}end;
FPE_nvm:
mes "[ Fabre Punch Event ]";
mes "Okay. Maybe next time.";
mes " ";
close;
OnFabreKill:
if (getequipweaponlv(4)==0 && getequipweaponlv(3)==0){
set $FabrePoints,$FabrePoints+1;
if ($FabrePoints > $HighestFabrePoints) {
set $HighestFabrePointsName$,strcharinfo(0);
set $FPEDefendingChampion$,strcharinfo(0);
set $HighestFabrePoints,$FabrePoints;
}
dispbottom "You have "+FabrePoints+" point(s)";
end;
}else {
dispbottom "You have to punch the monster without any weapon.";
warp "prontera",130,200;
end;
}
OnPupaKill:
if (getequipweaponlv(4)==0 && getequipweaponlv(3)==0){
set $PupaPoints,$PupaPoints+5;
if ($PupaPoints > $HighestPupaPoints) {
set $HighestPupaPointsName$,strcharinfo(0);
set $FPEDefendingChampion$,strcharinfo(0);
set $HighestPupaPoints,$PupaPoints;
}
dispbottom "You have "+FabrePoints+" point(s)";
end;
}else {
dispbottom "You have to punch the monster without any weapon.";
warp "prontera",130,200;
end;
}
OnFabre1Kill:
if (getequipweaponlv(4)==0 && getequipweaponlv(3)==0){
if ($FabrePoints < 10) {
set $FabrePoints, 0;
dispbottom "You have "+FabrePoints+" point(s)";
end;
}else {
set $FabrePoints,$FabrePoints-10;
dispbottom "You have "+FabrePoints+" point(s)";
end;
}end;
}else {
dispbottom "You have to punch the monster without any weapon.";
warp "prontera",130,200;
end;
}
OnHour30:
if ( $FabreEventChecker == 0 ) {
set $FabreEventChecker, 1;
initnpctimer;
end;
}
OnTimer10000:
announce "Fabre Punch Event has started.",0;
monster "pvp_n_1-2",0,0,"1 Point",1007,50,"Fabre Punch Event#1::OnFabreEvent";
monster "pvp_n_1-2",0,0,"10 Points",1230,10,"Fabre Punch Event#1::OnPupaEvent";
monster "pvp_n_1-2",0,0,"-10 Ponts",1229,50,"Fabre Punch Event#1::OnFabre1Event";
end;
OnTimer70000:
mapannounce "pvp_n_1-2.gat","Fabre Punch Event: 4 minutes left.",0;
monster "pvp_n_1-2",0,0,"1 Point",1007,50,"Fabre Punch Event#1::OnFabreEvent";
monster "pvp_n_1-2",0,0,"10 Points",1230,10,"Fabre Punch Event#1::OnPupaEvent";
monster "pvp_n_1-2",0,0,"-10 Ponts",1229,50,"Fabre Punch Event#1::OnFabre1Event";
end;
OnTimer130000:
mapannounce "pvp_n_1-2.gat","Fabre Punch Event: 3 minutes left.",0;
monster "pvp_n_1-2",0,0,"1 Point",1007,50,"Fabre Punch Event#1::OnFabreEvent";
monster "pvp_n_1-2",0,0,"10 Points",1230,10,"Fabre Punch Event#1::OnPupaEvent";
monster "pvp_n_1-2",0,0,"-10 Ponts",1229,50,"Fabre Punch Event#1::OnFabre1Event";
end;
OnTimer190000:
mapannounce "pvp_n_1-2.gat","Fabre Punch Event: 2 minutes left.",0;
monster "pvp_n_1-2",0,0,"1 Point",1007,50,"Fabre Punch Event#1::OnFabreEvent";
monster "pvp_n_1-2",0,0,"10 Points",1230,10,"Fabre Punch Event#1::OnPupaEvent";
monster "pvp_n_1-2",0,0,"-10 Ponts",1229,50,"Fabre Punch Event#1::OnFabre1Event";
end;
OnTimer250000:
mapannounce "pvp_n_1-2.gat","Fabre Punch Event: 1 minutes left.",0;
monster "pvp_n_1-2",0,0,"1 Point",1007,50,"Fabre Punch Event#1::OnFabreEvent";
monster "pvp_n_1-2",0,0,"10 Points",1230,10,"Fabre Punch Event#1::OnPupaEvent";
monster "pvp_n_1-2",0,0,"-10 Ponts",1229,50,"Fabre Punch Event#1::OnFabre1Event";
end;
OnTimer310000:
stopnpctimer;
announce "Fabre Punch Event has ended and the event Winner is "+$HighestFabrePointsName$+".",0;
killmonsterall "pvp_n_1-2";
set $FabreEventChecker, 0;
set $FabreEventPrizeChecker, 1;
sleep2 5000;
mapannounce "pvp_n_1-2.gat","You'll be warp at prontera in a short while.",16;
sleep2 10000;
mapwarp "pvp_n_1-2","prontera",155,166;
end;
}
prontera,131,206,5 script Fabre Punch Event#2 952,{
if(getgmlevel() == 0 ) end;
mes "Hello GM."+@attach;
mes "What do you want to do?";
if(select( "Host Fabre Punch Event","Nothing") == 2 ) close;
if ( $FabreEventChecker != 0 ) {
mes "[ Fabre Punch Event ]";
mes "There is Fabre Punch Event on-going. You can host this event if it is still on-going.";
close;
}
announce "GM "+strcharinfo(0)+" has hosted Fabre Punch Event!", bc_all;
close2;
set $FabreEventChecker, 1;
donpcevent "Fabre Punch Event#1::OnFPE";
end;
}