• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Click-And-Buy system..

alc95

New Member
Joined
Feb 20, 2009
Messages
10
Reaction score
0
Can someone give me a click-and-buy system because i have been looking in here and in otfans and i just found by backpack.. i have one pretty easy to use but it works with backpacks can someone help me or fix the script?

like this
PHP:
--Advanced container lever ( By Pitufo)
local items = {
[3456] = {itemId=7620, contMax=10, bp=2000, cost=2000, charges=15},
}
function onUse(cid, item, frompos, item2, topos)
if items[item.uid] then
if item.itemid == 1946 then
local v = items[item.uid]
if getPlayerFreeCap(cid) >= getItemWeightById(v.itemId, 20) then
if doPlayerRemoveMoney(cid, v.cost) == TRUE then
container = doPlayerAddItem(cid, v.bp, 1)
for i = 1, v.contMax do
if not(isItemRune(v.itemId)) then
doAddContainerItem(container, v.itemId, 1)
else
doAddContainerItem(container, v.itemId, v.charges)
end
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have but a container with "..getItemNameById(v.itemId)..".")
else
doPlayerSendCancel(cid, "Sorry, not enough money [Cost: "..v.cost.."].")
end
else
doPlayerSendCancel(cid, "Not enough cap [Cap needed: "..getItemWeightById(v.itemId, 20).."].")
end
doTransformItem(item.uid, item.itemid-1)
elseif item.itemid == 1945 then
doTransformItem(item.uid, item.itemid+1)
end
end
return 1
end

thank you :cool:
 
Back
Top