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

Lua Custom rune not Conjurable

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
Okay I am using TFS 0.3.6 Crying Damson 8.60 V5 and in mods/scripts/custom spells I have

mana rune.lua

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onGetFormulaValues(cid)
	return doPlayerAddMana(cid, math.random(50,150))
end
 
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
 
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

And the rune works fine, but it does not conjure when I say

adura magica

it just does nothing, no poof or no error or anything

Here is the "spells.xml" for custom spells

spellls.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Custom Spells" version="1.0" author="Ziggy" contact="" enabled="yes">
	<!-- Custom Spells -->

	
	<!-- Custom Runes -->
	<rune name="Mana Rune" words="adura majica" lvl="14" mana="240" soul="5" maglv="10" reagentId="2260" conjureId="2298" conjureCount="1" exhaustion="2000" needlearn="0" event="function" value="customspells/mana rune.lua">
		<vocation id="1"/>
		<vocation id="2"/>
		<vocation id="5"/>
		<vocation id="6"/>		
</rune>	
	
</mod>

Here is the line I have for it being conjurable in data/spells/spells.xml

Code:
	<conjure name="Mana Rune" words="adura majica" lvl="14" mana="240" soul="5" reagentId="2260" conjureId="2298" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
		<vocation id="1"/>
		<vocation id="2"/>
		<vocation id="5"/>
		<vocation id="6"/>
	</conjure>

This is the item in items.xml

Code:
   <item id="2298" article="a" name="mana rune">
        <attribute key="runeSpellName" value="adura magica" />
        <attribute key="weight" value="120" />
    </item>
 
Okay I am using TFS 0.3.6 Crying Damson 8.60 V5 and in mods/scripts/custom spells I have


And the rune works fine, but it does not conjure when I say

adura magica

it just does nothing, no poof or no error or anything

Here is the "spells.xml" for custom spells

spellls.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Custom Spells" version="1.0" author="Ziggy" contact="" enabled="yes">
	<!-- Custom Spells -->

	
	<!-- Custom Runes -->
	<rune name="Mana Rune" [COLOR="#FF0000"]words="adura majica"[/COLOR] lvl="14" mana="240" soul="5" maglv="10" reagentId="2260" conjureId="2298" conjureCount="1" exhaustion="2000" needlearn="0" event="function" value="customspells/mana rune.lua">
		<vocation id="1"/>
		<vocation id="2"/>
		<vocation id="5"/>
		<vocation id="6"/>		
</rune>	
	
</mod>

Here is the line I have for it being conjurable in data/spells/spells.xml

Code:
	<conjure name="Mana Rune" [COLOR="#FF0000"]words="adura majica"[/COLOR] lvl="14" mana="240" soul="5" reagentId="2260" conjureId="2298" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
		<vocation id="1"/>
		<vocation id="2"/>
		<vocation id="5"/>
		<vocation id="6"/>
	</conjure>

This is the item in items.xml

Code:
   <item id="2298" article="a" name="mana rune">
        <attribute key="runeSpellName" value="adura magica" />
        <attribute key="weight" value="120" />
    </item>

Omfg, how it will work if you are not spelling it correct?

Check the red words ...
 
Now my items.xml looks like

items.xml
Code:
    <item id="2298" article="a" name="mana rune">
        <attribute key="runeSpellName" value="adura magica" />
        <attribute key="weight" value="120" />
    </item>

my mods/customspells.xml
Code:
	<rune name="Mana Rune" words="adura magica" lvl="14" mana="240" soul="5" maglv="10" reagentId="2260" Id="2298" conjureCount="1" exhaustion="2000" needlearn="0" event="function" value="customspells/mana rune.lua">
		<vocation id="1"/>
		<vocation id="2"/>
		<vocation id="5"/>
		<vocation id="6"/>		
</rune>

and my mana rune.lua file itself is fine, it works.

So why is it still not working?
 
Yeah, I deleted alll the "custom spells" "mods" stupid crap and just made it a REAL spell that is REALLY conjurable and it works in full now, when you say adura magica it turns into a mana rune and it heals the said amount of mana.
 
Back
Top