Jump to content

Begin

Members
  • Content Count

    85
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    Begin reacted to AnnieRuru in Modify reward script   
    @Begin
    prontera,155,180,5 script Reward NPC 4_F_FAIRYKID4,{ // $ip_reward_daytime = 0; mes "["+ strnpcinfo(NPC_NAME) +"]"; if ( $ip_reward_daytime != atoi( gettimestr("%Y%m%d", 20 ) ) ) { $ip_reward_daytime = atoi( gettimestr("%Y%m%d", 20 ) ); deletearray $ip_reward$; } .@size = getarraysize( $ip_reward$ ); while ( getcharip() != $ip_reward$[.@i] && .@i < .@size ) { ++.@i; } if ( .@i < .@size ) { mes "You have claimed the reward with this IP address."; close; } if ( @ip_reward && @ip_reward + .countdown <= gettimetick(2) ) { mes "Here is the surprise reward"; getitem Poring_Coin, 1; $ip_reward$[ getarraysize( $ip_reward$ ) ] = getcharip(); close; } if ( @ip_reward ) { mes "Countdown timer..."; .@timeleft = @ip_reward + .countdown - gettimetick(2); mes .@timeleft /3600 +" hour "+ .@timeleft %3600/60 +" min "+ .@timeleft %60 +" sec left"; close; } mes "Hello "+ strcharinfo(PC_NAME) +", I am here to give you a daily Surprise Reward. Do you want to have it?"; next; select "Yes, sure !!"; mes "["+ strnpcinfo(NPC_NAME) +"]"; mes "You can claim the reward in 5 hours time."; close2; addtimer .countdown *1000, strnpcinfo(NPC_NAME) +"::OnClaimReward"; @ip_reward = gettimetick(2); end; OnClaimReward: dispbottom "You can claim Daily Login Reward now."; end; OnInit: .countdown = 5*60*60; // 5 hours // .countdown = 5; }
  2. Upvote
    Begin got a reaction from IndieRO in Modify reward script   
    Hi All,
    May I request for a Hourly Point NPC with a Target Hours before you get the reward?
    There is a menu with Start, Stop and Pause button for logging out/offline purpose.
    I already tried my best to edit a hourlypoint script but I failed.
    Thanks in advance!
    ---Solved. Already found it. Sorry for not patiently testing all the topics that I saw.

    Hi All,
    Can you help me edit this script? Need to change the settings. You must not get the reward once you talked. You must only get the reward if you only reached the target time.
    In the photo attached, I talked to NPC in the first time and the NPC already gave the reward. I want if possible, you will only get the reward when you stayed online for 5 hours straight without logging out/disconnect/offline.
    Also a menu with Start, Stop and Pause for a player if he will logout of the game.
    Thank you.

     
    prontera,155,160,5 script Reward NPC 4_F_FAIRYKID4,{ .@npc_name$ = "[P 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 "Do you want a surprise item from me?"; mes "You have to wait for "+callfunc("Time2Str", .@delays); mes "To claim the reward!"; close; } .@index = .@i+1; break; } mes .@npc_name$; mes "Hello "+strcharinfo(0)+",I"; mes "am here to give you a daily"; mes "Surprise 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] = 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 = 60; // 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.