You are viewing an old version of this page. Return to the latest version.
Version of 23:52, 19 March 2009 by Christopher
Difference between revisions of "LUA:Accepted"
(New page: Calls up this function only if the offered quest is accepted. This function is usualy placed after a "function Init(Quest)" in your quest scripts. Here is an example... function Accepte...) |
|||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | '''Syntax'''<br> | |
| + | Accepted(Quest, QuestGiver, Player)<br> | ||
| + | '''Explanation'''<br> | ||
| + | Calls up this function only if the offered quest is accepted. This function is placed in your "function Init(Quest)" in your quest scripts.<br> | ||
| − | function Accepted(Quest, QuestGiver, Player) | + | '''Example'''<br> |
| − | + | function Accepted(Quest, QuestGiver, Player)<br> | |
| − | + | if QuestGiver ~= nil then | |
| − | + | if GetDistance (Player, QuestGiver) < 30 then | |
| − | + | FaceTarget (QuestGiver, Player) | |
| − | + | conversation = CreateConversation() | |
| − | + | ||
| − | + | AddConversationOption(conversation, "Blah blah blah") | |
| − | + | StartConversation(conversation, QuestGiver, Player, "blah blah blah") | |
| − | + | end | |
| − | + | end | |
| + | end | ||
| + | |||
| + | |||
| + | In this example when the quest offered is accepted it will start the conversation. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | [http://www.eq2emulator.net/wiki/index.php/Developer:LUA_Functions Back to LUA Functions] | ||
Latest revision as of 17:27, 3 April 2009
Syntax
Accepted(Quest, QuestGiver, Player)
Explanation
Calls up this function only if the offered quest is accepted. This function is placed in your "function Init(Quest)" in your quest scripts.
Example
function Accepted(Quest, QuestGiver, Player)
if QuestGiver ~= nil then if GetDistance (Player, QuestGiver) < 30 then FaceTarget (QuestGiver, Player) conversation = CreateConversation() AddConversationOption(conversation, "Blah blah blah") StartConversation(conversation, QuestGiver, Player, "blah blah blah") end end end
In this example when the quest offered is accepted it will start the conversation.