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

Zero cost at shops

Dangnoob

Member
Joined
Jun 8, 2008
Messages
105
Solutions
2
Reaction score
12
Anybody know how to make it cost 0 gold in a shop? When u say trade to the npc, the trade window pops up, but if the item is at zero gold, it doesnt even show it. If i change it to 1 gold, it will show up. But obviously im looking for it to cost zero.
 
Solution
It actually was nothing with the server. Was due to OTClient not showing them if it was 0 gold.

For anybody curious, this is the change i made. instead of > 0, i just made it >= 0
Lua:
  for key,item in pairs(items) do
    if item[4] >= 0 then
      local newItem = {}
      newItem.ptr = item[1]
      newItem.name = item[2]
      newItem.weight = item[3] / 100
      newItem.price = item[4]
      table.insert(tradeItems[BUY], newItem)
    end

    if item[5] >= 0 then
      local newItem = {}
      newItem.ptr = item[1]
      newItem.name = item[2]
      newItem.weight = item[3] / 100
      newItem.price = item[5]
      table.insert(tradeItems[SELL], newItem)
    end
  end
It actually was nothing with the server. Was due to OTClient not showing them if it was 0 gold.

For anybody curious, this is the change i made. instead of > 0, i just made it >= 0
Lua:
  for key,item in pairs(items) do
    if item[4] >= 0 then
      local newItem = {}
      newItem.ptr = item[1]
      newItem.name = item[2]
      newItem.weight = item[3] / 100
      newItem.price = item[4]
      table.insert(tradeItems[BUY], newItem)
    end

    if item[5] >= 0 then
      local newItem = {}
      newItem.ptr = item[1]
      newItem.name = item[2]
      newItem.weight = item[3] / 100
      newItem.price = item[5]
      table.insert(tradeItems[SELL], newItem)
    end
  end
 
Last edited by a moderator:
Solution
Back
Top