kennyubuntu
Member
- Joined
- May 20, 2016
- Messages
- 150
- Reaction score
- 13
I'm tryng to when player use this item
Item inside depot, show the options to market based on this script
https://otland.net/threads/offline-player-to-player-item-trader-auction-system.51447/
Someone could help me?
Code:
14:44 You see a depot chest (Vol:30).
ItemID: [2594].
Item inside depot, show the options to market based on this script
https://otland.net/threads/offline-player-to-player-item-trader-auction-system.51447/
Someone could help me?
Code:
[14:41:05.436] [Error - LuaInterface::loadFile] data/actions/scripts/tradeoff_depotchest.lua:18: no loop to break near 'end'
[14:41:05.436] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/tradeoff_depotchest.lua)
[14:41:05.437] data/actions/scripts/tradeoff_depotchest.lua:18: no loop to break near 'end'
Code:
<action itemid="2594" script="tradeoff_depotchest.lua" />
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local result = db.getResult("SELECT * FROM `auction_system` ORDER BY `auction_system`.`id` ASC")
if result:getID() == -1 then
return true
end
local msg = "Trade Offline:\n\n!offer buy, ID\n!offer remove, ID\n!offer add, ItemName, ItemPrice, ItemCount\n\n"
while true do
local id = result:getDataString("id")
local name = getPlayerNameByGUID(result:getDataString("player"))
local item_name = getItemNameById(result:getDataString("item_id"))
local count = result:getDataString("count")
local custo = result:getDataString("cost")/1000
local custo2 = result:getDataString("cost")
if isPlayer(cid) then
msg = ""..msg.."ID : "..id.."\nItem Name : "..item_name.." - Item Count : "..count.." - Item Cust : "..custo.."k("..custo2.."GP) - Dono : "..name.."\n"
end
if not result:next() then
break
end
end
doPlayerPopupFYI(cid, msg) return true
end