SageXoort.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. -- Quest ID's
  9. local EMBERS_FOR_XOOT = 333 -- was 57
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, EMBERS_FOR_XOOT)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. conversation = CreateConversation()
  19. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1006.mp3", "", "", 0, 0, Spawn)
  20. if not HasCompletedQuest(Spawn, EMBERS_FOR_XOOT) then
  21. Begin(NPC, Spawn, conversation)
  22. else
  23. DoneQuests(NPC, Spawn)
  24. end
  25. end
  26. function Begin(NPC, Spawn, conversation)
  27. if not HasQuest(Spawn, EMBERS_FOR_XOOT) and not HasCompletedQuest(Spawn, EMBERS_FOR_XOOT) and GetLevel(Spawn) >= 5 then
  28. AddConversationOption(conversation, "I was just looking at what you were writing there.", "LookingAtWriting")
  29. elseif HasQuest(Spawn, EMBERS_FOR_XOOT) and GetQuestStep(Spawn, EMBERS_FOR_XOOT) == 2 then
  30. AddConversationOption(conversation, "I'm actually the one that's of service here!", "ImOfService")
  31. end
  32. AddConversationOption(conversation, "I'm just looking around, thanks. ")
  33. StartConversation(conversation, NPC, Spawn, "Hello there! How can I be of service?")
  34. end
  35. function LookingAtWriting(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. conversation = CreateConversation()
  38. AddConversationOption(conversation, "What's wrong with fire as a power source?", "WhatsWrongWithFire")
  39. AddConversationOption(conversation, "I don't know. Good luck with that.")
  40. 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?")
  41. end
  42. function WhatsWrongWithFire(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. conversation = CreateConversation()
  45. AddConversationOption(conversation, "I'll get some.", "OfferQuest1")
  46. 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.")
  47. end
  48. function OfferQuest1(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. OfferQuest(NPC, Spawn, EMBERS_FOR_XOOT)
  51. end
  52. function ImOfService(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. AddConversationOption(conversation, "Here you are. ", "HereYouAre")
  56. StartConversation(conversation, NPC, Spawn, "So, you return with the coals ... I hope you didn't get burned! Let me take a look...")
  57. end
  58. function HereYouAre(NPC, Spawn)
  59. SetStepComplete(Spawn, EMBERS_FOR_XOOT, 2)
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. AddConversationOption(conversation, "Thanks, it's appreciated.")
  63. 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!")
  64. end
  65. function DoneQuests(NPC, Spawn)
  66. choice = math.random(1, 2)
  67. if choice == 1 then
  68. PlayFlavor(NPC, "", "Oh to Drunder with this! How will I ever be able to get this thing working?", "frustrated", 1689589577, 4560189, Spawn)
  69. else
  70. Say(NPC, "Oops! Sorry friend! I thought you were someone else. Good day now!")
  71. end
  72. end