Jump to content
  • 0

Run For Your Live Event


jigsgfx

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

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

when i use this script im stuck on the side and cant move to the center of the field i think it suppose to warp me on the center with the bomb poring since all sides are block...

hope some one can do my request or atleast fix the script above.

thanks in advance.. /no1

Edited by jigsgfx
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

thanks but how can i make this script summon like 50 bomb porings? coz i only summon 1 bombporing


prontera,148,172,5 script Run Or Die 100,{
if ( getarraysize($@pb_aidlist) >= 100 ) {
mes "I'm sorry, the room is full";
close;
}
percentheal 100, 100;
warp "guild_vs5", 0, 0;
set $@pb_aidlist[ getarraysize($@pb_aidlist) ], getcharid(3);
end;
}
- script runordie -1,{
OnInit:
disablenpc "Run Or Die";
end;

OnWhisperGlobal:
if ( getgmlevel() < 99 ) end;
OnClock0145: // these are time to start event
OnClock0445:
OnClock0745:
OnClock1045:
OnClock1345:
OnClock1645:
OnClock1945:
OnClock2245:
announce "Run Or Die!!!: Are you ready to join Run Or Die event???", 0;
enablenpc "Run Or Die";
mapwarp "guild_vs5", "prontera", 148,172;
sleep 4000;
announce "Run Or Die: For Those who dare to join please '@warp prontera 148 172' to participate", 0;
sleep 6000;
announce "Run Or Die: Register time will be closing after 1 minute", 0;
sleep 20000;
announce "Run Or Die: Last 30 second", 0;
sleep 10000;
announce "Run Or Die: Rush type in '@warp prontera 148 172' to join", 0;
sleep 10000;
announce "Run Or Die: Last 10 second to register", 0;
sleep 5000;
announce "Run Or Die: 5", 0;
sleep 1000;
announce "Run Or Die: 4", 0;
sleep 1000;
announce "Run Or Die: 3", 0;
sleep 1000;
announce "Run Or Die: 2", 0;
sleep 1000;
announce "Run Or Die: 1", 0;
sleep 1000;
announce "Run Or Die: Time is up...I will come again 3 hour later..", 0;
disablenpc "Run Or Die";
mapannounce "guild_vs5", "Welcome to Run Or Die event", 0;
sleep 3000;
mapannounce "guild_vs5", "This is an easy event", 0;
sleep 3000;
mapannounce "guild_vs5", "Just stay AWAY from anything that you think its DANGEROUS!!", 0;
sleep 3000;
mapannounce "guild_vs5", "Stay alive as long as YOU CAN!!!!", 0;
sleep 3000;
mapannounce "guild_vs5", "The LAST SURVIVOR will be the WINNER", 0;
sleep 3000;
mapannounce "guild_vs5", "event will start in 3", 0;
sleep 1000;
mapannounce "guild_vs5", "2...", 0;
sleep 1000;
mapannounce "guild_vs5", "1...", 0;
sleep 1000;
mapannounce "guild_vs5", "Its time to run !!", 0;
initnpctimer;
set .stop, 0;
while (1) {
monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 5 + .@extra;
sleep 5000;
if ( .stop ) end;
set .@extra, .@extra + rand(1,5);
set .@round, .@round +1;
}
end;

OnTimer500:
stopnpctimer;
while ( getarraysize($@pb_aidlist) > 1 ) {
sleep 500;
for ( set .@i, 0; .@i < getarraysize($@pb_aidlist); set .@i, .@i +1 ) {
if ( isloggedin(.aidlist[.@i] == 0 ) ) {
deletearray $@pb_aidlist[.@i], 1;
set .@i, .@i -1;
}
else {
attachrid $@pb_aidlist[.@i];
if ( strcharinfo(3) != "guild_vs5" || hp == 0 ) {
deletearray $@pb_aidlist[.@i], 1;
set .@i, .@i -1;
}
}
}
}
detachrid;
set .stop, 1;
killmonsterall "guild_vs5";
if ( getarraysize($@pb_aidlist) == 1 ) {
announce "congratulations ~ the winner is "+ rid2name($@pb_aidlist), 0;
sleep 5000;
announce rid2name($@pb_aidlist) +" Win 5 Ancient Box Of Bloody", 0;
attachrid $@pb_aidlist;
getitem 30000, 5; // winner prize
warp "prontera", 148,172;
deletearray $@pb_aidlist;
}
else {
announce "nobody is a winner, too bad", 0;
}
end;
}
guild_vs5 mapflag nowarp
guild_vs5 mapflag nowarpto
guild_vs5 mapflag noteleport
guild_vs5 mapflag nosave SavePoint
guild_vs5 mapflag noskill
guild_vs5 mapflag nomemo

Edited by jigsgfx
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

edit this part....

( this part provide continuous spawn and updated amount from time to time )

while (1) {
monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 5 + .@extra;
sleep 5000;
if ( .stop ) end;
set .@extra, .@extra + rand(1,5);
set .@round, .@round +1;
}

refer here...

Monster

if you want ONLY 50 bomb poring...just simply change to this..

monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 50;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

its working.. i just notice when im testing it on a single player only.. then when its time to summon the 50 bombporings it will immediately killed.. my character won in less than a minute.. my character was surrounded by bombporings when the poring explode actually it's not look that it's explode coz there's no timer above the head of the poring.., and my character dont have a single scratch.. what do you think supposed to be the problem?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

trunk/db/re/mob_skill_db.txt

edit this

1904,Bomb Poring@NPC_SELFDESTRUCTION,any,173,1,10000,3000,0,no,self,always,0,,,,,,,

increase the explosion range...and add a casting time so that it work as "Timer"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

update this script

yeah I knew its made by me lol, but I've learned a lot new techniques by now ( I've level up ! )

by using OnPCDieEvent/OnPCLogoutEvent, this kind of LMS script will no longer has the chance for no winner situation

prontera,154,178,5    script    Run Or Die    100,{
   if ( !.start ) {
       mes "no event atm";
       close;
   }
   if ( .start == 2 ) {
       mes "event is running";
       close;
   }
   if ( .register_count >= .register_limit ) {
       mes "this event has reach the maximum player participations";
       close;
   }
   percentheal 100,100;
   warp "guild_vs5", 0,0;
   .register_aid[ .register_count ] = getcharid(3);
   .register_count+++;
   end;
OnWhisperGlobal:
   if ( getgmlevel() < 60 ) end;
//OnClock0000: // put all your start timer here
   if ( .start ) end;
   announce "Run or Die event registration start", 0;
   .start = 1;
   sleep 10000; // registration timer here
   announce "Run or Die event registration close", 0;
   .start = 2;
   sleep 3000;
   mapannounce "guild_vs5", "survive as long as you can !", 0;
   if ( .register_count < .register_min ) {
       announce "not enough participants for Run or Die event", 0;
       getmapxy .@map$, .@x, .@y, 1;
       mapwarp "guild_vs5", .@map$, .@x, .@y;
       goto L_reset;
   }
   while ( .start == 2 ) {
       monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 5 + rand(5), "", 0;
       monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 5 + rand(5), "", 1;
       monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 5 + rand(5), "", 2;
       sleep 5000;
   }
   end;
OnPCDieEvent:
OnPCLogoutEvent:
   if ( .start != 2 || strcharinfo(3) != "guild_vs5" ) end;
   while ( .register_aid != getcharid(3) && .@i < .register_count ) .@i++;
   deletearray .register_aid[.@i], 1;
   .register_count--;
   warp "SavePoint", 0,0;
   if ( .register_count > 1 ) end;
   killmonsterall "guild_vs5";
   announce "congratulations ~ the winner of Run Or Die event is "+ rid2name( .register_aid ), 0;
   getitem .reward_item_id, .reward_item_amount, .register_aid; // winner prize
   warpchar "SavePoint", 0,0, getcharid( 0, rid2name( .register_aid ) );
L_reset:
   .start = 0;
   deletearray .register_aid;
   .register_count = 0;
   end;
OnInit:
   .register_min = 2; // minimum amount of players to start this event, or else it auto-abort
   .register_limit = 100; // maximum amount of players able to participate in this event
   .reward_item_id = 7539;
   .reward_item_amount = 1;
   end;
}
guild_vs5    mapflag    nosave    SavePoint
guild_vs5    mapflag    nowarp
guild_vs5    mapflag    nowarpto
guild_vs5    mapflag    noteleport
guild_vs5    mapflag    nomemo
guild_vs5    mapflag    nopenalty
//guild_vs5    mapflag    nobranch
guild_vs5    mapflag    noicewall

  • Upvote 1
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...