letstry Posted September 23, 2018 Posted September 23, 2018 I'm currently using a script from this thread: Link Im using eAthena SVN and the script is working but my problem is that, only the Guild Leader is receiving the prize. Thanks in advance for helping out. Here is my code: //Author : Goddameit //Version : 2012/06/24 - 04:19 //Web : http://goo.gl/8Nedn /* I added some checks to make sure that will not happen some errors what I didn't expect for. Test in eA15*** SQL */ function script AllGuildMemberEvent { if(!set(.@gid,getcastledata(getarg(0),1))) return; query_sql("select account_id, char_id from `guild_member` where guild_id = '"+.@gid+"'", .@gmaid, .@gmcid); set .@amount,getarraysize(.@gmcid); for(set .@i,0;.@i<.@amount;set .@i,.@i+1) { if(!.@gmaid[.@i]) continue; query_sql("select last_ip from `login` where account_id = '"+.@gmaid[.@i]+"'",.@ip$); query_sql("select account_id from `login` where last_ip= '"+.@ip$+"'",.@aa); set .@bb,getarraysize(.@aa); for(set .@i2,1;.@i2<.@bb;set .@i2,.@i2+1) { for(set .@i3,0;.@i3<.@amount;set .@i3,.@i3+1) { if(.@aa[.@i2]==.@gmaid[.@i3]) { set .@gmaid[.@i3],0; set .@gmcid[.@i3],0; } } } if(attachrid(.@gmaid[.@i])) { message strcharinfo(0),"Victory !!"; getitem 969,5; detachrid; } } return; } - script AGME -1,{ OnAgitEnd: setarray .@maps$[0],"prtg_cas01"; //"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", //"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", //"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", //"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; for( set .@i,0; .@i <= 19; set .@i, .@i+1) { callfunc "AllGuildMemberEvent",.@maps$[.@i]; } end; } Quote
0 maken06 Posted October 1, 2018 Posted October 1, 2018 // ----------------------------------------------------------- // Reward options. // ----------------------------------------------------------- // [1] Enable rewards. // [2] Mail all rewards. // - If not set, players receive items in their inventory. // - Only ONE item can be sent via mail, plus Zeny. // - Note that offline players do NOT receive rewards. // [4] Only reward Guild Masters. // - If not set, all guild members are rewarded. // - If mailing is enabled (option 2), offline Guild Masters WILL receive rewards. // [8] Duplicate IP check. // - Members in a guild with the same IP address are not rewarded. // - If Guild Masters is enabled (option 4), this feature is not used. // ----------------------------------------------------------- https://github.com/rathena/rathena/blob/master/npc/custom/woe_controller.txt Quote
Question
letstry
I'm currently using a script from this thread: Link
Im using eAthena SVN and the script is working but my problem is that, only the Guild Leader is receiving the prize.
Thanks in advance for helping out.
Here is my code:
//Author : Goddameit //Version : 2012/06/24 - 04:19 //Web : http://goo.gl/8Nedn /* I added some checks to make sure that will not happen some errors what I didn't expect for. Test in eA15*** SQL */ function script AllGuildMemberEvent { if(!set(.@gid,getcastledata(getarg(0),1))) return; query_sql("select account_id, char_id from `guild_member` where guild_id = '"+.@gid+"'", .@gmaid, .@gmcid); set .@amount,getarraysize(.@gmcid); for(set .@i,0;.@i<.@amount;set .@i,.@i+1) { if(!.@gmaid[.@i]) continue; query_sql("select last_ip from `login` where account_id = '"+.@gmaid[.@i]+"'",.@ip$); query_sql("select account_id from `login` where last_ip= '"+.@ip$+"'",.@aa); set .@bb,getarraysize(.@aa); for(set .@i2,1;.@i2<.@bb;set .@i2,.@i2+1) { for(set .@i3,0;.@i3<.@amount;set .@i3,.@i3+1) { if(.@aa[.@i2]==.@gmaid[.@i3]) { set .@gmaid[.@i3],0; set .@gmcid[.@i3],0; } } } if(attachrid(.@gmaid[.@i])) { message strcharinfo(0),"Victory !!"; getitem 969,5; detachrid; } } return; } - script AGME -1,{ OnAgitEnd: setarray .@maps$[0],"prtg_cas01"; //"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", //"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", //"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", //"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; for( set .@i,0; .@i <= 19; set .@i, .@i+1) { callfunc "AllGuildMemberEvent",.@maps$[.@i]; } end; }
3 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.