You are viewing an old version of this page. Return to the latest version.
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...) |
|||
| Line 1: | Line 1: | ||
| − | 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... | + | 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...<br> |
| + | <br> | ||
| + | <br> | ||
| − | + | function Accepted(Quest, QuestGiver, Player)<br> | |
| − | + | if QuestGiver ~= nil then<br> | |
| − | function Accepted(Quest, QuestGiver, Player) | + | if GetDistance (Player, QuestGiver) < 30 then<br> |
| − | if QuestGiver ~= nil then | + | FaceTarget (QuestGiver, Player)<br> |
| − | if GetDistance (Player, QuestGiver) < 30 then | + | conversation = CreateConversation()<br> |
| − | FaceTarget (QuestGiver, Player) | + | <br> |
| − | conversation = CreateConversation() | + | AddConversationOption(conversation, "Blah blah blah")<br> |
| − | + | StartConversation(conversation, QuestGiver, Player, "blah blah blah")<br> | |
| − | AddConversationOption(conversation, "Blah blah blah") | + | end<br> |
| − | StartConversation(conversation, QuestGiver, Player, "blah blah blah") | + | end<br> |
| − | end | + | end<br> |
| − | end | ||
| − | end | ||
Revision as of 23:56, 19 March 2009
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 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