9
3

aMorakdevourer_halfling1584881.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. SpawnSet(NPC, "hp", 30)
  12. SpawnSet(NPC, "power", 15)
  13. EmoteLoop(NPC)
  14. if GetSpawnLocationID(NPC) == 1584881 then
  15. local Halfling = GetSpawnByLocationID(GetZone(NPC), 1584880)
  16. if Halfling == nil then
  17. SpawnByLocationID(GetZone(NPC), 1584880)
  18. else
  19. SpawnSet(Halfling, "show_command_icon", 0)
  20. end
  21. local RescuedHalfling = GetSpawnByLocationID(GetZone(NPC), 1584992)
  22. if RescuedHalfling ~= nil then
  23. Say(Halfling, "Ahhhhhh! I must escape!")
  24. Despawn(RescuedHalfling)
  25. end
  26. end
  27. end
  28. function respawn(NPC)
  29. spawn(NPC)
  30. end
  31. function group_dead(NPC, Spawn)
  32. local Halfling = GetSpawnByLocationID(GetZone(NPC), 1584880)
  33. if Halfling ~= nil then
  34. SpawnSet(Halfling, "show_command_icon", 1)
  35. end
  36. end
  37. function EmoteLoop (NPC)
  38. local timer = math.random(2500,5000)
  39. PlayAnimation(NPC, 10783)
  40. AddTimer(NPC, timer, "EmoteLoop")
  41. end