Jump to content
  • 0

About Annieruru's Battleground


nexus1528

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  07/15/13
  • Last Seen:  

I have successfully patched the diff file given by annie .. but i got error on my script ..
 

prontera,156,185,5  script Battleground 100,{

mes "Wanna sign up ?";

if ( select( "yes", "no" ) == 2 ) close;

else if ( .signup_count == 128 ) {

mes "Sorry the whole queue is full";

close;

}

while ( .signup_aid[.@i] != getcharid(3) && .@i < .signup_count )

set .@i, .@i +1;

if ( .@i < .signup_count ) {

mes "you have already sign up in this event";

close;

}

set .signup_aid[ .signup_count ], getcharid(3);

set .signup_count, .signup_count +1;

mes "You are now signed to the BG event";

// set .@i, 0; // DEBUG

// while ( .signup_aid[.@i] ) {

// set .@signup_name$, .@signup_name$ +","+ rid2name( .signup_aid[.@i] );

// set .@i, .@i +1;

// }

// mes "[Debug] Currently have "+ .signup_count +" sign-in and they are "+ .@signup_name$;

close2;

L_start:

if ( .signup_count < .min2start ) end;

for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) {

if ( attachrid( .signup_aid[.@i] ) ) {

if ( getmapflag( strcharinfo(3), mf_nowarp ) ) { // player has went into another event

deletearray .signup_aid[.@i], 1;

set .signup_count, .signup_count -1;

set .@i, .@i -1;

}

}

else {

deletearray .signup_aid[.@i], 1;

set .signup_count, .signup_count -1;

set .@i, .@i -1;

}

}

if ( .start || .signup_count < .min2start ) end;

announce "event started", 0;

set .start, 1;

for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 )

setbgid ( .@i %2 )? .red : .blue, .signup_aid[.@i];

deletearray .signup_aid, .min2start;

set .signup_count, .signup_count - .min2start;

bg_warp .red, "guild_vs3", 13,50;

bg_warp .blue, "guild_vs3", 86,50;

cleararray .score[1], .startingscore, 2;

bg_updatescore "guild_vs3", .score[1], .score[2];

sleep .eventlasting * 1000;

if ( .start == 1 ) {

if ( .score[1] == .score[2] )

mapannounce "guild_vs3", "Draw !", 0;

else if ( .score[1] > .score[2] ) {

mapannounce "guild_vs3", " Red side wins !", 0;

callsub L_reward, .red;

}

else if ( .score[1] < .score[2] ) {

mapannounce "guild_vs3", " Blue side wins !", 0;

callsub L_reward, .blue;

}

}

bg_warp .red, "prontera", 155,182;

bg_warp .blue, "prontera", 158,182;

bg_kickall .red;

bg_kickall .blue;

set .start, 0;

deletearray .score;

goto L_start;

L_reward:

getbgusers getarg(0);

for ( set .@i, 0; .@i < $@arenamembersnum; set .@i, .@i +1 )

getitem 501, 1, $@arenamembers[.@i]; // item reward

return;

OnredDead: callsub L_dead, 1;

OnblueDead: callsub L_dead, 2;

L_dead:

set .score[ getarg(0) ], .score[ getarg(0) ] -1;

bg_updatescore "guild_vs3", .score[1], .score[2];

if ( !.score[ getarg(0) ] )

awake strnpcinfo(0);

sleep2 1250;

percentheal 100,100;

end;

OnredQuit: callsub L_quit, 1, .red;

OnblueQuit: callsub L_quit, 2, .blue;

L_quit:

percentheal 100, 100;

if ( bg_get_data( getarg(1), 0 ) ) end;

set .score[ getarg(0) ], 0;

awake strnpcinfo(0);

end;

OnInit:

set .eventlasting, 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins

set .min2start, 2; // minimum player to start

set .startingscore, 3; // score at start



set .red, createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead" );

set .blue, createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead" );

end;

}



guild_vs3 mapflag battleground 2

guild_vs3 mapflag nosave SavePoint

guild_vs3 mapflag nowarp

guild_vs3 mapflag nowarpto

guild_vs3 mapflag noteleport

guild_vs3 mapflag nomemo

guild_vs3 mapflag nopenalty

guild_vs3 mapflag nobranch

 

 


the mapserver says that it cant find npc event Battleground::OnredDead and Battleground::OnredQuit

both on OnblueDead and OnblueQuit .. any help please ?

Edited by nexus1528
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


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

try change all label into lowercases...

Onreddead
Onredquit
Onbluedead
Onbluequit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  

Can you put a console image please?

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...