Hey guys
Found a rune prison script in the mods folder and decided to make a druid version of it using rush wood/wild growth and then i tested them both... Now the druid version works perfectly and removes the rush wood eventually but the original magic prison using magic walls will never be removed and will stay forever ! I tried looking at how the normal magic wall rune was set up as that works perfectly too and removes the magic wall eventually but couldn't find anything that would help me
Could someone please fix this magic prison so that the magic walls get removed just like my unmodified magic wall?
and would it be possible to force a rune charge to be removed/used when this rune is used? Since my server will be using unlimited runes in config.php
lastly... I would also like these runes to only be able to shoot on a target player or monster.. I tried this for myself using this line out of a UH rune which I thought might work but it didn't
Not working magic prison:
Working tera prison:
Any and all help appreciated !
EDIT: Making the edit so other people can spot the error.
I found out why my magic walls weren't being removed. The id was wrong in the lua script, the correct id is 1497 NOT 1498 for my server (TFS 0.3.6 v8.2).
Found a rune prison script in the mods folder and decided to make a druid version of it using rush wood/wild growth and then i tested them both... Now the druid version works perfectly and removes the rush wood eventually but the original magic prison using magic walls will never be removed and will stay forever ! I tried looking at how the normal magic wall rune was set up as that works perfectly too and removes the magic wall eventually but couldn't find anything that would help me
Could someone please fix this magic prison so that the magic walls get removed just like my unmodified magic wall?
and would it be possible to force a rune charge to be removed/used when this rune is used? Since my server will be using unlimited runes in config.php
lastly... I would also like these runes to only be able to shoot on a target player or monster.. I tried this for myself using this line out of a UH rune which I thought might work but it didn't
LUA:
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
Not working magic prison:
LUA:
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498)
local arr = {
{1, 1, 1},
{1, 2, 1},
{1, 1, 1}
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Working tera prison:
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1499)
local arr = {
{1, 1, 1},
{1, 2, 1},
{1, 1, 1}
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Any and all help appreciated !
EDIT: Making the edit so other people can spot the error.
I found out why my magic walls weren't being removed. The id was wrong in the lua script, the correct id is 1497 NOT 1498 for my server (TFS 0.3.6 v8.2).