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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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