Difference between revisions of "Startnpctimer"

From Hercules Wiki
Jump to: navigation, search
(Created page with "==Syntax== * startnpctimer {<attach flag>}; * startnpctimer {"<NPC name>"}; * startnpctimer {"<NPC name>"{, <attach flag>}}; ==Description== This script command ...")
 
(nevermind me [7] (testing stuff))
 
Line 5: Line 5:
  
 
==Description==
 
==Description==
 
 
This script command works almost exactly like [[initnpctimer]], however calling this method does not reset the timer for the NPC. When called, it will resume the timer if it has been stopped using [[stopnpctimer]], and it will not reset the NPC timer tick to 0.
 
This script command works almost exactly like [[initnpctimer]], however calling this method does not reset the timer for the NPC. When called, it will resume the timer if it has been stopped using [[stopnpctimer]], and it will not reset the NPC timer tick to 0.
  
 
==Parameters==
 
==Parameters==
 
 
See [[initnpctimer#Parameters|initnpctimer]].
 
See [[initnpctimer#Parameters|initnpctimer]].
  

Latest revision as of 14:15, 17 January 2015

Contents

Syntax

  • startnpctimer {<attach flag>};
  • startnpctimer {"<NPC name>"};
  • startnpctimer {"<NPC name>"{, <attach flag>}};

Description

This script command works almost exactly like initnpctimer, however calling this method does not reset the timer for the NPC. When called, it will resume the timer if it has been stopped using stopnpctimer, and it will not reset the NPC timer tick to 0.

Parameters

See initnpctimer.

Examples

  • Start or stop an NPC timer using menus.
switch( select("Resume timer", "Stop timer") )
{
    case 1:
         startnpctimer;
         end;

    case 2:
         stopnpctimer;
         end;
}

OnTimer60000:
    announce "This will only ever be called once.", bc_all|bc_npc;
    end;