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

Solved tfs 1.2 mana rune need help!

Sp0tl3ss

Nestalia.org
Joined
Jul 19, 2014
Messages
279
Reaction score
12
why is this script not working? cant get it to work :S for tfs 1.2

Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST_HEAL)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 900))

function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 5) + (mlevel * 3) - 50
local mana_maximum = (level * 6) + (mlevel * 4)
local mana_add = math.random(mana_minimum, mana_maximum)

doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "mana...", TALKTYPE_ORANGE_1)
return TRUE
end
 
Last edited by a moderator:
Solution
try this, you were using 0.x code on 1.2
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = (level * 5) + (magLevel * 3) - 50
    local max = (level * 6) + (magLevel * 4)
    player:addMana(math.random(min, max))
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    player:say("mana...", TALKTYPE_MONSTER_SAY)
    return true
end
try this, you were using 0.x code on 1.2
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = (level * 5) + (magLevel * 3) - 50
    local max = (level * 6) + (magLevel * 4)
    player:addMana(math.random(min, max))
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    player:say("mana...", TALKTYPE_MONSTER_SAY)
    return true
end
 
Last edited by a moderator:
Solution
try this, you were using 0.x code on 1.2
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = (level * 5) + (magLevel * 3) - 50
    local max = (level * 6) + (magLevel * 4)
    player:addMana(math.random(min, max))
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    player:say("mana...", TALKTYPE_MONSTER_SAY)
    return true
end
oh well thanks for fast response but this didnt work eiter :(
 
any errors in the console?


try that
XML:
<action itemid="2270" event="script" value="custom/manarune.lua"/>
 
Last edited by a moderator:
any errors in the console?


try that
Code:
<action itemid="2270" event="script" value="custom/manarune.lua"/>

That's what we used in 1.0 & maybe 1.1 but 1.2 does not use the event tag and uses script insted of value.
 
whas mine correct? thats how the others look great mana potions for example, and no no errors in console :(

Try to restart the server if it dosn't wanna update, then make sure you use itemid 2270.
You could also check if you already have a script for that itemid aswell.
 
try this, you were using 0.x code on 1.2
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = (level * 5) + (magLevel * 3) - 50
    local max = (level * 6) + (magLevel * 4)
    player:addMana(math.random(min, max))
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    player:say("mana...", TALKTYPE_MONSTER_SAY)
    return true
end

is it possible to add animated text funtion on this script?
 
Back
Top