9
3

NebbleUnderroot.lua 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/NebbleUnderroot.lua
  3. Script Author : Zcoretri, premierio015(Update)
  4. Script Date : 2015.07.27
  5. Script Purpose : Nebble Unfderroot dialog
  6. Modified Date : 2020.04.03
  7. Modified by : premierio015
  8. Modified Notes : Added correct VoiceOvers and animation
  9. --]]
  10. local count = 1
  11. function spawn(NPC)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. SpawnSet(NPC, "visual_state", 0)
  18. FaceTarget(NPC, Spawn)
  19. math.randomseed(os.time())
  20. local choice = math.random(1,2)
  21. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..choice.."_1040.mp3", "", "", 0, 0, Spawn)
  22. if count == 1 then
  23. PlayAnimation(NPC, "11541")
  24. end
  25. text = math.random(1,3)
  26. if text == 1 then
  27. Say(NPC, "Mmm, triggerfish pie! I can smell it now.")
  28. elseif text == 2 then
  29. Say(NPC, "Shark fin soup! Maybe I'll get lucky.")
  30. else
  31. Say(NPC, "Got any goods for sale from your adventures?")
  32. end
  33. count = count + 1
  34. TimerforFishingRodgone(NPC)
  35. AddTimer(NPC, 30000, "countReset")
  36. end
  37. function TimerforFishingRodgone(NPC)
  38. AddTimer(NPC, 3000, "FishingRodGone", 1, Spawn)
  39. end
  40. function FishingRodGone(NPC)
  41. SetEquipment(NPC, 0, 0)
  42. AddTimer(NPC, 45000, "FishingCast", 1, Spawn)
  43. end
  44. function FishingCast(NPC)
  45. PlayAnimation(NPC, 11539)
  46. AddTimer(NPC, 1000, "FishingRodAppear", 1, Spawn)
  47. end
  48. function FishingRodAppear(NPC)
  49. SetEquipment(NPC, 0, 1635, 255, 255, 255, 255, 255, 255)
  50. AddTimer(NPC, 3000, "ResetState", 1, Spawn)
  51. end
  52. function ResetState(NPC)
  53. SpawnSet(NPC, "visual_state", 11540)
  54. end
  55. function countReset(NPC)
  56. count = 1
  57. end