I think the random drop item giving it's easy but the same IP can get only 1 reward it's hard
so just try the script combine with this
set .@size, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+getcharip()+"'",.@aid);
if (.@size < 2) end;