Jump to content
  • 0
Sign in to follow this  
Lord Ganja

Q> When does addtimer resets?

Question

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;}

 

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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').

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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