9
3

aMorakdevourer_halfling133769476.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/aMorakdevourer_halfling.lua
  3. Script Purpose : a Morak devourer
  4. Script Author : Scatman, Playflavor by premierio015
  5. Script Date : 2009.05.14
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SpawnSet(NPC, "level", "3")
  10. SpawnSet(NPC, "difficulty", "2")
  11. EmoteLoop(NPC)
  12. if GetSpawnLocationID(NPC) == 133769476 then
  13. local Halfling = GetSpawnByLocationID(GetZone(NPC), 1584880)
  14. if Halfling == nil then
  15. SpawnByLocationID(GetZone(NPC), 1584880)
  16. else
  17. SpawnSet(Halfling, "show_command_icon", 0)
  18. end
  19. local RescuedHalfling = GetSpawnByLocationID(GetZone(NPC), 1584992)
  20. if RescuedHalfling ~= nil then
  21. Say(Halfling, "Ahhhhhh! I must escape!")
  22. Despawn(RescuedHalfling)
  23. end
  24. end
  25. end
  26. function respawn(NPC)
  27. spawn(NPC)
  28. end
  29. function group_dead(NPC, Spawn)
  30. local Halfling = GetSpawnByLocationID(GetZone(NPC), 1584880)
  31. if Halfling ~= nil then
  32. SpawnSet(Halfling, "show_command_icon", 1)
  33. end
  34. end
  35. function EmoteLoop (NPC)
  36. local timer = math.random(2500,5000)
  37. PlayAnimation(NPC, 10783)
  38. AddTimer(NPC, timer, "EmoteLoop")
  39. end