9
3

InitiateLunaru.lua 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. --[[
  2. Script Name : SpawnScripts/ElddarGrove/InitiateLunaru.lua
  3. Script Purpose : Initiate Lunaru
  4. Script Author : Dorbin
  5. Script Date : 2022.05.09
  6. Script Notes :
  7. --]]
  8. local Message = 5525
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, Message)
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. if GetFactionAmount(Spawn,11) <0 then
  15. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_notcitizen_gm_6da83eeb.mp3", "I'll defend myself if it comes to that, savage.", "shakefist", 1117657093, 2489618551, Spawn, 0)
  16. else
  17. FaceTarget(NPC, Spawn)
  18. conversation = CreateConversation()
  19. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1038.mp3", "", "bow", 0, 0, Spawn)
  20. if not HasQuest(Spawn,Message) and not HasCompletedQuest (Spawn,Message) then
  21. AddConversationOption(conversation, "You're very dedicated to training, I see.","Message1")
  22. end
  23. if HasCompletedQuest (Spawn,Message) then
  24. AddConversationOption(conversation, "Zwena is still serenading. I hope hearing her is enough for now.","Listen")
  25. end
  26. AddConversationOption(conversation, "Don't let me interrupt.")
  27. StartConversation(conversation, NPC, Spawn, "Sorry, I can't speak now. I must prepare for my sparring exercises.")
  28. end
  29. end
  30. function Message1(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. conversation = CreateConversation()
  33. PlayFlavor(NPC, "", "", "sigh", 0, 0, Spawn)
  34. AddConversationOption(conversation, "That wouldn't be a problem at all.","Message2")
  35. AddConversationOption(conversation, "Perhaps another time.")
  36. StartConversation(conversation, NPC, Spawn, "I am devoted to them, yes, but my heart lies with Zwena. That is why I must train so hard... if I want any time to spend with her away from our order. I must complete everything before I leave. Mmmm, could you perhaps deliver her a note?")
  37. end
  38. function Message2(NPC, Spawn)
  39. OfferQuest(NPC,Spawn, Message)
  40. FaceTarget(NPC, Spawn)
  41. end
  42. function Listen(NPC, Spawn)
  43. PlayFlavor(NPC, "", "", "listen", 0, 0, Spawn)
  44. AddTimer(NPC,3500,"Thanks",1,Spawn)
  45. end
  46. function Thanks(NPC, Spawn)
  47. local choice = math.random(1,2)
  48. if choice == 1 then
  49. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  50. elseif choice == 2 then
  51. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  52. end
  53. end