# 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.
* [Quest API] Add EVENT_LEVEL_UP and EVENT_LEVEL_DOWN to bots
# Notes
- Bots did not have these events, this will allow operators to perform events on bot level up/down.
* Update bot.cpp
* [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>
* [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
# 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.
* Plumbing
* Batch processing in world
* Cleanup
* Cleanup
* Update player_event_logs.cpp
* Add player zoning event
* Use generics
* Comments
* Add events
* Add more events
* AA_GAIN, AA_PURCHASE, FORAGE_SUCCESS, FORAGE_FAILURE
* FISH_SUCCESS, FISH_FAILURE, ITEM_DESTROY
* Add charges to ITEM_DESTROY
* WENT_ONLINE, WENT_OFFLINE
* LEVEL_GAIN, LEVEL_LOSS
* LOOT_ITEM
* MERCHANT_PURCHASE
* MERCHANT_SELL
* SKILL_UP
* Add events
* Add more events
* TASK_ACCEPT, TASK_COMPLETE, and TASK_UPDATE
* GROUNDSPAWN_PICKUP
* SAY
* REZ_ACCEPTED
* COMBINE_FAILURE and COMBINE_SUCCESS
* DROPPED_ITEM
* DEATH
* SPLIT_MONEY
* TRADER_PURCHASE and TRADER_SELL
* DISCOVER_ITEM
* Convert GM_COMMAND to use new macro
* Convert ZONING event to use macro
* Revert some code changes
* Revert "Revert some code changes"
This reverts commit d53682f997e89a053a660761085913245db91e9d.
* Add cereal generation support to repositories
* TRADE
* Formatting
* Cleanup
* Relocate discord_manager to discord folder
* Discord sending plumbing
* Rename UCS's Database class to UCSDatabase to be more specific and not collide with base Database class for repository usage
* More discord sending plumbing
* More discord message formatting work
* More discord formatting work
* Discord formatting of events
* Format WENT_ONLINE, WENT_OFFLINE
* Add merchant purchase event
* Handle Discord MERCHANT_SELL formatter
* Update player_event_discord_formatter.cpp
* Tweaks
* Implement retention truncation
* Put mutex locking on batch queue, put processor on its own thread
* Process on initial bootup
* Implement optional QS processing, implement keepalive from world to QS
* Reload player event settings when logs are reloaded in game
* Set settings defaults
* Update player_event_logs.cpp
* Update player_event_logs.cpp
* Set retention days on boot
* Update player_event_logs.cpp
* Player Handin Event Testing.
Testing player handin stuff.
* Cleanup.
* Finish NPC Handin.
* set a reference to the client inside of the trade object as well for plugins to process
* Fix for windows _inline
* Bump to cpp20 default, ignore excessive warnings on windows
* Bump FMT to 6.1.2 for cpp20 compat and swap fmt::join for Strings::Join
* Windows compile fixes
* Update CMakeLists.txt
* Update CMakeLists.txt
* Update CMakeLists.txt
* Create 2022_12_19_player_events_tables.sql
* [Formatters] Work on Discord Formatters
* Handin money.
* Format header
* [Formatters] Work on Discord Formatters
* Format
* Format
* [Formatters] More Formatter work, need to test further.
* [Formatters] More Work on Formatters.
* Add missing #endif
* [Formatters] Work on Formatters, fix Bot formatting in ^create help
* NPC Handin Discord Formatter
* Update player_event_logs.cpp
* Discover Item Discord Formatter
* Dropped Item Discord Formatter
* Split Money Discord Formatter
* Trader Discord Formatters
* Cleanup.
* Trade Event Discord Formatter Groundwork
* SAY don't record GM commands
* GM_Command don't record #help
* Update player_event_logs.cpp
* Fill in more event data
* Post rebase fixes
* Post rebase fix
* Discord formatting adjustments
* Add event deprecation or unimplemented tag support
* Trade events
* Add return money and sanity checks.
* Update schema
* Update ucs.cpp
* Update client.cpp
* Update 2022_12_19_player_events_tables.sql
* Implement archive single line
* Replace hackers table and functions with PossibleHack player event
* Replace very old eventlog table since the same events are covered by player event logs
* Update bot_command.cpp
* Record NPC kill events ALL / Named / Raid
* Add BatchEventProcessIntervalSeconds rule
* Naming
* Update CMakeLists.txt
* Update database_schema.h
* Remove logging function and methods
* DB version
* Cleanup SendPlayerHandinEvent
---------
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
* [Quest API] Add EVENT_DAMAGE_GIVEN and EVENT_DAMAGE_TAKEN to Perl/Lua.
# Perl
- Add `EVENT_DAMAGE_GIVEN`.
- Add `EVENT_DAMAGE_TAKEN`.
- Both events export `$entity_id`, `$damage`, `$spell_id`, `$skill_id`, `$is_damage_shield`, `$is_avoidable`, `$buff_slot`, `$is_buff_tic`, `$special_attack`.
# Lua
- Add `event_damage_given`.
- Add `event_damage_taken`.
- Both events export `e.entity_id`, `e.damage`, `e.spell_id`, `e.skill_id`, `e.is_damage_shield`, `e.is_avoidable`, `e.buff_slot`, `e.is_buff_tic`, `e.special_attack`, and `e.other`.
# Notes
- These events allow operators to have events fire based on damage given or taken, as well as keep better track of a Bot, Client, or NPC's damage per second or otherwise.
- Special Attack is only useful for NPCs, but allows you to see if the attack is Rampage, AERampage, or Chaotic Stab.
* Cleanup.
* [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>
* [Quest API] Add EVENT_LEVEL_DOWN to Perl/Lua.
# Perl
- Add `EVENT_LEVEL_DOWN`, exports `$levels_lost`.
- Add `$levels_gained` export to `EVENT_LEVEL_UP`.
# Lua
- Add `event_level_down`, exports `e.levels_lost`.
- Add `e.levels_gained` export to `event_level_up`.
# Notes
- Allows operators to perform actions on level down.
- Allows operators to tell how many levels were lost or gained in case people are gaining/losing multiple levels and they want to keep track or use this as a mechanic in their code somewhere.
* Update exp.cpp
* Update embparser.cpp
* [Bots] Add support for Bot scripting.
# Perl
- Add support for `zone/bot.pl` and `zone/bot_v#.pl`.
- Add support for `global/global_bot.pl`.
- Add `$bot->SignalBot(signal_id)` to Perl.
- Add `$bot->OwnerMessage(message)` to Perl.
- Add `$entity_list->SignalAllBotsByOwnerCharacterID(character_id, signal_id)` to Perl.
- Add `$entity_list->SignalBotByBotID(bot_id, signal_id)` to Perl.
- Add `$entity_list->SignalBotByBotName(bot_name, signal_id)` to Perl.
- Add `EVENT_SPELL_EFFECT_BOT` to Perl.
- Add `EVENT_SPELL_EFFECT_BUFF_TIC_BOT` to Perl.
# Lua
- Add support for `zone/bot.lua` and `zone/bot_v#.lua`.
- Add support for `global/global_bot.lua`.
- Add `bot:SignalBot(signal_id)` to Lua.
- Add `bot:OwnerMessage(message)` to Lua.
- Add `entity_list:SignalAllBotsByOwnerCharacterID(character_id, signal_id)` to Lua.
- Add `entity_list:SignalBotByBotID(bot_id, signal_id)` to Lua.
- Add `entity_list:SignalBotByBotName(bot_name, signal_id)` to Lua.
- Add `EVENT_SPELL_EFFECT_BOT` to Lua.
- Add `EVENT_SPELL_EFFECT_BUFF_TIC_BOT` to Lua.
# Supported Bot Events
1. `EVENT_CAST`
2. `EVENT_CAST_BEGIN`
3. `EVENT_CAST_ON`
4. `EVENT_COMBAT`
5. `EVENT_DEATH`
6. `EVENT_DEATH_COMPLETE`
7. `EVENT_SAY`
8. `EVENT_SIGNAL`
9. `EVENT_SLAY`
10. `EVENT_SLAY_NPC`
11. `EVENT_SPAWN`
12. `EVENT_TARGET_CHANGE`
13. `EVENT_TIMER`
14. `EVENT_USE_SKILL`
# Common
- Convert NPC pointers in common events to Mob pointers so bots are supported.
- Convert signal IDs to `int` where it wasn't already, allowing negative signals to be sent properly.
* Add EVENT_POPUP_RESPONSE.
* Cleanup and fix EVENT_COMBAT/EVENT_SLAY/EVENT_NPC_SLAY.
* Fix DoNPCEmote calls.
* Update attack.cpp
* Update event_codes.h
* Update bot_command.cpp
It wasn't possible to easily obtain the corpse from post-death events
because the killed entity id is assigned to the corpse and reset to 0
on the entity before the events are dispatched.
This exposes the killed entity's corpse to EVENT_DEATH_COMPLETE and
EVENT_DEATH_ZONE. Lua exports a Corpse object and perl exports a corpse
entity id.
The purpose of this is to make it easier to add items dynamically on
death. Ideally this would be done in EVENT_DEATH before the corpse is
made, but there's currently some combat system bugs that make that event
unusable since it can be dispatched multiple times.
A follow up will provide an api to reset corpse decay times since adding
items after corpse creation will require quests to manually reset the
decay timer in case the corpse had zero items.
# Perl
- Add `$from_instance_id` to EVENT_ZONE in Perl.
- Add `$from_instance_version` to EVENT_ZONE in Perl.
- Add `$target_instance_id` to EVENT_ZONE in Perl.
- Add `$target_instance_version` to EVENT_ZONE in Perl.
# Lua
- Add `e.from_instance_id` to EVENT_ZONE in Lua.
- Add `e.from_instance_version` to EVENT_ZONE in Lua.
- Add `e.instance_id` to EVENT_ZONE in Lua.
- Add `e.instance_version` to EVENT_ZONE in Lua.
# Notes
- This will allow Operators to prevent people from entering zones by Instance ID or Instance Version.
This cleans up some of the NPC::Death event dispatch code.
Adds handlers for EVENT_SPAWN_ZONE and EVENT_DEATH_ZONE used by zone
controller and fixes the death handler exports which were incorrect.
- Add EVENT_ALT_CURRENCY_MERCHANT_BUY to Perl/Lua.
- Add EVENT_ALT_CURRENCY_MERCHANT_SELL to Perl/Lua.
- Add EVENT_MERCHANT_BUY to Perl/Lua.
- Add EVENT_MERCHANT_SELL to Perl/Lua.
This will allow server operators to track or do specific stuff based on if a person buys X item from Y NPC or whatever.
* Update C++ standard to C++17
* Nuke EQ::Any in favor of std::any
* Remove std::iterator due to deprecation
* Replace result_of with invoke_result due to deprecation
Added EVENT_SKILL_UP to Perl/Lua
Adds sub EVENT_SKILL_UP output for use.
Exports:
$skill_id - ID of the skill being exported. Will export skill or language as the same so check below.
$skill_value - New skill level
$skill_max - Maximum value of skill
$is_tradeskill - 0 for non-tradeskill, 1 for tradeskill
Example usage:
sub EVENT_SKILL_UP {
if($is_tradeskill == 0) {
quest::shout("Skill Increase! " . $client->GetCleanName() . " has increased their " . quest::getskillname($skill_id) . " to " . $skill_value . " of " . $skill_max . "!"); #deleteme
}
if ($is_tradeskill == 1) {
quest::shout("Tradeskill Increase! " . $client->GetCleanName() . " has increased their " . quest::getskillname($skill_id) . " to " . $skill_value . " of " . $skill_max . "!"); #deleteme
}
}
Adds sub EVENT_LANGUAGE_SKILL_UP output for use.
Exports:
$skill_id - ID of the skill being exported. Will export skill or language as the same so check below.
$skill_value - New skill level
$skill_max - Maximum value of skill
Example usage:
sub EVENT_LANGUAGE_SKILL_UP {
quest::shout("Language Increase! " . $client->GetCleanName() . " has increased their " . quest::getlanguagename($skill_id) . " to " . $skill_value . " of " . $skill_max . "!"); #deleteme
}
Co-authored-by: toxin06 <53322305+toxin06@users.noreply.github.com>
- These events allow more customization beyond forcing operators to use a script file for each and every item they want to have some sort of functionality for these events.
- Perl event exports $item_id, $item_quantity, and $slot_id.
- Lua event exports item_id, item_quantity, slot_id, and item.