• 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!

Market INGAME 8.60 - is possible?

kennyubuntu

Member
Joined
May 20, 2016
Messages
150
Reaction score
13
My ideia is make a market in game manageable in a 8.60 server

This item like market open:
latest

Code:
14:44 You see a depot chest (Vol:30).
ItemID: [2594].

With this system:
https://otland.net/threads/offline-player-to-player-item-trader-auction-system.51447/
14wmrl.png


When player click on depot chest
latest

Show to him a menu like this:
Screenshot6_zpsnhyekqav.png


This menu will show selecters like: armors, legs
after other menu armors -> dragon scale mail

And show all dragon scale mail's offers like this script
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
  local result = db.getResult("SELECT * FROM `auction_system` ORDER BY `auction_system`.`id` ASC")

  local msg = "Market:\n\n/market buy, ID\n/market remove, ID\n/market add, ItemName, ItemPrice, ItemCount\n\n"
  if(result:getID() ~= -1) then
  repeat
  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
  until not result:next()
  result:free()
  end
  doPlayerPopupFYI(cid, msg) return true
end

It's possible?
Like a market (trade off) to OTs 8.60
What i need to search
If you would know or would this system too, pls comment here to pro otland members show the way to us, if i can make i will post here
Every 8.6 OTs should use it '-'
I'm using 0.4
 
You can create a market in your website :D
using the player-depot-items
player-inbox-item

How to change AddItem to AddItemInbox?

Code:
if(isItemStackable(delete:getDataString("item_id"))) then
  doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count"))
else
  for i = 1, delete:getDataInt("count") do
  doPlayerAddItem(cid, delete:getDataString("item_id"), 1)
  end
end

Code:
if(isItemStackable((buy:getDataString("item_id")))) then
  doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count"))
else
  for i = 1, buy:getDataInt("count") do
  doPlayerAddItem(cid, buy:getDataString("item_id"), 1)
  end
end
 
You can create a market in your website :D
using the player-depot-items
player-inbox-item


How to change AddItem to AddItemInbox?

Code:
if(isItemStackable(delete:getDataString("item_id"))) then
  doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count"))
else
  for i = 1, delete:getDataInt("count") do
  doPlayerAddItem(cid, delete:getDataString("item_id"), 1)
  end
end

Code:
if(isItemStackable((buy:getDataString("item_id")))) then
  doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count"))
else
  for i = 1, buy:getDataInt("count") do
  doPlayerAddItem(cid, buy:getDataString("item_id"), 1)
  end
end


Good ideia, i want it too
 
Back
Top