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

CreatureEvent [TFS 1.3 / 1.4] Upgrade System

Lua Script Error: [Event Interface]
data/events/scripts/player.lua:player@onMoveItem
data/lib/crafting/upgrade_system_core.lua:840: attempt to index local 'thing' (a nil value)
stack traceback:
[C]: in function '__index'
data/lib/crafting/upgrade_system_core.lua:840: in function 'onItemUpgradeLook'
data/events/scripts/player.lua:332: in function <data/events/scripts/player.lua:330>
otservbr 1.3
This is for OTServBR.
Looks like onMoveItem is not reaching last return. Just tried and there are few lines to edit.

Lua:
    -- Handle move items to the ground
    if toPosition.x ~= CONTAINER_POSITION then
        if item:isContainer() then
            local container = Container(item.uid)
            for categoryId = LOOT_START, LOOT_END do
                if container:hasQuickLootCategory(categoryId) then
                    container:removeQuickLootCategory(categoryId)
                    self:setQuickLootBackpack(categoryId, nil)
                end
            end
        end

        return true -- HERE
    end


    -- Reward System
    if toPosition.x == CONTAINER_POSITION then
        local containerId = toPosition.y - 64
        local container = self:getContainerById(containerId)
        if not container then
            return true -- HERE
        end
And return true at the end of this function. Change these lines to
Lua:
return us_onMoveItem(self, item, fromPosition, toPosition)
 
> Loading config: config.lua
> Establishing database connection... MySQL 6.1.6
> Running database manager
No tables were optimized.
> Loading vocations
> Loading items
> Loading script systems
> Loaded Upgrade System v2.4.4
[Warning - Events::load] Unknown player method: onItemMoved
> Loading monsters

Do anyone know how to fix?
 
Someone know the right items ID's? I using TFS 1.3 and id's on first post are different from that on movie.. I can't figure out how get exactly that items from tutorial
 
Someone know the right items ID's? I using TFS 1.3 and id's on first post are different from that on movie.. I can't figure out how get exactly that items from tutorial
These items are custom.
 
Hey man, I'm getting this error when I try to use the upgrade crystal.

1598211354919.png
Post automatically merged:

Got it fixed up and working! Thanks man amazing addon!
 
Last edited:
Hey, can someone help me understand, why is this exist? I using clear 1.3 TFS

Lua:
target:registerEvent("UpgradeSystemHealth")
target:registerEvent("UpgradeSystemDeath")
function Creature:onChangeOutfit(outfit)
    return true
end

function Creature:onAreaCombat(tile, isAggressive)
    return RETURNVALUE_NOERROR
end

function Creature:onTargetCombat(target)
    return RETURNVALUE_NOERROR
end

function Creature:onHear(speaker, words, type)
end
 

Attachments

Hey, can someone help me understand, why is this exist? I using clear 1.3 TFS

Lua:
target:registerEvent("UpgradeSystemHealth")
target:registerEvent("UpgradeSystemDeath")
function Creature:onChangeOutfit(outfit)
    return true
end

function Creature:onAreaCombat(tile, isAggressive)
    return RETURNVALUE_NOERROR
end

function Creature:onTargetCombat(target)
    return RETURNVALUE_NOERROR
end

function Creature:onHear(speaker, words, type)
end
Oh boy...
Lua:
function Creature:onChangeOutfit(outfit)
    return true
end

function Creature:onAreaCombat(tile, isAggressive)
    return RETURNVALUE_NOERROR
end

function Creature:onTargetCombat(target)
    target:registerEvent("UpgradeSystemHealth")
    target:registerEvent("UpgradeSystemDeath")
    return RETURNVALUE_NOERROR
end

function Creature:onHear(speaker, words, type)
end
 
enchantments are causing quite a bit of server lag, especially on large groups of monsters. For instance with this weapon: 12:55 You see a legendary Slayer Of Domination +2 (Atk:12900, sword fighting +3, critical hit chance +3%, critical hit damage +50%, life leech chance +3%, life leech amount +25%, mana leech chance +3%, mana leech amount +25%). Item Level: 5 20% to cast Energy Strike on Attack dealing 1-13844 damage 20% to cast Ice Strike on Attack dealing 1-574006 damage Earth Damage +1% 20% to cast Flame Strike on Attack dealing 1-107113 damage It can only be wielded properly by knights and elite knights of level 50000 or higher. It weighs 50.00 oz. This weapon proves how you were powerful inront of deepling spellsinger!

The ping jumps from my normal 32-50ms to 200-250+ and on massive groups of monsters it can go up to 400 on the initial attack start But with a normal weapon without enchantments the ping does not jump higher than 150-180 and the lag difference is pretty noticeable.
 
Error:
C++:
Lua Script Error: [Action Interface]
data/actions/scripts/upgrade_system_actions.lua:onUse
data/upgrade_system_core.lua:989: bad argument #1 to 'random' (interval is empty)
stack traceback:
        [C]: in ?
        [C]: in function 'math.random'
        data/upgrade_system_core.lua:989: in method 'rollAttribute'
        data/upgrade_system_core.lua:69: in function 'us_onUse'
        (...tail calls...)
 
Error:
C++:
Lua Script Error: [Action Interface]
data/actions/scripts/upgrade_system_actions.lua:onUse
data/upgrade_system_core.lua:989: bad argument #1 to 'random' (interval is empty)
stack traceback:
        [C]: in ?
        [C]: in function 'math.random'
        data/upgrade_system_core.lua:989: in method 'rollAttribute'
        data/upgrade_system_core.lua:69: in function 'us_onUse'
        (...tail calls...)
Check your config, looks like you missed or misspelled something.
 
Back
Top