Kinglykrab 26299354b6
[Quest API] Adds new methods to NPCs and Corpses (#1510)
- Add $npc->HasItem(item_id) to Perl.
- Add $npc->CountItem(item_id) to Perl.
- Add $npc->GetItemIDBySlot(loot_slot) to Perl.
- Add $npc->GetFirstSlotByItemID(item_id) to Perl.
- Add $corpse->HasItem(item_id) to Perl.
- Add $corpse->CountItem(item_id) to Perl.
- Add $corpse->GetItemIDBySlot(loot_slot) to Perl.
- Add $corpse->GetFirstSlotByItemID(item_id) to Perl.
- Add npc:HasItem(item_id) to Lua.
- Add npc:CountItem(item_id) to Lua.
- Add npc:GetItemIDBySlot(loot_slot) to Lua.
- Add npc:GetFirstSlotByItemID(item_id) to Lua.
- Add corpse:HasItem(item_id) to Lua.
- Add corpse:CountItem(item_id) to Lua.
- Add corpse:GetItemIDBySlot(loot_slot) to Lua.
- Add corpse:GetFirstSlotByItemID(item_id) to Lua.

These methods will allow server operators to view the loot a current has in a slot, the first slot found by item ID, count the item by ID, and see if the NPC has the item.

With that functionality you could build a custom loot system and modify loot more dynamically.
2021-08-31 00:42:08 -05:00
..
2020-03-12 00:00:39 -05:00
2019-10-12 21:07:06 -07:00
2019-10-12 21:07:06 -07:00
2018-03-04 13:54:28 -05:00
2021-08-01 20:58:05 -05:00
2021-08-01 20:58:05 -05:00
2017-04-10 14:52:44 -04:00
2019-10-13 00:53:31 -07:00
2017-05-15 15:46:19 -07:00
2021-02-12 02:42:03 -05:00
2021-07-15 19:27:27 -05:00
2021-07-15 19:27:27 -05:00
2018-11-07 21:55:12 -08:00
2021-08-01 20:58:05 -05:00
2019-09-01 23:54:24 -05:00
2020-04-19 04:36:39 -05:00
2019-10-12 21:07:06 -07:00
2021-02-07 17:08:16 -06:00
2021-02-07 15:00:16 -06:00
2021-02-07 15:00:16 -06:00
2021-02-07 15:00:16 -06:00
2021-02-06 19:19:20 -06:00
2017-07-15 20:29:55 -07:00
2020-02-22 16:17:18 -06:00
2020-01-31 20:25:06 -06:00