9
3

TrainingDummy.lua 712 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : TrainingDummy.lua
  3. Script Purpose : An unkillable spawn for you to whack on
  4. Script Author : Jabantiz
  5. Script Date : 7/14/2014
  6. Script Notes : None
  7. --]]
  8. function spawn(NPC)
  9. -- set the calls to the ai to 10 mins as there is no ai
  10. SetBrainTick(NPC, 600000)
  11. SetLuaBrain(NPC)
  12. -- give the spawn a crap load of hp so we can't one hit kill
  13. SetHP(NPC, 1000000)
  14. end
  15. function hailed(NPC, Spawn)
  16. Say(NPC, GetHP(NPC))
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function Think(NPC)
  22. -- no ai so won't attack
  23. return
  24. end
  25. function healthchanged(NPC, Spawn)
  26. -- insta heal so should be impossible to kill without the /kill command
  27. SetHP(NPC, GetMaxHP(NPC))
  28. end