9
3

InitiateLoFan.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/ElddarGrove/InitiateLoFan.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.09 11:05:18
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SpawnSet(NPC, "action_state", 372)
  10. AddTimer(NPC, math.random(2000,5000), "EmoteLoop")
  11. end
  12. function EmoteLoop(NPC)
  13. SpawnSet(NPC, "action_state", 0)
  14. local choice = MakeRandomInt(1,8)
  15. if choice == 1 then
  16. PlayFlavor(NPC,"","","pugilist_attack")
  17. AddTimer(NPC, 2550, "Idle")
  18. elseif choice == 2 then
  19. PlayFlavor(NPC,"","","pugilist_attack02")
  20. AddTimer(NPC, 3100, "Idle")
  21. elseif choice == 3 then
  22. PlayFlavor(NPC,"","","monk_attack02")
  23. AddTimer(NPC, 3050, "Idle")
  24. elseif choice == 4 then
  25. PlayFlavor(NPC,"","","monk_wild_swing")
  26. AddTimer(NPC, 3100, "Idle")
  27. elseif choice == 5 then
  28. PlayFlavor(NPC,"","","monk_attack01")
  29. AddTimer(NPC, 2450, "Idle")
  30. elseif choice == 6 then
  31. PlayFlavor(NPC,"","","monk_attack")
  32. AddTimer(NPC, 2550, "Idle")
  33. elseif choice == 7 then
  34. PlayFlavor(NPC,"","","monk_attack03")
  35. AddTimer(NPC, 4400, "Idle")
  36. else
  37. PlayFlavor(NPC,"","","pugilist_wild_swing")
  38. AddTimer(NPC, 3300, "Idle")
  39. end
  40. end
  41. function Idle(NPC)
  42. PlayAnimation(NPC, 372)
  43. SpawnSet(NPC, "action_state", 372)
  44. local timer = MakeRandomInt(500,2500)
  45. AddTimer(NPC, timer, "EmoteLoop")
  46. end