aMorakdevourer_halfling133769483.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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) == 133769483 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