Jump to content

skyblue

Members
  • Content Count

    0
  • Joined

  • Last visited


Reputation Activity

  1. Like
    skyblue reacted to Litro in Daily Reward IP check   
    try this
    prontera,155,160,5 script 60 seconds Reward 4_F_FAIRYKID4,{ getcharip(); .@npc_name$ = "[Reward NPC]"; for (.@i = 0; .@i < getarraysize($ip_reward$); .@i+=2) { if ($ip_reward$[.@i] != getcharip()) continue; .@delays = atoi($ip_reward$[.@i+1]) + .delay; if ( .@delays > gettimetick(2)) { mes .@npc_name$; mes "Your IP addres have been claim the reward"; mes "You have to wait for "+callfunc("Time2Str", .@delays - gettimetick(2)); close; } .@index = .@i; break; } mes .@npc_name$; 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 .@npc_name$; for (.@j = 0; .@j < getarraysize(.reward); .@j+=2) getitem .reward[.@j], .reward[.@j+1]; mes "Okay have fun with it!"; if (.@index) $ip_reward$[.@index+1] = gettimetick(2); else { .@index = getarraysize($ip_reward$); $ip_reward$[.@index] = getcharip(); $ip_reward$[.@index+1] = gettimetick(2); } close; default: mes .@npc_name$; mes "Okay goodbye!"; close; } OnInit: setarray .reward, 601, 1; // <item id>, <item amount>{, <item id>, <item amount>,...} .delay = 86400; // Delay time before reward can be re-claimed. time set in second, default 24 Hours = 86400 seconds end; }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.