Lua functions

GiveQuestItem

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

Historical signature: GiveQuestItem(…) via current binding

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

Function: GiveQuestItem(quest, player, description, item_id, ...)

Description: Copies definitions into the quest's temporary reward list and queues its reward display. A valid first item is required. Missing later definitions make the result false while preserving valid copies and still queuing the reward. The result does not mean the player accepted the reward.

Parameters: quest: Quest userdata. player: connected player spawn. description: display description. item_id: positive first item definition ID. ...: additional definition IDs.

Returns: True if all definitions were found; false for invalid initial input, missing connection, or any missing later definition.

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. Argument count matches current fixed C++ readers. The binding also handles arguments dynamically. This is a contextual call pattern, not a tested standalone script.

GiveQuestItem(Quest, Player, "", 9357)

Evidence: server/Quests/FarJourneyFreeport/TasksaboardtheFarJourney.lua:220; binding EQ2Emu_lua_GiveQuestItem.

Current registration: WorldServer/Lua/LuaInterface.cpp.