9
3

adefiledpriest.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/SourceEvil/adefiledpriest.lua
  3. Script Author : Lemmeron
  4. Script Date : 2020.08.16
  5. Script Purpose : To test scripts and get these priests to heal and assist Vith L'Tar once summoned by him
  6. :
  7. --]]
  8. local VithID = 2540005
  9. local Priest1loc = 433225
  10. local Priest2loc = 433226
  11. local zoneID = 254
  12. function spawn(NPC)
  13. local WhichOne = GetSpawnLocationID(NPC)
  14. local Vith = GetSpawn(NPC, VithID)
  15. if Vith ~= nil then
  16. if WhichOne == Priest1loc then
  17. AddTimer(NPC, 10000, "healVith", 1, Vith) --will add more heals and behavior
  18. elseif WhichOne == Priest2loc then
  19. AddTimer(NPC, 20000, "healVith2", 1, Vith) --will add more heals and behavior
  20. end
  21. else
  22. Say(NPC, "Vith not found!") -- error test
  23. end
  24. end
  25. function healVith(NPC, Vith)
  26. if IsAlive(Vith) then
  27. Say(NPC, "heal as priest 1") -- will change what it says when heals working
  28. CastSpell(Vith, 400145, 1, NPC) --test spell using quickstrike 400145 instead of a heal
  29. else
  30. Say(NPC, "not my turn as p2") -- error test
  31. end
  32. end
  33. function healVith2(NPC, Vith)
  34. if IsAlive(Vith) then
  35. Say(NPC, "heal as priest 2") -- will change what it says when heals working
  36. CastSpell(Vith, 90044, 1, NPC) --test spell using painbringer 90044 instead of a heal
  37. else
  38. Say(NPC, "not my turn as p1") -- error test
  39. end
  40. end