Code: Select all
function spawn(NPC)
ProvidesQuest(NPC, 2)
--Syntax is NPC, x, y, z, speed, delay (in seconds)
MovementLoopAddLocation(NPC, -233.71,-1.32,-78.60,1,1)
MovementLoopAddLocation(NPC, -199.22,-1.30,-65.10,1,1)
MovementLoopAddLocation(NPC, -181.13,1.42,-39.81,1,1)
MovementLoopAddLocation(NPC, -157.08,0.21,-37.07,1,1)
MovementLoopAddLocation(NPC, -140.16,-1.51,-17.05,1,1)
MovementLoopAddLocation(NPC, -125.01,-1.03, 13.01,1,1)
MovementLoopAddLocation(NPC, -119.43,-2.52, 22.60,1,1)
MovementLoopAddLocation(NPC, -65.02,-2.52,90.91,1,1)
MovementLoopAddLocation(NPC, -47.82,-2.52,128.37,1,1)
MovementLoopAddLocation(NPC, -32.20,-2.49,126.53,1,1)
MovementLoopAddLocation(NPC, -31.45,-2.38,126.15,1,1)
MovementLoopAddLocation(NPC, -12.74,-2.38,127.41,1,1)
MovementLoopAddLocation(NPC, 8.35,-2.38,115.70,1,1)
-- water
MovementLoopAddLocation(NPC,9.91,-4.89,115.10,1,1)
MovementLoopAddLocation(NPC,12.99,-4.72,110.96,1,1)
MovementLoopAddLocation(NPC,6.28,-4.67,40.30,1,1)
MovementLoopAddLocation(NPC,3.83,-1.78,15.99,1,1)
MovementLoopAddLocation(NPC,-49.88,-1.91,-6.65,1,1)
MovementLoopAddLocation(NPC,-143.41,-2.54,-70.24,1,1)
MovementLoopAddLocation(NPC,-147.62,-0.21,-88.47,1,1)
MovementLoopAddLocation(NPC,-165.80,-0.43,-91.04,1,1)
MovementLoopAddLocation(NPC,-192.28,-0.88,-110.35,1,1)
MovementLoopAddLocation(NPC,-241.93,-1.32,-116.01,1,1)
MovementLoopAddLocation(NPC,-240.83,-4.77,-100.04,1,1)
end
function attacked(NPC, Spawn)
Emote(NPC, "I shall not let you endanger our people.")
end
function hailed(NPC, Spawn)
FaceTarget(NPC, Spawn)
PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1002.mp3", "", "", 0, 0, Spawn)
conversation = CreateConversation()
if HasQuest(Spawn, 2) then
-- not functioning, skip for now
--if QuestIsComplete(Spawn, 2) then
-- AddConversationOption(conversation, "Great!")
-- StartConversation(conversation, NPC, Spawn, "Hello " .. GetName(Spawn) .. ", this information is most useful indeed.")
-- todo: give second quest
--else
-- temporary work around
AddConversationOption(conversation, "Not yet!")
StartConversation(conversation, NPC, Spawn, "Hello again " .. GetName(Spawn) .. ". have you recovered more information?")
--end
else
if HasCompletedQuest(Spawn, 2) then
AddConversationOption(conversation, "Hello!")
StartConversation(conversation, NPC, Spawn, "Hello again " .. GetName(Spawn) )
else
AddConversationOption(conversation, "More of us?", "MoreOfYou")
StartConversation(conversation, NPC, Spawn, "Hmm! How perculiar, another one of you! This is getting stranger and stranger by the day.")
end
end
end
function MoreOfYou(NPC, Spawn)
conversation = CreateConversation()
AddConversationOption(conversation, "I have no memory of my past or where I came from, but I would like to find out.", "FindOut")
StartConversation(conversation, NPC, Spawn, "Yes, several nights ago there was one such as yourself that appeared as if out of the ether onto the Docks. The only other outsiders that have arrived here came by a more traditional means. Where did you come from?")
end
function FindOut(NPC, Spawn)
conversation = CreateConversation()
AddConversationOption(conversation, "Perhaps I can help you and recover my memories. I will prove myself if you can tell me what to do.", "ProveMyself")
StartConversation(conversation, NPC, Spawn, "Yes that is exactly what the others said. As sworn protector of Hoa`Kar it is my duty to ensure the safety of all residents here and until we uncover where you and your people are coming from then I can not rest. I cannot trust any of you until more information can be provided and if you cannot recall then this leaves us both in a predicament.")
end
function ProveMyself(NPC, Spawn)
conversation = CreateConversation()
AddConversationOption(conversation, "That sounds like a good idea, where can I find them?", "FindThem")
StartConversation(conversation, NPC, Spawn, "Hmm, very well. Perhaps you should engage in some dialogue with the others that arrived perhaps one of them might help your memories return.")
end
function FindThem(NPC, Spawn)
conversation = CreateConversation()
AddConversationOption(conversation, "Very well. Take care Alexander.", "TalkToOthers")
StartConversation(conversation, NPC, Spawn, "We have temporarily housed them in one of the spare villas at North side of the village. Come back to me when you find out more.")
end
function TalkToOthers(NPC, Spawn)
OfferQuest(NPC, Spawn, 2)
conversation = CreateConversation()
StartConversation(conversation, NPC, Spawn, "Let's hope for whatever reason you uncover, it is the truth.")
Emote(NPC, " waves.", Spawn)
end
function death(NPC, Spawn)
Say(NPC, "There is peace in all.")
end
function killed(NPC, Spawn)
Say(NPC, "We promise to ensure your body and spirit passes safely to the other side.")
end