aMorakdevourer_halfling.lua 878 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/aMorakdevourer_halfling.lua
  3. Script Purpose : a Morak devourer
  4. Script Author : Scatman
  5. Script Date : 2009.05.14
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. if GetSpawnLocationID(NPC) == 1584881 then
  10. local Halfling = GetSpawnByLocationID(GetZone(NPC), 1584880)
  11. if Halfling == nil then
  12. SpawnByLocationID(GetZone(NPC), 1584880)
  13. else
  14. SpawnSet(Halfling, "show_command_icon", 0)
  15. end
  16. local RescuedHalfling = GetSpawnByLocationID(GetZone(NPC), 1584992)
  17. if RescuedHalfling ~= nil then
  18. Say(Halfling, "Ahhhhhh! I must escape!")
  19. Despawn(RescuedHalfling)
  20. end
  21. end
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end
  26. function group_dead(NPC, Spawn)
  27. local Halfling = GetSpawnByLocationID(GetZone(NPC), 1584880)
  28. if Halfling ~= nil then
  29. SpawnSet(Halfling, "show_command_icon", 1)
  30. end
  31. end