hi, hi im searching for Event script that will bring Players to a room like quiz_02 then they will wait for 1min before the script summon atleast 50 bomb poring ( depend on settings ).. the goal is players need to be alive when bomb poring explode its like one man standing and the one who stand last will be the winner.. the prize will be an item ( depend on settings ).
i did find script from eA called Crazy Poring.. the only thing is it only have 1 bomb poring and i test it and not working..
here's the code
guild_vs3,1,1,4 script Run! 1904,{
function delete_player ;
function do_explosion ;
function kill_player ;
function set_cells ;
function winner ;
end ;
OnStart:
movenpc "Run!", 37 + ( rand ( 25 ) + 1 ), 37 + ( rand ( 25 ) + 1 ) ;
set .rp_game, 1;
for ( set .@b, set ( .@a, getarraysize ( $@rp_p ) ) - .@a; .@b < .@a ; set .@b, .@b + 1 )
warpchar "guild_vs3", 37 + ( rand ( 25 ) + 1 ), 37 + ( rand ( 25 ) + 1 ), $@rp_p2[.@b] ;
detachrid ;
sleep 3000 ;
set .@range, getvariableofnpc ( .range, "runporing" );
while ( .rp_game ) {
npcspeed ( getarraysize ( $@rp_p ) * 5 ) + 80;
getmapxy .@m1$, .@x1, .@y1, 1 ;
while ( ! checkcell ( .@m1$, .@x1 + set ( .@y3, rand ( -8, 8 ) ), .@y1 + set ( .@y3, rand ( -8, 8 ) ), cell_chkpass ) ) ;
npcwalkto .@x1 + .@x3, .@y1 + .@y3 ;
sleep 800 ;
do_explosion ( .@x1 + .@x3, .@y1 + .@y3 ) ;
for ( set .@b, set ( .@a, getarraysize ( $@rp_p ) ) - .@a; .@b < .@a ; set .@b, .@b + 1 ) {
if ( attachrid ( $@rp_p[.@b] ) ) {
getmapxy .@m2$, .@x2, .@y2, 0 ;
if ( ! checkcell ( .@m2$, .@x2, .@y2, cell_chkpass ) )
warpchar "guild_vs3", 37 + ( rand ( 25 ) + 1 ), 37 + ( rand ( 25 ) + 1 ), $@rp_p2[.@b] ;
else if
(
( sqrt ( pow ( ( .@x1 + .@x3 ) - .@x2, 2 ) ) <= .@range )
&&
( sqrt ( pow ( ( .@y1 + .@y3 ) - .@y2, 2 ) ) <= .@range )
&&
.@m1$ == .@m2$
) {
kill_player ( .@b ) ;
set .@e, .rp_e;
if ( ! ( getarraysize ( $@rp_p ) % 4 ) )
set .rp_e, .rp_e + 1;
if ( .@e != .rp_e )
set_cells ( .rp_e ) ;
if ( getarraysize ( $@rp_p ) < 2 )
winner ( ) ;
}
detachrid ;
}
else if
(
! ( isloggedin ( $@rp_p[.@b], $@rp_p2[.@b] ) )
||
.@m2$ != .@m$
)
delete_player ( .@b ) ;
}
sleep 1100 ;
}
end ;
function delete_player {
set .@a, getarg ( 0 );
deletearray $@rp_p[.@a], 1 ;
deletearray $@rp_p2[.@a], 1 ;
return ;
}
function do_explosion {
set .@x, getarg ( 0 );
set .@y, getarg ( 1 );
movenpc "ExplosionEffect", .@x, .@y ;
donpcevent "ExplosionEffect::OnExplosion" ;
while ( ( set ( .@a, .@a + 1 ) % 3 ) ) {
movenpc "ExplosionEffect", .@x + .@a, .@y ;
donpcevent "ExplosionEffect::OnExplosion" ;
movenpc "ExplosionEffect", .@x, .@y - .@a ;
donpcevent "ExplosionEffect::OnExplosion" ;
}
return ;
}
function kill_player {
set .@a, getarg ( 0 );
specialeffect2 722 ;
percentheal -100, -100 ;
//sleep2 600 ; -> by using // I prevent multi-winners or something like it.
warp "SavePoint", 0, 0 ;
delete_player ( .@a ) ;
announce strcharinfo ( 0 ) +" has been touched by the poring.", bc_map, 0xe01a1a ;
return ;
}
function set_cells {
set .@a, getarg ( 0 ) * 3;
setcell "guild_vs3", 29 + .@a, 29, 70 - .@a, 36, cell_walkable, 0 ;
setcell "guild_vs3", 29, 63 + .@a, 70 - .@a, 70, cell_walkable, 0 ;
setcell "guild_vs3", 29 + .@a, 37, 36, 62 - .@a, cell_walkable, 0 ;
setcell "guild_vs3", 63, 37 + .@a, 70 - .@a, 62, cell_walkable, 0 ;
return ;
}
function winner {
attachrid $@rp_p[0] ;
announce strcharinfo ( 0 ) +" has won the game.", bc_map, 0xe01a1a ;
set .@size, getarraysize ( getvariableofnpc ( .item1, "runporing" ) );
for ( set .@i, 0; .@i < .@size ; set .@i, .@i + 1 )
getitem getvariableofnpc ( .item1[.@i], "runporing" ), getvariableofnpc ( .item2[.@i], "runporing" );
set .@size, getarraysize ( getvariableofnpc ( .var1, "runporing" ) );
for ( set .@i, 0; .@i < .@size ; set .@i, .@i + 1 )
setd getvariableofnpc ( .var1$[.@i], "runporing" ), getd ( getvariableofnpc ( .var1$[.@i], "runporing" ) ) + getvariableofnpc ( .var2[.@i], "runporing" );
set .rp_game, 0;
deletearray $@rp_p ;
deletearray $@rp_p2 ;
donpcevent "runporing::OnReset";
setcell "guild_vs3", 37, 37, 62, 62, cell_walkable, 1 ;
mapwarp "guild_vs3", "prontera", 155, 160 ;
return ;
}
}
guild_vs3,1,1,4 script ExplosionEffect 139,{
OnExplosion:
specialeffect 722 ;
}
turbo_room,127,79,6 script Run of the Poring 909,{
set .@a$, "^2b86b5Run of the Poring^000000";
set .@a, getvariableofnpc ( .rp_max, "runporing" ) - getarraysize ( $@rp_p );
mes .@a$;
if ( getvariableofnpc ( .p, "runporing" ) ) {
mes "Hi "+ strcharinfo ( 0 ) +", what do you want to do?";
if ( .@a )
mes "For now, I need "+ .@a +" more player"+ ( ( .@a > 1 ) ? "s" : "" );
else {
mes "I'm sorry, but now is a game running.";
showevent 0, 0 ;
close ;
}
showevent 1, 1 ;
next;
select ( "Register", "Information", "^911b1bExit^000000" ) ;
mes .@a$;
if ( @menu == 1 && getarraysize ( $@rp_p ) < getvariableofnpc ( .rp_max, "runporing" ) ) {
set .@a, getarraysize ( $@rp_p2 );
for ( ; .@b < .@a ; set .@b, .@b + 1 )
if ( getcharid ( 0 ) == $@rp_p2[.@b] ) {
mes "You were already registered!";
close ;
}
mes "You're registered now!";
set $@rp_p[getarraysize ( $@rp_p )], getcharid ( 3 );
set $@rp_p2[getarraysize ( $@rp_p2 )], getcharid ( 0 );
}
else if ( @menu == 1 ) {
mes "I'm sorry, but the game is now full.";
showevent 0, 0 ;
}
else if ( @menu == 2 ) {
mes "The objective of the game is survive from the Poring, running away from it.";
mes "The space will become small as player dies.";
mes "The explosion range is configured by the admin, anyway, don't be near the poring!";
}
mes "¡Qué pases un buen día.";
close2 ;
if ( getarraysize ( $@rp_p ) == getvariableofnpc ( .rp_max, "runporing" ) ) {
donpcevent "Run!::OnStart";
set getvariableofnpc ( .p, "runporing" ), 1 ;
showevent 0, 0 ;
}
end ;
}
else {
mes "I'm sorry, but the game of Run of the Poring hasn't been activated by a GM.";
close ;
}
OnInit:
setcell "guild_vs3", 29, 29, 70, 36, cell_walkable, 0 ;
setcell "guild_vs3", 29, 63, 70, 70, cell_walkable, 0 ;
setcell "guild_vs3", 29, 37, 36, 62, cell_walkable, 0 ;
setcell "guild_vs3", 63, 37, 70, 62, cell_walkable, 0 ;
}
- script runporing -1,{
OnWhisperGlobal:
if ( getgmlevel ( ) < 60 ) end ;
set .@a$, "^2b86b5Run of the Poring^000000";
mes .@a$;
mes "Hi "+ strcharinfo ( 0 ) +".";
if ( ! .p )
mes "Do you want to start a new game of Run of the Poring?";
else {
mes "I'm sorry, but now is a game active, please wait until it finishes.";
close ;
}
next ;
select ( "Yes", "No, thanks" ) ;
mes .@a$;
if ( @menu == 1 ) {
mes "Input the number of players.";
while ( ! .@a )
input .@a;
next ;
mes .@a$;
mes "Input the explosion range.";
while ( ! .@b )
input .@b;
next;
mes .@a$;
mes "Choose the prizes.";
while ( select ( "Item", "Variable", "Ready" ) != 3 ) {
next ;
mes .@a$;
if ( @menu == 1 ) {
mes "Input the ID of the item.";
input .@id;
next ;
mes .@a$;
mes "Input the amount.";
input .@c;
set .item1[getarraysize ( .item1 )], .@id;
set .item2[getarraysize ( .item2 )], .@c;
}
if ( @menu == 2 ) {
mes "Input the variable.";
input .@b$;
next ;
mes .@a$;
mes "Input the amount.";
input .@c;
set .var1$[getarraysize ( .var1$ )], .@a$;
set .var2[getarraysize ( .var2 )], .@c;
}
}
next ;
mes .@a$;
mes "The game has been started!";
announce "The game of Run of the Poring has been activated by a GM.", bc_all, 0xde9393 ;
set .p, 1;
set .range, .@b;
set .rp_max, .@a;
}
else
mes "When you want to start the game, talk to me.";
close ;
OnReset:
set .p, 0;
set .rp_max, 0;
deletearray .item1 ;
deletearray .item2 ;
deletearray .var1$ ;
deletearray .var2 ;
}
guild_vs3 mapflag noteleport
guild_vs3 mapflag nosave SavePoint
guild_vs3 mapflag nobranch
guild_vs3 mapflag pvp off
guild_vs3 mapflag gvg off
guild_vs3 mapflag nomemo
guild_vs3 mapflag nowarpto
guild_vs3 mapflag noreturn
guild_vs3 mapflag noskill
hope some one can do my request or atleast fix the script above.
thanks in advance..