Bringer Posted December 14, 2019 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 745 Reputation: 47 Joined: 03/12/14 Last Seen: 17 minutes ago Share Posted December 14, 2019 (edited) Spoiler // https://rathena.org/board/topic/110719-hourly-vending-timer-stop/#comment-324042 - script hourly_point_main -1,{ OnInit: .duration = 3600; .vip_multi = 2; .npc_name$ = strnpcinfo(3); //.delay = 1000; //Delay for idle re-check check. ( Default: 1000 [ = 1 Second ] ) //.idle = 60*1; //Player is idle after not moving for this many seconds. ( Default: 60*5 [ = 5 Minutes ] ) set .point_amt, 1; //Normal points gained. bindatcmd "reward", .npc_name$ + "::OnCheck"; end; OnUpdate: //Check for idle. if (@hourly_point_stopped || checkvending() >= 1) { @hourly_point_stopped = 1; dispbottom "The hourly points event stopped because you were vending, chatting, or idle!"; end; } set #HourlyPoints, #HourlyPoints + .point_amt * 1 * ( vip_status(1) ? .vip_multi : 1 ); dispbottom "You received "+.point_amt+" Reward Hourly Points by staying ingame for 1 hour"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; set @consecutive_hour, @consecutive_hour + 1; @timer = gettimetick(2) + .duration; addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate"; end; OnPCLoginEvent: @timer = gettimetick(2) + .duration; addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate"; dispbottom "Hourly Rewards have been started for this character."; end; OnPCLogoutEvent: @timer = gettimetick(2) + .duration; end; OnCheck: .@min = (@timer - gettimetick(2))/60; .@sec = (@timer - gettimetick(2))%60; dispbottom "Remaining Online Time:",0x9ae2d7; dispbottom "====================================",0x9ae2d7; dispbottom "Reward Hourly Points : [ "+#HourlyPoints+" ]",0x9ae2d7; if ( @hourly_point_stopped ) { dispbottom "The hourly points event stopped because you were previously vending, chatting, or idle!"; } else { dispbottom "Hourly Reward : " + ((.@min)? "" + .@min + " minute" + ((.@min > 1)?"s":""):"") + ((.@min && .@sec)? " and ":"") + ((.@sec)? "" + .@sec + " second" + ((.@sec > 1)?"s":""):"") + "",0x9ae2d7; dispbottom "====================================",0x9ae2d7; } end; } can anyone help this Mod script Timer Account Base [ if player change Char Timer still continue ] Even They logout timer will remain or gettimetick save Edited January 23, 2020 by Bringer Quote Link to comment Share on other sites More sharing options...
Question
Bringer
// https://rathena.org/board/topic/110719-hourly-vending-timer-stop/#comment-324042 - script hourly_point_main -1,{ OnInit: .duration = 3600; .vip_multi = 2; .npc_name$ = strnpcinfo(3); //.delay = 1000; //Delay for idle re-check check. ( Default: 1000 [ = 1 Second ] ) //.idle = 60*1; //Player is idle after not moving for this many seconds. ( Default: 60*5 [ = 5 Minutes ] ) set .point_amt, 1; //Normal points gained. bindatcmd "reward", .npc_name$ + "::OnCheck"; end; OnUpdate: //Check for idle. if (@hourly_point_stopped || checkvending() >= 1) { @hourly_point_stopped = 1; dispbottom "The hourly points event stopped because you were vending, chatting, or idle!"; end; } set #HourlyPoints, #HourlyPoints + .point_amt * 1 * ( vip_status(1) ? .vip_multi : 1 ); dispbottom "You received "+.point_amt+" Reward Hourly Points by staying ingame for 1 hour"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; set @consecutive_hour, @consecutive_hour + 1; @timer = gettimetick(2) + .duration; addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate"; end; OnPCLoginEvent: @timer = gettimetick(2) + .duration; addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate"; dispbottom "Hourly Rewards have been started for this character."; end; OnPCLogoutEvent: @timer = gettimetick(2) + .duration; end; OnCheck: .@min = (@timer - gettimetick(2))/60; .@sec = (@timer - gettimetick(2))%60; dispbottom "Remaining Online Time:",0x9ae2d7; dispbottom "====================================",0x9ae2d7; dispbottom "Reward Hourly Points : [ "+#HourlyPoints+" ]",0x9ae2d7; if ( @hourly_point_stopped ) { dispbottom "The hourly points event stopped because you were previously vending, chatting, or idle!"; } else { dispbottom "Hourly Reward : " + ((.@min)? "" + .@min + " minute" + ((.@min > 1)?"s":""):"") + ((.@min && .@sec)? " and ":"") + ((.@sec)? "" + .@sec + " second" + ((.@sec > 1)?"s":""):"") + "",0x9ae2d7; dispbottom "====================================",0x9ae2d7; } end; }
can anyone help this Mod script
-
Timer Account Base [ if player change Char Timer still continue ]
-
Even They logout timer will remain or gettimetick save
Edited by BringerLink to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.