10155 Commits

Author SHA1 Message Date
Alex King
5d5c2a4194
[Quest API] Add GetGuildPublicNote() to Perl/Lua. (#2608)
# Perl
- Add `$client->GetGuildPublicNote()`.

# Lua
- Add `client:GetGuildPublicNote()`.

# Notes
- Allows operators to grab a player's public note in there guild if they wanted to.
2022-12-04 12:18:18 -05:00
Aeadoin
80fffb57b1
[Bots] Cleanup Spell Settings Commands (#2607)
* [Bots] Cleanup Spell Settings Commands

* Update Bot DB version

* typo
2022-12-03 19:49:45 -05:00
Aeadoin
61b91d92c3
[Bots] Expanded Bot Spell Settings List. (#2606)
* [Bots] Expanded Bot Spell List Settings

* [Bots] Expanded Bot Spell List Settings

* Fixes/formatting

* typo

* Formatting & update SpellInfo Command

* Spelling

* Typo
2022-12-03 12:15:57 -05:00
Aeadoin
35d22913b9
[Bug Fix] Fix Bot ^spellsettingsadd command (#2603) 2022-12-01 14:25:23 -05:00
Alex King
dbba22b153
[Bug Fix] Add SE_MakeDrunk to avoid error message. (#2601)
* [Bug Fix] Add SE_MakeDrunk to avoid error message.

Currently sends error message about unknown spell effect ID.

* Message types cleanup.

* Update spdat.cpp
2022-11-30 22:09:59 -05:00
JJ
de7a632d67
[SQL] Bugs Table Migration (#2559) (#2602)
Copies bugs from `bugs` to `bug_reports`
2022-11-30 22:09:49 -05:00
Alex King
85ae36ede5
[Bug Fix] Fix Instance Repository (#2598)
Instance code used to use a `REPLACE INTO`, add an extended repository method to do this so we're not getting `DUPLICATE` errors.
2022-11-30 21:31:39 -05:00
Alex King
ecc34940b4
[Bug Fix] Fix IDFile Crash with spaces or invalid data. (#2597)
* [Bug Fix] Fix IDFile Crash with spaces or invalid data.

* Update mob_appearance.cpp
2022-11-30 21:31:28 -05:00
Alex King
a9cfacf54b
[Quest API] Add WearChange Overloads to Perl/Lua. (#2600)
* [Quest API] Add WearChange Overloads to Perl/Lua.

# Perl
- Add `$mob->WearChange(slot, texture)`.

# Lua
- Add `mob:WearChange(slot, texture)`.
- Add `mob:WearChange(slot, texture, color, heros_forge_model)`.

# Notes
- These overloads allow you to not have to send color.
- Lua didn't have an overload with Hero's Forge Model.

* Fix variable types.
2022-11-30 21:31:22 -05:00
Aeadoin
e7704f00f3
[Bots] Melee Bot Support for Spell Settings Commands (#2599) 2022-11-30 19:35:17 -05:00
Aeadoin
639f8e184a
[Fix] Clamp Item Ldon Sell Back Rates. (#2592)
* [Fix] Clamp ldonsellbackrates to prevent abuse.

* Change cast to uint32

* Fix issues with Clamp not functioning correctly.

* Fix missed clamp

* change price is unsigned int to prevent potential overflow

* Formatting

* Formatting fix

* Update client_packet.cpp

* Update client_packet.cpp

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2022-11-30 18:02:36 -05:00
Michael
1d302f512e
[Quest API] Adjustment to depop_all function. (#2595)
* [Quest API] Adjustment to depop_all function.

Adjustment to depop_all function to no longer require an owner under all conditions (allows use inside encounters)

* More simplification

* Update questmgr.cpp

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2022-11-29 23:57:19 -05:00
Michael
02c0a8fa7f
[Command] Adding movespeed to #showstats output (#2596) 2022-11-29 23:51:33 -05:00
Aeadoin
e928754df3
[Bot] Add Buff support for Bards under AI_IdleCastChecks (#2590)
* [Bot] Add Buff support for Bards under AI_IdleCastChecks

* Add InCombatBuffSong to Idle Bard cast Logic

* Fixes a number of Buffs that would fail to land on the Bot, causing casting loops

* Accidently removed If Statement added back.

* Update bot.cpp

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2022-11-28 16:35:51 -05:00
Alex King
200c6cccaf
[Bots] Optimize inventory loading. (#2588)
* [Bots] Optimize inventory loading.

# Notes
- Bots previously were running 23 individual queries to load their inventory versus grabbing their inventory all at once and referencing it in memory.

* Typo.

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot.cpp
2022-11-27 19:07:24 -05:00
Alex King
d6db35b84e
[Commands] Cleanup #gearup Command. (#2589)
# Notes
- Cleanup messages and logic.
- Add support for gearing up target client (with #gm on) and/or target bots.
2022-11-27 18:56:40 -05:00
Alex King
d0e7e8c4c4
[Quest API] Add Group/Raid Overloads to Perl/Lua. (#2587)
# Perl
- Add `$group->IsGroupMember(name)`.
- Add `$group->IsLeader(name)`.
- Add `$raid->IsRaidMember(c)`.
- Add `$raid->IsGroupLeader(c)`.

# Lua
- Add `group:IsGroupMember(name)`.
- Add `group:IsLeader(name)`.
- Add `raid:IsGroupLeader(client)`.
- Add `raid:IsLeader(client)`.
- Add `raid:IsRaidMember(client)`.

# Notes
- Adds overloads to these methods allowing operators to get by name or reference.
2022-11-27 15:57:01 -05:00
Aeadoin
29247a0f45
[Bot] Add Support for Bots to receive Auras, and other AoE Buffs. (#2586) 2022-11-27 15:49:38 -05:00
Alex King
2d364e2fd1
[Bots] Add Bot-specific Spell Settings. (#2553)
* [Bots] Add Bot-specific Spell Settings.

# Notes
- Allows players to set `priority`, `min_level`, `max_level`, `min_hp`, `max_hp`, and `is_enabled` settings per spell based on targeted bot.
- Lets players disable spells they don't want their bots casting or change the criteria they cast them at if they want.

* Update botspellsai.cpp

* Update 2022_11_19_bot_spell_settings.sql

* Typo.

* Update botspellsai.cpp

* Cleanup and add Reload Methods to Perl/Lua.
2022-11-27 14:46:36 -05:00
Aeadoin
f6c5560e9c
[Bot] Update Bot Logic to ignore ST_TargetsTarget when buffing (#2584)
* [Bot] Update Bot Logic to ignore ST_TargetsTarget when buffing

* Fix Not Operator

* Update botspellsai.cpp

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2022-11-27 14:39:34 -05:00
Alex King
fb4d4e1382
[Quest API] Fix Perl EVENT_HP double parsing in Spire. (#2585)
This condition caused the variables to show twice due to the way Sprie parses the source code, and the condition itself is unnecessary since we can just use an inline ternary in this case.
2022-11-27 14:27:27 -05:00
Aeadoin
9a7770377d
[Bots] Move Bot Spell Loading process to constructor from calcbotstats() (#2583) 2022-11-27 11:41:10 -05:00
Alex King
15b2baa663
[Commands] Cleanup #npcedit Command. (#2582)
* [Commands] Cleanup #npcedit Command.

- Make use of repositories and cleanup logic.

* Remove accidental change.
2022-11-27 11:37:22 -05:00
Alex King
253f4c07e0
[Commands] Cleanup #chat Command. (#2581)
- Cleanup messages and logic.
2022-11-26 19:28:28 -05:00
Alex King
f7ae5850f0
[Quest API] Add Time String to Seconds Method to Perl/Lua. (#2580)
* [Quest API] Add Time String to Seconds Method to Perl/Lua.

# Perl
- Add `quest::timetoseconds(time_string)`.

# Lua
- Add `eq.time_to_seconds(time_string)`.

# Notes
- Allows operators to use this method in place of hardcoded values like `3600`.

* Remove unused method.
2022-11-26 19:28:21 -05:00
Aeadoin
ea9a02bec4
[Bots] Add Rule Allowing Bots to Equip Any Race Items (#2578)
* [Bots] Add Rule AllowBotEquipAnyRaceGear

* Fix formatting

* Update item_instance.cpp

* Update bot.cpp

* Update item_data.h

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2022-11-26 17:39:31 -05:00
Alex King
31d57342e1
[Quest API] Add Entity Variable Methods to Perl/Lua. (#2579)
* [Quest API] Add Entity Variable Methods to Perl/Lua.

# Perl
- Add `$mob->GetEntityVariables()`.
- Add `$object->GetEntityVariables()`.

# Lua
- Add `mob:GetEntityVariables()`.
- Add `object:GetEntityVariables()`.

# Notes
- Convert all overloads and methods to use `std::string` for entity variables.
- Allows operators to get a list of a Mob's entity variables.

* Update loottables.cpp
2022-11-26 16:24:01 -05:00
Alex King
290ebf3b26
[Quest API] Add GetBotListByClientName() Class Overload to Perl/Lua. (#2577)
# Perl
- Add `$entity_list->GetBotListByClientName(client_name, class_id)`.

# Lua
- Add `eq.get_entity_list():GetBotListByClientName(client_name, class_id)`.

# Notes
- Adds overload to get bots by client name and class ID.
2022-11-26 15:47:45 -05:00
Alex King
25f8ee2084
[Hotfix] Instances Repository Fix (#2576)
Need to use `this` pointer.
2022-11-26 12:31:51 -05:00
Alex King
1002a5659b
[Hot Fix] Fix non-Bot Compile. (#2575)
#ifdef BOTS is needed for non-Bots compile.
2022-11-26 11:13:57 -05:00
Alex King
dced08cf97
[Quest API] Add Zone Flag Methods to Perl/Lua. (#2574)
* [Quest API] Add Zone Flag Methods to Perl/Lua.

# Perl
- Add `$client->GetPEQZoneFlags()`.
- Add `$client->GetZoneFlags()`.

# Lua
- Add `client:GetPEQZoneFlags()`.
- Add `client:GetZoneFlags()`.

# Notes
- Allows operators to get a list of all PEQ/zone flags to be looped through or listed out easily without having to have a list of individual zone IDs to check or otherwise.

* Update zoning.cpp

* Repositories and cleanup.
2022-11-26 11:13:46 -05:00
Alex King
b91d879662
[Quest API] Add Instance Methods to Perl/Lua. (#2573)
* [Quest API] Add Instance Methods to Perl/Lua.

# Perl
- Add `quest::GetInstanceIDs(zone_name)`.
- Add `quest::GetInstanceIDsByCharID(zone_name, character_id)`.
- Add `quest::GetInstanceVersionByID(instance_id)`.
- Add `quest::GetInstanceZoneIDByID(instance_id)`.

# Lua
- Add `eq.get_instance_ids(zone_name)`.
- Add `eq.get_instance_ids_by_char_id(zone_name, character_id)`.
- Add `eq.get_instance_version_by_id(instance_id)`.
- Add `eq.get_instance_zone_id_by_id(instance_id)`.

# Notes
- The instance IDs methods return arrays of IDs for looping so you can check on mass the instances a player has for a zone.
- Keeps operators from having to guess which possible versions of a zone a player has an instance for or loop through them all to find out.
- Cleanup `common/database_instances.cpp` to mostly use repositories where possible.

* Update database.h

* Update character_corpses_repository.h
2022-11-26 10:43:29 -05:00
Alex King
1d1ffc66fe
[Quest API] Add Proximity Range Methods to Perl/Lua. (#2572)
# Perl
- Add `quest::set_proximity_range(x_range, y_range)`.
- Add `quest::set_proximity_range(x_range, y_range, z_range)`.
- Add `quest::set_proximity_range(x_range, y_range, z_range, enable_say)`.

# Lua
- Add `eq.set_proximity_range(x_range, y_range)`.
- Add `eq.set_proximity_range(x_range, y_range, z_range)`.
- Add `eq.set_proximity_range(x_range, y_range, z_range, enable_say)`.

# Notes
- Allows a shorthand for setting proximities.
- Automatically uses NPC's current location versus having to provide it.
2022-11-26 10:11:40 -05:00
Aeadoin
4423a9f160
[Bots] Add Melee Support for Casting, Cleanup Bot Casting Logic (#2571)
* [Bots] Add Melee Support for Casting, Cleanup Logic

* Formatting

* More Logic Changes

* formatting
2022-11-25 16:23:00 -05:00
Aeadoin
217a6b6344
[Merchant] LDoNSellBackRate support for Rule Merchant:EnableAltCurrencySell (#2570) 2022-11-25 16:16:59 -05:00
Aeadoin
99052aec8b
[Bot] Add EVENT_TRADE Support to Bots. (#2560)
* [Bot] Add EVENT_TRADE Support to Bots.

* Fixed issue with duplicate items after Event Trade

* Update logic

* Add CalcBotStats call after Bot Trade Event

* Fix Lua EVENT_TRADE.

* Formatting.

* More formatting.

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
2022-11-25 15:09:08 -05:00
Aeadoin
45c4fe55f0
[Quest API] Add HasBotSpellEntry() to Perl/Lua. (#2563)
* [Bots] Quest API Check Spell in Bot_Spell_Entries

* Add to luabind and packages

* Change Method to be HasBotSpellEntry, change SpellID to uint16

* Ordering, and removed unused logging
2022-11-24 22:29:38 -05:00
Kinglykrab
52e1bc943a
[Commands] Add #bugs Command. (#2559)
* [Commands] Add #bugs Command.

- Adds a #bugs command for viewing bug reports.
- Remove unused bug related rules in favor of hard-coding the new system.

* Cleanup.

* Typo.

* Push.

* Lower status so it fits with message.
2022-11-22 17:32:26 -05:00
Kinglykrab
dd3c76e9d2
[Bug Fix] Fix EntityList::GetBotListByCharacterID() (#2569)
- Class ID wasn't being checked, must've been left out of commit.
2022-11-22 17:03:43 -05:00
Kinglykrab
5e6741cf17
[Quest API] Add Overloads to MoveZone Methods in Perl/Lua. (#2551)
# Perl
- Add `$client->MoveZone(zone_name, x, y, z)`.
- Add `$client->MoveZone(zone_name, x, y, z, h)`.
- Add `$client->MoveZoneGroup(zone_name, x, y, z)`.
- Add `$client->MoveZoneGroup(zone_name, x, y, z, h)`.
- Add `$client->MoveZoneRaid(zone_name, x, y, z)`.
- Add `$client->MoveZoneRaid(zone_name, x, y, z, h)`.
- Add `$client->MoveZoneInstance(instance_id, x, y, z)`.
- Add `$client->MoveZoneInstance(instance_id, x, y, z, h)`.
- Add `$client->MoveZoneInstanceGroup(instance_id, x, y, z)`.
- Add `$client->MoveZoneInstanceGroup(instance_id, x, y, z, h)`.
- Add `$client->MoveZoneInstanceRaid(instance_id, x, y, z)`.
- Add `$client->MoveZoneInstanceRaid(instance_id, x, y, z, h)`.

# Lua
- Add `client:MoveZone(zone_name, x, y, z)`.
- Add `client:MoveZone(zone_name, x, y, z, h)`.
- Add `client:MoveZoneGroup(zone_name, x, y, z)`.
- Add `client:MoveZoneGroup(zone_name, x, y, z, h)`.
- Add `client:MoveZoneRaid(zone_name, x, y, z)`.
- Add `client:MoveZoneRaid(zone_name, x, y, z, h)`.
- Add `client:MoveZoneInstance(instance_id, x, y, z)`.
- Add `client:MoveZoneInstance(instance_id, x, y, z, h)`.
- Add `client:MoveZoneInstanceGroup(instance_id, x, y, z)`.
- Add `client:MoveZoneInstanceGroup(instance_id, x, y, z, h)`.
- Add `client:MoveZoneInstanceRaid(instance_id, x, y, z)`.
- Add `client:MoveZoneInstanceRaid(instance_id, x, y, z, h)`.

# Notes
- Adds XYZ/XYZH overloads to these methods so it no longer assumes safe coordinates unless position isn't specified.
2022-11-22 16:48:05 -05:00
Kinglykrab
8373dd1cb9
[Commands] Cleanup #timers Command. (#2562)
- Cleanup popup window and add a message for if there are no recast timers.
2022-11-22 09:17:09 -05:00
Kinglykrab
9f65159cb2
[Commands] Cleanup #serverinfo Command. (#2568)
- Cleanup messages.
- Use new dialogue window methods.
2022-11-22 09:14:22 -05:00
Kinglykrab
f143d0a75f
[Commands] Cleanup #delacct Command. (#2567)
- Cleanup messages and logic.
- Use repositories.
2022-11-22 09:14:15 -05:00
Kinglykrab
19e7f0a6b1
[Commands] Cleanup #heromodel Command. (#2566)
- Cleanup messages and logic.
2022-11-22 09:14:08 -05:00
Kinglykrab
3c361be739
[Commands] Remove #iteminfo Command. (#2565)
- Command is unused and doesn't have most of the item data anyway, seems like a command for back when items weren't fully working.
2022-11-22 09:13:59 -05:00
Kinglykrab
3424fe78f5
[Commands] Cleanup #suspend Command. (#2564)
- Cleanup messages and logic.
- Use repositories.
2022-11-22 09:13:37 -05:00
Kinglykrab
0dfa067974
[Quest API] Add Hotzone Methods to Perl/Lua. (#2558)
# Perl
- Add `quest::ishotzone()`.
- Add `quest::sethotzone(is_hotzone)`.

# Lua
- Add `eq.is_hotzone()`.
- Add `quest::set_hotzone(is_hotzone)`.

# Notes
- Allows operators to toggle hotzone flags within a script dynamically, for stuff like making an instance a hotzone, but not necessarily all versions of the zone.
2022-11-22 09:11:53 -05:00
Kinglykrab
0c56586f3b
[Quest API] Add Client Spell Methods to Perl/Lua. (#2550)
* [Quest API] Add Client Spell Methods to Perl/Lua.

# Perl
- Add `$client->ApplySpell(spell_id)`.
- Add `$client->ApplySpell(spell_id, duration)`.
- Add `$client->ApplySpell(spell_id, duration, allow_pets)`.
- Add `$client->ApplySpell(spell_id, duration, allow_pets, is_raid_group_only)`.
- Add `$client->ApplySpell(spell_id, duration, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$client->ApplySpellGroup(spell_id)`.
- Add `$client->ApplySpellGroup(spell_id, duration)`.
- Add `$client->ApplySpellGroup(spell_id, duration, allow_pets)`.
- Add `$client->ApplySpellGroup(spell_id, duration, allow_pets, is_raid_group_only)`.
- Add `$client->ApplySpellGroup(spell_id, duration, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$client->ApplySpellRaid(spell_id)`.
- Add `$client->ApplySpellRaid(spell_id, duration)`.
- Add `$client->ApplySpellRaid(spell_id, duration, allow_pets)`.
- Add `$client->ApplySpellRaid(spell_id, duration, allow_pets, is_raid_group_only)`.
- Add `$client->ApplySpellRaid(spell_id, duration, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$client->SetSpellDuration(spell_id)`.
- Add `$client->SetSpellDuration(spell_id, duration)`.
- Add `$client->SetSpellDuration(spell_id, duration, allow_pets)`.
- Add `$client->SetSpellDuration(spell_id, duration, allow_pets, is_raid_group_only)`.
- Add `$client->SetSpellDuration(spell_id, duration, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$client->SetSpellDurationGroup(spell_id)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration, allow_pets)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration, allow_pets, is_raid_group_only)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$client->SetSpellDurationRaid(spell_id)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, allow_pets)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, allow_pets, is_raid_group_only)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, allow_pets, is_raid_group_only, allow_bots)`.

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

# Notes
- Allows operators extremely easy shorthands to cast on entire groups and raid groups and optionally include their bots and pets.
- Default functionality for Raid is that it only casts on your group, set `is_raid_group_only` to `false` to cast on the entire Raid.

* Cleanup.

* Remove Raid parameter from Solo/Group methods.
2022-11-22 09:11:36 -05:00
Kinglykrab
37af643b61
[Bots] Cleanup Say Event Parse. (#2557) 2022-11-20 14:28:46 -06:00
Kinglykrab
f67767f28e
[Cleanup] Extra Space in NPC::AISpellsList(). (#2555) 2022-11-20 09:59:59 -05:00