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.
than in spells.xml
than in items.xml
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
for spell script or make it wasteable like all runes. Is that possible? Thx for answers!
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
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!