184 Commits

Author SHA1 Message Date
Alex King
40738b29e3
[Quest API] Add Area-Based Quest Methods to Perl/Lua (#4447)
* [Quest API] Add Area-Based Quest Methods to Perl/Lua

* Convert some to mob

* Fix
2024-08-26 20:29:07 -05:00
Alex King
8640776a21
[Cleanup] Cleanup Body Type Code (#4366)
* [Cleanup] Cleanup Body Type-based Code

* Update bodytypes.cpp

* Final

* Update body_type.cpp

* Cleanup

* Cleanup

* Formatting

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-06-02 04:25:06 -04:00
Alex King
caa647dc6b
[Cleanup] Cleanup Deity Code (#4363)
* [Cleanup] Cleanup Deity-based Code

* Final push.

* Update deity.cpp

* Update deity.cpp

* Update deity.cpp

* Cleanup

* Cleanup

* [Cleanup] Cleanup Skill-based Code

* Update deity.cpp

* Update lua_client.cpp
2024-06-01 18:21:26 -05:00
Alex King
7ad97ce168
[Database] Add Extra Haste to Bots/Character Tables (#4286)
* [Database] Add Extra Haste to Bots/Character Tables

* Remove Database::GetExtraHasteByCharacterID

* Update database.h

* Update mob.cpp

* Update database_update_manifest.cpp

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-05-04 18:21:41 -05:00
Alex King
9a09d820a5
[Quest API] Add GetConsiderColor() to Perl/Lua (#4253) 2024-04-15 04:53:48 -05:00
Alex King
abdec39cdd
[Quest API] Add Archetype Methods to Perl/Lua (#4181)
* [Quest API] Add Archetype Methods to Perl/Lua

- Add `$mob->GetArchetypeName()`.
- Add `$mob->IsIntelligenceCasterClass()`.
- Add `$mob->IsPureMeleeClass()`.
- Add `$mob->IsWisdomCasterClass()`.

- Add `mob:GetArchetypeName()`.
- Add `mob:IsIntelligenceCasterClass()`.
- Add `mob:IsPureMeleeClass()`.
- Add `mob:IsWisdomCasterClass()`.

- Allows operators to use mob archetypes to perform different operations.
- Add a namespace for archetypes instead of constants.
- Utilize `IsIntelligenceCasterClass()`, `IsPureMeleeClass()`, and `IsWisdomCasterClass()` where necessary.
-

* Update mob.cpp
2024-03-23 14:37:35 -05:00
Alex King
66cc947b2a
[Quest API] Add Restore Methods for Health, Mana, and Endurance to Perl/Lua (#4179)
* [Quest API] Add Restore Methods for Health, Mana, and Endurance to Perl/Lua

- Add `$mob->RestoreEndurance()`.
- Add `$mob->RestoreHealth()`.
- Add `$mob->RestoreMana()`.

- Add `mob:RestoreEndurance()`.
- Add `mob:RestoreHealth()`.
- Add `mob:RestoreMana()`.

- Allows operators to easily restore a mob to full health, mana, or endurance.
- `RestoreHealth` is just a more verbosely named `Heal`.
- Convert spots in source to use these short hands instead of directly using `SetEndurance(GetMaxEndurance())`, `SetHP(GetMaxHP())`, or `SetMana(GetMaxMana())`.

* Update mob.h

* Update mob.h
2024-03-22 23:53:35 -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
95cc22ffbb
[Quest API] Add GetDeityName() to Perl/Lua (#4180)
# Perl
- Add `$mob->GetDeityName()`.

# Lua
- Add `mob:GetDeityName()`.

# Notes
- Allows operators to get a mob's deity name.
2024-03-13 20:27:31 -04:00
Alex King
8ee7910569
[Quest API] Add IsAlwaysAggro() to Perl/Lua (#4152)
- Add `$mob->IsAlwaysAggro()`.

- Add `mob:IsAlwaysAggro()`.

- Allows operators to determine if a mob is set to always aggro.
2024-03-03 20:40:20 -05:00
Alex King
b766a79c11
[Quest API] Add GetHeroicStrikethrough() to Perl/Lua (#4150)
- Add `$mob->GetHeroicStrikethrough()`.

- Add `mob:GetHeroicStrikethrough()`.

- Allows operators to get a mob's Heroic Strikethrough.
2024-03-03 13:05:01 -05:00
Alex King
5e3b6d363a
[Quest API] Add IsBoat()/IsControllableBoat() to Perl/Lua (#4151)
- Add `$mob->IsBoat()`.
- Add `$mob->IsControllableBoat()`.

- Add `mob:IsBoat()`.
- Add `mob:IsControllableBoat()`.

- Allows operators to determine if a mob is a boat or a controllable boat.
2024-03-03 12:34:21 -05:00
Alex King
b2fc59878a
[Quest API] Add IsDestructibleObject() to Perl/Lua (#4153)
# Perl
- Add `$mob-.IsDestructibleObject()`.

# Lua
- Add `mob:IsDestructibleObject()`.

# Notes
- Allows operators to determine if a mob is a destructible object.
2024-03-03 11:43:54 -05:00
Alex King
35fe38cd09
[Quest API] Add Pet Owner Methods to Perl/Lua (#4115)
* [Quest API] Add Pet Owner Methods to Perl/Lua

- Add `$mob->IsPetOwnerBot()`.
- Add `$mob->IsPetOwnerClient()`.
- Add `$mob->IsPetOwnerNPC()`.

- Add `mob:IsPetOwnerBot()`.
- Add `mob:IsPetOwnerClient()`.
- Add `mob:IsPetOwnerNPC()`.

- Allows operators to use these short hands instead of doing a `GetOwner() && GetOwner()->IsClient()`.

* Update npc.cpp
2024-02-25 00:38:34 -05:00
Alex King
f57c37e9c5
[Quest API] Add Pet Methods to Perl/Lua (#4116)
* [Quest API] Add Pet Methods to Perl/Lua

# Perl
- Add `$mob->IsAnimation()`.
- Add `$mob->IsCharmed()`.
- Add `$mob->IsFamiliar()`.
- Add `$mob->IsTargetLockPet()`.

# Lua
- Add `mob:IsAnimation()`.
- Add `mob:IsCharmed()`.
- Add `mob:IsFamiliar()`.
- Add `mob:IsTargetLockPet()`.

# Notes
- These methods were not exported and could be useful for operators.

* Update perl_mob.cpp
2024-02-24 22:51:21 -06:00
Alex King
67d8250b1c
[Quest API] Add Hatelist Count Methods to Perl/Lua (#4106)
# Perl
- Add `$mob->GetHateListCount()`.# Perl
- Add `$mob->GetHateListCount()`.
- Add `$mob->GetHateListBotCount()`.
- Add `$mob->GetHateListClientCount()`.
- Add `$mob->GetHateListNPCCount()`.

# Lua
- Add `mob:GetHateListCount()`.
- Add `mob:GetHateListBotCount()`.
- Add `mob:GetHateListClientCount()`.
- Add `mob:GetHateListNPCCount()`.

# Notes
- Allows operators to more easily get a total entity count of a Mob's hate list, can do an overall count, or specifically bots, clients, or NPCs.
2024-02-20 22:39:57 -06:00
Alex King
53d6e449c2
[Cleanup] Cleanup ChangeSize() (#3959)
# Notes
- Use `EQ::Clamp()` for logic instead of basic comparsions.
- Rename restriction parameter to `unrestricted`.
2024-01-12 01:51:02 -06:00
Alex King
259add68f5
[Commands] Cleanup #appearance Command (#3827)
* [Commands] Cleanup #appearance Command

# Notes
- Cleanup messages and logic.
- Cleanup appearance type constants to use a namespace with constexpr instead.
- Cleanup animation constants to use a namespace with constexpr instead.

* Update emu_constants.cpp

* Cleanup
2024-01-06 22:24:32 -06:00
Alex King
836c3d6596
[Cleanup] Appearance not appearence (#3819)
# Notes
- These were misspelled.
2023-12-30 11:22:02 -05:00
Alex King
e06c7d7735
[Quest API] Add GetHateTopBot(), GetHateTopClient(), and GetHateTopNPC() to Perl/Lua (#3793)
# Perl
- Add `$mob->GetHateTopBot()`.
- Add `$mob->GetHateTopClient()`.
- Add `$mob->GetHateTopNPC()`.

# Lua
- Add `mob:GetHateTopBot()`.
- Add `mob:GetHateTopClient()`.
- Add `mob:GetHateTopNPC()`.
2023-12-22 02:41:32 -06:00
Alex King
fdc5c27061
[Quest API] Add GMMove Overloads to Perl/Lua (#3719)
# Perl
- Add `$mob->GMMove(x, y, z, heading, save_guard_spot)`.

# Lua
- Add `mob:GMMove(x, y, z, heading, save_guard_spot)`.

# Notes
- Operators weren't able to disable saving guard spots, so moving with `GMMove` meant NPCs stayed where they were moved.
2023-11-25 18:15:37 -05:00
JJ
cc985cbcd5
[Quest API] Add GetBaseRaceName() to Perl and Lua (#3668) 2023-10-31 21:43:04 -04:00
Alex King
3791bc788f
[Parser Fix] Fix SendIllusion Spire parsing (#3623)
# Notes
- Spire parses methods based on parameters being on the same line, so these were not being parse properly since they were newlines.
2023-10-13 19:41:28 -05:00
Alex King
cf27f2bc88
[Quest API] Add Caster ID Parameter to FindBuff in Perl/Lua (#3590)
* [Quest API] Add Caster ID Parameter to FindBuff in Perl/Lua

# Perl
- Add `$mob->FindBuff(spell_id, caster_id)`.

# Lua
- Add `mob:FindBuff(spell_id, caster_id)`.

# Notes
- Allows operators to check if the spell ID is cast by a specific entity ID.
- We don't use `Mob*` reference here since the mob may have died, left zone, etc.

* Formatting.
2023-09-29 19:38:36 -04:00
Alex King
bab16771aa
[Quest API] Add ApplySpell() and SetBuffDuration() overloads to Perl/Lua (#3576)
# Perl
- Add `$bot->ApplySpell(spell_id, duration, level)`.
- Add `$bot->ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `$bot->ApplySpellGroup(spell_id, duration, level)`.
- Add `$bot->ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `$bot->ApplySpellRaid(spell_id)`.
- Add `$bot->ApplySpellRaid(spell_id, duration)`.
- Add `$bot->ApplySpellRaid(spell_id, duration, level)`.
- Add `$bot->ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `$bot->ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$bot->SetSpellDuration(spell_id, duration, level)`.
- Add `$bot->SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `$bot->SetSpellDurationGroup(spell_id, duration, level)`.
- Add `$bot->SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `$bot->SetSpellDurationRaid(spell_id)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration, level)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$client->ApplySpell(spell_id, duration, level)`.
- Add `$client->ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `$client->ApplySpellGroup(spell_id, duration, level)`.
- Add `$client->ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$client->SetSpellDuration(spell_id, duration, level)`.
- Add `$client->SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration, level)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$mob->ApplySpellBuff(spell_id, duration, level)`.
- Add `$mob->SetSpellDuration(spell_id, duration, level)`.

# Lua
- Add `bot:ApplySpell(spell_id, duration, level)`.
- Add `bot:ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `bot:ApplySpellGroup(spell_id, duration, level)`.
- Add `bot:ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `bot:ApplySpellRaid(spell_id)`.
- Add `bot:ApplySpellRaid(spell_id, duration)`.
- Add `bot:ApplySpellRaid(spell_id, duration, level)`.
- Add `bot:ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `bot:ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `bot:SetSpellDuration(spell_id, duration, level)`.
- Add `bot:SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `bot:SetSpellDurationGroup(spell_id, duration, level)`.
- Add `bot:SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `bot:SetSpellDurationRaid(spell_id, duration, level)`.
- Add `bot:SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `bot:SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `client:ApplySpell(spell_id, duration, level)`.
- Add `client:ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `client:ApplySpellGroup(spell_id, duration, level)`.
- Add `client:ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `client:ApplySpellRaid(spell_id, duration, level)`.
- Add `client:ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `client:ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `client:ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `client:SetSpellDuration(spell_id, duration, level)`.
- Add `client:SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `client:SetSpellDurationGroup(spell_id, duration, level)`.
- Add `client:SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `mob:ApplySpellBuff(spell_id, duration, level)`.
- Add `mob:SetSpellDuration(spell_id, duration, level)`.

# Notes
- This allows operators to override the spell level.
2023-09-17 13:14:13 -05:00
Alex King
fb20d92166
[Bug Fix] Fix Appearance Issues (#3520)
* [Bug Fix] Fix Appearance Issues

# Notes
- Changing race, gender, or texture of a Mob could result in it changing sizes due to use not sending the size as part of the appearance packet.
- Also converts the parameterized method to a struct parameter so that we can optionally send things without back-filling multiple arguments.

* Gender cleanup.

* Fix.

* Formatting.
2023-07-31 20:15:13 -05:00
Alex King
8c4cd34e01
[Quest API] Add GetMobTypeIdentifier() to Perl/Lua (#3512)
# Perl
- Add `$mob->GetMobTypeIdentifier()`.

# Lua
- Add `mob:GetMobTypeIdentifier()`.

# Notes
- Gets unique identifier independent of mob type.
2023-07-27 23:16:41 -05:00
Chris Miles
3f3bbe98b5
[Data Buckets] Implement scoped data buckets (#3498)
* [Data Buckets] Implement scoped data buckets

* Update database_update_manifest.cpp

* Update data_bucket.cpp

* Update data_bucket.cpp

* Update data_bucket.cpp

* Update data_bucket.h

* Update database_update_manifest.cpp

* Add GetScopedDbFilters references

* Scope transfer
2023-07-16 14:52:28 -04:00
Alex King
e55f9b9d27
[Feature] Add Support for item textures higher than 65,535 (#3494)
* [Feature] Add Support for item textures higher than 65,535

# Notes
- We were previously using `uint16` which has a max of `65,535`, but some of the new Live textures that are being used have values way beyond this.
- Updates quest API, commands, and database tables that also used `uint16`.

* Update version.h
2023-07-14 18:49:59 -04:00
Alex King
4854201b2a
[Quest API] Add Mob/Entity type check methods to Perl/Lua (#3493)
* [Quest API] Add Mob/Entity type check methods to Perl/Lua

# Perl
- Add `$mob->IsAura()`.
- Add `$mob->IsEncounter()`.
- Add `$mob->IsMerc()`.
- Add `$mob->IsOfClientBot()`.
- Add `$mob->IsOfClientBotMerc()`.
- Add `$mob->IsTemporaryPet()`.

# Lua
- Add `entity:IsAura()`.
- Add `entity:IsOfClientBot()`.
- Add `entity:IsOfClientBotMerc()`.
- Add `mob:IsTemporaryPet()`.

* Update lua_entity.cpp

* Update lua_mob.cpp
2023-07-12 21:20:07 -05:00
Alex King
a633784f78
[Quest API] Add GetClassPlural() and GetRacePlural() to Perl/Lua (#3468)
* [Quest API] Add GetClassPlural() and GetRacePlural() to Perl/Lua

# Perl
- Add `$mob->GetClassPlural()`.
- Add `$mob->GetRacePlural()`.

# Lua
- Add `mob:GetClassPlural()`.
- Add `mob:GetRacePlural()`.

# Notes
- Allows operators to get the plural of a player class or race, example being `Warrior` as `Warriors` or `Dark Elf` as `Dark Elves`.

* Update mob.cpp
2023-07-03 00:08:04 -05:00
Alex King
728ce0c519
[Quest API] Add GetCloseMobList() and CalculateDistance() overload to Perl/Lua (#3455)
* [Quest API] Add GetCloseMobList() and CalculateDistance() overload to Perl/Lua

# Perl
- Add `$entity_list->GetCloseMobList(mob)`.
- Add `$entity_list->GetCloseMobList(mob, distance)`.
- Add `$mob->CalculateDistance(mob)`.
- Add `$mob->GetCloseMobList()`.
- Add `$mob->GetCloseMobList(distance)`.

# Lua
- Add `eq.get_entity_list():GetCloseMobList(mob)`.
- Add `eq.get_entity_list():GetCloseMobList(mob, distance)`.
- Add `mob:CalculateDistance(mob)`.
- Add `mob:GetCloseMobList()`.
- Add `mob:GetCloseMobList(distance)`.

* Ignore Self

* Update lua_entity_list.cpp

* Cleanup
2023-07-02 10:55:27 -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
RekkasGit
32f7dc3d1b
[Quest API] Add GetHateListClosest(), GetHateListClosestBot(), GetHateListClosestClient(), and GetHateListClosestNPC() methods/overloads to Perl/Lua (#3359)
* Add HateListClosestClient available for scripting.

* Add other methods.

* Use pre-existing constants.

* Typos

* Update mob.h

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
2023-05-15 21:23:19 -04:00
Alex King
ce1de9997b
[Quest API] Add GetPet() to Perl (#3309)
# Perl
- Add `$mob->GetPet()`.

# Notes
- This exists in Lua, but not Perl.
2023-05-07 19:13:26 -05:00
Alex King
0e582eda82
[Quest API] Add HasSpellEffect() to Perl/Lua (#3319)
* [Quest API] Add HasSpellEffect() to Perl/Lua

# Perl
- Add `$mob->HasSpellEffect(effect_id)`.

# Lua
- Add `mob:HasSpellEffect(effect_id)`.

# Notes
- Allows operators to see if a Mob has an effect ID from any of their buffs.

* Update mob.cpp
2023-04-29 20:09:00 -05:00
Alex King
6a393bf0c3
[Quest API] Add GetDefaultRaceSize() overloads to Perl/Lua (#3320)
# Perl
- Add `$mob->GetDefaultRaceSize(race_id)`.
- Add `$mob->GetDefaultRaceSize(race_id, gender_id)`.

# Lua
- Add `mob:GetDefaultRaceSize(race_id)`.
- Add `mob:GetDefaultRaceSize(race_id, gender_id)`.

# Notes
- This allows you to get a default size for a race and gender that isn't the current mob's race and gender.
2023-04-29 19:53:49 -05:00
Alex King
57a15d473f
[Quest API] Add GetBuffSpellIDs() to Perl/Lua (#3273)
# Perl
- Add `$mob->GetBuffSpellIDs()`.

# Lua
- Add `$mob->GetBuffSpellIDs()`.

# Notes
- These methods allow operators to get a list of a mob's buff IDs without having to loop through their buffs themselves.
2023-04-09 10:58:35 -04:00
Alex King
26c267db1b
[Cleanup] "equipped" not "equiped", "dual" not "duel". (#3149)
* [Cleanup] "equipped" not "equiped", "dual" not "duel".

# Notes
- These are spelled incorrectly.

* Update spdat.h

* Formatting further.

* Update api_service.cpp
2023-03-27 17:55:37 -04:00
Alex King
9d1ace627c
[Feature] Add support for -1 extradmgskill to allow all skills to be scaled. (#3136)
* [Feature] Add support for -1 extradmgskill to allow all skills to be scaled.

- `$mob->GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`.

- `statbonuses:GetSkillDamageAmount(skill_id)` now uses `-1` properly.
- `mob:GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`.

- A `-1` value in `extradmgskill` denotes the ability to scale all skills at once.
- Consolidated `AddItemBonuses()`, `AdditiveWornBonuses()`, `CalcItemBonuses()`, and `CalcRecommendedLevelBonus()` to mob-based methods to avoid code duplication.
- Bots, NPCs, and Mercs can now use additive worn effects if the rule is enabled, as well as all other proper stat bonuses that only clients had before.
- No SQL update required to change `extradmgskill` and `extradmgamt` to `int` as they already are this type in the database, just had to adjust `item_data.h` and `shareddb.cpp`.

* Update mob.cpp

* Cleanup.

* Cleanup.

* Move #include <vector> to header.

* Add method for GetExtraDamageSkills

* fix additembonuses

* Update bonuses.cpp

* Update mob.cpp

* Out of bounds.

* Update bonuses.cpp

---------

Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
2023-03-25 20:26:01 -04:00
Alex King
4fe44f4cb6
[Quest API] Add Timer related methods to Mobs in Perl/Lua (#3133)
* [Quest API] Add Timer related methods to Mobs in Perl/Lua

# Perl
- Add `quest::ispausedtimer(timer_name)`.
- Add `quest::pausetimer(timer_name)`.
- Add `quest::resumetimer(timer_name)`.
- Add `$mob->GetRemainingTimeMS(timer_name)`.
- Add `$mob->GetTimerDurationMS(timer_name)`.
- Add `$mob->HasTimer(timer_name)`.
- Add `$mob->IsPausedTimer(timer_name)`.
- Add `$mob->PauseTimer(timer_name)`.
- Add `$mob->ResumeTimer(timer_name)`.
- Add `$mob->SetTimer(timer_name)`.
- Add `$mob->SetTimerMS(timer_name)`.
- Add `$mob->StopTimer(timer_name)`.

# Lua
- Add `mob:GetRemainingTimeMS(timer_name)`.
- Add `mob:GetTimerDurationMS(timer_name)`.
- Add `mob:HasTimer(timer_name)`.
- Add `mob:IsPausedTimer(timer_name)`.
- Add `mob:PauseTimer(timer_name)`.
- Add `mob:ResumeTimer(timer_name)`.
- Add `mob:SetTimer(timer_name)`.
- Add `mob:SetTimerMS(timer_name)`.
- Add `mob:StopTimer(timer_name)`.

# Notes
- The mob-based methods allow operators to loop entity list or whatever to set, stop, resume, pause, etc for timers.

* StopAllTimers()

* Update questmgr.cpp
2023-03-20 16:18:51 -04:00
Alex King
02ada0e496
[Quest API] Add SendIllusion overloads/parameters to Perl/Lua (#3059)
* [Quest API] Add SendIllusion methods to Perl.

# Perl
- Add `$mob->SendIllusion(race, gender, texture, helmtexture, face, hairstyle, haircolor, beard, beardcolor, drakkin_heritage, drakkin_tattoo, drakkin_details, size, target)`.
- Add `$mob->SendIllusionPacket(illusion_table_ref)`.

* Change defaults.

* Remove debug message

* Cleanup.

* Cleanup

* Update perl_mob.cpp
2023-03-15 20:37:37 -04:00
Alex King
7c819539c8
[Quest API] Add Spell GetActX methods to Perl/Lua (#3056)
# Perl
- Add `$mob->GetActDoTDamage(spell_id, value, target)`.
- Add `$mob->GetActDoTDamage(spell_id, value, target, from_buff_tic)`.
- Add `$mob->GetActReflectedSpellDamage(spell_id, value, effectiveness)`.
- Add `$mob->GetActSpellDamage(spell_id, value, target)`.
- Add `$mob->GetActSpellHealing(spell_id, value, target)`.
- Add `$mob->GetActSpellHealing(spell_id, value, target, from_buff_tic)`.

# Lua
- Add `mob:GetActDoTDamage(spell_id, value, target)`.
- Add `mob:GetActDoTDamage(spell_id, value, target, from_buff_tic)`.
- Add `mob:GetActReflectedSpellDamage(spell_id, value, effectiveness)`.
- Add `mob:GetActSpellCasttime(spell_id, cast_time)`.
- Add `mob:GetActSpellCost(spell_id, cost)`.
- Add `mob:GetActSpellDamage(spell_id, value)`.
- Add `mob:GetActSpellDamage(spell_id, value, target)`.
- Add `mob:GetActSpellDuration(spell_id, duration)`.
- Add `mob:GetActSpellHealing(spell_id, value)`.
- Add `mob:GetActSpellHealing(spell_id, value, target)`.
- Add `mob:GetActSpellHealing(spell_id, value, target, from_buff_tic)`.
- Add `mob:GetActSpellRange(spell_id, range)`.

 # Notes
- Allows operators to get various spell related values.
2023-03-12 15:36:43 -04:00
Alex King
5702f7bcd1
[Quest API] Add IsFindable() and IsTrackable() to Perl/Lua (#2996)
# Perl
- Add `$mob->IsFindable()`.
- Add `$mob->IsTrackable()`.

# Lua
- Add `mob:IsFindable()`.
- Add `mob:IsTrackable()`.

# Notes
- Allows operators to see if a mob is findable or trackable.
2023-02-28 21:26:11 -05:00
Alex King
69c6a7b89a
[Quest API] Add IsBerserk() to Perl/Lua (#2997)
* [Quest API] Add IsBerserk() to Perl/Lua

# Perl
- Add `$client->IsBerserk()`.

# Lua
- Add `client:IsBerserk()`.
- Remove `mob:IsBerserk()` to move to client.

# Notes
- Allows operators to check if a client is berserk.

* Move to Mob.

* Update lua_client.cpp
2023-02-28 20:31:20 -05:00
Alex King
ff4ccfa98f
[Quest API] Add GetDefaultRaceSize() to Perl/Lua (#2993)
# Perl
- Add `$mob->GetDefaultRaceSize()`.

# Lua
- Add `mob:GetDefaultRaceSize()`.

# Notes
- Allows operators to get the default race size of a race if they want to use it in a script.
2023-02-26 21:35:03 -05:00
Alex King
3335cacac1
[Bots] Cleanup and remove preprocessors. (#2757)
* [Bots] Cleanup and remove preprocessors.

- Removes every `#ifdef BOTS` we have and locks bots behind `Bots:AllowBots` rule.
- Bot updates are now done by default similar to regular database updates.
- Modify `CMakeLists.txt`, `.drone.yml`, and `BUILD.md` to match the removal of `EQEMU_ENABLE_BOTS`.

* Cleanup

- Add SQL for enabling bots for servers with bots.
- Add message that tells players/operators bots are disabled.

* Suggested changes.

* Bot injection stuff

* Change SQL to bot SQL.

* Tweaks

* Remove `is_bot`

* Update version.h

* Update main.cpp

* Update database.cpp

* Fix name availability crash

* Remove bots from update script

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-01-20 12:35:33 -06:00
Alex King
1531650b3a
[Quest API] Add Augment Slot Type/Visible to GetItemStat (#2686)
* [Quest API] Add Augment Slot Type/Visible to GetItemStat

# Notes
- Adds the ability to get an item's augment slot types and augment slot visibility information.

* const
2023-01-01 11:35:15 -05:00
Alex King
7e7485be77
[Quest API] Add BuffCount() Overloads to Perl/Lua. (#2679)
# Perl
- Add `$mob->BuffCount(is_beneficial)`.
- Add `$mob->BuffCount(is_beneficial, is_detrimental)`.

# Lua
- Add `mob:BuffCount(is_beneficial)`.
- Add `mob:BuffCount(is_beneficial, is_detrimental)`.

 # Notes
- Allows operators to count only beneficial or detrimental buffs a mob has instead of always counting all buffs.
2022-12-29 11:58:38 -05:00
Alex King
d1430f6834
[Quest API] Add IsAttackAllowed() to Perl/Lua. (#2672)
# Perl
- Add `$mob->IsAttackAllowed(target)`.
- Add `$mob->IsAttackAllowed(target, is_spell_attack)`.

# Lua
- Add `mob:IsAttackAllowed(target)`.

# Notes
- Lua had `mob:IsAttackAllowed(target, is_spell_attack)` but not the other overload.
- Perl had neither.
2022-12-25 16:17:46 -05:00