From ecf46cf7091c77a336211c841f4cc4d5fdf28e94 Mon Sep 17 00:00:00 2001 From: TurmoilToad Date: Mon, 10 Dec 2018 21:06:48 -0500 Subject: [PATCH] RemoveAllFromInstance, RemoveFromInstance, SetRunning, UpdateInstanceTimer, UpdateSpawnTimer --- Perl-API.md | 116 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 110 insertions(+), 6 deletions(-) diff --git a/Perl-API.md b/Perl-API.md index ef19eea..9efbcb4 100644 --- a/Perl-API.md +++ b/Perl-API.md @@ -724,15 +724,119 @@ sub EVENT_CLICKDOOR { } ``` +### RemoveAllFromInstance + +      **Parameter(s):** + +      instance_id (uint16) + +      **Usage:** + +      Removes ALL players from an instance by instance ID. + +      **Example:** + +```perl +sub EVENT_DEATH_COMPLETE { + #:: Instance ID is a pre-exported variable + quest::RemoveAllFromInstance($instanceid); +} +``` + +### RemoveFromInstance + +      **Parameter(s):** + +      instance_id (uint16) + +      **Usage:** + +      Removes the player that triggered the event from an instance by instance ID. + +      **Example:** + +```perl +sub EVENT_CLICKDOOR { + if ($doorid == 1) { + quest::RemoveFromInstance($instanceid); + } +} +``` + +### SendMail + +      **Parameter(s):** + +      to (string), from (string), subject (string), message (string) + +      **Usage:** + +      Used to send a mail message. + +### SetRunning + +      **Parameter(s):** + +      is_running (bool) + +      **Usage:** + +      Used to toggle run/walk state. + +      **Example:** + +```perl +sub EVENT_SPAWN { + #:: Set the NPC to run + quest::SetRunning(1); +} +``` + +### UpdateInstanceTimer + +      **Parameter(s):** + +      instance_id (int16), duration (uint32) + +      **Usage:** + +      Used to update a zone instance timer by instance id by the number of seconds specified. + +      **Example:** + +```perl +sub EVENT_CLICKDOOR { + #:: When they open door 7... + if ($doorid == 7) { + #:: Add one hour of time to the current instance + quest::UpdateInstanceTimer($instanceid,3600); + } +} +``` + +### UpdateSpawnTimer + +      **Parameter(s):** + +      spawn2_id (uint32), updated_time_till_repop (uint32) + +      **Usage:** + +      Used to update a spawn timer by spawn2 ID and time specified in ms. + +      **Example:** + +```perl +sub EVENT_DEATH_COMPLETE { + #:: Fippy Darkpaw's spawn point + quest::updatespawntimer(10875,(int(rand(600))+3600)*1000); +} +``` + (Work in Progress) ```perl -quest::RemoveAllFromInstance(uint16 instance_id) -quest::RemoveFromInstance(uint16 instance_id) -quest::SendMail(stirng to, string from, string subject, string message) -quest::SetRunning(bool is_running) -quest::UpdateInstanceTimer(int16 instance_id, uint32 duration) -quest::UpdateSpawnTimer(uint32 spawn2_id, uint32 updated_time_till_repop) + quest::UpdateZoneHeader(string key, string value) quest::activespeakactivity(int task_id) quest::activespeaktask()