he needs it to check that the competitor has a cap
Lua:
local Cost = 80000
local RuneId = 2268
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, Cost) == 1 then
backpack = doPlayerAddItem(cid, 5927, 1)
for i = 1, 8 do
doAddContainerItem(backpack, RuneId, 100)
end
else
doPlayerSendCancel(cid, 'You don\'t have enough money .')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return 1
end