Lua functions

AddQuestStepKillByRace

Registered in this checkout as EQ2Emu_lua_AddQuestStepKillByRace; implementation found at WorldServer/Lua/LuaFunctions.cpp:4726.

Historical signature: AddQuestStepKillByRace(…) via current binding

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: AddQuestStepKillByRace(quest, step, description, quantity, percentage, taskgroup, icon, ...)

Description: Adds a kill quest step matching the supplied race IDs. A positive icon is set only when the requested quantity is also positive. If the quest already has a connected player, sends quest updates.

Parameters: quest: Quest userdata. step: unsigned step number. description: step text. quantity: unsigned required count. percentage: float update percentage passed to the quest-step engine. taskgroup: task-group text; empty means no group. icon: unsigned 16-bit icon ID; zero leaves it unset. ...: unsigned race IDs; omitted or zero terminates the list.

Returns: None. Invalid quest has no effect.

Connection lifetime: Each player or group-member connection resolved by this function is retained through the native call. A disconnect or reconnect during a callback cannot destroy that retained connection or switch the ongoing call to a replacement. A later Lua call resolves the current connection. This does not extend the lifetime of unrelated spawn or item userdata.

Checked example

Active call in a local runtime Lua script. The shared race-restricted kill-step helper reads the first race ID at argument eight. This is a contextual call pattern, not a tested standalone script.

AddQuestStepKillByRace(Quest, 1, "I need to find a naga eye.", 1, 100, "I must locate several naga body parts.", 2516, 143)

Evidence: server/Quests/MultipleZones/lore_and_legend_naga.lua:14; binding EQ2Emu_lua_AddQuestStepKillByRace.

Current registration: WorldServer/Lua/LuaInterface.cpp.