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

Revision as of 09:06, 9 June 2013

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;