9
3

aHaoaeranexcavator.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/TimorousDeep/aHaoaeranexcavator.lua
  3. Script Purpose : a Haoaeran excavator
  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. choice = math.random(1, 2)
  20. if choice == 1 then
  21. PlayFlavor(NPC, "voiceover/english/rok_combat_vo/a_spiroc/ft/_exp04/aviak/spiroc_garbled_1988c4de.mp3", "Brawk! Rawk!", "", 200443481, 961836400, Spawn)
  22. elseif choice == 2 then
  23. PlayFlavor(NPC, "voiceover/english/rok_combat_vo/spiroc2/ft/_exp04/aviak/spiroc2_garbled_bfd1be1e.mp3", "Reet! Mock! Terock!", "", 2487641475, 3623989736, Spawn)
  24. end
  25. end
  26. end
  27. function turn_mine_on(NPC)
  28. SpawnSet(NPC, "visual_state", 10783)
  29. AddTimer(NPC, 1000, "turn_mine_off")
  30. end
  31. function turn_mine_off(NPC)
  32. SpawnSet(NPC, "visual_state", 0)
  33. AddTimer(NPC, math.random(2000, 4000), "turn_mine_on")
  34. end