View Full Version : XenoBot Bug - Open XenoBot does't sell of items that I'm wearing!
Elizabeth
09-07-2016, 11:12 PM
xxxxxxxxxx
shadowart
09-08-2016, 07:41 AM
It's actually Tibia that does this. Right click on the trade window and you'll be able to change the setting that prevents you from selling your equipment.
Imo the real problem is that Self.ShopGetItemSaleCount() reports your equipment as sellable regardless of your trading settings. Because of this people get stuck in infinite loops whenever they try to sell something that they are also wearing. This can be worked around in lua, but almost no scripts do it.
Elizabeth
09-08-2016, 09:24 AM
It's actually Tibia that does this. Right click on the trade window and you'll be able to change the setting that prevents you from selling your equipment.
Imo the real problem is that Self.ShopGetItemSaleCount() reports your equipment as sellable regardless of your trading settings. Because of this people get stuck in infinite loops whenever they try to sell something that they are also wearing. This can be worked around in lua, but almost no scripts do it.
So, I understand, that nothing can be done with this problem?
The only way out is wearing a different eq? :(
shadowart
09-08-2016, 09:37 AM
If you do want to sell your equipment you just need to change your trade settings. If you don't want to get stuck in a loop you need a better script.
Elizabeth
09-09-2016, 04:22 AM
If you do want to sell your equipment you just need to change your trade settings. If you don't want to get stuck in a loop you need a better script.
I don't want sell my equipment, whether u are in possession of this better script?
Or whether u can create such? :)
shadowart
09-09-2016, 05:20 AM
I'm at work atm, but I've posted it on the forums on several occasions before.
shadowart
09-09-2016, 01:47 PM
Add this to the beginning of your script and it should work (unless you're using someone's encrypted xblua, then you need to contact the creator):
local saleCountWithEq = Self.ShopGetItemSaleCount
function Self.ShopGetItemSaleCount(item)
local id = Item.GetItemIDFromDualInput(item)
local function countInEquipment()
local count = 0
local slots = {Self.Head, Self.Armor, Self.Legs, Self.Feet, Self.Amulet, Self.Weapon, Self.Ring, Self.Shield, Self.Ammo}
for _, slot in ipairs(slots) do
local item = slot()
if item.id == id then
count = count + math.max(item.count, 1)
end
end
return count
end
return saleCountWithEq(id) - countInEquipment()
end
Elizabeth
09-13-2016, 11:16 AM
Add this to the beginning of your script and it should work (unless you're using someone's encrypted xblua, then you need to contact the creator):
local saleCountWithEq = Self.ShopGetItemSaleCount
function Self.ShopGetItemSaleCount(item)
local id = Item.GetItemIDFromDualInput(item)
local function countInEquipment()
local count = 0
local slots = {Self.Head, Self.Armor, Self.Legs, Self.Feet, Self.Amulet, Self.Weapon, Self.Ring, Self.Shield, Self.Ammo}
for _, slot in ipairs(slots) do
local item = slot()
if item.id == id then
count = count + math.max(item.count, 1)
end
end
return count
end
return saleCountWithEq(id) - countInEquipment()
end
Tack sa mycket :)
shadowart
09-13-2016, 03:03 PM
Tack sa mycket :)
Nie ma za co.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.