<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Timers (Scripting)</title><link>https://sourceforge.net/p/hercules/wiki/Timers%2520%2528Scripting%2529/</link><description>Recent changes to Timers (Scripting)</description><atom:link href="https://sourceforge.net/p/hercules/wiki/Timers%20(Scripting)/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 20 Feb 2023 05:03:40 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/hercules/wiki/Timers%20(Scripting)/feed" rel="self" type="application/rss+xml"/><item><title>Timers (Scripting) modified by Brynner</title><link>https://sourceforge.net/p/hercules/wiki/Timers%2520%2528Scripting%2529/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Here I will try to better explain timers. To understand half of what's going&lt;br/&gt;
on here, I suggest you already know how the basics of &lt;a class="alink" href="/p/hercules/wiki/Scripting/"&gt;[Scripting]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Many people are confused as to the use of timers, and this guide aims to lend&lt;br/&gt;
a helping hand. So you might be wondering "What do we use timers for?" Well,&lt;br/&gt;
my friend, this guide shall explain some of the many uses of timers. "&amp;lt;a&amp;gt;"&lt;br/&gt;
would mean an actual tab. I am not keeping to my usual neatness or else there&lt;br/&gt;
would be too many "&amp;lt;TAB&amp;gt;"s. Also, I will explain the usage and format of&lt;br/&gt;
different kinds of timers in detail.&lt;/p&gt;
&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#use-number-1-npc-speech"&gt;Use Number 1: NPC Speech&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#use-number-3-deny-usage"&gt;Use Number 3: Deny Usage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#difference-between-timers"&gt;Difference between Timers&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#npc-timers"&gt;NPC Timers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#player-timers"&gt;Player Timers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#label-timers"&gt;Label Timers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#other-timers"&gt;Other Timers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#recap"&gt;Recap&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#npc-timers-in-detail"&gt;NPC Timers in detail&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#initnpctimer"&gt;InitNPCTimer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#startnpctimer"&gt;StartNPCTimer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#stopnpctimer"&gt;StopNPCTimer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#getnpctimer"&gt;GetNPCTimer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#setnpctimer"&gt;SetNPCTimer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#attachnpctimer"&gt;AttachNPCTimer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#detachnpctimer"&gt;DetachNPCTimer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#pros-and-cons"&gt;Pro's and Cons&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#player-timers-in-detail"&gt;Player Timers in detail&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#addtimer"&gt;AddTimer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#addtimercount"&gt;AddTimerCount&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#deltimer"&gt;DelTimer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#pros-and-cons_1"&gt;Pro's and Cons&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h1 id="use-number-1-npc-speech"&gt;Use Number 1: NPC Speech&lt;/h1&gt;
&lt;p&gt;NPC Speech can be triggered using timers, and can make NPCs partition a long&lt;br/&gt;
paragraph instead of spamming 3 instant lines.  &lt;/p&gt;
&lt;p&gt;Here's an example of it in proccess.&lt;br/&gt;
We'll take this apart after we look at it.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;prontera&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;script&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;Non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;spamming&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;NPC&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Talker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;_M_JOBGUIDER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;OnInit&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Startnpctimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;OnTimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Npctalk&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Y hallo dar lol."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nl"&gt;OnTimer3000&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Npctalk&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Lawl I'm not spamming."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nl"&gt;OnTimer4000&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Setnpctimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, let's take a look at this script.&lt;br/&gt;
We'll start with "OnInit:".  &lt;/p&gt;
&lt;p&gt;Q: What is "OnInit:"?&lt;br/&gt;
A: "OnInit:" is the commands you wish the NPC to execute right after the NPC&lt;br/&gt;
is loaded.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;OnInit&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;GlobalVariable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Would set the variable (integer) "$GlobalVariable" to 10 when the server&lt;br/&gt;
starts.&lt;br/&gt;
&lt;em&gt;also see: &lt;a class="" href="../More%20About%20Variables"&gt;Variables &lt;/a&gt;&lt;/em&gt;  &lt;/p&gt;
&lt;p&gt;Let's move on to the next item, shall we?&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;"end;" is always needed to show that a label starting with "On",&lt;br/&gt;
&lt;em&gt;(and is a valid label that the server sees other functions for than just a&lt;br/&gt;
custom label)&lt;/em&gt;&lt;br/&gt;
has ended.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you do not end the "On" label with "end;", horrible things will happen,&lt;br/&gt;
such as running through other labels.&lt;/strong&gt;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;OnInit&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;$GlobalVariable&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;LOtherLabel&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;$GlobalVariable&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="n"&gt;$GlobalVariable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When the NPC is run, the variable "$GlobalVariable" would be 35, since 32 + 3&lt;br/&gt;
= 35  &lt;/p&gt;
&lt;p&gt;Note that the initiation label is executed, and proceedes to run through&lt;br/&gt;
"LOtherLabel".&lt;br/&gt;
This is because I did not insert an "end;" after "OnInit" ended, but instead,&lt;br/&gt;
after LOtherLabel.&lt;br/&gt;
Note: Sometimes this is usefull too...  &lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;lt&lt;/span&gt;&lt;span class="c1"&gt;;your script here&amp;amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, let's walk over this script in more detail. The start is nothing new,&lt;br/&gt;
just a simple NPC header with a text box. Then there appears to be a close2;.&lt;br/&gt;
This is not a typo. Close2; behaves a bit like close;, it displays a close&lt;br/&gt;
button. However, the script will keep on running in the background, after the&lt;br/&gt;
close button has been pushed. So, after the player presses the close button,&lt;br/&gt;
it continues with the next line. For you lazy bums, here is an outtake of the&lt;br/&gt;
script to prevent your scrolling finger from getting tired.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Addtimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;15000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Bomb Squad::OnWarn"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Addtimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Bomb Squad::OnBoom"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Dismantler : The bomb will detonate in 30 seconds!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Addtimer creates a player tagged timer. It is really simple to work with,&lt;br/&gt;
although it can be inaccurate.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;addtimer &amp;lt;ticks&amp;gt;,"NPC::OnEvent"; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, in our case, we start a timer that lasts for 15000ms, converted, 15&lt;br/&gt;
seconds. When the timer ends, it triggers "Bomb Squad::OnWarn". In human&lt;br/&gt;
language: It jumps to the label named OnWarn: within the NPC called "Bomb&lt;br/&gt;
Squad". We also create another timer, that lasts for 30 seconds, and will&lt;br/&gt;
trigger the label OnBoom: Then a simple dispbottom, to display some text in&lt;br/&gt;
the player's chat, and an end; to terminate the script.  &lt;/p&gt;
&lt;p&gt;Q: Why not use NPC timers?&lt;br/&gt;
A: NPC timers do not remember which player triggered the script, and addtimer&lt;br/&gt;
does remember the so called RID. Since we need to manipulate the player later&lt;br/&gt;
on, we need the script to remember the RID.  &lt;/p&gt;
&lt;p&gt;Anyway, after 15 seconds, if the player hasn't logged out, the script will&lt;br/&gt;
restart at the following point:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nl"&gt;OnWarn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Dismantler : OH MY GOD! ONLY 15 SECONDS LEFT - HURRY!!!!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;What it does here, is another text display in the chat of the player, and then&lt;br/&gt;
end the script again. So, we wait, and we wait, and then, after another 15&lt;br/&gt;
seconds, the second timer triggers the label OnBoom:, and starts this piece of&lt;br/&gt;
code:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nl"&gt;OnBoom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"*time slows down as suddenly the ticking stops*"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"...."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"BOOOOOOOM"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"The blast flings you away."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Warp&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"prontera"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Again the dispbottoms, and then, a random warp, because the bomb exploded.&lt;br/&gt;
Then another end; terminates the script again.  &lt;/p&gt;
&lt;p&gt;If you would have done this all with NPC timers, your mapserver would have&lt;br/&gt;
smacked you and perhaps even tackled itself. Why? Well, the dispbottom and the&lt;br/&gt;
warp command can only be executed on a player. To execute something on a&lt;br/&gt;
player, the script needs to have a so called RID. Addtimer remembers this RID,&lt;br/&gt;
a NPC timer does not.  &lt;/p&gt;
&lt;p&gt;Q: What if I click the NPC before both timers run out.&lt;br/&gt;
A: This can be done by setting a player variable &lt;a class="user-mention" href="/u/boom/"&gt;@boom&lt;/a&gt; before the close2; See&lt;br/&gt;
&lt;span&gt;[Variables#Player_Variables]&lt;/span&gt;. Temporary player variable works well along&lt;br/&gt;
with addtimer command, as they both behave the same.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;they are attached to the player &lt;/li&gt;
&lt;li&gt;both will disappear when player log out &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;so the Bomb Squad npc script now look like this&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;prontera&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;155&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;188&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;script&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;Bomb&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Squad&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;_M_JOBGUIDER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"[Dismantler]"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Where is the bomb? WHERE IS IT??"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Please help me find it before it explodes."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;If&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;@boom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Close&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Close2&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;@boom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Addtimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;15000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Bomb Squad::OnWarn"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Addtimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Bomb Squad::OnBoom"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Dismantler : The bomb will detonate in 30 seconds!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;OnWarn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Dismantler : OH MY GOD! ONLY 15 SECONDS LEFT - HURRY!!!!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;OnBoom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"*time slows down as suddenly the ticking stops*"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"...."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"BOOOOOOOM"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"The blast flings you away."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Warp&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"prontera"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;@boom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In the code above, we have manipulated the behavior of the NPC to have two&lt;br/&gt;
separate live states. The first state is before anyone has clicked the NPC,&lt;br/&gt;
after which the player variable(@ prefix) boom is set to a value of 1&lt;br/&gt;
immediately following the &lt;a class="alink" href="/p/hercules/wiki/Close2/"&gt;[Close2]&lt;/a&gt; command by sending "&lt;a class="alink" href="/p/hercules/wiki/Set/"&gt;[Set]&lt;/a&gt; &lt;a class="user-mention" href="/u/boom/"&gt;@boom&lt;/a&gt;, 1".&lt;br/&gt;
Then upon clicking the NPC during the timer sessions the NPC will have a&lt;br/&gt;
regular &lt;a class="alink" href="/p/hercules/wiki/Close/"&gt;[Close]&lt;/a&gt; command after displaying the message to the player due to&lt;br/&gt;
the if( &lt;a class="user-mention" href="/u/boom/"&gt;@boom&lt;/a&gt; == 1 ) check; instead of creating more timers. Once the second&lt;br/&gt;
timer finishes we also see the player variable boom set back to 0 with&lt;br/&gt;
"&lt;a class="alink" href="/p/hercules/wiki/Set/"&gt;[Set]&lt;/a&gt; &lt;a class="user-mention" href="/u/boom/"&gt;@boom&lt;/a&gt;,0;", it's off state.  &lt;/p&gt;
&lt;p&gt;Now, on to the bomb npc.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;prontera&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;script&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;Bomb&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;HIDDEN_NPC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;If&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;@boom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"*The bomb has been disarm*"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Deltimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Bomb Squad::OnWarn"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Deltimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Bomb Squad::OnBoom"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;@boom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Close&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;deltimer command will remove the timer that has previously attached to the&lt;br/&gt;
player. So if the player previously talk to the Bomb Squad, will able to&lt;br/&gt;
disarm the bomb. This will prevent the addtimer from invoking the OnWarn: and&lt;br/&gt;
OnBoom: label.  &lt;/p&gt;
&lt;p&gt;Q: What happens if the player click on the Bomb after 15 seconds, will the&lt;br/&gt;
server throw error for OnWarn: label already executed ?&lt;br/&gt;
A: Nope, the server doesn't seem to care about that. This means you can put as&lt;br/&gt;
many addtimer command, and deltimer all of them without additional checks.&lt;br/&gt;
Neat, isn't it?  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : addtimer can only attached to the up to 31 instances on that&lt;br/&gt;
player. This means, if you have more than a number of scripts using addtimer&lt;br/&gt;
command on that player, on 32th queue will throw an error on the server to&lt;br/&gt;
notify some of your script has over abuse this command. To lift off this&lt;br/&gt;
limit, simply increase the MAX_EVENTTIMER in src\map\map.h, and recompile your&lt;br/&gt;
server.&lt;/p&gt;
&lt;h1 id="use-number-3-deny-usage"&gt;Use Number 3: Deny Usage&lt;/h1&gt;
&lt;p&gt;Let's start with another example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;prontera&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;script&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;Daily&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Healer&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;_M_JOBGUIDER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"[Healer]"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Hello there."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"I am a special healer, who will fully restore your HP and SP."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"However, my powers are limited, and I need to rest for a full day after healing you, before I can help you again."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Next&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"[Healer]"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Do you want me to heal you?"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Next&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;If&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Select&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;"Yes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="ss"&gt;"No"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"[Healer]"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Ok, good bye then."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Close&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;If&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TimeHealed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;86400&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Gettimetick&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;86400&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;one&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;day&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;seconds&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"[Healer]"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"I am sorry, but I am not a robot."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"I am still exhausted from the last time I healed you."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Close&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"[Healer]"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Mes&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Ok, here goes!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Close2&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Percentheal&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TimeHealed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Gettimetick&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Healer : Please give me at least a day to recover."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Q: I see no timers?&lt;br/&gt;
A: That is correct. This NPC uses what I would like to call a Static Timer. We&lt;br/&gt;
will review it in detail below.  &lt;/p&gt;
&lt;p&gt;Ok, at a first glance, this is a normal healer NPC that fully heals your HP&lt;br/&gt;
and SP. The interesting part though is at the bottom. Let's start with the&lt;br/&gt;
bottom most part:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Close2&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Percentheal&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TimeHealed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Gettimetick&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Dispbottom&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Healer : Please give me at least a day to recover."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The NPC does the healing here, but after the healing, it sets a weird value to&lt;br/&gt;
TimeHealed. First, it gets a value from gettimetick(2). This command returns&lt;br/&gt;
the amount of seconds elapsed since 1/1/1970, based on your server current&lt;br/&gt;
time.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;If&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TimeHealed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;86400&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Gettimetick&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When the player wants to use the NPC again, the NPC first checks if the player&lt;br/&gt;
is still allowed to be healed. How? Well, remember, in TimeHealed, we stored&lt;br/&gt;
the time when the player last used the NPC. With gettimetick(2) we get the&lt;br/&gt;
current time in seconds that has elapsed since 1/1/1970, and by adding 86400,&lt;br/&gt;
which is the amount of seconds that goes in a day (24 * 60 * 60). Those two&lt;br/&gt;
combined give us the next time the player is allowed to use the NPC again. If&lt;br/&gt;
the player is allowed to use the NPC again, the combined value should be in&lt;br/&gt;
the past, so it should be less than what gettimetick(2) will return to us. If&lt;br/&gt;
it is the other way around, the player is not allowed to use the NPC yet, and&lt;br/&gt;
it will jump inside the if-statement.  &lt;/p&gt;
&lt;p&gt;Please note, that using a Static Timer comes with some disadvantages. First,&lt;br/&gt;
it uses a player variable. Second, the more dynamic you make it, the more&lt;br/&gt;
resources it will cost. Although it should be less CPU intensive than a normal&lt;br/&gt;
timer, making it dynamic means.  &lt;/p&gt;
&lt;p&gt;By turning that numbers into a Global variable,&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;If&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;TimeHealed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;HealInterval&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Gettimetick&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;$HealInterval will be a variable that you can set as a GM through another NPC,&lt;br/&gt;
to determine the time between two heal possibilities in seconds.&lt;/p&gt;
&lt;h1 id="difference-between-timers"&gt;Difference between Timers&lt;/h1&gt;
&lt;p&gt;First, let's give an overview of the different kinds of timers or time&lt;br/&gt;
triggered labels.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="" href="../NPC%20Timers"&gt;#NPC_Timers&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a class="" href="../Player%20Timers"&gt;#Player_Timers&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a class="" href="../Label%20Timers"&gt;#Label_Timers&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a class="" href="../Other%20Timers"&gt;#Other_Timers&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="npc-timers"&gt;NPC Timers&lt;/h2&gt;
&lt;p&gt;NPC timers are timers that are executed from the NPC's point of view. This&lt;br/&gt;
means that it does not require a player to initiate it, nor a player to use&lt;br/&gt;
it. A perfect example of this is the Speaking NPC at the start of this&lt;br/&gt;
article. NPC timers use the following seven commands:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;initnpctimer {"NPC Name"},{&amp;lt;Player RID&amp;gt;}; &lt;/li&gt;
&lt;li&gt;startnpctimer {"NPC Name"},{&amp;lt;Player RID&amp;gt;}; &lt;/li&gt;
&lt;li&gt;stopnpctimer {"NPC Name"},{&amp;lt;flag&amp;gt;}; &lt;/li&gt;
&lt;li&gt;getnpctimer &amp;lt;type&amp;gt;{,"NPC Name"}; &lt;/li&gt;
&lt;li&gt;setnpctimer &amp;lt;amount&amp;gt;{,"NPC Name"}; &lt;/li&gt;
&lt;li&gt;attachnpctimer {&amp;lt;Player RID&amp;gt;}; &lt;/li&gt;
&lt;li&gt;detachnpctimer {"NPC Name"}; &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="player-timers"&gt;Player Timers&lt;/h2&gt;
&lt;p&gt;Player timers are used for NPCs that can interact with players, and need to&lt;br/&gt;
have a specific count down or up per player. Unlike a NPC timer, a Player&lt;br/&gt;
timer remembers which player started the timer. In other words, it remembers&lt;br/&gt;
the RID and reattaches it again when needed. This allows you to alter a&lt;br/&gt;
player's variable later on in the script, where this is not possible with a&lt;br/&gt;
NPC timer. Player timers use similar commands as NPC timers. However, there&lt;br/&gt;
are only three of them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;addtimer &amp;lt;ticks&amp;gt;,"NPC::OnEvent"; &lt;/li&gt;
&lt;li&gt;addtimercount &amp;lt;ticks&amp;gt;,"NPC::OnEvent"; &lt;/li&gt;
&lt;li&gt;deltimer "NPC::OnEvent"; &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="label-timers"&gt;Label Timers&lt;/h2&gt;
&lt;p&gt;Label Timers aren't timers actually. They are labels that are triggered&lt;br/&gt;
depending on the current time of the server. There are several different kinds&lt;br/&gt;
of them, but they all almost work in the same way. You simply put them in your&lt;br/&gt;
script as a label, and they look like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OnClockXXXX: &lt;/li&gt;
&lt;li&gt;OnDayXXXX: &lt;/li&gt;
&lt;li&gt;OnHourXX: &lt;/li&gt;
&lt;li&gt;OnMinuteXX: &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Where XX is a two digit number and XXXX is a four digit number. SSSXXXX is&lt;br/&gt;
three letters followed by four digits.&lt;br/&gt;
How they work? Relatively easy. OnClock is already explained in the first part&lt;br/&gt;
of this article, but here is the recap in case you forgot. To make it work,&lt;br/&gt;
you replace XXXX by an actual time in the 24 hour format. The time you put&lt;br/&gt;
there, is when the label is triggered. So, for example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;OnClock0700: // This label is triggered at 7 AM servertime.
OnClock1414: // This label is triggered at 2:14 PM servertime.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Just like normal labels, you can use the same OnClock label in different NPCs,&lt;br/&gt;
but, it cannot occur twice in the same NPC. You can have different OnClocks in&lt;br/&gt;
the same NPC though.&lt;br/&gt;
OnDayXXXX works a bit like OnClock. The XXXX here stands for a specific day in&lt;br/&gt;
a specific month. The first XX is the month, the second XX is the day of that&lt;br/&gt;
month. When it is that day, it will be triggered. Assumed is, that this&lt;br/&gt;
happens only once at the start of that day, or the first time that your server&lt;br/&gt;
is up during that day. Here are a couple of examples:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;OnDay0101: // This label is triggered on the first day of January.
OnDay0515: // This one is triggered on the fifteenth day of May.
OnDay1231: // This one is triggered on the last day of December.
OnDay0229: // This label is only triggered when it is February 29th, so once every four years.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;OnHourXX and OnMinuteXX are similar in use. With OnHour, the XX stands for a&lt;br/&gt;
specific hour during the day when it is triggered. The XX within OnMinute&lt;br/&gt;
stands for a specific minute per hour. Some examples to make it clear:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;OnHour01: // Triggers at 1 AM every day.
OnHour20: // Triggers at 8 PM every day.
OnMinute00: // Triggers at each new hour, so 1:00, 2:00, 3:00, 4:00 etc.
OnMinute17: // Triggers each hour at 17 minutes past. So, 8:17, 9:17, 10:17 etc.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Last, and probably the least known is OnSSSXXXX. The best way to describe this&lt;br/&gt;
one is an OnWeekday label. (OnWeekday does not exist.) In this label, SSS is&lt;br/&gt;
replaced by one of the following: Sun, Mon, Tue, Wed, Thu, Fri, Sat. XXXX is&lt;br/&gt;
replaced by a number in the same way as the XXXX in OnClockXXXX. It notes a&lt;br/&gt;
specific time of the day. This label is triggered on the specified day of the&lt;br/&gt;
week (SSS) at the specified time in 24 hour format (XXXX). At least, that is&lt;br/&gt;
the theory. Here are some examples you can work with:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;OnSat1200: // Triggers at noon on each Saturday.
OnTue0707: // Triggers at 7 past 7 AM on Tuesday.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note: Although there is no OnSecondXX or OnMillisecondXXXX label, you can&lt;br/&gt;
simulate this. Be aware though, this causes a heavy load on your server. To do&lt;br/&gt;
this, you will have to use a NPC. Here is a short example simulating&lt;br/&gt;
OnSecond30 using a NPC timer:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;script&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;Annoying&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Announcer&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;FAKE_NPC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;OnInit&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Initnpctimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;OnTimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Gettime&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GETTIME_SECOND&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;!=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Announce&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"I'm very annoying."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;bc_all&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Initnpctimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And one that triggers every 40 milliseconds:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;script&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;Flooder&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FAKE_NPC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;OnInit&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Initnpctimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;OnTimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Announce&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;"Flood!"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;bc_all&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Initnpctimer&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;End&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="other-timers"&gt;Other Timers&lt;/h2&gt;
&lt;p&gt;These timers are actually nowhere related to timers. To be exact, they are&lt;br/&gt;
event triggered labels, but let's go over them anyway, because they are&lt;br/&gt;
useful. The timers I'm referring to are the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/OnInit/"&gt;[OnInit]&lt;/a&gt;: - Is triggered on server start up. &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/OnInterIfInit/"&gt;[OnInterIfInit]&lt;/a&gt;: - Is triggered when the mapserver connects to the charserver. &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/OnInterIfInitOnce/"&gt;[OnInterIfInitOnce]&lt;/a&gt;: - Is only triggered on the first time the map server connects to the char server. If it loses connection after that, and gets a connection again, these labels are no longer triggered (unless the map server is really restarted). &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/OnAgitInit/"&gt;[OnAgitInit]&lt;/a&gt;: - Is triggered when WoE is initiated. &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/OnAgitStart/"&gt;[OnAgitStart]&lt;/a&gt;: - Is triggered when WoE is started. &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/OnAgitEnd/"&gt;[OnAgitEnd]&lt;/a&gt;: - Is triggered when WoE ends. &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/OnTimer/"&gt;[OnTimer]&lt;/a&gt;X: - Is triggered when a player or NPC timer reaches the value X in milliseconds. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are many more of these kinds of special event triggered labels, like the&lt;br/&gt;
login event, but these, with the exception of OnTimerX, are all triggered&lt;br/&gt;
without the need of a player. With OnTimerX, the X should be replaced by a&lt;br/&gt;
time in milliseconds, for example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;OnTimer100: // Triggers 100ms after a player timer or NPC timer is started in the same NPC.
OnTimer3600000: // Triggers 1 hour after a player timer or NPC timer is started in the same NPC.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="recap"&gt;Recap&lt;/h2&gt;
&lt;p&gt;The above information should help you make a decission on what timertype to&lt;br/&gt;
use. For example, if you do not need to do anything with the player who starts&lt;br/&gt;
it, or don't need a player to start it, use a NPC timer. When you want to do&lt;br/&gt;
stuff related to a player, or which needs an RID, use a player timer. When you&lt;br/&gt;
want something to happen at a specific moment in time, use one of the On&lt;br/&gt;
labels. And when you want your server to lag badly, simulate&lt;br/&gt;
OnMillisecondXXXX.&lt;/p&gt;
&lt;h1 id="npc-timers-in-detail"&gt;NPC Timers in detail&lt;/h1&gt;
&lt;p&gt;In this section, we will explain how each NPC Timer command works in detail.&lt;br/&gt;
First another quick list of the available NPC Timers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Initnpctimer/"&gt;[Initnpctimer]&lt;/a&gt; {"NPC Name"},{&amp;lt;Player RID&amp;gt;}; &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Startnpctimer/"&gt;[Startnpctimer]&lt;/a&gt; {"NPC Name"},{&amp;lt;Player RID&amp;gt;}; &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Stopnpctimer/"&gt;[Stopnpctimer]&lt;/a&gt; {"NPC Name"},{&amp;lt;flag&amp;gt;}; &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Getnpctimer/"&gt;[Getnpctimer]&lt;/a&gt; &amp;lt;type&amp;gt;{,"NPC Name"}; &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Setnpctimer/"&gt;[Setnpctimer]&lt;/a&gt; &amp;lt;amount&amp;gt;{,"NPC Name"}; &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Attachnpctimer/"&gt;[Attachnpctimer]&lt;/a&gt; {&amp;lt;Player RID&amp;gt;}; &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Detachnpctimer/"&gt;[Detachnpctimer]&lt;/a&gt; {"NPC Name"}; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now that you know the commands, you will have to know how NPC Timers actually&lt;br/&gt;
work. It is quite easy to be honest. A NPC can have one timer attached to it,&lt;br/&gt;
which basically is a stopwatch. When you start a timer, a kind of NPC like&lt;br/&gt;
variable will start running, often from 0. Every millisecond (1 second is 1000&lt;br/&gt;
milliseconds or 1000 ms), 1 is added to this variable. So, after 1 second, the&lt;br/&gt;
variable will be 1000. After 12.5 seconds, the variable will be 12500.&lt;br/&gt;
Now, on each tick (tick means every increment of this variable), the timer&lt;br/&gt;
will check if inside the NPC it is running from or attached to, if there is a&lt;br/&gt;
label that matches his current value. The labels have a special format, and&lt;br/&gt;
look like this:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;OnTimerXXXXX:
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Where XXXXX is a number that can be as small as 0, or as big as 2,147,483,647&lt;br/&gt;
(roughly 24 days). If the value of the timer matches one of those labels, then&lt;br/&gt;
the NPC will start running at that specific label. So, let's say you have a&lt;br/&gt;
label OnTimer1000: (1 second), and you have started a NPC timer, then one&lt;br/&gt;
second later, the script will jump to that label, and start executing the code&lt;br/&gt;
underneath it.&lt;br/&gt;
Often, when using NPC Timers, you want to stop them at some point, or reset&lt;br/&gt;
them, to make the NPC start over again. For this purpose, the&lt;br/&gt;
&lt;a class="" href="/p/hercules/wiki/Developers/"&gt;Developers&lt;/a&gt; have written several commands that are now at our&lt;br/&gt;
disposal, which allow us to manipulate this NPC based timer.&lt;br/&gt;
A last thing you need to know, before we go into detail on the specific&lt;br/&gt;
commands, is that by default a NPC Timer will run in the same NPC as where the&lt;br/&gt;
command is found, and that there is no player attached. The last part means,&lt;br/&gt;
that you will be unable by default to manipulate the player, variable wise or&lt;br/&gt;
command wise.  &lt;/p&gt;
&lt;h2 id="initnpctimer"&gt;InitNPCTimer&lt;/h2&gt;
&lt;p&gt;This command allows you create a new NPC timer, if it doesn't already exist,&lt;br/&gt;
and have it start counting from 0. The NPC timer is attached to a NPC,&lt;br/&gt;
normally the one you start it from. This means, that it will look for certain&lt;br/&gt;
OnTimer labels inside that NPC alone. However, you can also make the command&lt;br/&gt;
start a NPC Timer in another NPC. To do this, you will have to specify a NPC&lt;br/&gt;
Name. You can even attach a player to the NPC Timer. To do this, you must&lt;br/&gt;
specify the RID when using &lt;strong&gt;initnpctimer&lt;/strong&gt;. This will allow your timer to&lt;br/&gt;
execute commands that require a player's RID, like warp or countitem.&lt;br/&gt;
On top of that, you can also specify both a NPC Name and a Player RID. For&lt;br/&gt;
that, put the NPC Name first, then a comma, and then the player's RID.&lt;br/&gt;
For those unfamiliar of what an RID is, the RID is a kind of hook with which&lt;br/&gt;
online players are recognized. When coming online, the player's RID will be&lt;br/&gt;
set equal to his account ID (getcharid(3)).  &lt;/p&gt;
&lt;p&gt;Some examples:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;initnpctimer; // Start a new NPC timer and make it count from 0.
initnpctimer "My Other NPC"; // Start a new NPC timer in the NPC named "My Other NPC" and make it count from 0.
initnpctimer getcharid(3); // Start a new NPC timer and make it count from 0. Also, attach the current player to the timer.
initnpctimer "My Other NPC",getcharid(3); // Start a new NPC timer in the NPC named "My Other NPC" 
                                             and make it count from 0. Also, attach the current player to the timer.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="startnpctimer"&gt;StartNPCTimer&lt;/h2&gt;
&lt;p&gt;This command almost works the same as &lt;a class="" href="/p/hercules/wiki/Initnpctimer/"&gt;Initnpctimer&lt;/a&gt;. The only&lt;br/&gt;
major difference is that it doesn't set the counter, or if you like, the timer&lt;br/&gt;
variable, to 0. It simply continues where it was. So, if you started the NPC&lt;br/&gt;
Timer with &lt;strong&gt;initnpctimer&lt;/strong&gt; , and stopped it later on, but want it to start&lt;br/&gt;
again where it left off, then you use this command. If you like you can read&lt;br/&gt;
&lt;strong&gt;continuenpctimer instead of&lt;/strong&gt; startnpctimer **.  &lt;/p&gt;
&lt;p&gt;** Again, for the various options, you might want to look at&lt;br/&gt;
&lt;a class="" href="/p/hercules/wiki/Initnpctimer/"&gt;Initnpctimer&lt;/a&gt;. We will just show some examples here:  &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;startnpctimer&lt;/span&gt;&lt;span class="c1"&gt;; // Continues the NPC timer where it left off, or start a new one if there isn't a timer already.&lt;/span&gt;
&lt;span class="nv"&gt;startnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"My Other NPC"&lt;/span&gt;&lt;span class="c1"&gt;; // Same as above, but starts it in the NPC named "My Other NPC".&lt;/span&gt;
&lt;span class="nv"&gt;startnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;getcharid&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;; // Same as the first one, but attaches the current player to the timer.&lt;/span&gt;
&lt;span class="nv"&gt;startnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"My Other NPC"&lt;/span&gt;,&lt;span class="nv"&gt;getcharid&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;; // Combination of the two above.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="stopnpctimer"&gt;StopNPCTimer&lt;/h2&gt;
&lt;p&gt;This command is the counterpart of &lt;a class="" href="/p/hercules/wiki/Startnpctimer/"&gt;Startnpctimer&lt;/a&gt;. What it&lt;br/&gt;
does, you've guessed it, it stops (or pauses) the timer. As for the&lt;br/&gt;
parameters, the NPC Name part is exactly the same as with&lt;br/&gt;
&lt;a class="" href="/p/hercules/wiki/Initnpctimer/"&gt;Initnpctimer&lt;/a&gt;. If you specify a flag value (can be any non-&lt;br/&gt;
zero value, zero will simply be ignored), then &lt;strong&gt;stopnpctimer&lt;/strong&gt; will also&lt;br/&gt;
detach the player, if any was attached to it.  &lt;/p&gt;
&lt;p&gt;Some examples again:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;stopnpctimer; // Pauses the NPC timer in the current NPC.
stopnpctimer "My Other NPC"; // Pauses the NPC timer in the NPC named "My Other NPC"
stopnpctimer 1; // Pauses the NPC timer in the current NPC and detaches any attached player.
stopnpctimer "My Other NPC",1; // Combination of the two above.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="getnpctimer"&gt;GetNPCTimer&lt;/h2&gt;
&lt;p&gt;&lt;a class="" href="/p/hercules/wiki/Getnpctimer/"&gt;Getnpctimer&lt;/a&gt; is a bit of a tricky command. Basically it can be&lt;br/&gt;
used to read out the statistics on a certain NPC Timer. (Either the one in the&lt;br/&gt;
current NPC, or the one defined by the parameter "NPC Name".) There are three&lt;br/&gt;
different statistics for a NPC Timer, which are:  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;0 - Current Tick Count &lt;/li&gt;
&lt;li&gt;1 - Remaining OnTimer labels &lt;/li&gt;
&lt;li&gt;2 - Already executed OnTimer labels &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first one (0), basically is a variable which holds the amount of&lt;br/&gt;
milliseconds that the timer is on.  &lt;/p&gt;
&lt;p&gt;The second one (1), holds the amount of labels that the timer will still have&lt;br/&gt;
to do in the NPC, if it is not reset or stopped prematurely.  &lt;/p&gt;
&lt;p&gt;The third one (2), holds the amount of OnTimer labels which the timer already&lt;br/&gt;
has executed. Most likely, &lt;strong&gt;initnpctimer&lt;/strong&gt; resets this counter. What&lt;br/&gt;
&lt;strong&gt;startnpctimer&lt;/strong&gt; does to this statistic, is unknown at the moment.  &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="../GetNPCimer"&gt;Getnpctimer&lt;/a&gt; always needs to have a type (one of the three&lt;br/&gt;
above) specified when being used. For the second stat of the three, when there&lt;br/&gt;
was originally a player attached, then it will still need this player to be&lt;br/&gt;
attached, or it will give you back an error and return 0.  &lt;/p&gt;
&lt;p&gt;Some examples:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;getnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;; // Returns the current amount of ticks.&lt;/span&gt;
&lt;span class="nv"&gt;getnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;,&lt;span class="s2"&gt;"My Other NPC"&lt;/span&gt;&lt;span class="c1"&gt;; // Does the same, only for the NPC named "My Other NPC".&lt;/span&gt;
&lt;span class="nv"&gt;getnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="c1"&gt;; // Returns the amount of OnTimer labels that are still untriggered.&lt;/span&gt;
&lt;span class="nv"&gt;getnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;,&lt;span class="s2"&gt;"My Other NPC"&lt;/span&gt;&lt;span class="c1"&gt;; // Same as above, but for the NPC named "My Other NPC".&lt;/span&gt;
&lt;span class="nv"&gt;getnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="c1"&gt;; // Returns the amount of OnTimer labels that have already been triggered.&lt;/span&gt;
&lt;span class="nv"&gt;getnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;,&lt;span class="s2"&gt;"My Other NPC"&lt;/span&gt;&lt;span class="c1"&gt;; // Same as above, but for the NPC named "My Other NPC".&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Currently there is no way to retrieve the value of getnpctimer(0)&lt;br/&gt;
with attachnpctimer;. It's still mark as a&lt;br/&gt;
&lt;a class="" href="https://github.com/HerculesWS/Hercules/blob/e711753b9d584845e385ada29780b9ed216c4f55/src/map/npc.c#L771" rel="nofollow"&gt;TODO&lt;/a&gt;&lt;br/&gt;
in the source code ;-)&lt;/p&gt;
&lt;h2 id="setnpctimer"&gt;SetNPCTimer&lt;/h2&gt;
&lt;p&gt;&lt;a class="" href="/p/hercules/wiki/Setnpctimer/"&gt;Setnpctimer&lt;/a&gt; is the counterpart of &lt;a class="" href="/p/hercules/wiki/Getnpctimer/"&gt;Getnpctimer&lt;/a&gt;.&lt;br/&gt;
However, it only allows you to change the current amount of ticks (elapsed&lt;br/&gt;
milliseconds) of a specific timer. If you define a NPC Name with it, it will&lt;br/&gt;
use the timer in that NPC, otherwise, it will try to alter the timer in the&lt;br/&gt;
NPC where the command is in. The amount you set the NPC Timer to, should be&lt;br/&gt;
given in ticks, or milliseconds. The command theoritically works even when a&lt;br/&gt;
NPC timer is stopped, but probably does not work when no NPC Timer has ever&lt;br/&gt;
started in the NPC. This is about all there is to this command. It works, no&lt;br/&gt;
matter if there is a player attached to it or not.  &lt;/p&gt;
&lt;p&gt;Some examples again:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;setnpctimer 10000; // Sets the NPC Timer of the current NPC to 10 seconds.
setnpctimer 2345,"My Other NPC"; // Sets the NPC Timer in the NPC named "My Other NPC" to 2345 ticks or ms.
setnpctimer 0; // Sets the current NPC Timer to 0.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note:&lt;br/&gt;
In the current revisions, &lt;strong&gt;setnpctimer&lt;/strong&gt; also pauses the timer when changing&lt;br/&gt;
the value. So, do not forget to use &lt;strong&gt;startnpctimer&lt;/strong&gt; ; after using&lt;br/&gt;
&lt;strong&gt;setnpctimer&lt;/strong&gt; , or your timer will not continue to run. (This might be&lt;br/&gt;
changed in later revisions)  &lt;/p&gt;
&lt;h2 id="attachnpctimer"&gt;AttachNPCTimer&lt;/h2&gt;
&lt;p&gt;&lt;a class="" href="/p/hercules/wiki/Attachnpctimer/"&gt;Attachnpctimer&lt;/a&gt; allows you to attach a player to a NPC later&lt;br/&gt;
on. This can only be done to the NPC Timer that is in the same NPC as where&lt;br/&gt;
this command is used. To attach a player, you will simply have to give his&lt;br/&gt;
account id or RID (or UID/GID in some devs words) as a parameter.  &lt;/p&gt;
&lt;p&gt;Examples:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;attachnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;getcharid&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;; // Attaches current player to the NPC Timer.&lt;/span&gt;
&lt;span class="nv"&gt;attachnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2000000&lt;/span&gt;&lt;span class="c1"&gt;; // Attaches the player with account id 2000000 to the NPC Timer, if he is online.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="detachnpctimer"&gt;DetachNPCTimer&lt;/h2&gt;
&lt;p&gt;&lt;a class="" href="/p/hercules/wiki/Detachnpctimer/"&gt;Detachnpctimer&lt;/a&gt; is the opposite of&lt;br/&gt;
&lt;a class="" href="/p/hercules/wiki/Attachnpctimer/"&gt;Attachnpctimer&lt;/a&gt;. Unlike its counterpart however, you can use&lt;br/&gt;
it outside its current NPC. To do this, simply specify the name of the other&lt;br/&gt;
NPC as parameter. This is optional of course.  &lt;/p&gt;
&lt;p&gt;Examples:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;detachnpctimer&lt;/span&gt;&lt;span class="c1"&gt;; // Detaches the attached player from the NPC Timer, if anyone was attached.&lt;/span&gt;
&lt;span class="nv"&gt;detachnpctimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"My Other NPC"&lt;/span&gt;&lt;span class="c1"&gt;; // Does the same, only for the NPC named "My Other NPC".&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="pros-and-cons"&gt;Pro's and Cons&lt;/h2&gt;
&lt;p&gt;Using NPC Timers have specific advantages and disadvantages. These will be&lt;br/&gt;
listed in a compact way next.&lt;br/&gt;
Advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can be specific bound to any NPC. &lt;/li&gt;
&lt;li&gt;No need for a player, but can be attached. &lt;/li&gt;
&lt;li&gt;Can be used on start up or time triggered labels. &lt;/li&gt;
&lt;li&gt;Can be looped/resetted easily. &lt;/li&gt;
&lt;li&gt;Can be manipulated/read out in various ways. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Disadvantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NPC bound, so, if multiple players use the NPC, the timer will restart each time. (Can cause unexpected results.) &lt;/li&gt;
&lt;li&gt;Only one NPC Timer can run per NPC. &lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="player-timers-in-detail"&gt;Player Timers in detail&lt;/h1&gt;
&lt;p&gt;In this section, we will explain how each Player Timer command works in&lt;br/&gt;
detail. First another quick list of the available Player Timers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Addtimer/"&gt;[Addtimer]&lt;/a&gt; &amp;lt;ticks&amp;gt;,"NPC::OnEvent"; &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Addtimercount/"&gt;[Addtimercount]&lt;/a&gt; &amp;lt;ticks&amp;gt;,"NPC::OnEvent"; &lt;/li&gt;
&lt;li&gt;&lt;a class="alink" href="/p/hercules/wiki/Deltimer/"&gt;[Deltimer]&lt;/a&gt; "NPC::OnEvent"; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The list of player timer commands is significally shorter than the list of NPC&lt;br/&gt;
Timers. This is right away one of the well.., downsides of the player timer.&lt;br/&gt;
It has less flexibility. However, player timers are easier to work with for&lt;br/&gt;
the same reason.&lt;br/&gt;
Player timers work in a reverse way from NPC Timers. Basically you enter a&lt;br/&gt;
number in milliseconds (1 second is 1000 milliseconds), and a timer attached&lt;br/&gt;
to the player who triggered it, will run down from that number to 0. When it&lt;br/&gt;
reaches 0, it will jump to the eventlabel specified in the second parameter of&lt;br/&gt;
addtimer.&lt;br/&gt;
Besides starting a timer, and let it run it's course, you can also delay it,&lt;br/&gt;
and even delete it before it reaches 0. Also, a player timer, is like the word&lt;br/&gt;
indicates, unique for each player for each label. So, a player will not&lt;br/&gt;
influence the timer of another player in normal circumstances, and you can&lt;br/&gt;
even start different timers for the same player, as long as the event label is&lt;br/&gt;
different each time.  &lt;/p&gt;
&lt;h2 id="addtimer"&gt;AddTimer&lt;/h2&gt;
&lt;p&gt;Addtimer allows you to start a new timer for the player who is currently&lt;br/&gt;
interacting with the script. It has two parameters, which are not optional:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ticks &lt;/li&gt;
&lt;li&gt;"NPC::OnEvent" &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ticks is a number which you specify, which is the starting time, in&lt;br/&gt;
milliseconds. The timer will start to run immediately after this line,&lt;br/&gt;
substracing 1 from the tickcount each millisecond, until it reaches 0.&lt;br/&gt;
The NPC::OnEvent, is an event label which you must specify. It must be for the&lt;br/&gt;
following format: "NPC NAME::OnYourLabel", where OnYourLabel is an existing&lt;br/&gt;
label that starts with On, in the NPC named NPC NAME. When the timer runs down&lt;br/&gt;
to 0, it will jump to that label in that NPC. For easiness sake, let's call&lt;br/&gt;
the "NPC::OnEvent" part of the command, and the upcoming commands, also the&lt;br/&gt;
name of the player timer.&lt;br/&gt;
Well, that is all there is to the addtimer command, so some last examples:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;addtimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;1000&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"My NPC::OnMyLabel"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Starts&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;timer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;out&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;after&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;1000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ms&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;second&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;then&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;jumps&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OnMyLabel&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;My&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NPC&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="nt"&gt;addtimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;60000&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"NPC1::OnLoser"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;60&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;seconds&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;timer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;out&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;jumps&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OnLoser&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NPC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;named&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NPC1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="addtimercount"&gt;AddTimerCount&lt;/h2&gt;
&lt;p&gt;Addtimercount allows you to 'delay' a previously started timer. It takes the&lt;br/&gt;
current amount of ticks left, and add the amount specified by the parameter&lt;br/&gt;
ticks. So, in essence, this delays the timer by &amp;lt;ticks&amp;gt; amount of&lt;br/&gt;
milliseconds. For which timer it does this, is up to you and the player who is&lt;br/&gt;
currently attached to the script. Which timer you want to alter, is what you&lt;br/&gt;
specify with the second parameter, "NPC::OnEvent" (or as said earlier, the&lt;br/&gt;
name of the timer).&lt;br/&gt;
Some examples:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;addtimercount&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;5000&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"My NPC::OnMyLabel"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Adds&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;seconds&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;timer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"My NPC::OnMyLabel"&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="nt"&gt;addtimercount&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-10000&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"NPC1::OnLoser"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Removes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;seconds&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;timer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"NPC1::OnLoser"&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="deltimer"&gt;DelTimer&lt;/h2&gt;
&lt;p&gt;Deltimer is the counterpart of &lt;a class="alink" href="/p/hercules/wiki/Addtimer/"&gt;[Addtimer]&lt;/a&gt;. It stops and deletes a previously&lt;br/&gt;
created timer that had the same event label/name as specified in the&lt;br/&gt;
parameter. Of course, it only does this for the timer of the player that is&lt;br/&gt;
currently attached to the script, but well, that is all it does.&lt;br/&gt;
Some examples:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;deltimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"My NPC::OnMyLabel"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Erases&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;timer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;was&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;supposed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;jump&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OnMyLabel&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NPC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;named&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;My&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NPC&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="nt"&gt;deltimer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"NPC1::OnLoser"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Erases&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;timer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;named&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NPC1&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nd"&gt;OnLoser&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;Name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Event&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="pros-and-cons_1"&gt;Pro's and Cons&lt;/h2&gt;
&lt;p&gt;Using Player Timers have specific advantages and disadvantages. These will be&lt;br/&gt;
listed in a compact way next.&lt;br/&gt;
Advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multiple Player Timers can run per NPC. &lt;/li&gt;
&lt;li&gt;Multiple Player Timers can be run per player. &lt;/li&gt;
&lt;li&gt;Can be manipulated easily. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Disadvantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You always need a player attached to the script to use this. &lt;/li&gt;
&lt;li&gt;The timer is erased on log out. (Can be an advantage as well.) &lt;/li&gt;
&lt;li&gt;Cannot be read out without abusing a variable. &lt;/li&gt;
&lt;li&gt;Cannot be used when server start up or npc only triggered labels, otherwise the server will throw &lt;em&gt;Player not Attached!&lt;/em&gt; error &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;[Category:Scripting]&lt;/span&gt; &lt;span&gt;[Category:Script_Command]&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brynner</dc:creator><pubDate>Mon, 20 Feb 2023 05:03:40 -0000</pubDate><guid>https://sourceforge.netca64f05a2670522c4a3cc0953ed2ee59ef78b4ed</guid></item></channel></rss>