From 9ee936cc8a29ec1772dd25c5d8d3cd787f1b2f21 Mon Sep 17 00:00:00 2001 From: TurmoilToad Date: Mon, 7 Jan 2019 17:18:44 -0500 Subject: [PATCH] playersize, playertexture, popup, pvp, qs_player_event, qs_send_query, rain, rebind, removetitle, repopzone --- Perl-API.md | 191 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 181 insertions(+), 10 deletions(-) diff --git a/Perl-API.md b/Perl-API.md index 0ed36a8..9307f34 100644 --- a/Perl-API.md +++ b/Perl-API.md @@ -2833,19 +2833,190 @@ quest::playergender(0); quest::playerrace(1); ``` +## playersize + +      **Parameter(s):** + +      newsize _(int)_ + +      **Usage:** + +      Temporarily adjusts the size of the client character that triggered the event to the specified size. + +      **Example:** + +```perl +#:: Change size to 10 +quest::playersize(10); +``` + +## playertexture + +      **Parameter(s):** + +      texture_id _(int)_ + +      **Usage:** + +      Temporarily changes the texture of the client character that triggered the event to the specified texture. + +      **Example:** + +```perl +#:: Change texture to 2 +quest::playertexture(2); +``` + +## popup + +      **Parameter(s):** + +      window_title _(string)_, message _(string)_, popup_id _(int)_, buttons _(int)_, duration _(int)_ + +      **Usage:** + +      Used to create a popup window with the specified parameters. The parameters popup_id, buttons, and duration are optional. Button parameters are: 0=OK button, 1=Yes/No buttons. Setting duration to 0 results in a popup that will remain until dismissed. + +      **Example:** + +```perl +sub EVENT_ENTER { + #:: Popup window entitled "Teleport", Question: "Teleport to The Plane of Hate?", popup ID 666, Yes/No buttons, remain until dismissed + quest::popup('Teleport', 'Teleport to The Plane of Hate?', 666, 1, 0); +} + +sub EVENT_POPUPRESPONSE { + if ($popupid == 666) { + #:: Teleport the player to The Plane of Hate + quest::movepc(186,-393,656,3); + } +} +``` + +## pvp + +      **Parameter(s):** + +      mode _(string)_ + +      **Usage:** + +      Toggles the PVP setting for the client character that triggered the event. String can be on, or off. + +      **Example:** + +```perl +#:: Turn pvp on +quest::pvp("on"); +#:: Turn pvp off +quest::pvp("off"); +``` + +## qs_player_event + +      **Parameter(s):** + +      character_id _(int)_, message _(string)_ + +      **Usage:** + +      Adds a record to table `qs_player_events` with the specified parameters. + +      **Example:** + +```perl +quest::qs_player_event($charid,"Triggered an event with this API call in it.") +``` + +## qs_send_query + +      **Parameter(s):** + +      query _(string)_ + +      **Usage:** + +      Send a raw query to the QueryServ process. + +      **Example:** + +```perl +quest::qs_send_query("SELECT * FROM `qs_player_events` WHERE `event_desc` LIKE '%level%' LIMIT 0,1000;"); +``` + +## rain + +      **Parameter(s):** + +      weather _(int)_ + +      **Usage:** + +      Changes the rainy weather to the specified setting: 0=none, 1=rain. See also quest::snow(). + +      **Example:** + +```perl +sub EVENT_ZONE { + if ($name=~/turmoiltoad/i) { + #:: Turn on the rain for those left behind + quest::rain(1); + } +} +``` + +## rebind + +      **Parameter(s):** + +      zone_id _(int)_, x _(float)_, y _(float)_, z _(float)_ + +      **Usage:** + +      Binds the client character that triggered the event to the specified zone (by Zone ID) at the specified location. + +      **Example:** + +```perl +#:: Change bind point to Rivervale, X=0, Y=0, Z=3.13 +quest::rebind(19, 0.00, 0.00, 3.13); +``` + +## removetitle + +      **Parameter(s):** + +      title_set_id _(int)_ + +      **Usage:** + +      Removes the specified Title Set from the client character that triggered the event. + +      **Example:** + +```perl +#:: Remove Title Set 2 (prefix "Arbiter", suffix "Harbinger of the Old World") +quest::removetitle(2); +``` + +## repopzone + +      **Parameter(s):** + +      None. + +      **Usage:** + +      Repops the zone and re-enables spawn timers. + +```perl +#:: Repop the zone +quest::repopzone(); +``` + (Work in Progress) ```perl -quest::playersize(int newsize) -quest::playertexture(int texture_id) -quest::popup(string window_title, string message, int popup_id, int buttons, int duration) -quest::pvp(string mode [on|off]) -quest::qs_player_event(int character_id, string message) -quest::qs_send_query(string query) -quest::rain(int weather) -quest::rebind(int zone_id, float x, float y, float z) -quest::removetitle(int title_set_id) -quest::repopzone() quest::resettaskactivity(int task_id, int activity_id) quest::respawn(int npc_type_id, int grid_id) quest::resume()