9
3

RyGorrExplosiveMiningBarrel.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : ItemScripts/RyGorrExplosiveMiningBarrel.lua
  3. Script Purpose : for the item "Ry'Gorr Explosive Mining Barrel"
  4. Script Author : theFoof
  5. Script Date : 2013.6.12
  6. Script Notes :
  7. --]]
  8. local RyGorrOperations = 60
  9. function used(Item, Player)
  10. if GetQuestStep(Player, RyGorrOperations) == 1 then
  11. if GetZoneID(GetZone(Player)) == 470 then
  12. local X = GetX(Player)
  13. local Y = GetY(Player)
  14. local Z = GetZ(Player)
  15. if X > -20.27 and X < -10.27 then
  16. if Y < -60 then
  17. if Z > 150.07 and Z < 160.07 then
  18. local barrel = SpawnByLocationID(GetZone(Player), 33980)
  19. AddSpawnAccess(barrel, Player)
  20. SetTempVariable(barrel, "player", Player)
  21. RemoveItem(Player, 47881)
  22. else
  23. SendMessage(Player, "You cannot place the Ry'Gorr Explosive Mining Barrel here.", "yellow")
  24. end
  25. else
  26. SendMessage(Player, "You cannot place the Ry'Gorr Explosive Mining Barrel here.", "yellow")
  27. end
  28. else
  29. SendMessage(Player, "You cannot place the Ry'Gorr Explosive Mining Barrel here.", "yellow")
  30. end
  31. else
  32. SendMessage(Player, "You cannot place the Ry'Gorr Explosive Mining Barrel here.", "yellow")
  33. end
  34. end
  35. end