9
3

aNightmarehandler.lua 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. --[[
  2. Script Name : SpawnScripts/LopingPlains/anightmarehandler.lua
  3. Script Purpose : a nightmare handler (1160002)
  4. Script Author : Neatz09
  5. Script Date : 4/14/2019
  6. Script Notes :
  7. --]]
  8. function respawn(NPC)
  9. spawn(NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. conversation = CreateConversation()
  14. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1042.mp3", "", "", 0, 0, Spawn)
  15. AddConversationOption(conversation, "I would like to travel.", "dlg_1_1")
  16. AddConversationOption(conversation, "Nowhere.")
  17. StartConversation(conversation, NPC, Spawn, "Greetings traveler, how can I assist you today?")
  18. end
  19. function dlg_1_1(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. local con = CreateConversation()
  22. if GetSpawnLocationID(NPC) == 367286 then
  23. AddConversationOption(con, "To Greater Faydark", "SombornToGFay")
  24. AddConversationOption(con, "To Lesser Faydark.", "SombornToLFay")
  25. AddConversationOption(con, "To Steamfont Mountains.", "SombornToSFM")
  26. AddConversationOption(con, "To Timorous Moor.", "SombornToTM")
  27. elseif GetSpawnLocationID(NPC) == 367289 then
  28. AddConversationOption(con, "To Greater Faydark.", "LFayToGFay")
  29. AddConversationOption(con, "To Somborn.", "LFayToSomborn")
  30. AddConversationOption(con, "To Steamfont Mountains.", "LFayToSFM")
  31. AddConversationOption(con, "To Timorous Moor.", "LFayToTM")
  32. elseif GetSpawnLocationID(NPC) == 367287 then
  33. AddConversationOption(con, "To Lesser Faydark.", "GFayToLFay")
  34. AddConversationOption(con, "To Somborn.", "GFayToSomborn")
  35. AddConversationOption(con, "To Steamfont Mountains.", "GFayToSFM")
  36. AddConversationOption(con, "To Timorous Moor.", "GFayToTM")
  37. elseif GetSpawnLocationID(NPC) == 367288 then
  38. AddConversationOption(con, "To Greater Faydark.", "TMToGFay")
  39. AddConversationOption(con, "To Lesser Faydark.", "TMToLFay")
  40. AddConversationOption(con, "To Somborn.", "TMToSomborn")
  41. AddConversationOption(con, "To Steamfont Mountains.", "TMToSFM")
  42. elseif GetSpawnLocationID(NPC) == 367285 then
  43. AddConversationOption(con, "To Greater Faydark.", "SFMToGFay")
  44. AddConversationOption(con, "To Lesser Faydark.", "SFMTToLFay")
  45. AddConversationOption(con, "To Somborn.", "SFMTToSomborn")
  46. AddConversationOption(con, "To Timorous Moor.", "SFMToTM")
  47. else
  48. PlayFlavor(NPC, "", "Not implemented yet!", "cry", 0, 0, Spawn)
  49. end
  50. AddConversationOption(con, "Nowhere.")
  51. StartConversation(con, NPC, Spawn, "Where to?")
  52. end
  53. function SombornToGFay(NPC, Spawn)
  54. StartAutoMount(Spawn, 970)
  55. SetMount(Spawn, 8211)
  56. end
  57. function SombornToLFay(NPC, Spawn)
  58. StartAutoMount(Spawn, 972)
  59. SetMount(Spawn, 8211)
  60. end
  61. function SombornToSFM(NPC, Spawn)
  62. StartAutoMount(Spawn, 976)
  63. SetMount(Spawn, 8211)
  64. end
  65. function SombornToTM(NPC, Spawn)
  66. StartAutoMount(Spawn, 974)
  67. SetMount(Spawn, 8211)
  68. end
  69. function LFayToGFay(NPC, Spawn)
  70. StartAutoMount(Spawn, 977)
  71. SetMount(Spawn, 8211)
  72. end
  73. function LFayToSomborn(NPC, Spawn)
  74. StartAutoMount(Spawn, 969)
  75. SetMount(Spawn, 8211)
  76. end
  77. function LFayToSFM(NPC, Spawn)
  78. StartAutoMount(Spawn, 979)
  79. SetMount(Spawn, 8211)
  80. end
  81. function LFayToTM(NPC, Spawn)
  82. StartAutoMount(Spawn, 978)
  83. SetMount(Spawn, 8211)
  84. end
  85. function GFayToLFay(NPC, Spawn)
  86. StartAutoMount(Spawn, 980)
  87. SetMount(Spawn, 8211)
  88. end
  89. function GFayToSomborn(NPC, Spawn)
  90. StartAutoMount(Spawn, 969)
  91. SetMount(Spawn, 8211)
  92. end
  93. function GFayToSFM(NPC, Spawn)
  94. StartAutoMount(Spawn, 982)
  95. SetMount(Spawn, 8211)
  96. end
  97. function GFayToTM(NPC, Spawn)
  98. StartAutoMount(Spawn, 981)
  99. SetMount(Spawn, 8211)
  100. end
  101. function TMToGFay(NPC, Spawn)
  102. StartAutoMount(Spawn, 983)
  103. SetMount(Spawn, 8211)
  104. end
  105. function TMToLFay(NPC, Spawn)
  106. StartAutoMount(Spawn, 984)
  107. SetMount(Spawn, 8211)
  108. end
  109. function TMToSomborn(NPC, Spawn)
  110. StartAutoMount(Spawn, 973)
  111. SetMount(Spawn, 8211)
  112. end
  113. function TMToSFM(NPC, Spawn)
  114. StartAutoMount(Spawn, 985)
  115. SetMount(Spawn, 8211)
  116. end
  117. function SFMToGFay(NPC, Spawn)
  118. StartAutoMount(Spawn, 986)
  119. SetMount(Spawn, 8211)
  120. end
  121. function SFMToLFay(NPC, Spawn)
  122. StartAutoMount(Spawn, 987)
  123. SetMount(Spawn, 8211)
  124. end
  125. function SFMToSomborn(NPC, Spawn)
  126. StartAutoMount(Spawn, 976)
  127. SetMount(Spawn, 8211)
  128. end
  129. function SFMToTM(NPC, Spawn)
  130. StartAutoMount(Spawn, 988)
  131. SetMount(Spawn,8211)
  132. end