SageXoort.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/SageXoort.lua
  3. Script Purpose : Sage Xoort
  4. Script Author : John Adams
  5. Script Date : 2008.09.23
  6. Updated: Dorbin 2021.01.08
  7. Script Notes : Auto-Generated Conversation from PacketParser Data
  8. --]]
  9. local EMBERS_FOR_XOOT = 333 -- was 57
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, EMBERS_FOR_XOOT)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if math.random(1, 100) <= 75 then
  19. if not HasCompletedQuest(Spawn, EMBERS_FOR_XOOT) then
  20. PlayFlavor(NPC, "voiceover/english/sage_xoort/qey_village06/100_sage_xoort_xoort_first_4b109355.mp3", "Oh to Drunder with this! How will I ever be able to get this thing working?", "frustrated", 3733527937, 3267359953, Spawn)
  21. else
  22. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  23. end
  24. end
  25. end
  26. function LeaveRange(NPC, Spawn)
  27. end
  28. function hailed(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. conversation = CreateConversation()
  31. PlayFlavor(NPC, "voiceover/english/sage_xoort/qey_village06/sagexoort000.mp3", "", "hello", 202647880, 3563931951, Spawn)
  32. --[[
  33. if not HasCompletedQuest(Spawn, EMBERS_FOR_XOOT) then
  34. Begin(NPC, Spawn, conversation)
  35. else
  36. DoneQuests(NPC, Spawn)
  37. end
  38. end
  39. function Begin(NPC, Spawn, conversation)
  40. conversation = CreateConversation()]]--
  41. if not HasQuest(Spawn, EMBERS_FOR_XOOT) and not HasCompletedQuest(Spawn, EMBERS_FOR_XOOT) and GetLevel(Spawn) >= 5 then
  42. AddConversationOption(conversation, "I was just looking at what you were writing there.", "LookingAtWriting")
  43. elseif HasQuest(Spawn, EMBERS_FOR_XOOT) and GetQuestStep(Spawn, EMBERS_FOR_XOOT) == 2 then
  44. AddConversationOption(conversation, "I'm actually the one that's of service here!", "ImOfService")
  45. end
  46. AddConversationOption(conversation, "I'm just looking around, thanks. ")
  47. StartConversation(conversation, NPC, Spawn, "Hello there! How can I be of service?")
  48. end
  49. function LookingAtWriting(NPC, Spawn)
  50. FaceTarget(NPC, Spawn)
  51. conversation = CreateConversation()
  52. PlayFlavor(NPC, "voiceover/english/sage_xoort/qey_village06/sagexoort001.mp3", "", "ponder", 2659791211, 4166741888, Spawn)
  53. AddConversationOption(conversation, "What's wrong with fire as a power source?", "WhatsWrongWithFire")
  54. AddConversationOption(conversation, "I don't know. Good luck with that.")
  55. StartConversation(conversation, NPC, Spawn, "Nothing much, just a schematic I'm working on. I can't find a power source for it ... Oh, Solusek's flame! How in the name of Brell can I make this thing work?")
  56. end
  57. function WhatsWrongWithFire(NPC, Spawn) --missing Voiceover key 002
  58. FaceTarget(NPC, Spawn)
  59. conversation = CreateConversation()
  60. PlayFlavor(NPC, "voiceover/english/sage_xoort/qey_village06/sagexoort002.mp3", "", "no", 0, 0, Spawn)
  61. AddConversationOption(conversation, "I'll get some.", "OfferQuest1")
  62. StartConversation(conversation, NPC, Spawn, "Fire's no good. It doesn't get hot enough or burn long enough. WAIT! HAH! Oh, you're right! I need a special type of coal. You thought of it, so you can fetch it. I need still-burning embers from the forgotten guardians in the Forest Ruins.")
  63. end
  64. function OfferQuest1(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. OfferQuest(NPC, Spawn, EMBERS_FOR_XOOT)
  67. end
  68. function ImOfService(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. conversation = CreateConversation()
  71. PlayFlavor(NPC, "voiceover/english/sage_xoort/qey_village06/sagexoort003.mp3", "", "ponder", 3017924926, 3471986747, Spawn)
  72. AddConversationOption(conversation, "Here you are. ", "HereYouAre")
  73. StartConversation(conversation, NPC, Spawn, "So, you return with the coals ... I hope you didn't get burned! Let me take a look...")
  74. end
  75. function HereYouAre(NPC, Spawn)
  76. SetStepComplete(Spawn, EMBERS_FOR_XOOT, 2)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. PlayFlavor(NPC, "voiceover/english/sage_xoort/qey_village06/sagexoort004.mp3", "", "agree", 4269195696, 625587041, Spawn)
  80. AddConversationOption(conversation, "Thanks, it's appreciated.")
  81. StartConversation(conversation, NPC, Spawn, "Oh yes! These shall work nicely! Tell you what -- take this money for your work. I planned on buying a spell for creating a power source but because of your smart thinking and hard work, I need no spell!")
  82. end
  83. --[[
  84. function DoneQuests(NPC, Spawn)
  85. choice = math.random(1, 2)
  86. if choice == 1 then
  87. PlayFlavor(NPC, "voiceover/english/sage_xoort/qey_village06/100_sage_xoort_xoort_first_4b109355.mp3", "Oh to Drunder with this! How will I ever be able to get this thing working?", "confused", 3733527937, 3267359953, Spawn)
  88. else
  89. Say(NPC, "Oops! Sorry friend! I thought you were someone else. Good day now!")
  90. end
  91. end
  92. ]]--