mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 07:38:36 +00:00
[Quest API] Add EVENT_SKILL_UP & EVENT_LANGUAGE_SKILL_UP to Perl/Lua (#2076)
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>
This commit is contained in:
@@ -4230,7 +4230,9 @@ luabind::scope lua_register_events() {
|
||||
luabind::value("consider_corpse", static_cast<int>(EVENT_CONSIDER_CORPSE)),
|
||||
luabind::value("loot_zone", static_cast<int>(EVENT_LOOT_ZONE)),
|
||||
luabind::value("equip_item_client", static_cast<int>(EVENT_EQUIP_ITEM_CLIENT)),
|
||||
luabind::value("unequip_item_client", static_cast<int>(EVENT_UNEQUIP_ITEM_CLIENT))
|
||||
luabind::value("unequip_item_client", static_cast<int>(EVENT_UNEQUIP_ITEM_CLIENT)),
|
||||
luabind::value("skill_up", static_cast<int>(EVENT_SKILL_UP)),
|
||||
luabind::value("language_skill_up", static_cast<int>(EVENT_LANGUAGE_SKILL_UP))
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user