SplorpyQuagmarr_(lost).lua 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/SplorpyQuagmarr_(lost).lua
  3. Script Purpose : Splorpy Quagmarr lost during the quest Little LostFroglok
  4. Script Author : theFoof
  5. Script Date : 2013.05.21
  6. Script Notes :
  7. --]]
  8. local LostFroglok = 26
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  11. AddSpawnAccess(NPC, NPC)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. conversation = CreateConversation()
  19. if GetQuestStep(Spawn, LostFroglok) == 2 then
  20. PlayFlavor(NPC, "splorpy_quagmarr/halas/gwenevyns_cove/splorpy_quagmarr/splorpy_quagmarr_001.mp3", "", "", 3711049527, 3895860763, Spawn)
  21. AddConversationOption(conversation, "Splorpy! It's me, " .. GetName(Spawn) .. ". I'm a friend of your dad's.", "Quest1Chat_1")
  22. StartConversation(conversation, NPC, Spawn, "Hello? Who's there?")
  23. end
  24. end
  25. function Quest1Chat_1(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. conversation = CreateConversation()
  28. PlayFlavor(NPC, "splorpy_quagmarr/halas/gwenevyns_cove/splorpy_quagmarr/splorpy_quagmarr_002.mp3", "", "", 4266619341, 398836584, Spawn)
  29. AddConversationOption(conversation, "That I did. How did you get out here?", "Quest1Chat_2")
  30. StartConversation(conversation, NPC, Spawn, "I remember you! You killed the bad bears!")
  31. end
  32. function Quest1Chat_2(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. conversation = CreateConversation()
  35. PlayFlavor(NPC, "splorpy_quagmarr/halas/gwenevyns_cove/splorpy_quagmarr/splorpy_quagmarr_003.mp3", "", "", 3146179411, 3806044983, Spawn)
  36. AddConversationOption(conversation, "You were frightened by a barbarian?", "Quest1Chat_3")
  37. StartConversation(conversation, NPC, Spawn, "I was playing hide and seek with the other kids when a huge man jumped out at us! We screamed and I hopped away as fast as I could!")
  38. end
  39. function Quest1Chat_3(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. conversation = CreateConversation()
  42. PlayFlavor(NPC, "splorpy_quagmarr/halas/gwenevyns_cove/splorpy_quagmarr/splorpy_quagmarr_004.mp3", "", "", 2435575866, 3227047552, Spawn)
  43. AddConversationOption(conversation, "Well, I'm here to take you back to your dad. I think we should get going before you get any colder.", "Quest1Chat_4")
  44. StartConversation(conversation, NPC, Spawn, "No, " .. GetName(Spawn) .. "! His whole body was a beard! I know what a barbarian looks like and this was not a barbarian.")
  45. end
  46. function Quest1Chat_4(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. PlayFlavor(NPC, "splorpy_quagmarr/halas/gwenevyns_cove/splorpy_quagmarr/splorpy_quagmarr_005.mp3", "", "", 3060792386, 2313305125, Spawn)
  50. AddConversationOption(conversation, "Maybe.", "FollowPlayer")
  51. StartConversation(conversation, NPC, Spawn, "Okay! Maybe dad will have some hot stew ready!")
  52. end
  53. function FollowPlayer(NPC, Spawn)
  54. SetStepComplete(Spawn, LostFroglok, 2)
  55. RemoveSpawnAccess(NPC, Spawn)
  56. local pet = SpawnMob(GetZone(NPC), 4701835, 0, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  57. SetTempVariable(Spawn, "splorp", pet)
  58. SetFollowTarget(pet, Spawn)
  59. ToggleFollow(pet)
  60. end
  61. function SpawnAccess(NPC, Spawn)
  62. if GetQuestStep(Spawn, LostFroglok) == 2 then
  63. AddSpawnAccess(NPC, Spawn)
  64. end
  65. end