aRyGorrinvader2.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/aRyGorrinvader2.lua
  3. Script Purpose : for the Ry'Gorr invaders
  4. Script Author : theFoof
  5. Script Date : 2013.6.15
  6. Script Notes :
  7. --]]
  8. local NothingWaste = 56
  9. function spawn(NPC)
  10. EmoteLoop(NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. end
  18. function EmoteLoop(NPC)
  19. local choice = math.random(1,4)
  20. local emote
  21. if choice == 1 then
  22. emote = "flex"
  23. elseif choice == 2 then
  24. emote = "stretch"
  25. elseif choice == 3 then
  26. emote = "point"
  27. elseif choice == 4 then
  28. emote = "peer"
  29. end
  30. PlayFlavor(NPC, "", "", emote, 0, 0)
  31. AddTimer(NPC, math.random(15000,45000), "EmoteLoop")
  32. end
  33. function death(NPC, Spawn)
  34. if HasQuest(Spawn, NothingWaste) then
  35. if GetQuestStep(Spawn, NothingWaste) < 4 then
  36. if not QuestStepIsComplete(Spawn, NothingWaste, 1) then
  37. local HelmetChance = math.random(1, 100)
  38. if HelmetChance >= 50 then
  39. AddLootItem(NPC, 11818)
  40. end
  41. end
  42. if not QuestStepIsComplete(Spawn, NothingWaste, 2) then
  43. local ChestguardChance = math.random(1,100)
  44. if ChestguardChance >= 50 then
  45. AddLootItem(NPC, 11817)
  46. end
  47. end
  48. if not QuestStepIsComplete(Spawn, NothingWaste, 3) then
  49. local WarhammerChance = math.random(1,100)
  50. if WarhammerChance >= 50 then
  51. AddLootItem(NPC, 11824)
  52. end
  53. end
  54. end
  55. end
  56. end