aShinReeavenger.lua 1022 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/aShinReeavenger.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.11 09:05:13
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/NPCModule"
  9. local TheSkeletonKey = 411
  10. local blood_stained_finger_bones = 331128
  11. function spawn(NPC, Spawn)
  12. NPCModule(NPC, Spawn)
  13. RandomMovement(NPC, Spawn, 12, -12, 2, 8, 15)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. PlayAnimation(NPC, 18)
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function death(NPC, Spawn)
  23. local chance = MakeRandomInt(1, 100)
  24. if chance >= 50 then
  25. if HasQuest(Spawn, TheSkeletonKey) then
  26. local zone = GetZone(Spawn)
  27. local X = GetX(NPC)
  28. local Y = GetY(NPC)
  29. local Z = GetZ(NPC)
  30. local BloodStainedFingerBones = SpawnMob(zone, blood_stained_finger_bones , true, X, Y, Z, 49.56)
  31. if BloodStainedFingerBones ~= nil then
  32. AddSpawnAccess(BloodStainedFingerBones, Spawn)
  33. end
  34. end
  35. end
  36. end