From 48e311c5004bc1a36275e064e1693db8b5cd9c2d Mon Sep 17 00:00:00 2001 From: TurmoilToad Date: Thu, 19 Jul 2018 08:29:54 -0400 Subject: [PATCH] Updated Perl API Perl Sub Event Examples (markdown) --- Perl-API---Perl-Sub-Event-Examples.md | 45 ++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/Perl-API---Perl-Sub-Event-Examples.md b/Perl-API---Perl-Sub-Event-Examples.md index f7b0037..9b4a49e 100644 --- a/Perl-API---Perl-Sub-Event-Examples.md +++ b/Perl-API---Perl-Sub-Event-Examples.md @@ -1444,11 +1444,25 @@ Typically you would handle this functionality using the task system. Typically you would handle this functionality using the task system. +### Exports + +| Name | Type | Usage +| --- | --- | --- +|donecount | int | `quest::say($donecount); # returns int` +|activity_id | int | `quest::say($activity_id); # returns int` +|task_id | int | `quest::say($task_id); # returns int` + # EVENT_TASK_FAIL ### Trigger -- when a player fails a task. +- When a player fails a task. + +### Exports + +| Name | Type | Usage +| --- | --- | --- +|task_id | int | `quest::say($task_id); # returns int` Typically you would handle this functionality using the task system. @@ -1460,6 +1474,13 @@ Typically you would handle this functionality using the task system. Typically you would handle this functionality using the task system. +### Exports + +| Name | Type | Usage +| --- | --- | --- +|activity_id | int | `quest::say($activity_id); # returns int` +|task_id | int | `quest::say($task_id); # returns int` + ### Example - In this example, when a player completes a task, it triggers the event and tries to match with task ID 212; if it matches, a yellow message is displayed to the client. @@ -1479,6 +1500,14 @@ sub EVENT_TASK_STAGE_COMPLETE { - when a player's task is updated. +### Exports + +| Name | Type | Usage +| --- | --- | --- +|donecount | int | `quest::say($donecount); # returns int` +|activity_id | int | `quest::say($activity_id); # returns int` +|task_id | int | `quest::say($task_id); # returns int` + # EVENT_TIMER ### Trigger @@ -1517,19 +1546,19 @@ sub EVENT_TIMER { ### Trigger -- by beginning a trade. +- When a client begins a trade. # EVENT_UNAUGMENT_ITEM ### Trigger -- when a client removes an augment from an item. +- When a client removes an augment from an item. # EVENT_UNEQUIP_ITEM ### Trigger -- when a client unequips an item. +- When a client unequips an item. # EVENT_WAYPOINT_ARRIVE @@ -1587,7 +1616,7 @@ sub EVENT_WAYPOINT_DEPART { ### Trigger -- when a weapon procs. +- When a weapon procs. # EVENT_ZONE @@ -1595,6 +1624,12 @@ sub EVENT_WAYPOINT_DEPART { - When a player leaves a zone. +### Exports + +|Name | Type | Description +| --- | --- | --- +|target_zone_id | int | `quest::say($target_zone_id); # returns int` + ### Example - In this example, we blow up pets when a player with a pet zones.