Is there any one that can provide me a ip check for a daily reward or weekly..
Atm i have this script but seems not to work properly when i login 2 account they both can take the reward.
prontera,155,160,5 script 60 seconds Reward 4_F_FAIRYKID4,{
//=========================== Settings ================================================================
set .@rewname$,"[ Daily Reward ]";
set .rewardid,601;
set @rewardamount,1;
//======================= Settings End ================================================================
//*****************************************************************************************************
query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", @LastIp$);
if( (gettimetick(2) - lastTimeTalked > 60)&&(gettimetick(2) - getd(@LastIp$) > 60)) {
mes .@rewname$;
mes "Hello "+strcharinfo(0)+",I";
mes "am here to give you a daily";
mes "Reward. Do you want to have it?";
next;
switch(select("-Yes,sure!:-No,bye!:-Cancel")) {
case 1:
mes .@rewname$;
mes "Okay going to give you the item!";
next;
mes .@rewname$;
getitem .rewardid,@rewardamount;
mes "Okay have fun with it!";
set lastTimeTalked,gettimetick(2);
setd(@LastIp$,gettimetick(2));
close;
case 2:
mes .@rewname$;
mes "Okay goodbye!";
close;
case 3:
close;
}
}
mes .@rewname$;
mes "Sorry you can get the";
mes "Reward again after ";
mes "60 seconds are over!";
close;
}
Hello,
Is there any one that can provide me a ip check for a daily reward or weekly..
Atm i have this script but seems not to work properly when i login 2 account they both can take the reward.
Share this post
Link to post
Share on other sites