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

Change manarune script from 0.4 to 1.1!

Hashirama479

World of Ninja
Joined
Dec 19, 2016
Messages
536
Solutions
6
Reaction score
74
Could someone help me to fix the mr script for tfs 1.1? Would be so awesome!

Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 500) -- time in seconds x1000
local config = {
    [1] = {mana = 4},
    [2] = {mana = 4},
    [3] = {mana = 2},
    [4] = {mana = 4},
    [5] = {mana = 4},
    [6] = {mana = 4},
    [7] = {mana = 2},
    [8] = {mana = 4},
    [9] = {mana = 4},
    [10] = {mana = 4},
    [11] = {mana = 2},
    [12] = {mana = 1},
    [13] = {mana = 4},
    [14] = {mana = 4},
    [15] = {mana = 2},
    [16] = {mana = 1},
    [17] = {mana = 4},
    [18] = {mana = 4},
    [19] = {mana = 2},
    [20] = {mana = 1},
    [21] = {mana = 4},
    [22] = {mana = 4},
    [23] = {mana = 2},
    [24] = {mana = 1},
    [25] = {mana = 4},
    [26] = {mana = 4},
    [27] = {mana = 2},
    [28] = {mana = 1},
    }
function onUse(cid, item, fromPosition, itemEx, toPosition)
if exhaustion.check(cid, 4905) then
    doPlayerSendCancel(cid, "You cant heal when you got freezed.")
    return true
end

local manamax = getPlayerMaxMana(cid)
local mana_add = math.random(800000000,820000000)
local hp = math.random(800000000,820000000)

if(hasCondition(cid, CONDITION_EXHAUST)) then
doPlayerSendCancel(cid, "You are exhausted")
return true
end
local pos = getThingPos(cid)
if getPlayerStorageValue(cid, 85987) < 100 then
doPlayerAddMana(cid, mana_add)
doCreatureAddHealth(cid,hp)
else
mana_add = math.random(800000000,820000000) + ((getPlayerStorageValue(cid, 85987) - 100) * 1717217) + math.floor((getPlayerLevel(cid) * config[getPlayerVocation(cid)].mana))
doPlayerAddMana(cid, mana_add)
doCreatureAddHealth(cid,mana_add)
end
doSendMagicEffect(getThingPos(cid), CONST_ME_HITBYPOISON)
doSendAnimatedText(getPlayerPosition(cid),""..mana_add.."", TEXTCOLOR_GREEN)
--doPlayerSendCancel (cid,"You have receive +"..mana_add.." health and mana")
doAddCondition(cid, exhaust)
return true
end
 
Back
Top