Hi community, I found this script in the forum of hercules I tested it and I wonder sometimes its giving a specific error when there's a winner.
script :
//===== eAthena Script =====================================
//= Run or Die ( aka. Poring Bomb Event )
//===== By: ================================================
//= AnnieRuru
//===== Current Version: ===================================
//= 2.1
//===== Compatible With: ===================================
//= Hercules 2015-10-29
//===== Description: =======================================
//= Avoid the poring bomb at all cost !
//===== Topic ==============================================
//= http://herc.ws/board/topic/11010-
//===== Additional Comments: ===============================
//= another script that finally has a release topic for it
//==========================================================
mellina,38,66,7 script Bomb Poring 98,{
if ( ( .@size = getvariableofnpc( .aidtotal, "runordie" ) ) >= 100 ) { // 100 participant max
mes "["+strnpcinfo(0)+"]";
mes "I'm sorry, the room is full";
close;
}
if(getvariableofnpc( .start, "runordie" )) {
mes "["+strnpcinfo(0)+"]";
mes "Hey would you like to join me?";
next;
if(select("Join Event!:Leave Event!") == 2) end;
percentheal 100, 100;
warp "guild_vs5", 0,0;
set getvariableofnpc( .aid[ .@size ], "runordie" ), getcharid(3);
set getvariableofnpc( .aidtotal, "runordie" ), getvariableofnpc( .aidtotal, "runordie" ) +1;
end;
} else {
mes "["+strnpcinfo(0)+"]";
mes "I am sorry event is currently off rigth now.";
end;
}
}
- script runordie -1,{
OnInit:
//disablenpc "Bomb Poring";
//bindatcmd "runordie", strnpcinfo(0)+"::OnStart", 99,100;
.onesec = 1000; // use for script debugging... set to 100 to make the announcement run faster
end;
OnStart:
OnClock1000:
OnClock2100:
deletearray .aid;
.aidtotal = 0;
mapwarp "guild_vs5", "mellina", 85,84;
killmonsterall "guild_vs5";
.start = 1;
announce "Bomb Poring event is on!",bc_all,0xffccff;
sleep 4 * .onesec;
announce "To participate in this event (@je)!",bc_all,0xffccff;
sleep 6 * .onesec;
announce "You only have 1 minute to register on this event!",bc_all,0xffccff;
sleep 20 * .onesec;
announce "30 seconds left before registration is closed!",bc_all,0xffccff;
sleep 10 * .onesec;
announce "To participate in this event (@je)!",bc_all,0xffccff;
sleep 10 * .onesec;
announce "Last 10 seconds for registrations!",bc_all,0xffccff;
sleep 5 * .onesec;
announce "Bomb Poring : 5",bc_all,0xffccff;
sleep 1000;
announce "Bomb Poring : 4",bc_all,0xffccff;
sleep 1000;
announce "Bomb Poring : 3",bc_all,0xffccff;
sleep 1000;
announce "Bomb Poring : 2",bc_all,0xffccff;
sleep 1000;
announce "Bomb Poring : 1",bc_all,0xffccff;
sleep 1000;
announce "Event is now closed.",bc_all,0xffccff;
if ( .aidtotal < 2 ) { // cannot start event if nobody joins(0) or just having (1) player
announce "Bomb Poring is canceled not enough players to continue!",bc_all,0xffccff;
mapwarp "guild_vs5", "mellina", 85,84;
deletearray .aid;
.aidtotal = 0;
.start = 0;
end;
}
mapannounce "guild_vs5", "Welcome Bomb Poring!",bc_map,0xffccff;
sleep 3 * .onesec;
mapannounce "guild_vs5", "To the players don't know this event, It its very simple!",bc_map,0xffccff;
sleep 3 * .onesec;
mapannounce "guild_vs5", "You just need to stay AWAY from anything that you think its DANGEROUS!!",bc_map,0xffccff;
sleep 3 * .onesec;
mapannounce "guild_vs5", "Stay alive no matter what!",bc_map,0xffccff;
sleep 3 * .onesec;
mapannounce "guild_vs5", "The LAST SURVIVOR will be the WINNER",bc_map,0xffccff;
sleep 3 * .onesec;
mapannounce "guild_vs5", "Event will start in 3....",bc_map,0xffccff;
sleep 1 * .onesec;
mapannounce "guild_vs5", "2...",bc_map,0xffccff;
sleep 1 * .onesec;
mapannounce "guild_vs5", "1..",bc_map,0xffccff;
sleep 1 * .onesec;
mapannounce "guild_vs5", "Start Running Now!",bc_map,0xffccff;
while ( .start ) {
.@more += rand(1,2);
monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 2 + .@more, "", 0;
monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 2 + .@more, "", 1;
monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 2 + .@more, "", 2;
sleep 5000;
}
end;
OnPCDieEvent:
OnPCLogoutEvent:
if ( strcharinfo(3) == "guild_vs5" && .start ) {
if ( .aidtotal > 1 ) {
for ( .@i = 0; .@i < .aidtotal; .@i++ ) {
if ( getcharid(3) == .aid[.@i] ) {
deletearray .aid[.@i], 1;
.aidtotal--;
}
}
}
if ( .aidtotal == 1 ) {
.start = 0;
killmonsterall "guild_vs5";
announce "Congratulations ~ the winner is "+ rid2name(.aid),bc_all,0xffccff;
sleep 5000;
if ( isloggedin( .aid ) ) {
attachrid .aid;
getitem 7539,10; // winner prize
warp "mellina", 85,84;
}
deletearray .aid;
.aidtotal = 0;
}
}
end;
}
guild_vs5 mapflag nowarp
guild_vs5 mapflag noreturn
guild_vs5 mapflag nowarpto
guild_vs5 mapflag noteleport
guild_vs5 mapflag nosave SavePoint
guild_vs5 mapflag noskill
guild_vs5 mapflag nomemo
guild_vs5 mapflag nopenalty
guild_vs5 mapflag noicewall