InitiateLoFan.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/InitiateLoFan.lua
  3. Script Author : Rylec
  4. Script Date : 2021.02.10 05:02:11
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 4000, "EmoteLoop")
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. end
  16. function EmoteLoop(NPC)
  17. SpawnSet(NPC, "action_state", 0)
  18. local choice = MakeRandomInt(1,8)
  19. if choice == 1 then
  20. PlayAnimation(NPC, 1181)
  21. AddTimer(NPC, 1300, "Idle")
  22. elseif choice == 2 then
  23. PlayAnimation(NPC, 1201)
  24. AddTimer(NPC, 1300, "Idle")
  25. elseif choice == 3 then
  26. PlayAnimation(NPC, 1284)
  27. AddTimer(NPC, 1550, "Idle")
  28. elseif choice == 4 then
  29. PlayAnimation(NPC, 1286)
  30. AddTimer(NPC, 1300, "Idle")
  31. elseif choice == 5 then
  32. PlayAnimation(NPC, 1287)
  33. AddTimer(NPC, 950, "Idle")
  34. elseif choice == 6 then
  35. PlayAnimation(NPC, 11830)
  36. AddTimer(NPC, 1300, "Idle")
  37. elseif choice == 7 then
  38. PlayAnimation(NPC, 11831)
  39. AddTimer(NPC, 2450, "Idle")
  40. else
  41. PlayAnimation(NPC, 11832)
  42. AddTimer(NPC, 1750, "Idle")
  43. end
  44. end
  45. function Idle(NPC)
  46. PlayAnimation(NPC, 372)
  47. SpawnSet(NPC, "action_state", 372)
  48. local timer = MakeRandomInt(500,2500)
  49. AddTimer(NPC, timer, "EmoteLoop")
  50. end