local c = {
['item'] = 2565,
['cost'] = 200 * 10000,
[1945] = 1946, -- lever
[1946] = 1945, -- lever
uniqueID = 4819
}
local leverBuy = Action()
function leverBuy.onUse(player, item, fromPosition, itemEx, toPosition)
local cid = player:getId()
if doPlayerRemoveMoney(cid, c.cost) then
doPlayerAddItem(cid, c.item, 1)
doPlayerSendTextMessage(cid, 25,"You bought an item for ".. c.cost .." gold")
else
doPlayerSendCancel(cid, "You do not have enough money!")
end
item:transform(c[item.itemid])
return true
end
leverBuy:uid(c.uniqueID)
leverBuy:register()
Testa ai, não testei.