202 Commits

Author SHA1 Message Date
Chris Miles
4639405fdf
[Discord Integration] Native Discord Integration (#2140)
* Start of discord integration work

* more testing

* Discord client work

* More discord work

* Cleanup

* Handle retry timer response and max retries

* Update base retry timer

* Move Discord queue handler to UCS, add queuer to own thread

* Post merge

* Send up Zone::SendDiscordMessage

* Start of discord integration work

* more testing

* Discord client work

* More discord work

* Cleanup

* Move Discord queue handler to UCS, add queuer to own thread

* Post merge

* Push up tables

* Quest API stuff.

* Update 2022_05_07_discord_webhooks.sql

* Post merge fixes

* Push up manifest

* Flip logging signs in logic from copy / paste of inverse logic before

* Make sure we add new line to quest api sourced messages

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
2022-06-09 17:22:23 -05:00
Kinglykrab
30e34c67b4
[Quest API] Fix parameters in some Perl worldwide methods. (#2224) 2022-05-31 15:46:14 -04:00
Kinglykrab
bcf7ccefcd
[Money Messages] Cleanup quest::givecash(), split, and task reward messages. (#2205)
* [Money Messages] Cleanup quest::givecash(), split, and task reward messages.
- Cleans up all the money messages using ConvertMoneyToString().
- Allows quest::givecash() to have optional parameters other than copper.

* Commification.

* Corpse messages.

* String IDs and cleanup.
2022-05-29 14:33:18 -04:00
Kinglykrab
9e9ef6809b
[Cleanup] Cleanup spell and max level bucket logic. (#2181)
* [Cleanup] Cleanup spell and max level bucket logic.
- Spell buckets will now allow new mob->SetBucket() buckets since most people use these now.
- Max level bucket will now allow new mob->SetBucket() bucket since most people use these now.
- Clean up GetScribeableSpells() and GetLearnableDisciplines() logic and magic numbers.
- Make GetClientMaxLevel() uint8 instead of int since it can only be 0-255.

* Fix typo from other commit.

* Lua setter.

* Update client.cpp
2022-05-28 14:35:17 -04:00
Kinglykrab
0e96099b3d
[Titles] Cleanup titles, title suffix, and last name methods. (#2174)
* [Titles] Cleanup titles, title suffix, and last name methods.
- Use strings instead of const chars*.
- Add optional parameter to SetAATitle in Lua so you can save to the database similar to Perl.
- Cleanup #lastname command.
- Cleanup #title command.
- Cleanup #titlesuffix command.

* Update npc.cpp
2022-05-19 20:15:44 -04:00
Kinglykrab
6398381c44
[Quest API] Add CheckNameFilter to Perl/Lua. (#2175)
- Add quest::checknamefilter(name) to Perl.
- Add eq.check_name_filter(name) to Lua.
- Allows operators to check strings against the name filter for stuff like setting custom pet names, titles, suffixes, etc in scripts.
2022-05-19 20:01:14 -04:00
Kinglykrab
7c1a139991
[Cleanup] Quest API push methods using invalid types. (#2172)
* [Cleanup] Quest API push methods using invalid types.
- Some push methods were pushing integers as unsigned integers or unsigned integer as integers, this fixes all of that.
- Also cleans up some lines that had multiple function calls on them.

* More cleanup of bools and one expansion name was wrong.
2022-05-15 22:14:16 -04:00
Kinglykrab
8329760632
[Quest API] Add TaskSelector to Perl/Lua. (#2177)
- Add $client->TaskSelector(task_list) to Perl.
- Add client:TaskSelector({task_list}) to Lua.
- Allow $client->AssignTask(task_id) in Perl.
- Allow client:AssignTask(task_id) in Lua.
- Can now assign tasks in scripts without the NPC ID parameter.
2022-05-15 00:49:55 -04:00
Kinglykrab
9b075c28b6
[Quest API] Add commify to Perl/Lua. (#2099)
- Add quest::commify(number) to Perl.
- Add eq.commify(number) to Lua.
2022-05-03 19:44:22 -04:00
KayenEQ
bc875ae554
[API] Methods for getting more information on quest timers. (#2060)
* hastimer

* [API] Check quest timer duration, timer remaining and if timer exists.

* [API] Methods for getting more information on quest timers.

* [API] Methods for getting more information on quest timers.

* [API] Methods for getting more information on quest timers.
2022-04-13 11:20:03 -04:00
Kinglykrab
58fafd0f9c
[Bug Fix] quest::MovePCInstance() Arguments Fix. (#2020)
- Logic made the method return an "error" when not using last parameter.
2022-02-27 16:39:45 -05:00
Kinglykrab
d2d7b8108d
[Commands] Cleanup #ai Command. (#1980)
- Cleanup messages and logic.
- Remove #ai start/#ai stop as they can crash zones and are mostly useless.
- Add EQ::constants::GetConsiderLevelMap() and EQ::constants::GetConsiderLevelName().
- Add quest::getconsiderlevelname(consider_level) to Perl.
- Add eq.get_consider_level_name(consider_level) to Lua.
2022-02-11 16:26:08 -05:00
Kinglykrab
f9eb4603a3
[Quest API] Add GetEnvironmentalDamageName() to Perl/Lua. (#1964)
- Add EQ::constants::GetEnvironmentalDamageMap() and EQ::constants::GetEnvironmentalDamageName().
- Add quest::getenvironmentaldamagename(damage_type) to Perl.
- Add eq.get_environmental_damage_name(damage_type) to Lua.
- Cleanup GM messages for avoiding environmental damage.
2022-02-10 16:09:56 -05:00
Kinglykrab
5a7ee28740
[Bug Fix] Fix quest::updatespawntimer() Perl croak. (#1947) 2022-01-26 14:57:18 -06:00
Chris Miles
9815f50efa
[Expansion] Content Filtering Adjustments (#1910)
* Change default expansion values for ALL to -1 from 0

* Adjust content_filter_criteria

* Refactor content filtering logic

* Allow flag strings to also just be empty instead of null

* Formatting

* Editor oops
2022-01-02 20:52:29 -06:00
Kinglykrab
294e51fca7
[Commands] Add #setaltcurrency Command. (#1850)
* [Commands] Add #setaltcurrency Command.
- Add #setaltcurrency [Currency ID] [Amount] command to allow you to set a specific alternate currency to a value.
- Add Zone::GetCurrencyID() and Zone::GetCurrencyItemID() helper methods.
- Cleanup loops through zone->AlternateCurrencies.
- Utilize helper methods where necessary.
- Convert old methods parameters and return values from int to uint32 where necessary.

* Typo.
2021-12-08 18:58:06 -05:00
Kinglykrab
aa4536e1ef
[Quest API] Add GetLDoNThemeName() to Perl/Lua. (#1861)
* [Quest API] Add GetLDoNThemeName() to Perl/Lua.
- Add quest::getldonthemename(theme_id) to Perl.
- Add eq.get_ldon_theme_name(theme_id) to Lua.

* Update embparser_api.cpp
2021-12-03 19:53:00 -05:00
Kinglykrab
01a671918a
[Quest API] Add GetBodyTypeName() to Perl/Lua. (#1863)
* [Quest API] Add GetBodyTypeName() to Perl/Lua.
- Add GetBodyTypeName() and GetBodyTypeMap() helper methods.
- Add quest::getbodytypename(bodytype_id) to Perl.
- Add eq.get_body_type_name(bodytype_id) to Lua.

* ShowStats() cleanup.
2021-12-03 19:52:42 -05:00
Kinglykrab
4a154686e1
[Quest API] Add GetFactionName() to Perl/Lua. (#1859)
* [Quest API] Add GetFactionName() to Perl/Lua.
- Add quest::getfactionname(faction_id) to Perl.
- Add eq.get_faction_name(faction_id) to Lua.

* Update embparser_api.cpp

* Update embparser_api.cpp

* Update embparser_api.cpp
2021-12-02 10:09:15 -05:00
Kinglykrab
29dfe9d404
[Quest API] Add GetLanguageName() to Perl/Lua. (#1860)
- Add quest::getlanguagename(language_id) to Perl.
- Add eq.get_language_name(language_id) to Lua.
2021-12-01 20:31:20 -05:00
Kinglykrab
293361a1f7
[Cleanup] Make use of AccountStatus constants wherever status is checked or used. (#1764)
* [Cleanup] Make use of AccountStatus constants wherever status is checked or used.
- Cleanup all instances of SendEmoteMessage.
- Cleanup all instances of SendEmoteMessageRaw.
- Cleanup all instances of MessageStatus.
- Convert Quest API method defaults to use constants.

* Cleanup constant names.
2021-11-14 21:01:13 -06:00
Kinglykrab
17aaab1f9d
[Quest API] Add Spell methods to Perl. (#1631)
* [Quest API] Add Spell methods to Perl.
- Add quest::getspell(spell_id) to Perl.
- Add eq.get_spell(spell_id) to Lua.
These methods return a spell object.

Exports $spell object references to spell events.

* Formatting.

* Remove comment.

* Update spdat.cpp

* Amplication typo.

* Fix conflicts.

* Remove repository changes.

* Fix typing.

* Update spell_effects.cpp
2021-11-03 17:47:15 -04:00
Kinglykrab
efab0c4b6b
[Quest API] Add remove LDoN Win/Loss to Perl and Lua. (#1611)
* [Quest API] Add remove LDoN Win/Loss to Perl and Lua.
- Add $client->RemoveLDoNLoss(theme_id) to Perl.
- Add $client->RemoveLDoNWin(theme_id) to Perl.
- Add quest::removeldonloss(theme_id) to Perl.
- Add quest::removeldonwin(theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyexpeditionid(expedition_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyclientname(client_name, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyexpeditionid(expedition_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyclientname(client_name, theme_id) to Perl.
- Add quest::worldwideaddldonloss(theme_id, min_status, max_status) to Perl.
- Add quest::worldwideaddldonwin(theme_id, min_status, max_status) to Perl.
- Add client:RemoveLDoNLoss(theme_id) to Lua.
- Add client:RemoveLDoNWin(theme_id) to Lua.
- Add eq.remove_ldon_loss(theme_id) to Lua.
- Add eq.remove_ldon_win(theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_expedition_id(expedition_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_client_name(client_name, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_expedition_id(expedition_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_client_name(client_name, theme_id) to Lua.
- Add eq.world_wide_add_ldon_loss(theme_id, min_status, max_status) to Lua.
- Add eq.world_wide_add_ldon_win(theme_id, min_status, max_status) to Lua.
Adds enum for LDoN Themes and Theme Bitmasks so we're not using magic numbers.
Adds item links to item messages and augment messages on rejection/restriction/Lore.

* Update client_packet.cpp

* Update client_packet.cpp

* Update servertalk.h

Alphabetical.
2021-10-20 15:11:14 -04:00
Kinglykrab
91adf9c0eb
[Quest API] Add cross zone and world wide dialogue windows to Perl/Lua. (#1599)
* [Quest API] Add cross zone and world wide dialogue windows to Perl/Lua.
- Add quest::crosszonedialoguewindowbycharid(character_id, message) to Perl.
- Add quest::crosszonedialoguewindowbygroupid(group_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyraidid(raid_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyguildid(guild_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyexpeditionid(expedition_id, message) to Perl.
- Add quest::crosszonedialoguewindowbyclientname(client_name, message) to Perl.
- Add quest::worldwidedialoguewindow(message, min_status, max_status) to Perl.
- Add eq.cross_zone_dialogue_window_by_char_id(character_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_group_id(group_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_raid_id(raid_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_guild_id(guild_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_expedition_id(expedition_id, message) to Lua.
- Add eq.cross_zone_dialogue_window_by_client_name(client_name, message) to Lua.
- Add eq.world_wide_dialogue_window(message, min_status, max_status) to Lua.

* Use string instead.
2021-10-11 16:33:18 -04:00
Kinglykrab
8c5f26ca5e
[Quest API] Add IsNPCSpawned(npc_ids) and CountSpawnedNPCs(npc_ids) to Perl/Lua. (#1570)
- Add quest::isnpcspawned(npc_ids) to Perl.
- Add quest::countspawnednpcs(npc_ids) to Perl.
- Add eq.is_npc_spawned(npc_ids) to Lua.
- Add eq.count_spawned_npcs(npc_ids) to Lua.
2021-10-02 12:01:39 -04:00
Kinglykrab
c15c54e920
[Quest API] Cross zone and world wide method overhaul. (#1520)
* [Quest API] Cross zone and world wide method overhaul.
- Adds support for Character ID, Character Name, and Expedition ID to all cross zone methods that did not have a method.
- Adds worldwide LDoN Updates.
- Shrinks the number of packets and structs from 83 to 17.

No quest functionality will be affected by this, as the only changes are the underlying method used to send the cross zone and world wide data.

* Formatting, organization, and fixing of improper exports.

* Finalize comb through of variable types, update types, etc.

* Merge fixes.
2021-09-19 16:15:14 -07:00
Chris Miles
6b93130c13
[Saylinks] Implement Auto Saylink Injection (#1525)
* Implement auto saylink injection

* Cover Lua say since it takes a different code path
2021-09-12 22:08:30 -05:00
Kinglykrab
fec1b1538e
[Quest API] Modify GetItemStat() and GetSpellStat() functionality. (#1509)
- Added quest::getitemstat(item_id, stat_identifier) to Perl.
- Added quest::getspellstat(spell_id, stat_identifier, slot) to Perl.
- Added eq.get_item_stat(item_id, stat_identifier) to Lua.
- Added eq.get_spell_stat(spell_id, stat_identifier, slot) to Lua.

Wasn't sure where to put the GetItemStatValue() method so I put it in inventory profile, I can move it wherever is preferred.

These additions will allow people to grab item and spell stat values in plugins without needing a mob object.
2021-08-31 01:31:56 -05:00
Alex
40db13d33e
[Quest API] Add get_data_remaining(bucket_name) to Perl/Lua. (#1421)
- Add quest::get_data_remaining(bucket_name) to Perl.
- Add eq.get_data_remaining(bucket_name) to Lua.
2021-06-17 11:39:16 -05:00
Alex
68fe95786e
[Quest API] Add getgendername(gender_id) to Perl/Lua. (#1405)
- Add quest::getgendername(gender_id) to Perl.
- Add eq.get_gender_name(gender_id) to Lua.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-16 10:49:02 -05:00
Alex
f8a72296e6
[Quest API] Add getdeityname(deity_id) to Perl/Lua. (#1404)
- Add quest::getdeityname(deity_id) to Perl.
- Add eq.get_deity_name(deity_id) to Lua.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-16 10:45:38 -05:00
Alex
ed6e53be54
[Quest API] Add getinventoryslotname(slot_id) to Perl/Lua. (#1406)
- Add quest::getinventoryslotname(slot_id) to Perl.
- Add eq.get_inventory_slot_name(slot_id) to Lua.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-16 10:42:06 -05:00
Alex
ecdebbc1a7
[Consistency] Deity not diety. (#1407)
* [Consistency] Deity not diety.

* Uppercase. [skip ci]
2021-06-16 09:33:10 -05:00
Alex
b9d8fb0d91
[Quest API] Add rename(name) to Perl/Lua. (#1414)
- Add quest::rename(name) to Perl.
- Add eq.rename(name) to Lua.
2021-06-16 09:30:32 -05:00
Alex
00dd7c2b71
[Quest API] Add getcleannpcnamebyid(npc_id) to Perl/Lua. (#1383)
* [Quest API] Add optional clean name parameter to getnpcnamebyid in Perl/Lua.
- Allows Server Operators to grab the clean name without having to clean it up in their Perl/Lua.

* Convert from a parameter to a method.

* Add safer method.

* Convert to proper type.
2021-06-11 23:41:06 -05:00
Alex
e14acd6802
[Quest API] Add several methods to Perl/Lua API for LDoN stuff. (#1356)
- Swapped parameters in mostly unused functions to be theme_id first and points second. (No examples in PEQ quests.)
- Add $client->AddLDoNLoss(theme_id) to Perl.
- Add $client->AddLDoNWin(theme_id) to Perl.
- Add quest::crosszoneaddldonlossbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneaddldonlossbyexpeditionid(expedition_id, theme_id) to Perl.
- Add quest::crosszoneaddldonpointsbycharid(character_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbygroupid(group_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbyraidid(raid_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbyguildid(guild_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonpointsbyexpeditionid(expedition_id, theme_id, points) to Perl.
- Add quest::crosszoneaddldonwinbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneaddldonwinbyexpeditionid(expedition_id, theme_id) to Perl.
- Fix quest::addldonloss(theme_id) in Perl.
- Fix quest::addldonwin(theme_id) in Perl.
- Add client:AddLDoNLoss(theme_id) to Lua.
- Add client:AddLDoNWin(theme_id) to Lua.
- Add eq.add_ldon_loss(theme_id) to Lua.
- Add eq.add_ldon_points(theme_id, points) to Lua.
- Add eq.add_ldon_win(theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_loss_by_expedition_id(expedition_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_points_by_char_id(character_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_group_id(group_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_raid_id(raid_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_guild_id(guild_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_points_by_expedition_id(expedition_id, theme_id, points) to Lua.
- Add eq.cross_zone_add_ldon_win_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_add_ldon_win_by_expedition_id(expedition_id, theme_id) to Lua.
2021-05-24 21:15:41 -05:00
Michael Cook (mackal)
4358e24dab
[Bug Fix] Fix use-after-free corruption with some DB calls (#1335) 2021-04-27 18:53:34 -05:00
Alex
dd06033a58
Add character-specific zone-based experience modifiers. (#1326)
* Add character-specific zone-based experience modifiers.

This will allow server operators to give players individual experience modifiers (regular and AA).

Zone ID 0 will server as a global modifier for players, if no rows are found the modifier defaults to 1.0 so experience is neither increased nor decreased.

Setting a zone-specific modifier will override the zone ID 0 global modifier.

Requires a SQL update: sql/git/required/2021_04_11_character_exp_modifiers.sql

- Add quest::getaaexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_aa_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::getexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::setaaexpmodifierbycharid(character_id, zone_id, aa_modifier) to Perl.
- Add eq.set_aa_exp_modifier_by_char_id(character_id, zone_id, aa_modifier) to Lua.
- Add quest::setexpmodifierbycharid(character_id, zone_id, exp_modifier) to Perl.
- Add eq.set_exp_modifier_by_char_id(character_id, zone_id, exp_modifier) to Lua.
- Add $client->GetAAEXPModifier(character_id, zone_id) to Perl.
- Add client:GetAAEXPModifier(character_id, zone_id) to Lua.
- Add $client->GetEXPModifier(character_id, zone_id) to Perl.
- Add client:GetEXPModifier(character_id, zone_id) to Lua.
- Add $client->SetAAEXPModifier(zone_id, aa_modifier) to Perl.
- Add client:SetAAEXPModifier(zone_id, aa_modifier) to Lua.
- Add $client->SetEXPModifier(zone_id, exp_modifier) to Perl.
- Add client:SetEXPModifier(zone_id, exp_modifier) to Lua.

* Removed unneeded [].

* Fix variable name,

* Fix variable name.

* Fix version.h.

* Rename 2021_04_11_character_exp_modifiers.sql to 2021_04_23_character_exp_modifiers.sql

* Update db_update_manifest.txt
2021-04-23 08:47:39 -04:00
Alex
13a50f7806
[Quest API] Add HTML color tag method to Perl and Lua. (#1324)
* Add HTML color tag method to Perl and Lua.
- Add quest::gethexcolorcode(color_name) to Perl.
- Add eq.get_hex_color_code(color_name) to Lua.

Full color list here: https://pastebin.com/rUYKr1ye

* Convert to static and use strcasecmp over strcmp.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-04-22 23:52:00 -05:00
Alex
00fb9bc9f9
[Bug Fix] Zone Heading for Binds, Summons, Teleports, and Zoning. (#1328)
* For as long as I can remember people have had issues with zoning in, facing the wrong way, and walking through a zone line.

With this we will be able to set zone's safe heading as well as preserve heading on summon (NPC or GM) and teleports between zones.

This affects several pre-existing quest methods and extends their parameters to allow for the addition of heading.

The following functions have had heading added.
Lua
- client:SetBindPoint()
- client:SetStartZone()

Perl
- $client->SetBindPoint()
- $client->SetStartZone()
- quest::rebind()

SetStartZone parameter list was fixed also.

This converts some pre-existing methods from glm::vec3() to glm::vec4() and has an overload where necessary to use a glm::vec3() method versus glm::vec4() method.

This shouldn't affect any pre-existing servers and will allow PEQ and others to document safe headings for zones properly.

* Removed possible memory leaks.

* Fix SQL.

* Fix client message.

* Fix debug log.

* Fix log message.

* Fix call in rebind overload.

* Fix floats.

* Add default to column.
2021-04-22 22:49:44 -05:00
Akkadius
d117ce0bf2 [Hotfix] Incorrect Perl usage method (docs) 2021-03-31 00:18:43 -05:00
Alex
97c11a1199
[Quest API] Add new zone name methods to Perl and Lua. (#1309)
- Add quest::GetZoneShortName(zone_id) to Perl.
- Add quest::GetZoneLongNameByID(zone_id) to Perl.
- Add eq.get_zone_id_by_name(zone_name) to Lua.
- Add eq.get_zone_short_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_name(zone_name) to Lua.
2021-03-28 20:25:50 -05:00
splose
b3fbe1b015
add quest::get_spell_level(uint16 spell_id, uint8 class_id) (#1295) 2021-03-15 23:59:09 -05:00
Alex
cd08c96fa4
[Quest API] Add secondstotime(duration) to Perl and Lua. (#1281)
- Add quest::converttime(duration) to Perl.
- Add eq.convert_time(duration) to Lua.
2021-03-11 21:38:47 -05:00
Kinglykrab
36bfebfe6a Add Inventory methods to Perl.
- Add $client->GetInventory() to Perl.
- Export Lua Inventory methods to Perl.
 - Add quest::createitem(item_id, charges, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six, attuned) to Perl so you can return a ItemInstance for testing purposes.
2021-02-01 21:07:07 -05:00
Kinglykrab
19ae461e36 Add message(color, message) and whisper(message) to Perl/Lua.
- Add quest::message(color, message) to Perl.
- Add eq.message(color, message) to Lua.
- Add quest::whisper(message) to Perl.
- Add eq.whisper(message) to Lua.

These methods allow you to use implied client references. The whisper method also converts a widely used plugin in Perl to a Perl and Lua method that works on both Clients and NPCs.
2021-01-23 10:47:44 -05:00
hg
4ae9904822 Use strlen for perl hash key size 2020-12-30 18:47:32 -05:00
hg
c0b8bfde03 Fix invalid return in perl expedition api
This was returning an invalid (garbage) hash reference for
empty results when filtering on expedition name
2020-12-30 18:47:32 -05:00
hg
cc5dd4cd82 Add missing expedition perl api declaration 2020-12-30 18:47:32 -05:00
hg
b46eca4ec6 Store expeditions with dz id not instance id
This exposes dynamic zone ids for any future changes and will make it
easier to preserve historic dz and expedition data. This also cleans up
some dynamic zone creation for expedition requests

When purging instances the expedition table is no longer updated
since dynamic zone ids are not re-used like instance ids are

Update #dz list commands to show dz id

Add GetDynamicZoneID and get_expedition_by_dz_id quest apis
2020-12-30 18:47:32 -05:00