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

[Rune] Mr,Ssd

Midxas

New Member
Joined
Apr 21, 2014
Messages
43
Reaction score
0
Hello ppl! Im trying to make supersd rune. It seems like simple thing but it doesent work for me :/

Firstly at spells/attack/ i add supersd file.

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2, -130, -3, -100, 14, 17, 9, 16)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
than in spells.xml
Code:
<rune name="Super Sudden Death" id="2298" allowfaruse="1" charges="3" lvl="45" maglv="15" exhaustion="2000" needtarget="1" blocktype="solid" event="script" value="attack/supersd.lua"/>

than in items.xml

Code:
<item id="2298" article="a" name="super sudden death rune">
<attribute key="type" value="rune" />
<attribute key="weight" value="70" />
</item>

And when im trying to use this i see msg "You cannot use this object". What's wrong in here?

And the second thing is that i need to change this script
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 80))

function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 4) + (mlevel * 4) - 50
local mana_maximum = (level * 4) + (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, "Aaaah...", TALKTYPE_ORANGE_1)
return TRUE
end

for spell script or make it wasteable like all runes. Is that possible? Thx for answers!
 
any errors on the first one?

for the second
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 80))

function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 4) + (mlevel * 4) - 50
local mana_maximum = (level * 4) + (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, "Aaaah...", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
return TRUE
end
 
There was no error. I fixed it but i dont know how :O just copied again this
Code:
<rune name="Super Sudden Death" id="2298" allowfaruse="1" charges="3" lvl="45" maglv="15" exhaustion="2000" needtarget="1" blocktype="solid" event="script" value="attack/supersd.lua"/>

Thx for manarune it works now!

@Edit: I have another question.
lol.png


Anyone know where item id 2283 can be described? I mean in items.xml there in only
Code:
<item id="2283" article="a" name="manarune">
<attribute key="type" value="rune" />
<attribute key="weight" value="70" />
</item>

At spells.xml there's nothing about 2283 but still there is communicate that it can be used by 20 magic lvl or higher and i have no idea where i can delete this :/
 
Last edited:

Similar threads

Back
Top