karazu Posted October 16, 2013 Group: Members Topic Count: 57 Topics Per Day: 0.01 Content Count: 374 Reputation: 5 Joined: 03/09/12 Last Seen: June 19, 2018 Share Posted October 16, 2013 Please help me with this.after the event/BG it will not give you a prize.This is the scriptDRAW,TEAM A or B wins it will not give you. OnTimer190000: if(.point[1]>.point[2]){ set .bg_id_w,$@bg_id_a; Announce "[Battle Ground]:Team A Win!",0; }else if(.point[2]>.point[1]){ set .bg_id_w,$@bg_id_b; Announce "[Battle Ground]:Team B Win!",0; }else{ set .bg_id_w,-1; Announce "[Battle Ground]:Draw!",0; } for( set .@i,1; .playerid[.@i]; set .@i,.@i+1 ){ if( attachrid(.playerid[.@i]) ){ //Prize if Team A win if(.bg_id_w == -1){ getitem 605,1;} //If Match Draws else if( getcharid(4) == .bg_id_w ) { getitem 605,1;} //If Someone Wins } } Quote Link to comment Share on other sites More sharing options...
skyleo Posted October 16, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 39 Reputation: 2 Joined: 08/19/12 Last Seen: April 8, 2022 Share Posted October 16, 2013 (edited) Are you sure that you're syntax of your for()-loop is right? for( set .@i,1; ..playerid[.@i]; set .@i,.@i+1 ){ [/quote as you can the in the marked part there is not really a statement telling the loop how long it should repeat. It might be working, what I actually do not know because the athena-script-language is a bit weird and sometimes quite simple, so I would find it weird, if this would work. If it's like PHP it might be working if it interprets that you're just asking if this var has a value, so returning true. and as long as this statement returns true the for-loop should work. But to be safe just try this: for( set .@i,1; getarraysize(.playerid[.@i]) < .@i; set .@i,.@i+1 ){ Edited October 16, 2013 by skyleo Quote Link to comment Share on other sites More sharing options...
karazu Posted October 16, 2013 Group: Members Topic Count: 57 Topics Per Day: 0.01 Content Count: 374 Reputation: 5 Joined: 03/09/12 Last Seen: June 19, 2018 Author Share Posted October 16, 2013 (edited) Thank you for that.I will try this one. Are you sure that you're syntax of your for()-loop is right? for( set .@i,1; ..playerid[.@i]; set .@i,.@i+1 ){ [/quote as you can the in the marked part there is not really a statement telling the loop how long it should repeat. It might be working, what I actually do not know because the athena-script-language is a bit weird and sometimes quite simple, so I would find it weird, if this would work. If it's like PHP it might be working if it interprets that you're just asking if this var has a value, so returning true. and as long as this statement returns true the for-loop should work. But to be safe just try this: for( set .@i,1; getarraysize(.playerid[.@i]) < .@i; set .@i,.@i+1 ){ Hello Still did not work. It will only announce and will not give prize..Hello Lets just continue the discussion fixing here: http://rathena.org/board/topic/88645-custom-battle-ground-by-goddammit-not-properly-working/ Thank you Edited October 16, 2013 by karazu Quote Link to comment Share on other sites More sharing options...
Question
karazu
Please help me with this.
after the event/BG it will not give you a prize.
This is the script
DRAW,TEAM A or B wins it will not give you.
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.