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>
- Export $killed_x, $killed_y, $killed_z, and $killed_h to EVENT_DEATH_ZONE in Perl.
- Cleanup export strings and unnecessary .c_str() calls on event exports.
- 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.
* Add EVENT_LOOT_ZONE to zone_controller
* Fix porting event_loot_zone to lua API
* Remove extra spacing and remove forced message to allow for scripted responses.
* Allow all script parsing to fire before sending a failed lootitem, add corpse_id
* Only search for zone_controller once
* [Quest API] Add EVENT_CONSIDER to Perl and Lua.
- Exports $entity_id in Perl.
- Exports e.entity_id in Lua.
Allows you to perform events on consider for server operators.
* Missing comma.
* Formatting.
* Add return capability to EVENT_CONSIDER and EVENT_CONSIDER_CORPSE so operators can break out of consider functions.
* [Cheat Detection] Anti-Cheat reimplementation
* minor patch fixes
* ceiling to server side runspeed
Warp(LT) was picking up a bunch of expected 6.2 but it was reported back as 6.5, this should help reduce the amount of false positives we get
* use ceil instead of std::ceilf for linux
* boat false positive fix
* stopping the double detection
* fixes and cleanup
* auto merge tricked me...
* dummy divide by 0 checks
this should prevent anyone from setting Zone:MQWarpDetectionDistanceFactor to 0 and causing a crash.
* Formatting
* encapsulation to its own class and clean up
* more detections
* typo
* OP_UnderWorld implmentation
* Update client_packet.h
* Syntax changes, formatting, cleanup
* preventing crashes due to invalid packet size
* typos and clearer logic
* seperated the catagory for cheats
* Updated MQGhost for more detail
Co-authored-by: Akkadius <akkadius1@gmail.com>
* Add a std::string overload for Database::SetMQDetectionFlag
* Replace calls to MakeAnyLenString in client_packet.cpp
At least the SetMQDetectionFlag ones
* Replace MakeAnyLenString calls in client_process
At least SetMQDectectionFlag ones
* Replace MakeAnyLenString in embparser
fmtlib actually is gross here, oh well.
* Replace MakeAnyLenString in merc
* Replace MakeAnyLenString in inventory
Also if'd out an unfinished implementation of Client::GetItemLinkHash
* Replace AppendAnyLenString in zonelist
* Replace AppendAnyLenString in zonelist
* Replace MakeAnyLenString in clientlist
* Nuke MakeAnyLenString/AppendAnyLenString
* Fix formatting string in zonelist
- 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.
- When a zone boots, it will spawn an invisible npc by the name of zone_controller
- Lua and Perl scripts can be represented with this npc as zone_controller.pl/lua
- This NPC's ID is ruled be define ZONE_CONTROLLER_NPC_ID 10
- Two EVENT's uniquely are handled with this NPC/controller (They only work with the zone_controller NPC)
- EVENT_SPAWN_ZONE :: All NPC spawns in the zone trigger the controller and pass the following variables:
$spawned_entity_id
$spawned_npc_id
- EVENT_DEATH_ZONE :: All NPC deaths in the zone trigger the controller event and pass the following variables:
$killer_id
$killer_damage
$killer_spell
$killer_skill
$killed_npc_id
Added parameter to LUA and Perl method settime(hour, minute, [update_world = true])
- If update_world is false, the zone will then unsubscribe itself from regular worldserver time synchronizations
Added DB ver 9082 with update to add npc_types texture columns if table does not currently have them
Changes Speed from float to int. EQ client deals with int step locs better than it does floats according to Haynar's testing.
This also contains mob runspeed changes. I recommend you set runspeeds to start in the DB 1.25 for NPCs below 1.25 which will match player runspeeds almost equally. Existing DBs will need to be updated.
General Cleanup of MobAI functions. Mobs now change their heading on AIMovement timers if their targets' heading has changed since that time. This prevents players from being able to land backstabs inbetween mob swings.
Charmed/feared players now send the appropriate packet, there was a missing CastToClient() in spells that was missing.
Mob runspeed can no longer be snared to 0%, instead, 1% of their base runspeed is the maximum. Roots apply as roots instead of a modifier under this code.
There is going to be bugs with this code. It's better we push through it than revert it. Sanctuary has been running this for a good week and we've worked through the issues.
Misc updates:
Exported some variables to perl, including:
EVENT_ITE_CLICK_CAST:
EVENT_ITEM_CLICK:
spell_id - returns the spell_id of the click effect.
return value - cancels the cast.
EVENT_DROP_ITEM:
quantity - returns the # of items dropped in the packet. If the item has charges, charges are returned here instead.
itemname - name of the item being dropped
itemid - id of the item being droppped
spell_id - spell_id associated with the item's click effect.
slotid - the inventory slot id of the item being dropped.
return value - cancels the item from being dropped.
Added Perl function: CalcEXP. Calculates the experience you would gain for an NPC that cons a specific con value to you.
Fixed a bug where you would receive the group experience bonus and group experience messages for simply being in a group, regardless of the player being in the same zone as you.
-Identified Size / SolidType fields in newer clients and properly exported it to EQEmu for use in UF, RoF, RoF2 via perl accessors. (Should work in LUA, no testing was done though for LUA)
-Added a sanity check for size to objects. Any size over 5000.f seems to crash the newer clients' graphical engines and PEQ has some containers filled in with bogus values.
-Added the ability to return a value on perl function EVENT_PLAYER_PICKUP which sends a fake dropped item ID to the client to generate the appropriate client response so the item can stay on the ground and not be 'picked up'. Should also work in LUA, didn't test LUA.
-Renamed unknown008 and unknown010 to size and solidtype respectively for objects.
- This event triggers when taking any sort of environmental damage. Example use:
sub EVENT_ENVIRONMENTAL_DAMAGE{
quest::debug("EVENT_ENVIRONMENTAL_DAMAGE");
quest::debug("env_damage is " . $env_damage);
quest::debug("env_damage_type is " . $env_damage_type);
quest::debug("env_final_damage is " . $env_final_damage);
}
Result: (Test falling in Velks): http://i.imgur.com/tPRL7yL.png