adeadsoldier.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/adeadsoldier.lua
  3. Script Purpose : a dead soldier
  4. Script Author : Scatman
  5. Script Date : 2009.06.13
  6. Script Notes :
  7. --]]
  8. --local DefiledSoldier = 2530024
  9. local APresenceOfEvil = 131
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "OutOfRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. if HasQuest(Spawn, APresenceOfEvil) and GetQuestStep(Spawn, APresenceOfEvil) == 4 and not (GetTempVariable(NPC, "APresenceOfEvil_Activated") == "True") then
  20. SetStepComplete(Spawn, APresenceOfEvil, 4)
  21. SetTempVariable(NPC, "APresenceOfEvil_Activated", "True")
  22. -- local defiled = SpawnMob(GetZone(NPC), DefiledSoldier, 0, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  23. local defiled = SpawnMob(GetZone(NPC), 2530223, 0, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  24. if defiled ~= nil then
  25. Attack(NPC, Spawn)
  26. end
  27. Despawn(NPC, 2000)
  28. end
  29. end
  30. function OutOfRange(NPC, Spawn)
  31. end