aHaoaerandigger.lua 891 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/TimorousDeep/aHaoaerandigger.lua
  3. Script Purpose : a Haoaeran digger
  4. Script Author : John Adams
  5. Script Date : 2009.03.03
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, math.random(2000, 4000), "turn_mine_on")
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. end
  16. function aggro(NPC, Spawn)
  17. chance = math.random(1, 100)
  18. if chance <= 20 then
  19. PlayFlavor(NPC, "voiceover/english/rok_combat_vo/a_spiroc/ft/_exp04/aviak/spiroc_garbled_1988c4de.mp3", "Brawk! Rawk!", "", 200443481, 961836400, Spawn)
  20. end
  21. end
  22. function turn_mine_on(NPC)
  23. SpawnSet(NPC, "visual_state", 10783)
  24. AddTimer(NPC, 1000, "turn_mine_off")
  25. end
  26. function turn_mine_off(NPC)
  27. SpawnSet(NPC, "visual_state", 0)
  28. AddTimer(NPC, math.random(2000, 4000), "turn_mine_on")
  29. end