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

otx imbuements bug

zerghel

Tsuni
Joined
Jul 1, 2008
Messages
299
Reaction score
9
hello guys
im having this issue with inbuements
players are able to imbuement a weapon while is equiped
and the critical boost got seriously bugged
when they de-equip the weapon critical chance goes to 65526% and extra damage to 65486% until they log out
when they log in imbuement works ok now
is there any way to prevent players imbue items while equiped?

im using this one:
 
Solution
thx for your answer
but still happens the same,
btw, i cannot move an item while the imbuements window is open, but the weapon or items can be imbued while equipped, the bug comes once u close the imbuements windows and move the imbued weapon with criticalto your backpack, now critical chance and extra damage goes up to 65k%, still i can equip another weapon and those values will stay until i equip a weapon with critical imbuement or log out
(same applies for mana and life leech)
thing is ppl shouldn't be able to imbue an equipped item, but since imbuement is a function i have no idea how to set a "cancel" to it
Post automatically merged:

maybe something i can add here to stop ppl from imbuing equiped items? any ideas?
Lua:
function...
thx for your answer
but still happens the same,
btw, i cannot move an item while the imbuements window is open, but the weapon or items can be imbued while equipped, the bug comes once u close the imbuements windows and move the imbued weapon with criticalto your backpack, now critical chance and extra damage goes up to 65k%, still i can equip another weapon and those values will stay until i equip a weapon with critical imbuement or log out
(same applies for mana and life leech)
thing is ppl shouldn't be able to imbue an equipped item, but since imbuement is a function i have no idea how to set a "cancel" to it
Post automatically merged:

maybe something i can add here to stop ppl from imbuing equiped items? any ideas?
Lua:
function Player.canImbueItem(self, imbuement, item)
    local item_type = ""
    for tp, items in pairs(Imbuements_Weapons) do
        if isInArray(items, item:getId()) then
            item_type = tp
            break
        end
    end
    local imb_type = ""
    for ibt, imb_n in pairs(enablingStorages) do
        if string.find(ibt, imbuement:getName():lower()) then
            imb_type = ibt
            break
        end
    end
    if imb_type == "" then
        print(">> [Imbuement::canImbueItem] Error on search imbuement '".. imbuement:getName() .. "'")
        return false
    end

    local equip = equipitems[imb_type]
    if not equip then
        print(">> [Imbuement::canImbueItem] Error on search Weapons imbuement '" .. imbuement:getName() .. "'")
        return false
    end

    local imbuable = false
    for i, p in pairs(equip) do
        if p:lower() == item_type then
            imbuable = true
            break
        end
    end
    if not imbuable then
        return false
    end
    local stg = enablingStorages[imb_type]
    if not stg then
        print(">> [Imbuement::canImbueItem] Error on search Storage imbuement '" .. imbuement:getName() .. "'")
        return false
    end
i have very limited knowledge of lua compared to you
 
Last edited:
thx for your answer
but still happens the same,
btw, i cannot move an item while the imbuements window is open, but the weapon or items can be imbued while equipped, the bug comes once u close the imbuements windows and move the imbued weapon with criticalto your backpack, now critical chance and extra damage goes up to 65k%, still i can equip another weapon and those values will stay until i equip a weapon with critical imbuement or log out
(same applies for mana and life leech)
thing is ppl shouldn't be able to imbue an equipped item, but since imbuement is a function i have no idea how to set a "cancel" to it
Post automatically merged:

maybe something i can add here to stop ppl from imbuing equiped items? any ideas?
Lua:
function Player.canImbueItem(self, imbuement, item)
    local item_type = ""
    for tp, items in pairs(Imbuements_Weapons) do
        if isInArray(items, item:getId()) then
            item_type = tp
            break
        end
    end
    local imb_type = ""
    for ibt, imb_n in pairs(enablingStorages) do
        if string.find(ibt, imbuement:getName():lower()) then
            imb_type = ibt
            break
        end
    end
    if imb_type == "" then
        print(">> [Imbuement::canImbueItem] Error on search imbuement '".. imbuement:getName() .. "'")
        return false
    end

    local equip = equipitems[imb_type]
    if not equip then
        print(">> [Imbuement::canImbueItem] Error on search Weapons imbuement '" .. imbuement:getName() .. "'")
        return false
    end

    local imbuable = false
    for i, p in pairs(equip) do
        if p:lower() == item_type then
            imbuable = true
            break
        end
    end
    if not imbuable then
        return false
    end
    local stg = enablingStorages[imb_type]
    if not stg then
        print(">> [Imbuement::canImbueItem] Error on search Storage imbuement '" .. imbuement:getName() .. "'")
        return false
    end
i have very limited knowledge of lua compared to you

something like this, not tested btw

Lua:
function Player.canImbueItem(self, imbuement, item)
for slot = CONST_SLOT_HEAD, CONST_SLOT_AMMO do
    local slotItem = self:getSlotItem(slot)
    if slotItem then
        if slotItem == item then
            return false
        end
    end
end
local item_type = ""
for tp, items in pairs(Imbuements_Weapons) do
    if isInArray(items, item:getId()) then
        item_type = tp
        break
    end
end
local imb_type = ""
for ibt, imb_n in pairs(enablingStorages) do
    if string.find(ibt, imbuement:getName():lower()) then
        imb_type = ibt
        break
    end
end
if imb_type == "" then
    print(">> [Imbuement::canImbueItem] Error on search imbuement '".. imbuement:getName() .. "'")
    return false
end

local equip = equipitems[imb_type]
if not equip then
    print(">> [Imbuement::canImbueItem] Error on search Weapons imbuement '" .. imbuement:getName() .. "'")
    return false
end

local imbuable = false
for i, p in pairs(equip) do
    if p:lower() == item_type then
        imbuable = true
        break
    end
end
if not imbuable then
    return false
end
local stg = enablingStorages[imb_type]
if not stg then
    print(">> [Imbuement::canImbueItem] Error on search Storage imbuement '" .. imbuement:getName() .. "'")
    return false
end
 
Solution
it seems to be working but when i try to imbue an equipped item i get this message"You did not collect enough knowledge from the ancient Shapers. Visit the Shaper temple in Thais for help." :p.
 
it seems to be working but when i try to imbue an equipped item i get this message"You did not collect enough knowledge from the ancient Shapers. Visit the Shaper temple in Thais for help." :p.


delete or change this line to whatever you want :)
 
Back
Top