function onUse(cid, item, frompos, item2, topos)
local ruina = 9299
local sciana = 9132
local wsp = {x=150, y=56, z=7, stackpos=1}
local wsp2 = {x=150, y=56, z=8, stackpos=1}
function resp()
local wallPos ={x=150, y=56, z=7, stackpos=2}
doSendAnimatedText(wallPos, "!?", TEXTCOLOR_YELLOW)
end
if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if (item2.aid == 23241) then
if math.random(1, 100) <= 70 then
doPlayerSendTextMessage(cid, 22, "Udalo ci sie czesciowo rozbic sciane")
doTransformItem(item2.uid, ruina)
doSendMagicEffect(getCreaturePosition(cid), 4)
else
doPlayerSendTextMessage(cid, 22, "Nieudalo ci sie rozbic sciany")
end
end
if (item2.aid == 23241) then
if (item2.itemid == ruina) then
if (item.itemid == 2398) then
if math.random(1,100) <= 60 then
doPlayerSendTextMessage(cid, 22, "Udalo ci sie rozbic sciane")
doSendMagicEffect(getCreaturePosition(cid), 4)
doRemoveItem(item2.uid, 1)
addEvent(resp, 10*1000)
doTileAddItemEx(wsp, uid)
else
doPlayerSendTextMessage(cid, 22, "Nieudalo ci sie rozbic sciany")
end
end
end
end
return TRUE
end