9
3

dock_fight2.lua 715 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/dock_fight2.lua
  3. Script Purpose : the unarmed 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. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  18. end
  19. function EmoteLoop(NPC)
  20. local choice = math.random(1,3)
  21. if choice == 1 then
  22. PlayFlavor(NPC, "", "", "attack", 0, 0)
  23. elseif choice == 2 then
  24. PlayAnimation(NPC, 11764)
  25. else
  26. PlayAnimation(NPC, 11890)
  27. end
  28. AddTimer(NPC, math.random(1000,5000), "EmoteLoop")
  29. end