KaylieBrianne55217.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : SpawnScripts/Frostfell/KaylieBrianne55217.lua
  3. Script Purpose : Waypoint Path for KaylieBrianne55217.lua
  4. Script Author : Rylec
  5. Script Date : 11-30-2019 03:16:50
  6. Script Notes : Source: Live
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 15, "InRange")
  10. end
  11. function hailed(NPC, Spawn)
  12. Say(NPC, "Watch out! It's slippery!!") --text created by Rylec, not on Live
  13. end
  14. function respawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. SpawnSet(NPC, "action_state", 0)
  18. local rand = math.random(1,2)
  19. if rand==1 then
  20. Say(NPC, "Whoa... whoa... Oh no!!")
  21. end
  22. if rand==2 then
  23. Say(NPC, "Oh no! I can't stay standing... it's too slippery!")
  24. end
  25. PlayAnimation(NPC, 11767)
  26. AddTimer(NPC, 1300, "TimerLyingDown", 1, Spawn)
  27. end
  28. function TimerLyingDown(NPC)
  29. PlayAnimation(NPC, 11769)
  30. AddTimer(NPC, 2400, "TimerGettingUp", 1, Spawn)
  31. end
  32. function TimerGettingUp(NPC)
  33. PlayAnimation(NPC, 11768)
  34. AddTimer(NPC, 2500, "TimerConfused", 1, Spawn)
  35. end
  36. function TimerConfused(NPC)
  37. PlayAnimation(NPC, 11214)
  38. AddTimer(NPC, 1000, "TimerResetState", 1, Spawn)
  39. end
  40. function TimerResetState(NPC)
  41. SpawnSet(NPC, "action_state", 2809)
  42. end