PhilosopherOrrinalanya.lua 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/PhilosopherOrrinalanya.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.28 04:06:45
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  9. require "SpawnScripts/Generic/DialogModule"
  10. function spawn(NPC)
  11. waypoints(NPC)
  12. ProvidesQuest(NPC,247)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. end
  15. function InRange(NPC, Spawn) --Quest Callout
  16. if GetFactionAmount(Spawn,11)<0 then
  17. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  18. else
  19. if not HasCompletedQuest(Spawn, 247)then
  20. if math.random(1, 100) <= 80 then
  21. choice = math.random(1,3)
  22. FaceTarget(NPC, Spawn)
  23. if choice ==1 then
  24. PlayFlavor(NPC, "voiceover/english/philosopher_orrinalanya/qey_village02/100_philosopher_urrinalanya_multhail4_68bb913c.mp3", "I suppose I should meet him for that debate... it does seem like an interesting topic...", "ponder", 415488076, 395918302, Spawn, 4)
  25. elseif choice ==2 then
  26. PlayFlavor(NPC, "voiceover/english/philosopher_orrinalanya/qey_village02/100_philosopher_urrinalanya_callout_f7da3eeb.mp3", "Hmm ... you don't seem the philosophizing type ... good day and farewell.", "sniff", 3739495894, 1743566335, Spawn, 4)
  27. elseif choice ==3 then
  28. PlayFlavor(NPC, "voiceover/english/philosopher_orrinalanya/qey_village02/100_philosopher_urrinalanya_orrin_intro_ee0886dd.mp3", "Have the gods of influence forsaken us, or have we turned from them? Do we not want to see them, or are they not here to be seen? Care to join me in this enlightened debate, friend?", "orate", 2698585009, 3547905149, Spawn,4)
  29. end
  30. end
  31. end
  32. end
  33. end
  34. function hailed(NPC, Spawn)
  35. FaceTarget(NPC,Spawn)
  36. if GetFactionAmount(Spawn,11)<0 then
  37. FaceTarget(NPC, Spawn)
  38. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  39. else
  40. if not HasLanguage(Spawn,4)then
  41. Garbled(NPC,Spawn)
  42. PlayFlavor(NPC,"","","noway",0,0,Spawn)
  43. else
  44. Dialog1 (NPC,Spawn)
  45. end
  46. end
  47. end
  48. function Dialog1(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. Dialog.New(NPC, Spawn)
  51. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  52. Dialog.AddDialog("Have the gods of influence forsaken us? Or have we ourselves turned from them? Do we not want to see them, or are they not here to be seen?")
  53. Dialog.AddVoiceover("voiceover/english/philosopher_orrinalanya/qey_village02/philosopherorrinalanya.mp3", 2178958737, 1415446310)
  54. if not HasQuest(Spawn, 247) and not HasCompletedQuest(Spawn, 247) then
  55. Dialog.AddOption("What are you talking about? Haven't the god been abscent since The Shattering?","Dialog2")
  56. end
  57. Dialog.AddOption("I'll leave you to your reflections. Good day.")
  58. Dialog.Start()
  59. end
  60. function Dialog2(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. Dialog.New(NPC, Spawn)
  63. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  64. Dialog.AddDialog("The art of philosophy is not one of hard facts, but rather how you perceive what is before you. However, I can tell you're not interested in this enlightening conversation. If you've no more pressing matters than interrupting my thoughts, perhaps you wouldn't mind delivering a note for me.")
  65. Dialog.AddVoiceover("voiceover/english/philosopher_orrinalanya/qey_village02/philosopherorrinalanya000.mp3", 849141617,1802066306)
  66. Dialog.AddOption("I certainly can.", "QuestStart")
  67. Dialog.AddOption("Believe it or not, I do have pressing matters. Good day.")
  68. Dialog.Start()
  69. end
  70. function QuestStart (NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. OfferQuest(NPC, Spawn, 247)
  73. end
  74. function FaceFount1(NPC)
  75. SpawnSet(NPC, "heading", "6")
  76. end
  77. function FaceFount2(NPC)
  78. SpawnSet(NPC, "heading", "139")
  79. end
  80. function FaceFount3(NPC)
  81. SpawnSet(NPC, "heading", "318")
  82. end
  83. function FaceFount4(NPC)
  84. SpawnSet(NPC, "heading", "281")
  85. end
  86. function waypoints(NPC)
  87. MovementLoopAddLocation(NPC, 771.5, -20.41, 289.13, 2, 1,"FaceFount1")
  88. MovementLoopAddLocation(NPC, 771.5, -20.41, 289.13, 2, 33,"Action")
  89. MovementLoopAddLocation(NPC, 771.5, -20.41, 289.13, 2, 0)
  90. MovementLoopAddLocation(NPC, 776, -20.52, 287.26, 2, 0)
  91. MovementLoopAddLocation(NPC, 778.56, -20.57, 281.87, 2, 0)
  92. MovementLoopAddLocation(NPC, 782.1, -20.25, 272.07, 2, 0)
  93. MovementLoopAddLocation(NPC, 782.1, -20.25, 272.07, 2, 0)
  94. MovementLoopAddLocation(NPC, 782.1, -20.25, 272.07, 2, 1,"FaceFount2")
  95. MovementLoopAddLocation(NPC, 782.1, -20.25, 272.07, 2, 55,"Action")
  96. MovementLoopAddLocation(NPC, 782.1, -20.25, 272.07, 2, 0)
  97. MovementLoopAddLocation(NPC, 781.3, -20.51, 275.65, 2, 0)
  98. MovementLoopAddLocation(NPC, 777.91, -20.6, 283.44, 2, 0)
  99. MovementLoopAddLocation(NPC, 771.5, -20.41, 289.13, 2, 1,"FaceFount1")
  100. MovementLoopAddLocation(NPC, 771.5, -20.41, 289.13, 2, 33,"Action")
  101. MovementLoopAddLocation(NPC, 771.5, -20.41, 289.13, 2, 0)
  102. MovementLoopAddLocation(NPC, 765.24, -20.48, 286.85, 2, 0)
  103. MovementLoopAddLocation(NPC, 765.24, -20.48, 286.85, 2, 0)
  104. MovementLoopAddLocation(NPC, 763.39, -20.51, 281.6, 2, 1,"FaceFount3")
  105. MovementLoopAddLocation(NPC, 763.39, -20.51, 281.6, 2, 33,"Action")
  106. MovementLoopAddLocation(NPC, 763.39, -20.51, 281.6, 2, 0)
  107. MovementLoopAddLocation(NPC, 763.39, -20.51, 281.6, 2, 0)
  108. MovementLoopAddLocation(NPC, 763.39, -20.51, 281.6, 2, 1,"FaceFount4")
  109. MovementLoopAddLocation(NPC, 763.39, -20.51, 281.6, 2, 33,"Action")
  110. MovementLoopAddLocation(NPC, 763.39, -20.51, 281.6, 2, 0)
  111. MovementLoopAddLocation(NPC, 765.25, -20.49, 285.44, 2, 0)
  112. end
  113. function Action(NPC)
  114. local choice = MakeRandomInt(1, 4)
  115. if choice == 1 then
  116. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  117. elseif choice == 2 then
  118. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  119. elseif choice == 3 then
  120. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  121. elseif choice == 4 then
  122. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  123. end
  124. end