Updated Perl EVENT_ITEM_CLICK (markdown)

TurmoilToad
2018-01-17 23:44:17 -05:00
parent 95c58ad1b1
commit 6dc54d2d1c
+22 -1
@@ -1,4 +1,5 @@
EVENT_ITEM_CLICK
EVENT_ITEM_CLICK is triggered when a client clicks an item with a click effect. This is a useful script to put in the Global quest scripts directory, so that you can make an item click work anywhere in the world.
### Exports
**Name**|**Type**|**Description**
:-----|:-----|:-----
@@ -16,4 +17,24 @@ sub EVENT_ITEM_CLICK {
}
```
### Triggered
* Triggered when a client clicks on item with a click effect.
### Examples
* This example is taken from the Evil Eye Costume Kit, which is part of the Halloween Costume illusion items.
* Note that the `scriptfileid` field for the item is set to 30073 in the database.
* Note that a corresponding quest file exists at global/items/script_30073.pl.
```perl
sub EVENT_ITEM_CLICK {
#::: Use == for numeric comparison to Item ID 54711 - Evil Eye Costume Kit
if ($itemid == 54711) {
#::: Change the player's race to 469 - Evil Eye
quest::playerrace(469);
}
}
```
Generated On 2018-01-15T22:07:30-08:00