Difference between revisions of "LUA:CanReceiveQuest"

(Created page with "'''Syntax'''<br> CanReceiveQuest([Spawn*] player, [int32] quest_id)<br> '''Explanation'''<br> This function returns a true/false value after a check to see if a player is eligib...")
 
(No difference)

Latest revision as of 11:26, 7 September 2013

Syntax
CanReceiveQuest([Spawn*] player, [int32] quest_id)

Explanation
This function returns a true/false value after a check to see if a player is eligible to receive a quest.

Example

function hailed(NPC, Spawn)
    if CanReceiveQuest(Spawn, 1)
        OfferQuest(NPC, Spawn, 1)
    end
end

When an npc with this function is hailed, if the spawn that hailed is able to receive quest 1, the npc will offer quest 1.



Back to Quest Functions