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

Spell Utamo Vita on/off

tetra20

DD
Joined
Jan 17, 2009
Messages
1,315
Solutions
4
Reaction score
323
Location
Egypt
I Want to Share with you Guys my utamo vita. i think it isn't released before as a spell
I Won't Take so Long to Keep it Clean And Short
First Go To Data/spells/support/magic shield And Replace the code with this
The Code 75% isn't mine i redited a little parts and added the Mana Shield On


Second Version
Code:
local shield = createConditionObject(CONDITION_MANASHIELD)
setConditionParam(shield, CONDITION_PARAM_TICKS, 200000)
function onCastSpell(cid, var)
local pos = getPlayerPosition(cid)
if hasCondition(cid, CONDITION_MANASHIELD) == false then
doAddCondition(cid,shield)
doSendMagicEffect(getThingPos(cid),12)
doCreatureSay(cid, "Mana Shield On!", TALKTYPE_ORANGE_1)
else
doRemoveCondition(cid,CONDITION_MANASHIELD)
doCreatureSay(cid, "Mana Shield Off!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(cid), 12)
end
return true
end

Add This in Spells.xml
Code:
 <instant name="Magic Shield" words="utamo vita" lvl="14" mana="50" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/magic shield.lua">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="3"/>
<vocation id="5"/>
<vocation id="6"/>
<vocation id="7"/>
<vocation id="9"/>
<vocation id="10"/>
</instant>
And Done
 

Attachments

Last edited:
You could use if getCreatureCondition(cid, CONDITION_MANASHIELD) == TRUE instead of storage.
 
Thanks Guys Gonna Redit to the Condition Version

- - - Updated - - -

btw sry for the small pictures

- - - Updated - - -

Lua:
local shield = createConditionObject(CONDITION_MANASHIELD)
setConditionParam(shield, CONDITION_PARAM_TICKS, 200000)
function onCastSpell(cid, var)
if hasCondition(cid, CONDITION_MANASHIELD) == false then)
doAddCondition(cid,shield)
doSendMagicEffect(getThingPos(cid),12)
doCreatureSay(cid, "Mana Shield On!", TALKTYPE_ORANGE_1)
else
doRemoveCondition(cid,CONDITION_MANASHIELD)
doCreatureSay(cid, "Mana Shield Off!", TALKTYPE_ORANGE_1)
end
return true
end

:)
 
When you log out of the server and log back in and I'll use "utamo vita", it pops up a text "Mana Shield Off!" instead of "Mana Shield On!" or when he uses "utamo vita" and is over, it also if you type "utamo vita" pops the text "Mana Shield Off".
Can you fix it?
 
well, I have version where it's removed by spell "exana amo" in my data.
Haven't seen it in one spell, though. Nice job.
 
The second version doesn't work
Displayed devoured yellow inscription "utamo vita"

Code:
local storage = 10239 -- epmty storage
local pos = getPlayerPosition(cid)
 
local shield = createConditionObject(CONDITION_MANASHIELD)
setConditionParam(shield, CONDITION_PARAM_TICKS, 200000)
function onCastSpell(cid, var)
if hasCondition(cid, CONDITION_MANASHIELD) == false then)
doAddCondition(cid,shield)
doSendMagicEffect(getThingPos(cid),12)
doCreatureSay(cid, "Mana Shield On!", TALKTYPE_ORANGE_1)
else
doRemoveCondition(cid,CONDITION_MANASHIELD)
doCreatureSay(cid, "Mana Shield Off!", TALKTYPE_ORANGE_1)
end
return true
end
 
Thanks for your comment.. i fixed the second version :)
First Post
 
Back
Top