Lord Ganja 5 Posted August 31, 2015 I'm currently using 'addtimer' attach to a character that reduces a permanent account variable every minute. I was just wondering if the timer automatically resets and stop when the player logged out? or do I have to use 'deltimer' attach on OnPCLogoutEvent? Here's the script that im using: - script pk_karma_system -1,{OnPCLoginEvent: if( #pk_karmasystem_pts < 1 )end; addtimer 60000,"pk_karma_system::OnPointReduce"; end; OnPointReduce: if( #pk_karmasystem_pts < 1 ) deltimer "pk_karma_system::OnPointReduce"; else { #pk_karmasystem_pts -= 1; addtimer 60000,"pk_karma_system::OnPointReduce"; } end;} Quote Share this post Link to post Share on other sites
0 Garr 117 Posted August 31, 2015 Taken from doc/script_commands.txt, under addtimer: One more thing. These timers are stored as part of player data. If the player logs out, all of these get immediately deleted, without executing the script. If this behavior is undesirable, use some other timer mechanism (like 'sleep'). Quote Share this post Link to post Share on other sites
0 Lord Ganja 5 Posted August 31, 2015 Thanks @@Garr! Quote Share this post Link to post Share on other sites
I'm currently using 'addtimer' attach to a character that reduces a permanent account variable every minute.
I was just wondering if the timer automatically resets and stop when the player logged out? or do I have to use 'deltimer' attach on OnPCLogoutEvent?
Here's the script that im using:
Share this post
Link to post
Share on other sites