CarolynWu.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/CarolynWu.lua
  3. Script Author : Rylec
  4. Script Date : 2021.02.19 12:02:32
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SpawnSet(NPC, "mood_state", 11852)
  10. SpawnSet(NPC, "visual_state", "11420")
  11. AddTimer(NPC, 4000, "EmoteLoop")
  12. end
  13. function hailed(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function EmoteLoop(NPC)
  19. SpawnSet(NPC, "action_state", 0)
  20. local choice = MakeRandomInt(1,10)
  21. if choice == 1 then
  22. PlayAnimation(NPC, 1966)
  23. AddTimer(NPC, 2100, "Idle")
  24. elseif choice == 2 then
  25. PlayAnimation(NPC, 1967)
  26. AddTimer(NPC, 1700, "Idle")
  27. elseif choice == 3 then
  28. PlayAnimation(NPC, 1968)
  29. AddTimer(NPC, 2400, "Idle")
  30. elseif choice == 4 then
  31. PlayAnimation(NPC, 1969)
  32. AddTimer(NPC, 3200, "Idle")
  33. elseif choice == 5 then
  34. PlayAnimation(NPC, 2953)
  35. AddTimer(NPC, 3700, "Idle")
  36. elseif choice == 6 then
  37. PlayAnimation(NPC, 10868)
  38. AddTimer(NPC, 1500, "Idle")
  39. else
  40. PlayAnimation(NPC, 10889)
  41. AddTimer(NPC, 3500, "Idle")
  42. end
  43. end
  44. function Idle(NPC)
  45. PlayAnimation(NPC, 101)
  46. SpawnSet(NPC, "action_state", 101)
  47. local timer = MakeRandomInt(500,1400)
  48. AddTimer(NPC, timer, "EmoteLoop")
  49. end