LUA Functions and Examples:
* RemoveWidgetFromZoneMap(Zone, WidgetID) - must be used in preinit_zone_script
ZoneScripts/Commonlands.lua example:
function preinit_zone_script(zone)
-- removes KoS Commonlands spires from all spawns and playesr
-- visibly and in terms of player map (line of sight, and Y coordinate)
RemoveWidgetFromZoneMap(zone, 1101229151)
end
* ReplaceWidgetFromClient(Player, WidgetID, DeleteWidget, x, y, z, NewGridID) - must be called after client has sent sys_client_avatar_ready
ZoneScripts/Commonlands.lua example:
function signal_changed(Zone, Player, Reason)
if Reason == "sys_client_avatar_ready" then
-- Slightly moves the spires further down for the client visual
-- we do yet not support "moving" within the map space so this would not address line of sight or heightmap
ReplaceWidgetFromClient(Player, 1101229151, 0, 171.31, -48.04, -412.99, 783227007)
-- Alternatively ReplaceWidgetFromClient(Player, 1101229151, 1) could be called to remove the widget from the client visually
end
end
* RemoveWidgetFromSpawnMap(Spawn, WidgetID) -- removes the widget from the map (line of sight and heightmap checks). Can be called at any time (Spawn/Player).
- NPC Spells now supports self-HP ratios
alter table spawn_npc_spells add column required_hp_ratio tinyint signed not null default 0;
If greater than 0, hp ratio must be HIGHER or EQUAL to the value
If less than 0, hp ratio must be LOWER or EQUAL to the value
values -100 to 100 are accepted. Default value of 0 skips checks.
- Reduced some messages by timer that could spam on zone startup
- Fix#351 /yell now available, yell with self target breaks all active encounters, yell with direct target breaks that encounter, no target breaks first encounter
- WorldStructs.xml update required for /yell so others know you are yelling!
- /spawn details aggro (NPC only) added, view active encounter list (who receives credit, locked encounter) and hate list (actual damage/hate)
- InfoStruct now has a new UINT8 "engaged_encounter", set to 1 for being in an active encounter, 0 for out of encounter (allows regen/speed recovery)
- Returning from linkdead DB load reduced
- Returning from linkdead you won't see ghost versions of yourself
- Addressed returning from linkdead and spells missing, would despawn your pet or remove buffs for examples.
- Protections around private spawns aggroing/attacking players that cannot see them
- Additional spell crash protection when spell caster is not in zone
- Addressed spells being removed from character on /camp and disconnect
- LUA AddRecipeBookToPlayer(Player, BookID)
BookID = SELECT id, name, tradeskill_default_level FROM items WHERE item_type='Recipe'
- LUA RemoveRecipeFromPlayer(Player, RecipeID)
RecipeID = SELECT id from recipe where name='RecipeName';
- Fix#467 Tradeskill spells are now sent upon levelling (if not already assigned by starting spells)
- Wards now limit themselves to one "tic"/"trigger" per hit.
- New LUA Functions:
DeleteSpellBook(Player, type)
type = bit operand combination of:
DELETE_TRADESKILLS = 1,
DELETE_SPELLS = 2,
DELETE_COMBAT_ART = 4,
DELETE_ABILITY = 8,
DELETE_NOT_SHOWN = 16
Eg. tradeskills and spells = (1+2) = 3
SendNewAdventureSpells(Player) - sends adventure spells by their level
SendNewTradeskillSpells(Player) - sends tradeskill spells by their level
RemoveSpellBookEntry(Player, spell_id)