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

Lua TFS 1.3 Enchant Items

nefinoo

Carnage.flv
Joined
Sep 11, 2010
Messages
549
Solutions
1
Reaction score
58
Location
Lo Mochis, Sinaloa
can use certain items in armors, shields and weapons, to add attributes such as regeneration, skills, life or mana, etc, but do not be random, you intentionally know what attributes you want to add to your equipment.

by the way sorry for my english, i'm using translate
 
Last edited:
Not sure what rev of 1.3 you are using but I am using this source edit by Infernum. Simple script below.


Place this in actions.
Code:
<action itemid="8300" script="upgrade.lua" />

Actions/upgrade.lua
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target.itemid == 2187 then
        local position = player:getPosition()
        target:setAbility(ITEM_ABILITY_ABSORBPHYSICAL, 10)
        target:setAbility(ITEM_ABILITY_SKILL_SWORD, 5)
        position:sendMagicEffect(CONST_ME_MAGIC_RED)
    end
    return true
end
 
so
you want a Stone which gives as example "1% More hp and mana" and this item can be used on Armors etc?
yes, something like that
Post automatically merged:

Not sure what rev of 1.3 you are using but I am using this source edit by Infernum. Simple script below.


Place this in actions.
Code:
<action itemid="8300" script="upgrade.lua" />

Actions/upgrade.lua
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target.itemid == 2187 then
        local position = player:getPosition()
        target:setAbility(ITEM_ABILITY_ABSORBPHYSICAL, 10)
        target:setAbility(ITEM_ABILITY_SKILL_SWORD, 5)
        position:sendMagicEffect(CONST_ME_MAGIC_RED)
    end
    return true
end

How can check what rev iam using?
Post automatically merged:

Not sure what rev of 1.3 you are using but I am using this source edit by Infernum. Simple script below.


Place this in actions.
Code:
<action itemid="8300" script="upgrade.lua" />

Actions/upgrade.lua
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target.itemid == 2187 then
        local position = player:getPosition()
        target:setAbility(ITEM_ABILITY_ABSORBPHYSICAL, 10)
        target:setAbility(ITEM_ABILITY_SKILL_SWORD, 5)
        position:sendMagicEffect(CONST_ME_MAGIC_RED)
    end
    return true
end

Lua:
Lua Script Error: [Action Interface]
data/actions/scripts/upgrade.lua:onUse
data/actions/scripts/upgrade.lua:4: attempt to call method 'setAbility' (a nil value)
stack traceback:
        [C]: in function 'setAbility'
        data/actions/scripts/upgrade.lua:4: in function <data/actions/scripts/upgrade.lua:1>

I got this.
 
Last edited:
Back
Top