• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Create super SD

matti450

Member
Joined
Apr 13, 2008
Messages
507
Reaction score
24
How do i create own Super Sd that depends on Ml? and Super manarune that also is depended on mana?
 
just copy normal sd files and change the formula
yes but how do i make it depending on the ml then?

<item id="2268" article="a" name="sudden death rune">
<attribute key="runeSpellName" value="adori gran mort"/>
<attribute key="weight" value="120"/>
<attribute key="charges" value="3"/>
 
The script is in spells. You can use a callback like this, instead of setCombatFormula.
Code:
function onGetFormulaValues(cid, level, maglevel)
   min = maglevel*7
   max = maglevel*10

   return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
 
The script is in spells. You can use a callback like this, instead of setCombatFormula.
Code:
function onGetFormulaValues(cid, level, maglevel)
   min = maglevel*7
   max = maglevel*10

   return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
gonna test it out and see ^^ thx anyway
 
action.xml
<action itemid="runeid" event="script" value="other/Manarune.lua"/>


data/action/scripts/others
Manarune.lua

LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000) -- time in seconds x1000

function onUse(cid, item, fromPosition, itemEx, toPosition)

local manamax = getPlayerMaxMana(cid)
local min = .15 -- this means 3% minimum healing
local max = .18 -- this means 5% maximum healing
local mana_add = math.random((manamax * (min/10)), (manamax * (max/10))) 

    if(hasCondition(cid, CONDITION_EXHAUST)) then
            doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
        return doPlayerSendCancel(cid, "You are exhausted")
    end
        doPlayerAddMana(cid, mana_add)
        doSendMagicEffect(getThingPos(cid), 28)
        doSendAnimatedText(getPlayerPosition(cid),""..mana_add.."", 204)
    doAddCondition(cid, exhaust)
        return true
end
 
action.xml
<action itemid="runeid" event="script" value="other/Manarune.lua"/>


data/action/scripts/others
Manarune.lua

LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000) -- time in seconds x1000

function onUse(cid, item, fromPosition, itemEx, toPosition)

local manamax = getPlayerMaxMana(cid)
local min = .15 -- this means 3% minimum healing
local max = .18 -- this means 5% maximum healing
local mana_add = math.random((manamax * (min/10)), (manamax * (max/10)))

    if(hasCondition(cid, CONDITION_EXHAUST)) then
            doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
        return doPlayerSendCancel(cid, "You are exhausted")
    end
        doPlayerAddMana(cid, mana_add)
        doSendMagicEffect(getThingPos(cid), 28)
        doSendAnimatedText(getPlayerPosition(cid),""..mana_add.."", 204)
    doAddCondition(cid, exhaust)
        return true
end
thx natala :D
 
what does that mean ? setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -50, -1, -40, 5, 5, 4, 7)
if i want to make it stronger what do i need to change "-"
 
Back
Top