Home
Random
Recent changes
Special pages
Community portal
Preferences
About Lost City Wiki
Disclaimers
Search
User menu
Talk
Contributions
Log in
Editing
RuneScript/NPC Queues
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
NPC queues don’t use names like player queues. They are queued by “ID” instead, to allow NPCs to override global behavior without checking NPC type in each queue. Processing is done very similarly to players and will not run if the queue isn’t ready to execute or the NPC is delayed. == Command == <code>npc_queue(id, delay, arg);</code> ''An active NPC pointer must be set!'' Developers may pass one int argument here to use when it runs. ==== Additional Args ==== We do not support this - for documentation purposes only: Jagex has an asterisked variant of this command that lets you pass additional arguments: <code>npc_queue*(id, delay)(args, …);</code> == Trigger == The <code>ai_queue</code> trigger has 20 queue IDs available to use. The trigger’s subject is the NPC type. It looks like <code>[ai_queueID,type]</code>. When the trigger runs you may use <code>last_int</code> to reference the arg passed to the queue. ==== Conventions ==== These queue IDs are arbitrary outside of a few conventions: <code>[ai_queue1,type]</code> runs on '''retaliate''' - this means something has hit them and will set their mode to attack back. <code>[ai_queue2,type]</code> runs on '''damage''' - this means something has hit them and damage is being applied. <code>[ai_queue3,type]</code> runs on '''death''' - this means something has dropped their health to 0 and will drop items, or advance a player’s quest state. <code>[ai_queue8,type]</code> runs on '''bind spells''' - this means something has hit them with a bind spell and movement will be blocked for a period of time. == Hunt Modes == Hunt modes may be configured to run a queue when they find a target. This allows a developer to implement extra logic before deciding (or not deciding) to attack.
Summary:
Please note that all contributions to Lost City Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
LostCityRS:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)