Andrespro
New Member
Explanation:
Well, go to data/lib/ folder and search for function.lua, go to the first line and add:
Very simple, very useful
Lua:
-- doTradeItem(cid,olditem,count,newitem,amount)
dotradeitem is used to trade items.
- olditem = Item to be traded
- count = 'olditem' count
- newitem = Item to be given
- amouont = 'newitem' count
-- Examples:
doTradeItem(cid,2160,50,2472,1)
-- Change '50' of '2160' for '1' of '2472'
-- It's useful when you want to trade items with NPC
Well, go to data/lib/ folder and search for function.lua, go to the first line and add:
Lua:
function doTradeItem(cid, olditem, count, newitem, amount)
if getPlayerItemCount(cid, olditem) >= count then
doPlayerRemoveItem(cid, olditem, count)
return (doPlayerAddItem(cid, newitem, amount) and TRUE or FALSE
end
end
Very simple, very useful
Last edited: