Difference between revisions of "LUA:GetQuest"

(Created page with "= LUA Functions: GetQuest() = Gets the quest with the given id for the given player ==== Syntax ==== var = GetQuest(param1, param2) ==== Parameters ==== ; Required - ''param1...")
 
(No difference)

Latest revision as of 17:14, 11 September 2013

LUA Functions: GetQuest()

Gets the quest with the given id for the given player


Syntax

var = GetQuest(param1, param2)


Parameters

Required - param1 (Spawn), param2 (int32)
param1 is the player we want to check
param2 is the id of the quest


Usage

function hailed(NPC, Spawn)
    local quest = GetQuest(Spawn, 1234)
    if quest ~= nil then
        Say(NPC, "You have the quest")
    else
        Say(NPC, "You do not have the quest")
    end
end

The NPC will respond if the player who hailed it has quest 1234

Notes

Returns a quest pointer