196 Commits

Author SHA1 Message Date
Alex King
d142e1ca81
[Hotfix] Fix Quest Ownership Edge Case (#4977)
* [Hotfix] Fix Quest Ownership Edge Case

* Push
2025-08-02 22:09:30 -05:00
Alex King
323a0c0b27
[Feature] Zone Scripting (#4908)
* [Feature] Add Zone Scripting Capabilities

* Push

* Update zone.cpp

* Fix crashes

* Lua

* Add other events, finish Lua

* Add EVENT_ENTER_ZONE

* Final

* Push

* Push

* [Feature] Add Zone Scripting Capabilities

* Push

* Update zone.cpp

* Fix crashes

* Add EVENT_ENTER_ZONE

* Remove duplicates

* Update embparser.cpp
2025-07-10 15:08:08 -04:00
Alex King
3b617a6652
[Quest API] Add Last Login and First Login Flags to EVENT_CONNECT (#4866)
* [Quest API] Add Last Login and First Login Flags to EVENT_CONNECT

* Push

* Update base_character_data_repository.h

* Update version field

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2025-05-14 20:46:25 -05:00
Alex King
9e07d90664
[Quest API] Add Zone Support to Perl and Lua (#4662)
* [Quest API] Add Zone Support to Perl and Lua

* Final
2025-02-08 23:21:15 -06:00
Alex King
3158386aa3
[Bug Fix] Fix Issue with Perl EVENT_PAYLOAD (#4545) 2024-11-24 17:19:40 -06:00
hg
bcedfe7032
[Quest API] Add Native Database Querying Interface (#4531)
* Add database quest API

API functions are named to be similar to LuaSQL and perl DBI

New connections are made for Database objects. These can either use
credentials from the server eqemu_config or manual connections.

* Add option to use zone db connections
2024-11-12 20:01:18 -06:00
Alex King
448a33a60c
[Quest API] Add Scripting Support to Mercenaries (#4500)
* [Quest API] Add Scripting Support to Mercenaries

* Cleanup

* Cleanup

* Update lua_merc.h

* Update mob.cpp

* XYZH

* Final

* Update attack.cpp

* Update attack.cpp

* Simplify event invocation

* Inline example

* Nullptr init example

* EVENT_TIMER simplify add EventPlayerNpcBotMerc

* EVENT_TIMER_START

* Remove has_start_event

* EVENT_TIMER_START with settimerMS

* EVENT_POPUP_RESPONSE

* Consolidation

* Update attack.cpp

* Push

* Update quest_parser_collection.h

* Comments

* Cleanup per comments

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-10-10 21:29:29 -04:00
Alex King
e3198edb86
[Quest API] Add EVENT_READ_ITEM to Perl/Lua (#4497)
* [Quest API] Add EVENT_READ_ITEM to Perl/Lua

* Add item_id export

* Add item export.

* Update client.cpp
2024-10-08 18:25:14 -04:00
Alex King
e9b84f4d11
[Bug Fix] Fix issue with killed mob coordinates (#4457) 2024-08-22 11:45:31 -04:00
Alex King
cd03152550
[Quest API] Add Zone Uptime Exports to Perl/Lua (#4339) 2024-05-26 10:06:38 -04:00
Chris Miles
f07c5901f4
[Quests] Reload Quests on Bootup, Init earlier (#4298)
* [Quests] Reload Perl quests on bootup, init earlier

* Do reload on top of init
2024-05-04 20:57:16 -04:00
Alex King
d77966797e
[Quest API] Add Spell Blocked Event to Perl/Lua (#4217)
* [Spells] Add Unblockable Spell Table and Spell Blocked Event

- Add `EVENT_SPELL_BLOCKED`, exports `$blocking_spell_id`, `$cast_spell_id`, `$blocking_spell`, and `$cast_spell`.

- Add `event_spell_blocked`, exports `e.blocking_spell_id`, `e.cast_spell_id`, `e.blocking_spell`, and `e.cast_spell`.

- Adds `spells_unblockable` table with a `spell_id` and `is_unblockable` column.
- This table will need to be populated based on known spells that should be unblockable.

- This event will allow operators to perform events when spells are blocked.

* Cleanup

* Cleanup

* Update spells.cpp

* Remove unused repositories.

* Finalize

* Update lua_parser_events.cpp
2024-03-31 22:58:30 -05:00
Alex King
161c13f457
[Quest API] Add Buff Support to Perl/Lua (#4182)
* [Quest API] Add Buff Support to Perl/Lua

- Add `$mob->GetCasterID()`.
- Add `$mob->GetCasterLevel()`.
- Add `$mob->GetCasterName()`.
- Add `$mob->GetCastOnX()`.
- Add `$mob->GetCastOnY()`.
- Add `$mob->GetCastOnZ()`.
- Add `$mob->GetCounters()`.
- Add `$mob->GetDOTRune()`.
- Add `$mob->GetExtraDIChance()`.
- Add `$mob->GetInstrumentModi()`.
- Add `$mob->GetMagicRune()`.
- Add `$mob->GetMeleeRune()`.
- Add `$mob->GetNumberOfHits()`.
- Add `$mob->GetRootBreakChanc()`.
- Add `$mob->GetSpellID()`.
- Add `$mob->GetTicsRemaining()`.
- Add `$mob->GetVirusSpreadTim()`.
- Add `$mob->IsCasterClient()`.
- Add `$mob->IsPersistentBuff()`.
- Add `$mob->SendsClientUpdate()`.

- Add `mob:GetCasterID()`.
- Add `mob:GetCasterLevel()`.
- Add `mob:GetCasterName()`.
- Add `mob:GetCastOnX()`.
- Add `mob:GetCastOnY()`.
- Add `mob:GetCastOnZ()`.
- Add `mob:GetCounters()`.
- Add `mob:GetDOTRune()`.
- Add `mob:GetExtraDIChance()`.
- Add `mob:GetInstrumentModi()`.
- Add `mob:GetMagicRune()`.
- Add `mob:GetMeleeRune()`.
- Add `mob:GetNumberOfHits()`.
- Add `mob:GetRootBreakChanc()`.
- Add `mob:GetSpellID()`.
- Add `mob:GetTicsRemaining()`.
- Add `mob:GetVirusSpreadTim()`.
- Add `mob:IsCasterClient()`.
- Add `mob:IsPersistentBuff()`.
- Add `mob:SendsClientUpdate()`.

- Adds support for `Buffs_Struct` to Perl/Lua.
- Allows operators to read a mob's buff data directly to determine caster, melee rune, etc.

* Fix GetCasterID() to proper data type.

* Remove Lua_Buffs, return table instead.

* Cleanup
2024-03-13 23:38:15 -04:00
Alex King
3bfb148bdc
[Quest API] Add RemoveAAPoints() and AA Loss Event to Perl/Lua (#4174)
* [Quest API] Add RemoveAAPoints() and AA Loss Event to Perl/Lua

# Perl
- Add `$client->RemoveAAPoints(points)`.
- Add `EVENT_AA_LOSS`, exports `$aa_lost`.

# Lua
- Add `client:RemoveAAPoints(points)`.
- Add `event_aa_loss`, exports `e.aa_lost`.

# Notes
- Allows operators to more easily remove AA Points.
- Has a bool return type that will return false if the player does not have enough AA Points to complete the removal.

* Update client.cpp
2024-03-08 21:20:33 -05:00
Alex King
a244509d63
[Quest API] Export Combat Record to Death Events (#4112)
# Perl
- Add `$combat_start_time`, `$combat_end_time`, `$damage_received`, and `$healing_received` to death events for NPCs.

# Lua
- Add `e.combat_start_time`, `e.combat_end_time`, `e.damage_received`, and `e.healing_received` to death events for NPCs.

# Notes
- Allows operators to hook in to the combat record logic so they can log the start and end of combat as well as the damage/healing received over the course of the fight.
2024-02-24 22:57:49 -06:00
Alex King
5a89fcfb78
[Quest API] Add Entity Variable Events to Perl/Lua (#4092)
* [Quest API] Add Entity Variable Events to Perl/Lua

- Add `EVENT_ENTITY_VARIABLE_DELETE`.
- Add `EVENT_ENTITY_VARIABLE_SET`.
- Add `EVENT_ENTITY_VARIABLE_UPDATE`.
- All export `$variable_name` and `$variable_value`.

- Add `event_entity_variable_delete`.
- Add `event_entity_variable_set`.
- Add `event_entity_variable_update`.
- All export `e.variable_name` and `e.variable_value`.

- Allows operators to perform operations when entity variables are cleared, deleted, set, or updated.

* Update mob.cpp

* Cleanup.

* Cleanup

* Update mob.cpp

* Update lua_general.cpp

* Update embparser_api.cpp
2024-02-19 20:34:33 -06:00
Alex King
db3601c25c
[Quest API] Add Timer Events to Perl/Lua (#4099)
* [Quest API] Add Timer Events to Perl/Lua

# DRAFT

* Cleanup
2024-02-19 03:51:16 -06:00
Alex King
331e04fbf8
[Quests] Cleanup Quest Parser Logic (#4025)
* [Quests] Cleanup Quest Parser Logic

# Notes
- Consolidate duplicated code into loops to make it easier to read and easier to add on to.

# Images

* Update quest_parser_collection.cpp

* Push

* Push

* Update embperl.cpp

* Push

* Additional cleanup, use File::Exists utility

* Range based loops

* Update embparser.cpp

* Cleanup

* Update embparser.cpp

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-02-05 19:53:16 -05:00
Alex King
b93dec357f
[Quest API] Fix issue with death events. (#3823)
# Notes
- Death events were happening too early so stuff checking for dead NPCs was non-functional.
2023-12-31 17:37:26 -05:00
Alex King
b19ad64800
[Bug Fix] Send Entity ID in Death Events to resolve #3721 (#3779)
* [Bug Fix] Send Entity ID in Death Events to resolve #3721

# Notes
- Due to some pointers becoming invalid you may get an invalid entity ID on the killed mob if we don't just directly send the entity ID in the export string.

* Update attack.cpp

* Remove GetID() export.
2023-12-17 19:43:41 -06:00
Alex King
0c9c2e25c1
[Quest API] Add EVENT_CRYSTAL_GAIN and EVENT_CRYSTAL_LOSS to Perl/Lua (#3735)
* [Quest API] Add EVENT_CRYSTAL_GAIN and EVENT_CRYSTAL_LOSS

- Add `$client->AddEbonCrystals(amount)`.
- Add `$client->AddRadiantCrystals(amount)`.
- Add `$client->RemoveEbonCrystals(amount)`.
- Add `$client->RemoveRadiantCrystals(amount)`.
- Add `EVENT_CRYSTAL_GAIN`.
- Add `EVENT_CRYSTAL_LOSS`.
- Export `$ebon_amount`, `$radiant_amount`, and `$is_reclaim`.

- Add `client:AddEbonCrystals(amount)`.
- Add `client:AddRadiantCrystals(amount)`.
- Add `client:RemoveEbonCrystals(amount)`.
- Add `client:RemoveRadiantCrystals(amount)`.
- Add `event_crystal_gain`.
- Add `event_crystal_loss`.
- Export `e.ebon_amount`, `e.radiant_amount`, and `e.is_reclaim`.

- Allows operators to add or remove Ebon/Radiant Crystals directly.
- Allows operators to track gain/loss of Ebon/Radiant Crystals.

* Update perl_client.cpp

* Update lua_client.cpp
2023-12-16 22:47:13 -06:00
Alex King
9739c1c8ef
[Quest API] Add EVENT_ALT_CURRENCY_GAIN and EVENT_ALT_CURRENCY_LOSS to Perl/Lua (#3734)
* [Quest API] Add EVENT_ALT_CURRENCY_GAIN and EVENT_ALT_CURRENCY_LOSS

- Add `EVENT_ALT_CURRENCY_GAIN`.
- Add `EVENT_ALT_CURRENCY_LOSS`.
- Export `$currency_id`, `$amount`, and `$total.

- Add `event_alt_currency_gain`.
- Add `event_alt_currency_loss`.
- Export `e.currency_id`, `e.amount`, and `e.total.

- Convert `int8 method` to `bool is_scripted` in `Client::AddAlternateCurrencyValue`.
- Properly utilize `is_scripted` parameter in `perl_client.cpp`.
- Allows operators to perform events on alternate currency gains/losses.

* Update lua_general.cpp

* Cleanup types.

* Update lua_client.cpp
2023-12-16 22:40:24 -06:00
Alex King
8aae59eebe
[Quest API] Add EVENT_LDON_POINTS_GAIN and EVENT_LDON_POINTS_LOSS to Perl/Lua (#3742)
* [Quest API] Add EVENT_LDON_POINTS_GAIN and EVENT_LDON_POINTS_LOSS to Perl/Lua

- Add `EVENT_LDON_POINTS_GAIN`.
- Add `EVENT_LDON_POINTS_LOSS`.
- Exports `$theme_id` and `$points`.

- Add `event_ldon_points_gain`.
- Add `event_ldon_points_loss`.
- Exports `e.theme_id` and `e.points`.

- Allows operators to track gain/loss of LDoN Points of any theme.

* Update client.cpp
2023-12-16 22:31:25 -06:00
Alex King
c1b07afae9
[Quest API] Add EVENT_LOOT_ADDED to Perl/Lua (#3739)
* [Quest API] Add EVENT_ADDED_LOOT to Perl/Lua

# Perl
- Add `EVENT_ADDED_LOOT`.
- Exports `$item`, `$item_id`, `$item_name`, `$item_charges`, `$augment_one`, `$augment_two`, `$augment_three`, `$augment_four`, `$augment_five`, and `$augment_six`.

# Lua
- Add `event_added_loot`.
- Exports `e.item`, `e.item_id`, `e.item_name`, `e.item_charges`, `e.augment_one`, `e.augment_two`, `e.augment_three`, `e.augment_four`, `e.augment_five`, and `e.augment_six`.

# Notes
- Allows operators to perform events when loot is added to an NPC, such as removing the loot or keeping track of it.

* Update lua_parser_events.cpp

* Rename event.

* loot_added

* AddItem changese
2023-12-16 22:25:09 -06:00
regneq
ded82ac6d6
[Spawn] (imported from takp) Added min_time and max_time to spawnentry. This will prevent a NPC from… (#3685)
* Added mintime and maxtime to spawnentry. This will prevent a NPC from spawning outside of the times specified. NPCs spawned in this way will then behave like normal NPCs. They will not despawn on their own, unlike spawn_events/spawn_conditions. NPCs using this that are alone in their spawngroup will attempt to spawn after their respawn timer has expired if the time of day is outside their range. Otherwise, another NPC in the spawngroup will be chosen to spawn. The normal rules (chance, spawn_limit) still apply to these NPCs, this is just another rule added to the system.

mintime and maxtime both represent the in-game EQ Hour. Valid values are 1-24. If either or both of the values are 0, then the NPC will not have any time restriction.

Added a new rule World:BootHour. This allows server admins to specify the EQ hour the server will boot to. Valid options are 1-24. Setting this rule to 0 (default) disables it and world will use whatever time is specified in the DB.

* generated base_spawnentry_repository.h from script

* removed the rule insert from database_update_manifest.cpp.

* Add logging, initializers, minor cleanup

* Remove if/else branch

* Update eqtime.cpp

* Initializers, logging

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-11-18 14:23:04 -06:00
Fryguy
62711b13d8
Revert "[Bug Fix] Fix Killed XYZH support in EVENT_DEATH in Perl. (#3591)" (#3682)
This reverts commit 9b992167f00fabda47ed4740eb28a1351ea6caf5.
2023-11-06 17:30:55 -06:00
Akkadius
1887e48b76 Revert "[Perl] Reload perl quests on zone bootup (#3648)"
This reverts commit 0bbfcf7adc18b90d43a960923c8bf67fc41bcaa3.
2023-10-26 16:21:06 -05:00
hg
0bbfcf7adc
[Perl] Reload perl quests on zone bootup (#3648)
Perl wasn't implementing quest interface's Init which is called by
Zone::Bootup. This should fix zone's that were in standby not using the
latest version of perl plugin scripts.
2023-10-23 22:39:19 -05:00
Alex King
1212ccefef
[Quest API] Add target ID and spell exports to events (#3620)
* [Quest API] Add target ID and spell exports to events

# Notes
- Add `$spell` export to `EVENT_CAST`, `EVENT_CAST_BEGIN`, `EVENT_CAST_BEGIN`, `EVENT_ITEM_CLICK`, `EVENT_ITEM_CLICK_CAST`, `EVENT_ITEM_CLICK_CLIENT`, `EVENT_ITEM_CLICK_CAST_CLIENT`, `EVENT_SPELL_EFFECT_BUFF_TIC_BOT`, `EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT`, `EVENT_SPELL_EFFECT_BUFF_TIC_NPC`, `EVENT_SPELL_EFFECT_BOT`, `EVENT_SPELL_EFFECT_CLIENT`, `EVENT_SPELL_EFFECT_NPC`, `EVENT_SPELL_FADE`, `EVENT_DEATH`, `EVENT_DEATH_COMPLETE`, `EVENT_DEATH_ZONE`, `EVENT_DAMAGE_GIVEN`, and `EVENT_DAMAGE_TAKEN` in Perl.
- Add `$target_id` export to `EVENT_CAST`, `EVENT_CAST_BEGIN`, and `EVENT_CAST_ON` in Perl.
- Add `e.target_id` export to `EVENT_CAST`, `EVENT_CAST_BEGIN`, and `EVENT_CAST_ON` in Lua.

* Add $target/e.target exports.

* Update spells.cpp
2023-10-15 19:40:25 -04:00
Alex King
9b992167f0
[Bug Fix] Fix Killed XYZH support in EVENT_DEATH in Perl. (#3591)
* [Bug Fix] Fix Killer XYZH support in EVENT_DEATH in Perl.

# Notes
- Fixes XYZH exports in Perl.

* Update embparser.cpp
2023-09-17 13:40:07 -05:00
Alex King
251993c61b
[Quest API] Add ItemData Class to Perl (#3465)
* [Quest API] Add ItemData Class to Perl

- Add `$questitem->GetItem()`.
- Add `$questitem->GetUnscaledItem()`.
- Add `$questitemdata->GetAGI()`.
- Add `$questitemdata->GetAC()`.
- Add `$questitemdata->GetCHA()`.
- Add `$questitemdata->GetDEX()`.
- Add `$questitemdata->GetINT()`.
- Add `$questitemdata->GetSTA()`.
- Add `$questitemdata->GetSTR()`.
- Add `$questitemdata->GetAWis()`.
- Add `$questitemdata->GetAccuracy()`.
- Add `$questitemdata->GetArtifactFlag()`.
- Add `$questitemdata->GetAttack()`.
- Add `$questitemdata->GetAttuneable()`.
- Add `$questitemdata->GetAugmentDistiller()`.
- Add `$questitemdata->GetAugmentRestrict()`.
- Add `$questitemdata->GetAugmentSlotType(slot_id)`.
- Add `$questitemdata->GetAugmentSlotUnk2(slot_id)`.
- Add `$questitemdata->GetAugmentSlotVisible(slot_id)`.
- Add `$questitemdata->GetAugmentType()`.
- Add `$questitemdata->GetAvoidance()`.
- Add `$questitemdata->GetBackstabDamage()`.
- Add `$questitemdata->GetBagSize()`.
- Add `$questitemdata->GetBagSlots()`.
- Add `$questitemdata->GetBagType()`.
- Add `$questitemdata->GetBagWeightReduction()`.
- Add `$questitemdata->GetBaneDamageAmount()`.
- Add `$questitemdata->GetBaneDamageBody()`.
- Add `$questitemdata->GetBaneDamageRace()`.
- Add `$questitemdata->GetBaneDamageRaceAmount()`.
- Add `$questitemdata->GetBardEffect()`.
- Add `$questitemdata->GetBardLevel()`.
- Add `$questitemdata->GetBardLevel2()`.
- Add `$questitemdata->GetBardType()`.
- Add `$questitemdata->GetBardSkillType()`.
- Add `$questitemdata->GetBardSkillValue()`.
- Add `$questitemdata->GetBenefitFlag()`.
- Add `$questitemdata->GetBook()`.
- Add `$questitemdata->GetBookType()`.
- Add `$questitemdata->GetCR()`.
- Add `$questitemdata->GetCastTime()`.
- Add `$questitemdata->GetCastTime_()`.
- Add `$questitemdata->GetCharmFile()`.
- Add `$questitemdata->GetCharmFileID()`.
- Add `$questitemdata->GetClairvoyance()`.
- Add `$questitemdata->GetClasses()`.
- Add `$questitemdata->GetClickName()`.
- Add `$questitemdata->GetClickEffect()`.
- Add `$questitemdata->GetClickLevel()`.
- Add `$questitemdata->GetClickLevel2()`.
- Add `$questitemdata->GetClickType()`.
- Add `$questitemdata->GetColor()`.
- Add `$questitemdata->GetCombatEffects()`.
- Add `$questitemdata->GetCorruption()`.
- Add `$questitemdata->GetDR()`.
- Add `$questitemdata->GetDSMitigation()`.
- Add `$questitemdata->GetDamage()`.
- Add `$questitemdata->GetDamageShield()`.
- Add `$questitemdata->GetDeity()`.
- Add `$questitemdata->GetDelay()`.
- Add `$questitemdata->GetDOTShielding()`.
- Add `$questitemdata->GetElementalDamageAmount()`.
- Add `$questitemdata->GetElementalDamageType()`.
- Add `$questitemdata->GetEliteMaterial()`.
- Add `$questitemdata->GetEndurance()`.
- Add `$questitemdata->GetEnduranceRegen()`.
- Add `$questitemdata->GetExpendableArrow()`.
- Add `$questitemdata->GetExtraDamageAmount()`.
- Add `$questitemdata->GetExtraDamageSkill()`.
- Add `$questitemdata->GetFR()`.
- Add `$questitemdata->GetFVNoDrop()`.
- Add `$questitemdata->GetFactionAmount1()`.
- Add `$questitemdata->GetFactionAmount2()`.
- Add `$questitemdata->GetFactionAmount3()`.
- Add `$questitemdata->GetFactionAmount4()`.
- Add `$questitemdata->GetFactionModifier1()`.
- Add `$questitemdata->GetFactionModifier2()`.
- Add `$questitemdata->GetFactionModifier3()`.
- Add `$questitemdata->GetFactionModifier4()`.
- Add `$questitemdata->GetFavor()`.
- Add `$questitemdata->GetFilename()`.
- Add `$questitemdata->GetFocusEffect()`.
- Add `$questitemdata->GetFocusName()`.
- Add `$questitemdata->GetFocusLevel()`.
- Add `$questitemdata->GetFocusLevel2()`.
- Add `$questitemdata->GetFocusType()`.
- Add `$questitemdata->GetFulfilment()`.
- Add `$questitemdata->GetGuildFavor()`.
- Add `$questitemdata->GetHP()`.
- Add `$questitemdata->GetHaste()`.
- Add `$questitemdata->GetHealAmount()`.
- Add `$questitemdata->GetHeroicAGI()`.
- Add `$questitemdata->GetHeroicCR()`.
- Add `$questitemdata->GetHeroicCHA()`.
- Add `$questitemdata->GetHeroicCorruption()`.
- Add `$questitemdata->GetHeroicDR()`.
- Add `$questitemdata->GetHeroicDEX()`.
- Add `$questitemdata->GetHeroicFR()`.
- Add `$questitemdata->GetHeroicINT()`.
- Add `$questitemdata->GetHeroicMR()`.
- Add `$questitemdata->GetHeroicPR()`.
- Add `$questitemdata->GetHeroicSTA()`.
- Add `$questitemdata->GetHeroicSTR()`.
- Add `$questitemdata->GetHeroicWIS()`.
- Add `$questitemdata->GetID()`.
- Add `$questitemdata->GetIDFile()`.
- Add `$questitemdata->GetIcon()`.
- Add `$questitemdata->GetItemClass()`.
- Add `$questitemdata->GetItemType()`.
- Add `$questitemdata->GetLDoNPrice()`.
- Add `$questitemdata->GetLDoNSellBackRate()`.
- Add `$questitemdata->GetLDoNSold()`.
- Add `$questitemdata->GetLDoNTheme()`.
- Add `$questitemdata->GetLight()`.
- Add `$questitemdata->GetLore()`.
- Add `$questitemdata->GetLoreFlag()`.
- Add `$questitemdata->GetLoreGroup()`.
- Add `$questitemdata->GetMR()`.
- Add `$questitemdata->GetMagic()`.
- Add `$questitemdata->GetMana()`.
- Add `$questitemdata->GetManaRegen()`.
- Add `$questitemdata->GetMaterial()`.
- Add `$questitemdata->GetMaximumCharges()`.
- Add `$questitemdata->GetMinimumStatus()`.
- Add `$questitemdata->GetName()`.
- Add `$questitemdata->GetNoDrop()`.
- Add `$questitemdata->GetNoPet()`.
- Add `$questitemdata->GetNoRent()`.
- Add `$questitemdata->GetNoTransfer()`.
- Add `$questitemdata->GetPR()`.
- Add `$questitemdata->GetPendingLoreFlag()`.
- Add `$questitemdata->GetPointType()`.
- Add `$questitemdata->GetPotionBelt()`.
- Add `$questitemdata->GetPotionBeltSlots()`.
- Add `$questitemdata->GetPrice()`.
- Add `$questitemdata->GetProcEffect()`.
- Add `$questitemdata->GetProcName()`.
- Add `$questitemdata->GetProcRate()`.
- Add `$questitemdata->GetProcLevel()`.
- Add `$questitemdata->GetProcLevel2()`.
- Add `$questitemdata->GetProcType()`.
- Add `$questitemdata->GetPurity()`.
- Add `$questitemdata->GetQuestItemFlag()`.
- Add `$questitemdata->GetRaces()`.
- Add `$questitemdata->GetRange()`.
- Add `$questitemdata->GetRecLevel()`.
- Add `$questitemdata->GetRecSkill()`.
- Add `$questitemdata->GetRecastDelay()`.
- Add `$questitemdata->GetRecastType()`.
- Add `$questitemdata->GetRegen()`.
- Add `$questitemdata->GetReqLevel()`.
- Add `$questitemdata->GetScriptFileID()`.
- Add `$questitemdata->GetScrollEffect()`.
- Add `$questitemdata->GetScrollName()`.
- Add `$questitemdata->GetScrollLevel()`.
- Add `$questitemdata->GetScrollLevel2()`.
- Add `$questitemdata->GetScrollType()`.
- Add `$questitemdata->GetSellRate()`.
- Add `$questitemdata->GetShielding()`.
- Add `$questitemdata->GetSize()`.
- Add `$questitemdata->GetSkillModifierType()`.
- Add `$questitemdata->GetSkillModifierValue()`.
- Add `$questitemdata->GetSlots()`.
- Add `$questitemdata->GetSpellDamage()`.
- Add `$questitemdata->GetSpellShield()`.
- Add `$questitemdata->GetStackSize()`.
- Add `$questitemdata->GetStackable()`.
- Add `$questitemdata->GetStrikeThrough()`.
- Add `$questitemdata->GetStunResist()`.
- Add `$questitemdata->GetSummonedFlag()`.
- Add `$questitemdata->GetTradeskills()`.
- Add `$questitemdata->GetWeight()`.
- Add `$questitemdata->GetWornName()`.
- Add `$questitemdata->GetWornEffect()`.
- Add `$questitemdata->GetWornLevel()`.
- Add `$questitemdata->GetWornLevel2()`.
- Add `$questitemdata->GetWornType()`.

- Fixed data type of parameters in a handful of methods.

- Allows operators to directly interact with item data without the need for `quest::getitemstat` or DBI or anything of the sort.

* Update perl_questitem.cpp

* Update lua_iteminst.cpp

* Update lua_iteminst.h

* Update lua_iteminst.h
2023-07-02 11:26:49 -04:00
Alex King
d16ac99033
[Quest API] Add StatBonuses Class to Perl (#3460)
* [Quest API] Add StatBonuses Class to Perl

# Perl
- Add `$mob->GetAABonuses()`.
- Add `$mob->GetItemBonuses()`.
- Add `$mob->GetSpellBonuses()`.
- Add `$statbonuses->GetAbsorbMagicAttack(slot)`.
- Add `$statbonuses->GetAC()`.
- Add `$statbonuses->GetAccuracy(slot)`.
- Add `$statbonuses->GetAdjustedCastingSkill()`.
- Add `$statbonuses->GetAggroRange()`.
- Add `$statbonuses->GetAGI()`.
- Add `$statbonuses->GetAGICapModifier()`.
- Add `$statbonuses->GetAlterNPCLevel()`.
- Add `$statbonuses->GetAmbidexterity()`.
- Add `$statbonuses->GetAmplification()`.
- Add `$statbonuses->GetAntiGate()`.
- Add `$statbonuses->GetArcheryDamageModifier()`.
- Add `$statbonuses->GetAssassinate(slot)`.
- Add `$statbonuses->GetAssassinateLevel(slot)`.
- Add `$statbonuses->GetAssistRange()`.
- Add `$statbonuses->GetAStacker(slot)`.
- Add `$statbonuses->GetATK()`.
- Add `$statbonuses->GetAvoidMeleeChance()`.
- Add `$statbonuses->GetAvoidMeleeChanceEffect()`.
- Add `$statbonuses->GetBaseMovementSpeed()`.
- Add `$statbonuses->GetBerserkSPA()`.
- Add `$statbonuses->GetBindWound()`.
- Add `$statbonuses->GetBlockBehind()`.
- Add `$statbonuses->GetBrassModifier()`.
- Add `$statbonuses->GetBStacker(slot)`.
- Add `$statbonuses->GetBuffSlotIncrease()`.
- Add `$statbonuses->GetCHA()`.
- Add `$statbonuses->GetCHACapModifier()`.
- Add `$statbonuses->GetChannelChanceItems()`.
- Add `$statbonuses->GetChannelChanceSpells()`.
- Add `$statbonuses->GetCharmBreakChance()`.
- Add `$statbonuses->GetClairvoyance()`.
- Add `$statbonuses->GetCombatStability()`.
- Add `$statbonuses->GetConsumeProjectile()`.
- Add `$statbonuses->GetCorrup()`.
- Add `$statbonuses->GetCorrupCapModifier()`.
- Add `$statbonuses->GetCR()`.
- Add `$statbonuses->GetCRCapModifier()`.
- Add `$statbonuses->GetCripplingBlowChance()`.
- Add `$statbonuses->GetCriticalDamageModifier(slot)`.
- Add `$statbonuses->GetCriticalDoTChance()`.
- Add `$statbonuses->GetCriticalDOTDecay()`.
- Add `$statbonuses->GetCriticalHealChance()`.
- Add `$statbonuses->GetCriticalHealDecay()`.
- Add `$statbonuses->GetCriticalHealOverTime()`.
- Add `$statbonuses->GetCriticalHitChance(slot)`.
- Add `$statbonuses->GetCriticalMend()`.
- Add `$statbonuses->GetCriticalRegenDecay()`.
- Add `$statbonuses->GetCriticalSpellChance()`.
- Add `$statbonuses->GetCStacker(slot)`.
- Add `$statbonuses->GetDamageModifier(slot)`.
- Add `$statbonuses->GetDamageModifier2(slot)`.
- Add `$statbonuses->GetDamageShield()`.
- Add `$statbonuses->GetDamageShieldSpellID()`.
- Add `$statbonuses->GetDamageShieldType()`.
- Add `$statbonuses->GetDeathSave(slot)`.
- Add `$statbonuses->GetDelayDeath()`.
- Add `$statbonuses->GetDEX()`.
- Add `$statbonuses->GetDEXCapModifier()`.
- Add `$statbonuses->GetDistanceRemoval()`.
- Add `$statbonuses->GetDivineAura()`.
- Add `$statbonuses->GetDivineSaveChance(slot)`.
- Add `$statbonuses->GetDodgeChance()`.
- Add `$statbonuses->GetDOTCriticalDamageIncrease()`.
- Add `$statbonuses->GetDoTShielding()`.
- Add `$statbonuses->GetDoubleAttackChance()`.
- Add `$statbonuses->GetDoubleRangedAttack()`.
- Add `$statbonuses->GetDoubleRiposte()`.
- Add `$statbonuses->GetDoubleSpecialAttack()`.
- Add `$statbonuses->GetDR()`.
- Add `$statbonuses->GetDRCapModifier()`.
- Add `$statbonuses->GetDSMitigation()`.
- Add `$statbonuses->GetDSMitigationOffHand()`.
- Add `$statbonuses->GetDStacker(slot)`.
- Add `$statbonuses->GetDualWieldChance()`.
- Add `$statbonuses->GetEffectiveCastingLevel()`.
- Add `$statbonuses->GetEndurancePercentCap(slot)`.
- Add `$statbonuses->GetEndurance()`.
- Add `$statbonuses->GetEnduranceReduction()`.
- Add `$statbonuses->GetEnduranceRegen()`.
- Add `$statbonuses->GetExtraXTargets()`.
- Add `$statbonuses->GetExtraAttackChance()`.
- Add `$statbonuses->GetFactionModifierPercent()`.
- Add `$statbonuses->GetFearless()`.
- Add `$statbonuses->GetFeignedCastOnChance()`.
- Add `$statbonuses->GetFinishingBlow(slot)`.
- Add `$statbonuses->GetFinishingBlowLevel(slot)`.
- Add `$statbonuses->GetFlurryChance()`.
- Add `$statbonuses->GetFocusEffects(slot)`.
- Add `$statbonuses->GetFocusEffectsWorn(slot)`.
- Add `$statbonuses->GetForageAdditionalItems()`.
- Add `$statbonuses->GetFR()`.
- Add `$statbonuses->GetFRCapModifier()`.
- Add `$statbonuses->GetFrenziedDevastation()`.
- Add `$statbonuses->GetFrontalBackstabChance()`.
- Add `$statbonuses->GetFrontalBackstabMinimumDamage()`.
- Add `$statbonuses->GetFrontalStunResist()`.
- Add `$statbonuses->GetGiveDoubleAttack()`.
- Add `$statbonuses->GetGiveDoubleRiposte(slot)`.
- Add `$statbonuses->GetGivePetGroupTarget()`.
- Add `$statbonuses->GetGravityEffect()`.
- Add `$statbonuses->GetHaste()`.
- Add `$statbonuses->GetHasteType2()`.
- Add `$statbonuses->GetHasteType3()`.
- Add `$statbonuses->GetHateModifier()`.
- Add `$statbonuses->GetHeadShot(slot)`.
- Add `$statbonuses->GetHeadShotLevel(slot)`.
- Add `$statbonuses->GetHealAmt()`.
- Add `$statbonuses->GetHealRate()`.
- Add `$statbonuses->GetHeroicAGI()`.
- Add `$statbonuses->GetHeroicCHA()`.
- Add `$statbonuses->GetHeroicCorrup()`.
- Add `$statbonuses->GetHeroicCR()`.
- Add `$statbonuses->GetHeroicDEX()`.
- Add `$statbonuses->GetHeroicDR()`.
- Add `$statbonuses->GetHeroicFR()`.
- Add `$statbonuses->GetHeroicINT()`.
- Add `$statbonuses->GetHeroicMR()`.
- Add `$statbonuses->GetHeroicPR()`.
- Add `$statbonuses->GetHeroicSTA()`.
- Add `$statbonuses->GetHeroicSTR()`.
- Add `$statbonuses->GetHeroicWIS()`.
- Add `$statbonuses->GetHitChance()`.
- Add `$statbonuses->GetHitChanceEffect(slot)`.
- Add `$statbonuses->GetHP()`.
- Add `$statbonuses->GetHPPercentCap(slot)`.
- Add `$statbonuses->GetHPRegen()`.
- Add `$statbonuses->GetHPToManaConvert()`.
- Add `$statbonuses->GetHundredHands()`.
- Add `$statbonuses->GetIllusionPersistence()`.
- Add `$statbonuses->GetImmuneToFlee()`.
- Add `$statbonuses->GetImprovedReclaimEnergy()`.
- Add `$statbonuses->GetImprovedTauntslot()`.
- Add `$statbonuses->GetIncreaseBlockChance()`.
- Add `$statbonuses->GetIncreaseChanceMemoryWipe()`.
- Add `$statbonuses->GetIncreaseRunSpeedCap()`.
- Add `$statbonuses->GetInhibitMelee()`.
- Add `$statbonuses->GetINT()`.
- Add `$statbonuses->GetINTCapModifier()`.
- Add `$statbonuses->GetIsBlind()`.
- Add `$statbonuses->GetIsFeared()`.
- Add `$statbonuses->GetItemATKCap()`.
- Add `$statbonuses->GetItemHPRegenCap()`.
- Add `$statbonuses->GetItemManaRegenCap()`.
- Add `$statbonuses->GetLimitToSkill(slot)`.
- Add `$statbonuses->GetMagicWeapon()`.
- Add `$statbonuses->GetMana()`.
- Add `$statbonuses->GetManaAbsorbPercentDamage(slot)`.
- Add `$statbonuses->GetManaPercentCap(slot)`.
- Add `$statbonuses->GetManaRegen()`.
- Add `$statbonuses->GetMasteryOfPast()`.
- Add `$statbonuses->GetMaxBindWound()`.
- Add `$statbonuses->GetMaxHP()`.
- Add `$statbonuses->GetMaxHPChange()`.
- Add `$statbonuses->GetMeleeLifetap()`.
- Add `$statbonuses->GetMeleeMitigation()`.
- Add `$statbonuses->GetMeleeMitigationEffect()`.
- Add `$statbonuses->GetMeleeRune(slot)`.
- Add `$statbonuses->GetMeleeSkillCheck()`.
- Add `$statbonuses->GetMeleeSkillCheckSkill()`.
- Add `$statbonuses->GetMeleeThresholdGuard(slot)`.
- Add `$statbonuses->GetMetabolism()`.
- Add `$statbonuses->GetMinimumDamageModifier(slot)`.
- Add `$statbonuses->GetMitigateDOTRune(slot)`.
- Add `$statbonuses->GetMitigateMeleeRune(slot)`.
- Add `$statbonuses->GetMitigateSpellRune(slot)`.
- Add `$statbonuses->GetMovementSpeed()`.
- Add `$statbonuses->GetMR()`.
- Add `$statbonuses->GetMRCapModifier()`.
- Add `$statbonuses->GetNegateAttacks(slot)`.
- Add `$statbonuses->GetNegateEffects()`.
- Add `$statbonuses->GetNegateIfCombat()`.
- Add `$statbonuses->GetNoBreakAESneak()`.
- Add `$statbonuses->GetOffhandRiposteFail()`.
- Add `$statbonuses->GetPackrat()`.
- Add `$statbonuses->GetParryChance()`.
- Add `$statbonuses->GetPCPetFlurry(slot)`.
- Add `$statbonuses->GetPCPetRampage(slot)`.
- Add `$statbonuses->GetPercussionModifier()`.
- Add `$statbonuses->GetPersistentCasting()`.
- Add `$statbonuses->GetPetAvoidance()`.
- Add `$statbonuses->GetPetCriticalHit()`.
- Add `$statbonuses->GetPetFlurry()`.
- Add `$statbonuses->GetPetMaxHP()`.
- Add `$statbonuses->GetPetMeleeMitigation()`.
- Add `$statbonuses->GetPR()`.
- Add `$statbonuses->GetPRCapModifier()`.
- Add `$statbonuses->GetProcChance()`.
- Add `$statbonuses->GetProcChanceSPA()`.
- Add `$statbonuses->GetRaiseSkillCap(slot)`.
- Add `$statbonuses->GetReduceFallDamage()`.
- Add `$statbonuses->GetReduceTradeskillFail(slot)`.
- Add `$statbonuses->GetReflectChance()`.
- Add `$statbonuses->GetResistFearChance()`.
- Add `$statbonuses->GetResistSpellChance()`.
- Add `$statbonuses->GetReverseDamageShield()`.
- Add `$statbonuses->GetReverseDamageShieldSpellID()`.
- Add `$statbonuses->GetReverseDamageShieldType()`.
- Add `$statbonuses->GetRiposteChance()`.
- Add `$statbonuses->GetRoot(slot)`.
- Add `$statbonuses->GetRootBreakChance()`.
- Add `$statbonuses->GetSalvageChance()`.
- Add `$statbonuses->GetSanctuary()`.
- Add `$statbonuses->GetScreech()`.
- Add `$statbonuses->GetSecondaryDamageIncrease()`.
- Add `$statbonuses->GetSeeInvis()`.
- Add `$statbonuses->GetSEResist(slot)`.
- Add `$statbonuses->GetShieldBlock()`.
- Add `$statbonuses->GetShieldEquipDamageModifier()`.
- Add `$statbonuses->GetShroudOfStealth()`.
- Add `$statbonuses->GetSingingModifier()`.
- Add `$statbonuses->GetSkillAttackProc(slot)`.
- Add `$statbonuses->GetSkillDamageAmount(slot)`.
- Add `$statbonuses->GetSkillDamageAmount2(slot)`.
- Add `$statbonuses->GetSkillDamageTaken(slot)`.
- Add `$statbonuses->GetSkillModifier(slot)`.
- Add `$statbonuses->GetSkillModifierMax(slot)`.
- Add `$statbonuses->GetSkillProc(slot)`.
- Add `$statbonuses->GetSkillProcSuccess(slot)`.
- Add `$statbonuses->GetSkillReuseTime(slot)`.
- Add `$statbonuses->GetSlayUndead(slot)`.
- Add `$statbonuses->GetSongModifierCap()`.
- Add `$statbonuses->GetSongRange()`.
- Add `$statbonuses->GetSpellCriticalDamageIncreaseNOStack()`.
- Add `$statbonuses->GetSpellCriticalDamageIncrease()`.
- Add `$statbonuses->GetSpellDamageShield()`.
- Add `$statbonuses->GetSpellDamage()`.
- Add `$statbonuses->GetSpellOnDeath(slot)`.
- Add `$statbonuses->GetSpellOnKill(slot)`.
- Add `$statbonuses->GetSpellProcChance()`.
- Add `$statbonuses->GetSpellShield()`.
- Add `$statbonuses->GetSpellThresholdGuard(slot)`.
- Add `$statbonuses->GetSpellTriggers(slot)`.
- Add `$statbonuses->GetSTA()`.
- Add `$statbonuses->GetSTACapModifier()`.
- Add `$statbonuses->GetSTR()`.
- Add `$statbonuses->GetSTRCapModifier()`.
- Add `$statbonuses->GetStrikeThrough()`.
- Add `$statbonuses->GetStringedModifier()`.
- Add `$statbonuses->GetStunBashChance()`.
- Add `$statbonuses->GetStunResist()`.
- Add `$statbonuses->GetTradeSkillMastery()`.
- Add `$statbonuses->GetTriggerMeleeThreshold()`.
- Add `$statbonuses->GetTriggerOnValueAmount()`.
- Add `$statbonuses->GetTriggerSpellThreshold()`.
- Add `$statbonuses->GetTripleAttackChance()`.
- Add `$statbonuses->GetTripleBackstab()`.
- Add `$statbonuses->GetTwoHandBluntBlock()`.
- Add `$statbonuses->GetUnfailingDivinity()`.
- Add `$statbonuses->GetVampirism()`.
- Add `$statbonuses->GetVoiceGraft()`.
- Add `$statbonuses->GetWindModifier()`.
- Add `$statbonuses->GetWIS()`.
- Add `$statbonuses->GetWISCapModifier()`.
- Add `$statbonuses->GetXPRateModifier()`.

# Notes
- Adds methods to get mob's stat bonuses to Mob methods.
- Adds support for stat bonuses class to Perl similar to Lua.

* Update perl_stat_bonuses.cpp

* Update perl_stat_bonuses.cpp
2023-07-02 10:26:46 -04:00
Alex King
a13fa07e68
[Quest API] Add Spawn2 Class to Perl (#3456)
# Perl
- Add `$spawn->Depop()`.
- Add `$spawn->Disable()`.
- Add `$spawn->Enable()`.
- Add `$spawn->ForceDespawn()`.
- Add `$spawn->GetCurrentNPCID()`.
- Add `$spawn->GetHeading()`.
- Add `$spawn->GetID()`.
- Add `$spawn->GetKillCount()`.
- Add `$spawn->GetRespawnTimer()`.
- Add `$spawn->GetSpawnCondition()`.
- Add `$spawn->GetSpawnGroupID()`.
- Add `$spawn->GetVariance()`.
- Add `$spawn->GetX()`.
- Add `$spawn->GetY()`.
- Add `$spawn->GetZ()`.
- Add `$spawn->IsEnabled()`.
- Add `$spawn->IsNPCPointerValid()`.
- Add `$spawn->LoadGrid()`.
- Add `$spawn->Repop()`.
- Add `$spawn->Repop(delay)`.
- Add `$spawn->Reset()`.
- Add `$spawn->SetCurrentNPCID(npc_id)`.
- Add `$spawn->SetNPCPointer(npc_pointer)`.
- Add `$spawn->SetRespawnTimer(new_respawn_time)`.
- Add `$spawn->SetTimer(duration)`.
- Add `$spawn->SetVariance(variance)`.

# Notes
- Adds support for Spawn2 class to Perl.
2023-07-02 10:26:32 -04:00
Alex King
50db7637aa
[Quest API] Add Memorize and Scribe Spell Events to Perl/Lua (#3363)
* [Quest API] Add Memorize and Scribe Spell Events to Perl/Lua

# Perl
- Add `EVENT_MEMORIZE_SPELL`.
- Add `EVENT_UNMEMORIZE_SPELL`.
- Add `EVENT_SCRIBE_SPELL`.
- Add `EVENT_UNSCRIBE_SPELL`.

# Lua
- Add `event_memorize_spell`.
- Add `event_unmemorize_spell`.
- Add `event_scribe_spell`.
- Add `event_unscribe_spell`.

# Notes
- Allows operators to perform events on memorization, unmemorization, scribe, or unscribe.
- Cleaned up target description messages for `#unscribespell`.

* Update client.cpp
2023-05-25 18:18:14 -05:00
Alex King
c5c9985e0d
[Cleanup] Remove ExportVarComplex() from embparser.cpp/embparser.h (#3282)
# Notes
- This is unused.
2023-04-14 19:41:23 -04:00
Aeadoin
0d509a7f3a
[Crash] Add Checks for valid pointers or fix existing. (#3164) 2023-04-01 12:44:00 -04:00
Alex King
2a6cf8c8e7
[Strings] Add more number formatters (#2873)
* [Strings] Add more number formatters

# Notes
- Adds `Strings::ToUnsignedInt` for `uint32` support.
- Adds `Strings::ToBigInt` for `int64` support.
- Adds `Strings::ToUnsignedBigInt` for `uint64` support.
- Adds `Strings::ToFloat` for `float` support.
- Replaces all `std::stoi` references with `Strings::ToInt`.
- Replaces all `atoi` references with `Strings::ToInt`.
- Replaces all `std::stoul` references with `Strings::ToUnsignedInt`.
- Replaces all `atoul` references with `Strings::ToUnsignedInt`.
- Replaces all `std::stoll` references with `Strings::ToBigInt`.
- Replaces all `atoll` references with `Strings::ToBigInt`.
- Replaces all `std::stoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `atoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `std::stof` references with `Strings::ToFloat`.

* [Strings] Add more number formatters

- Adds `Strings::ToUnsignedInt` for `uint32` support.
- Adds `Strings::ToBigInt` for `int64` support.
- Adds `Strings::ToUnsignedBigInt` for `uint64` support.
- Adds `Strings::ToFloat` for `float` support.
- Replaces all `std::stoi` references with `Strings::ToInt`.
- Replaces all `atoi` references with `Strings::ToInt`.
- Replaces all `std::stoul` references with `Strings::ToUnsignedInt`.
- Replaces all `atoul` references with `Strings::ToUnsignedInt`.
- Replaces all `std::stoll` references with `Strings::ToBigInt`.
- Replaces all `atoll` references with `Strings::ToBigInt`.
- Replaces all `std::stoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `atoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `std::stof` references with `Strings::ToFloat`.

* Rebase cleanup

* Changes/benchmarks/tests

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-03-04 17:01:19 -06:00
Vayle
e57979c3a8
[Quest API] Add Additional XP Events EVENT_AA_EXP_GAIN, EVENT_EXP_GAIN (#2865)
* Add XP Events

* Tweak

* Formatting

* Additional tweak

* Adjustment

* Update export naming

* Formatting

* Indenting

* Finalizing formatting

* Indenting adjustments

* Use tab character setting

* Remove double tabs

* Update exp.cpp

---------

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2023-02-13 00:19:02 -06:00
Alex King
4df9661903
[Quest API] Add EVENT_DROP_ITEM_CLIENT to Perl/Lua (#2869)
* [Quest API] Add EVENT_DROP_ITEM_CLIENT to Perl/Lua

- Add `EVENT_DROP_ITEM_CLIENT`, exports `$quantity,` $item_name`, `$item_id`, `$spell_id`, `$slot_id`, and `$item`.

- Add `event_drop_item_client`, exports `e.quantity`, `e.item_name`, `e.item_id`, `e.spell_id`, `e.slot_id`, and `e.item`.

* Update inventory.cpp

* Update inventory.cpp

* Update lua_general.cpp

* Update inventory.cpp
2023-02-13 00:15:19 -06:00
Alex King
8c363320d8
[Quest API] Export target to EVENT_TARGET_CHANGE in Perl/Lua. (#2870)
* [Quest API] Export target to EVENT_TARGET_CHANGE in Perl/Lua.

- Export `$target` to `EVENT_TARGET_CHANGE`.

- Export `e.other` to `event_target_change`.

- Allows operators to not have to grab bot, Client, or NPC's target in Perl with `GetTarget()`.
- Allows operators to not have to grab Client's target in Lua with `GetTarget()`.

* Update mob.cpp

* Update mob.cpp

* Update mob.cpp
2023-02-13 00:03:52 -06:00
Alex King
d4afc78982
[Quest API] Add EVENT_DESTROY_ITEM_CLIENT to Perl/Lua. (#2871)
* [Quest API] Add EVENT_DESTROY_ITEM_CLIENT to Perl/Lua.

- Add `EVENT_DESTROY_ITEM_CLIENT`, exports `$item_id`, `$item_name`, `$quantity`, and `$item`.

- Add `event_destroy_item_client`, exports `e.item_id`, `e.item_name`, `e.quantity`, and `e.item`.

- Allows operators to use player scripts for item destroys.

* Update lua_parser_events.h

* Update inventory.cpp
2023-02-12 23:58:27 -06:00
Alex King
ca0e85b4bc
[Quest API] Export $item to EVENT_PLAYER_PICKUP in Perl. (#2875)
* [Quest API] Export $item to EVENT_PLAYER_PICKUP in Perl.

# Notes
- Exports `$item` to `EVENT_PLAYER_PICKUP` in Perl so that you have access to the item itself.

* Optional parsing.

* Update object.cpp

* Update object.cpp
2023-02-12 23:52:47 -06:00
Alex King
5b24d38d1e
[Quest API] Export $item to Fishing and Forage Events in Perl (#2876)
* [Quest API] Export $item to Fishing and Forage Events in Perl

# Notes
- Exports `$item` to `EVENT_FISH_SUCCESS` in Perl.
- Exports `$item` to `EVENT_FORAGE_SUCCESS` in Perl.

* Add optional parsing to fish/forage events.

* Update forage.cpp

* Fix missing event param

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-02-12 23:50:21 -06:00
Alex King
4a1d026215
[Quest API] Export $spawned to EVENT_SPAWN_ZONE in Perl (#2877)
* [Quest API] Export $spawned to EVENT_SPAWN_ZONE in Perl

# Notes
- Exports `$spawned` to `EVENT_SPAWN_ZONE` in Perl.
- Allows operators to use the mob reference instead of having to grab it from entity list.

* Optional parsing.
2023-02-12 23:46:01 -06:00
Alex King
5ef8f8c3a8
[Quest API] Export $item and $corpse to EVENT_LOOT and EVENT_LOOT_ZONE in Perl (#2878)
* [Quest API] Export $item and $corpse to EVENT_LOOT and EVENT_LOOT_ZONE in Perl

# Notes
- Exports `$item` and `$corpse` to `EVENT_LOOT` in Perl.
- Exports `$item` and `$corpse` to `EVENT_LOOT_ZONE` in Perl.

* Optional parsing.

* Update corpse.cpp

* Cleanup

* Export changes

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-02-12 23:45:26 -06:00
Alex King
c64591b8f7
[Quest API] Export $killed_npc to EVENT_NPC_SLAY to Perl (#2879)
# Notes
- Exports `$killed_npc` to `EVENT_NPC_SLAY` to Perl.
- Allows operators to use NPC reference in event instead of just NPC ID.
2023-02-12 22:49:16 -06:00
Alex King
7099e17c7e
[Quest API] Export $hate_entity to EVENT_HATE_LIST in Perl (#2885)
# Notes
- Exports `$hate_entity` to `EVENT_HATE_LIST`.
- Allows operators to see which mob is joining/leaving an NPC's hatelist.
2023-02-12 22:44:31 -06:00
Alex King
2c75e8fcd4
[Quest API] Add $target export to EVENT_INSPECT in Perl (#2891)
* [Quest API] Add $target export to EVENT_INSPECT in Perl

# Notes
- Exports `$target` to `EVENT_INSPECT`.
- Allows operators to get information from target directly instead of using entity list.

* Update client_packet.cpp
2023-02-12 22:43:38 -06:00
Alex King
e8f01fb6ac
[Quest API] Export $item and $augment to augment events in Perl (#2895)
* [Quest API] Export $item and $augment to augment events in Perl

# Notes
- Exports `$item` and `$augment` to `EVENT_AUGMENT_INSERT_CLIENT` in Perl.
- Exports `$item` and `$augment` to `EVENT_AUGMENT_REMOVE_CLIENT` in Perl.
- Allows operators to use item and augment reference instead of just item IDs.

* Cleanup
2023-02-12 22:42:27 -06:00
Alex King
2dcff247c8
[Quest API] Export targets to EVENT_CONSIDER and EVENT_CONSIDER_CORPSE (#2908)
# Perl
- Export `$target` to `EVENT_CONSIDER`.
- Export `$corpse` to `EVENT_CONSIDER_CORPSE`.

# Lua
- Export `e.other` to `EVENT_CONSIDER`.
- Export `e.corpse` to `EVENT_CONSIDER_CORPSE`.

 # Notes
- Allows operators to grab the target or corpse a player is considering.
2023-02-12 22:32:04 -06:00