I have no idea, it's necessary?
[:
is (TFS 0.3.6) broPeople need to know the exact version to know what kind of features and function to use.
Yes bro Heal and Attack is possible during spellShould be person be able to heal himself in those 2 seconds?
exhaustion.set(cid, 11989, 2)
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
BroAdd this in the spell you want (under function onCastSpell).
Code:exhaustion.set(cid, 11989, 2)
creaturescript, type statschange
Register the name in login.lua.Code:function onStatsChange(cid, attacker, type, combat, value) if exhaustion.check(cid, 11989) and type == STATSCHANGE_HEALTHLOSS then return false end return true end
where do i put those scripts that u sent to me i need the whole spell i have absolutely nothing .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.
<event type="statschange" name="Immortal" event="script" value="immortal.lua"/>
registerCreatureEvent(cid, "Immortal")
Ok I understand that, but I can use any spell? the problem is that what that was not used because none is ' immortality '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
Only the type needs to be statschange, you can choose the rest.Code:registerCreatureEvent(cid, "Immortal")
exhaustion.set(cid, 11989, 2)
Ok Very thx BroIt'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.
So you can just add it to any spell and then that spell will make you immortal for 2 seconds.Code:exhaustion.set(cid, 11989, 2)
local config = {
}
function onCastSpell(cid, var)
exhaustion.set(cid, 11989, 2)
end
return true
end