9
3

ToppaDoppster.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst/ToppaDoppster.lua
  3. Script Purpose : Toppa Doppster
  4. Script Author : Scatman
  5. Script Date : 2009.09.19
  6. Updated by :ememjr
  7. Updated Date :2017.05.04
  8. Update NOtes : updated quest number
  9. Script Notes :
  10. --]]
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, 231)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. conversation = CreateConversation()
  17. RandomGreeting(NPC, Spawn)
  18. if HasCompletedQuest(Spawn, 231) then
  19. Say(NPC, "You'll be a hero among my friends!")
  20. elseif HasQuest(Spawn, 231) then
  21. if GetQuestStep(Spawn, 231) == 1 then
  22. AddConversationOption(conversation, "Not yet.")
  23. elseif GetQuestStep(Spawn, 231) == 2 then
  24. AddConversationOption(conversation, "Yes, here it is.", "YesHereItIs")
  25. end
  26. StartConversation(conversation, NPC, Spawn, "Did you get the glowmyst juice?")
  27. else
  28. AddConversationOption(conversation, "What do you need?", "WhatDoYouNeed")
  29. AddConversationOption(conversation, "Sorry, not now.")
  30. StartConversation(conversation, NPC, Spawn, "You there! Do you think you can help me?")
  31. end
  32. end
  33. function RandomGreeting(NPC, Spawn)
  34. choice = math.random(1, 3)
  35. if choice == 1 then
  36. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1005.mp3", "", "", 0, 0, Spawn)
  37. elseif choice == 2 then
  38. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1005.mp3", "", "", 0, 0, Spawn)
  39. elseif choice == 3 then
  40. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1005.mp3", "", "", 0, 0, Spawn)
  41. end
  42. end
  43. function respawn(NPC)
  44. spawn(NPC)
  45. end
  46. ------------------------------------------------------------------------------------------------------------
  47. -- QUEST 1
  48. ------------------------------------------------------------------------------------------------------------
  49. function WhatDoYouNeed(NPC, Spawn)
  50. conversation = CreateConversation()
  51. AddConversationOption(conversation, "But what?", "ButWhat")
  52. StartConversation(conversation, NPC, Spawn, "My friends sent me out to collect some glowmyst juice from the beetles here in Oakmyst. You see, we're trying to start our own tavern and we're working on our craft. I was sent out here to collect some glowmyst juice, but...")
  53. end
  54. function ButWhat(NPC, Spawn)
  55. conversation = CreateConversation()
  56. AddConversationOption(conversation, "I could get the juice for you.", "ICouldGetJuice")
  57. AddConversationOption(conversation, "Good luck figuring it out.")
  58. StartConversation(conversation, NPC, Spawn, "These bugs are so disgusting! I can't stand touching them. Don't even get me started on extracting their fluid sacs.")
  59. end
  60. function ICouldGetJuice(NPC, Spawn)
  61. conversation = CreateConversation()
  62. AddConversationOption(conversation, "I'll be right back with them.", "OfferQuest1")
  63. StartConversation(conversation, NPC, Spawn, "Would you? That would be wonderful! I need ten glowmyst fluid sacs.")
  64. end
  65. function YesHereItIs(NPC, Spawn)
  66. SetStepComplete(Spawn, 231, 2)
  67. conversation = CreateConversation()
  68. AddConversationOption(conversation, "Glad to hear it!")
  69. StartConversation(conversation, NPC, Spawn, "Wonderful! Thank you so much! My friends will be pleased!")
  70. end
  71. function OfferQuest1(NPC, Spawn)
  72. OfferQuest(NPC, Spawn, 231)
  73. end