9
3

CarolynWu.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : SpawnScripts/ElddarGrove/CarolynWu.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.09 11:05:46
  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. PlayFlavor(NPC,"","","bostaff_attack")
  23. AddTimer(NPC, 2100, "Idle")
  24. elseif choice == 2 then
  25. PlayFlavor(NPC,"","","bostaff_attack01")
  26. AddTimer(NPC, 1700, "Idle")
  27. elseif choice == 3 then
  28. PlayFlavor(NPC,"","","bostaff_attack02")
  29. AddTimer(NPC, 2400, "Idle")
  30. elseif choice == 4 then
  31. PlayFlavor(NPC,"","","bostaff_attack03")
  32. AddTimer(NPC, 3200, "Idle")
  33. elseif choice == 5 then
  34. PlayFlavor(NPC,"","","bostaff_kick")
  35. AddTimer(NPC, 3700, "Idle")
  36. elseif choice == 6 then
  37. PlayFlavor(NPC,"","","bostaff_dodge_forehand")
  38. AddTimer(NPC, 1500, "Idle")
  39. else
  40. PlayFlavor(NPC,"","","bostaff_taunt_combat_art")
  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