Updated Perl API Perl Sub Event Examples (markdown)

TurmoilToad 2018-07-19 08:29:54 -04:00
parent b47096ce1b
commit 48e311c500

@ -1444,11 +1444,25 @@ Typically you would handle this functionality using the task system.
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 # EVENT_TASK_FAIL
### Trigger ### 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. 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. 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 ### 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. - 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. - 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 # EVENT_TIMER
### Trigger ### Trigger
@ -1517,19 +1546,19 @@ sub EVENT_TIMER {
### Trigger ### Trigger
- by beginning a trade. - When a client begins a trade.
# EVENT_UNAUGMENT_ITEM # EVENT_UNAUGMENT_ITEM
### Trigger ### Trigger
- when a client removes an augment from an item. - When a client removes an augment from an item.
# EVENT_UNEQUIP_ITEM # EVENT_UNEQUIP_ITEM
### Trigger ### Trigger
- when a client unequips an item. - When a client unequips an item.
# EVENT_WAYPOINT_ARRIVE # EVENT_WAYPOINT_ARRIVE
@ -1587,7 +1616,7 @@ sub EVENT_WAYPOINT_DEPART {
### Trigger ### Trigger
- when a weapon procs. - When a weapon procs.
# EVENT_ZONE # EVENT_ZONE
@ -1595,6 +1624,12 @@ sub EVENT_WAYPOINT_DEPART {
- When a player leaves a zone. - When a player leaves a zone.
### Exports
|Name | Type | Description
| --- | --- | ---
|target_zone_id | int | `quest::say($target_zone_id); # returns int`
### Example ### Example
- In this example, we blow up pets when a player with a pet zones. - In this example, we blow up pets when a player with a pet zones.