9
3

dock_fight1.lua 721 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/dock_fight1.lua
  3. Script Purpose : the armed NPC fighting on halas docks
  4. Script Author : theFoof
  5. Script Date : 2013.10.30
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. EmoteLoop(NPC)
  10. SpawnSet(NPC, "emote_state", "16")
  11. SpawnSet(NPC, "action_state", "11420")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  19. end
  20. function EmoteLoop(NPC)
  21. local choice = math.random(1,3)
  22. if choice == 1 then
  23. PlayFlavor(NPC, "", "", "attack", 0, 0)
  24. elseif choice == 2 then
  25. PlayAnimation(NPC, 11764)
  26. else
  27. PlayAnimation(NPC, 11890)
  28. end
  29. AddTimer(NPC, math.random(1000,5000), "EmoteLoop")
  30. end