local X
local Y
local Z
local O
function ThingLoot_onUse (pUnit, Event, pMisc, player)
if player:HasFinishedQuest(900022) == true or player:HasFinishedQuest(900024) == true then
Choice=math.random(1, 100)
if Choice >= 1 and Choice <= 20 then
X = pMisc:GetX()
Y = pMisc:GetY()
Z = pMisc:GetZ()
O = pMisc:GetO()
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:SpawnCreature(900181, x, y, z, o, 100, 180000, 0, 0, 0)
pMisc:RegisterEvent("Respawn", 370000, 0)
pMisc

espawn()
else
pMisc:AddItem(player, 13872, 1)
else
player:GetMoney()
end
end
end
function Respawn (pUnit, Event, pMisc)
SpawnGameObject(176793, x, y, z, o, 999999999, 1)
RegisterGameObjectEvent (176793 ,4, "ThingLoot_onUse")