function onUse(cid, item, FromPosition, itemEx, toPosition)
[B]local arrows = 20[/B]
[B]local mana = 200[/B]
[B]local posionarrows = 5[/B]
[B]local idpoison = 2545[/B]
if(getPlayerItemCount(cid, item.itemid) >= arrows) then
if(getCreatureMana(cid) >= mana) then
doCreatureAddMana(cid, -mana)
doPlayerRemoveItem(cid, item.itemid, arrows)
doPlayerAddItem(cid, idpoison, poisonarrows)
else
doPlayerSendTextMessage(cid, 22, "Potrzebujesz "..mana..", aby zamienic strzaly na zatrute strzaly!")
return true
end
else
doPlayerSendTextMessage(cid, 22, "Potrzebujesz "..arrows.." strzal, aby je zamienic na zatrute strzaly!")
return true
end
return true
end