balanar12321 0 Posted October 3, 2020 if( query_sql( "SELECT `account_id` FROM `char` WHERE `guild_id`='"+$koegid+"' AND `online`= 1 ",.@AID ) ) for( set .@i,0; .@i < getarraysize( .@AID ); set .@i,.@i + 1 ){ getitem 601,1,.@AID[.@i]; getitem 602,1,.@AID[.@i]; } end; Can anyone help me to make this Auto Reward only 1 Per IP, if 2 players using 1 IP,,, only 1 player receive the prize at the end of the event Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted October 3, 2020 https://annieruru.blogspot.com/2019/01/how-to-compare-value-within-array.html use 4th method since you are rathena user prontera,150,190,5 script kjsfhkdhf 1_F_MARIA,{ if (inarray(.deny_ip$, getcharip()) >= 0) { mes "You've claim reward with this IP"; close; } .deny_ip$[getarraysize(.deny_ip$)] = getcharip(); getitem 501,1; end; } oh, wait, I thought you want modify reward given from koe script now you want it to give everyone upon the event ends - script sdfsdf FAKE_NPC,{ Onaaa: .@guild_id = .@atcmd_parameters$; // <-- change this to your guild ID, whatever it came from getguildmember .@guild_id, 1; getguildmember .@guild_id, 2; for (.@i = 0; .@i < $@guildmembercount; ++.@i) { if (isloggedin($@guildmemberaid[.@i], $@guildmembercid[.@i])) { if (inarray(.@deny_ip$, getcharip($@guildmemberaid[.@i])) >= 0) { message rid2name($@guildmemberaid[.@i]), "Multiple IP detected."; continue; } .@deny_ip$[getarraysize(.@deny_ip$)] = getcharip($@guildmemberaid[.@i]); getitem 501, 1, $@guildmemberaid; } } end; OnInit: bindatcmd "give", strnpcinfo(3)+"::Onaaa"; end; } Quote Share this post Link to post Share on other sites
if( query_sql( "SELECT `account_id` FROM `char` WHERE `guild_id`='"+$koegid+"' AND `online`= 1 ",.@AID ) )
for( set .@i,0; .@i < getarraysize( .@AID ); set .@i,.@i + 1 ){
getitem 601,1,.@AID[.@i];
getitem 602,1,.@AID[.@i];
}
end;
Can anyone help me to make this Auto Reward only 1 Per IP, if 2 players using 1 IP,,, only 1 player receive the prize at the end of the event
Share this post
Link to post
Share on other sites