nexus1528 Posted October 4, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 20 Reputation: 0 Joined: 07/15/13 Last Seen: November 25, 2014 Share Posted October 4, 2013 (edited) 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::OnredQuitboth on OnblueDead and OnblueQuit .. any help please ? Edited October 4, 2013 by nexus1528 Quote Link to comment Share on other sites More sharing options...
Emistry Posted October 4, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 18 hours ago Share Posted October 4, 2013 try change all label into lowercases... Onreddead Onredquit Onbluedead Onbluequit Quote Link to comment Share on other sites More sharing options...
Promise Posted October 4, 2013 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 386 Reputation: 38 Joined: 04/28/13 Last Seen: March 22, 2024 Share Posted October 4, 2013 Can you put a console image please? Quote Link to comment Share on other sites More sharing options...
Question
nexus1528
I have successfully patched the diff file given by annie .. but i got error on my script ..
Edited by nexus1528the mapserver says that it cant find npc event Battleground::OnredDead and Battleground::OnredQuit
both on OnblueDead and OnblueQuit .. any help please ?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.