aRyGorrinvader.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/aRyGorrinvader.lua
  3. Script Purpose : for the Ry'Gorr invaders
  4. Script Author : theFoof
  5. Script Date : 2013.6.15
  6. Script Notes :
  7. --]]
  8. require"SpawnScripts/Generic/random_pattern_small"
  9. local NothingWaste = 56
  10. function spawn(NPC)
  11. ChooseMovement(NPC)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. end
  19. function death(NPC, Spawn)
  20. if HasQuest(Spawn, NothingWaste) then
  21. if GetQuestStep(Spawn, NothingWaste) < 4 then
  22. if not QuestStepIsComplete(Spawn, NothingWaste, 1) then
  23. local HelmetChance = math.random(1, 100)
  24. if HelmetChance >= 50 then
  25. AddLootItem(NPC, 11818)
  26. end
  27. end
  28. if not QuestStepIsComplete(Spawn, NothingWaste, 2) then
  29. local ChestguardChance = math.random(1,100)
  30. if ChestguardChance >= 50 then
  31. AddLootItem(NPC, 11817)
  32. end
  33. end
  34. if not QuestStepIsComplete(Spawn, NothingWaste, 3) then
  35. local WarhammerChance = math.random(1,100)
  36. if WarhammerChance >= 50 then
  37. AddLootItem(NPC, 11824)
  38. end
  39. end
  40. end
  41. end
  42. end