Gicu
Well-Known Member
- Joined
- Feb 26, 2011
- Messages
- 187
- Reaction score
- 52
HI
If not working please write errors!
-add line spells.xml
---create lua data/spells/immortal.lua
--- addEvent(INV, 5 * 1000) -----Duration immortal
--- add this line to you login.lua
This is protection for forever IMMORTAL.
---and last add NEW group in you data/XML/groups.xml
Let's Tested!
If not working please write errors!
-add line spells.xml
Lua:
<instant group="support" spellid="144" name="Immortal" words="Immortal" lvl="1" mana="1" aggressive="0" selftarget="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="immortal.lua">
</instant>
---create lua data/spells/immortal.lua
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, 63)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
function onCastSpell(creature, variant, isHotkey)
local player = Player(creature)
if not player then
return
end
local function INV()
local player = Player(creature)
if not player then
return
end
player:setGroup(Group(1))
return true
end
addEvent(INV, 5000)
player:setGroup(Group(5))
return combat:execute(creature, variant)
end
--- addEvent(INV, 5 * 1000) -----Duration immortal
--- add this line to you login.lua
This is protection for forever IMMORTAL.
Lua:
if player:getGroup():getId() == 5 then
player:setGroup(Group(1))
end
---and last add NEW group in you data/XML/groups.xml
Lua:
<group id="5" name="IMMORTAL" flags="8" access="0" maxdepotitems="0" maxvipentries="0" />
Let's Tested!