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

Please Need Help Inmmunity Spell

JueJua

New Member
Joined
Jan 27, 2009
Messages
23
Reaction score
0
I need a spell that when I put it last me 2 seconds and protect me from everything. but that does not heal, just to protect all damages
Type : Buff
Time Cooldown : Normal
Time Buff : 2 seconds
Effect Number :22
Thanks.!
 
Add this in the spell you want (under function onCastSpell).
Code:
exhaustion.set(cid, 11989, 2)

creaturescript, type statschange
Code:
function onStatsChange(cid, attacker, type, combat, value)
     if exhaustion.check(cid, 11989) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then
         return false
     end
     return true
end
Register the name in login.lua.
 
Last edited:
Add this in the spell you want (under function onCastSpell).
Code:
exhaustion.set(cid, 11989, 2)

creaturescript, type statschange
Code:
function onStatsChange(cid, attacker, type, combat, value)
     if exhaustion.check(cid, 11989) and type == STATSCHANGE_HEALTHLOSS then
         return false
     end
     return true
end
Register the name in login.lua.
Bro
I do not understand : S
record the part that says : exhaustion.set ( cid , 11989 , 2 )
where ?

And the other in spell ? o in creaturescrips/login.lua
 
You can just use anu spell you want and add that line under function onCastSpell.

Add the creaturescript in creaturescripts.xml with type statschange and register the name in login.lua.
 
:S

You can just use anu spell you want and add that line under function onCastSpell.

Add the creaturescript in creaturescripts.xml with type statschange and register the name in login.lua.
where do i put those scripts that u sent to me i need the whole spell i have absolutely nothing .

Im Sorry .s
 
Last edited by a moderator:
You can just use any spell, copy any spell from your spells folder and edit it.

If you need help with the creaturescripts.xml line
Code:
<event type="statschange" name="Immortal" event="script" value="immortal.lua"/>

login.lua
Code:
registerCreatureEvent(cid, "Immortal")
Only the type needs to be statschange, you can choose the rest.
 
You can just use any spell, copy any spell from your spells folder and edit it.

If you need help with the creaturescripts.xml line
Code:
<event type="statschange" name="Immortal" event="script" value="immortal.lua"/>

login.lua
Code:
registerCreatureEvent(cid, "Immortal")
Only the type needs to be statschange, you can choose the rest.
Ok I understand that, but I can use any spell? the problem is that what that was not used because none is ' immortality '
 
It's this line that creates this immortality for 2 seconds, because it sets storage and in the statschange script that makes the player not lose health or mana you check for this storage.
Code:
exhaustion.set(cid, 11989, 2)
So you can just add it to any spell and then that spell will make you immortal for 2 seconds.
 
.

It's this line that creates this immortality for 2 seconds, because it sets storage and in the statschange script that makes the player not lose health or mana you check for this storage.
Code:
exhaustion.set(cid, 11989, 2)
So you can just add it to any spell and then that spell will make you immortal for 2 seconds.
Ok Very thx Bro :D something like this? :

Code:
local config = {
}



function onCastSpell(cid, var)

exhaustion.set(cid, 11989, 2)

end
    return true
end
 
Remove the end above return true (that doesn't close anything) and the local config table (not used?).
But ye, you could do it like that, although it might be more fun to have some magic effects like spells usually have so people see something happening.
 
Back
Top