JerbenSleepwell.lua 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/JerbenSleepwell.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.09.25 10:09:46
  5. Script Purpose : Dialogues for quest "Batwing Crunchies for Jerben", this script is only for Qeynos Combined version of this NPC.
  6. :
  7. --]]
  8. local BatwingCrunchiesforJerben = 5364
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, BatwingCrunchiesforJerben)
  11. SetPlayerProximityFunction(NPC, 10, "InRange")
  12. end
  13. function InRange(NPC, Spawn)
  14. if not HasQuest(Spawn, BatwingCrunchiesforJerben) then
  15. PlayFlavor(NPC, "voiceover/english/innkeeper_jerben_sleepwell/qey_village02/100_innkeeper_callout_ce8f52eb.mp3", "It's been so long since I've had one of my wife's special desserts! I want some crunchies! Will you help me get more crunchies?", "frustrated", 943990017, 651455380, Spawn)
  16. end
  17. end
  18. function hailed(NPC, Spawn)
  19. FaceTarget(NPC, Spawn)
  20. local conversation = CreateConversation()
  21. if not HasQuest(Spawn, BatwingCrunchiesforJerben) and not HasCompletedQuest(Spawn, BatwingCrunchiesforJerben) then
  22. PlayFlavor(NPC, "jerben_sleepwell/qey_village02/jerbensleepwell003.mp3", "", "hail", 2393164093, 2811776206, Spawn)
  23. AddConversationOption(conversation, "What were you just asking? Something about \"crunchies?\"", "Option1")
  24. StartConversation(conversation, NPC, Spawn, "Hello fellow patron!")
  25. elseif GetQuestStep(Spawn, BatwingCrunchiesforJerben) == 1 then
  26. PlayFlavor(NPC, "", "Ooh...I can't wait for some crunchies!", "manipulate", 1689589577, 4560189, Spawn)
  27. elseif GetQuestStep(Spawn, BatwingCrunchiesforJerben) == 2 then
  28. PlayFlavor(NPC, "voiceover/english/innkeeper_jerben_sleepwell/qey_village02/jerbensleepwell.mp3", "", "wink", 2091561802, 1214350847, Spawn)
  29. AddConversationOption(conversation, "I've returned with the wings you needed, but they don't look very tasty.", "Option3")
  30. AddConversationOption(conversation, "I'll keep that in mind...")
  31. StartConversation(conversation, NPC, Spawn, "If you've come to relax after a long journey, you've come to the right place!")
  32. elseif HasCompletedQuest(Spawn, BatwingCrunchiesforJerben) then
  33. PlayFlavor(NPC, "", "Thanks for the wings. They'll make the perfect crunchies!", "thanks", 1689589577, 4560189, Spawn)
  34. end
  35. end
  36. function Option1(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. local conversation = CreateConversation()
  39. PlayFlavor(NPC, "jerben_sleepwell/qey_village02/jerbensleepwell000.mp3", "", "pout", 811958962, 3230656855, Spawn)
  40. AddConversationOption(conversation, "I think I could help you out there.", "Option2")
  41. AddConversationOption(conversation, "Gee, that's a shame.")
  42. StartConversation(conversation, NPC, Spawn, "Oh, I was just reminiscing about how my lovely wife would bake white batwing crunchies--everyone loved those crunchy treats, but we've run out of albino batwings to make them.")
  43. end
  44. function Option2(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. local conversation = CreateConversation()
  47. PlayFlavor(NPC, "voiceover/english/innkeeper_jerben_sleepwell/qey_village02/jerbensleepwell001.mp3", "", "", 4196072373, 1311386681, Spawn)
  48. AddConversationOption(conversation, "I'll see what I can do.", "offer")
  49. StartConversation(conversation, NPC, Spawn, "Really? You'd help me, friend? That's wonderful. I've not had the crunchies in so long; I forget what they taste like. You'll find the albino bats living in the caves near here. Bring back several wings and I'll be forever in your debt.")
  50. end
  51. function Option3(NPC, Spawn)
  52. SetStepComplete(Spawn, BatwingCrunchiesforJerben, 2)
  53. FaceTarget(NPC, Spawn)
  54. local conversation = CreateConversation()
  55. PlayFlavor(NPC, "voiceover/english/innkeeper_jerben_sleepwell/qey_village02/jerbensleepwell002.mp3", "", "cheer", 3830347004, 2175613137, Spawn)
  56. AddConversationOption(conversation, "Hey, a little coin is always appreciated. Thanks!")
  57. StartConversation(conversation, NPC, Spawn, "Oh, this is wonderful! Really, these were my favorite treats as a child, so they bring back fond memories. I'm forever indebted to you. Please let me pay you a few coins for your trouble.")
  58. end
  59. function offer(NPC, Spawn)
  60. OfferQuest(NPC, Spawn, BatwingCrunchiesforJerben)
  61. end
  62. function respawn(NPC)
  63. spawn(NPC)
  64. end