Not sure what distro you are using but for example with this 1.4 file you would just remove lines 9 and 10. The goal in any distro would be to remove the section that checks if it is illusionable.Hello, i am not very good with coding but am trying to find out where i can change the values as may be needed to allow utevo res ina to disguise as any in-game mob.
is this possible? Thanks in advance for any answers.
local condition = Condition(CONDITION_OUTFIT)
condition:setTicks(180000)
function onCastSpell(creature, variant)
local returnValue = RETURNVALUE_NOERROR
local monsterType = MonsterType(variant:getString())
if not monsterType then
returnValue = RETURNVALUE_CREATUREDOESNOTEXIST
elseif not...
you must edit/ change it in the mosnter.xml file in order to enable or make it possible to do.Hello, i am not very good with coding but am trying to find out where i can change the values as may be needed to allow utevo res ina to disguise as any in-game mob.
is this possible? Thanks in advance for any answers.
Not sure what distro you are using but for example with this 1.4 file you would just remove lines 9 and 10. The goal in any distro would be to remove the section that checks if it is illusionable.Hello, i am not very good with coding but am trying to find out where i can change the values as may be needed to allow utevo res ina to disguise as any in-game mob.
is this possible? Thanks in advance for any answers.
local condition = Condition(CONDITION_OUTFIT)
condition:setTicks(180000)
function onCastSpell(creature, variant)
local returnValue = RETURNVALUE_NOERROR
local monsterType = MonsterType(variant:getString())
if not monsterType then
returnValue = RETURNVALUE_CREATUREDOESNOTEXIST
elseif not creature:hasFlag(PlayerFlag_CanIllusionAll) and not monsterType:isIllusionable() then
returnValue = RETURNVALUE_NOTPOSSIBLE
end
if returnValue ~= RETURNVALUE_NOERROR then
creature:sendCancelMessage(returnValue)
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
condition:setOutfit(monsterType:getOutfit())
creature:addCondition(condition)
creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
return true
end
in the mosnter.xml file ex: demon <flag summonable="0"/> to <flag summonable="1"/>Not sure what distro you are using but for example with this 1.4 file you would just remove lines 9 and 10. The goal in any distro would be to remove the section that checks if it is illusionable.
Lua:local condition = Condition(CONDITION_OUTFIT) condition:setTicks(180000) function onCastSpell(creature, variant) local returnValue = RETURNVALUE_NOERROR local monsterType = MonsterType(variant:getString()) if not monsterType then returnValue = RETURNVALUE_CREATUREDOESNOTEXIST elseif not creature:hasFlag(PlayerFlag_CanIllusionAll) and not monsterType:isIllusionable() then returnValue = RETURNVALUE_NOTPOSSIBLE end if returnValue ~= RETURNVALUE_NOERROR then creature:sendCancelMessage(returnValue) creature:getPosition():sendMagicEffect(CONST_ME_POFF) return false end condition:setOutfit(monsterType:getOutfit()) creature:addCondition(condition) creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) return true end
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="80"/>
<flag runonhealth="0"/>
</flags>
in the mosnter.xml file ex: demon <flag summonable="0"/> to <flag summonable="1"/>
Lua:<flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="80"/> <flag runonhealth="0"/> </flags>
Utevo res ina
is illusion, you're thinking of utevo res.
And even if it were summon instead of illusion the same principle applies. You're not bound by the xml files if you're allowing any existing creature.hello, I forgot to use the reply function. ( still rather new to using the forums as well.) in my Canary folder, I have 3 data folders, including data, data-canary, and data-otservbr-global, but I am unable to find a file with that informationUtevo res ina
is illusion, you're thinking ofutevo res.
And even if it were summon instead of illusion the same principle applies. You're not bound by the xml files if you're allowing any existing creature.
Not sure which one of those folders but the typical directory to it would beAyo, I am currently running via Canary's latest release as far as I know.
Post automatically merged:
hello, I forgot to use the reply function. ( still rather new to using the forums as well.) in my Canary folder, I have 3 data folders, including data, data-canary, and data-otservbr-global, but I am unable to find a file with that information
data/spells/scripts/support/creature_illusion.lua
Not sure which one of those folders but the typical directory to it would bedata/spells/scripts/support/creature_illusion.lua
local condition = Condition(CONDITION_OUTFIT)
condition:setTicks(180000)
local spell = Spell("instant")
function spell.onCastSpell(creature, variant)
local returnValue = RETURNVALUE_NOERROR
local monsterType = MonsterType(variant:getString())
if not monsterType then
returnValue = RETURNVALUE_CREATUREDOESNOTEXIST
elseif not creature:hasFlag(PlayerFlag_CanIllusionAll) and not monsterType:isIllusionable() then
returnValue = RETURNVALUE_NOTPOSSIBLE
end
if returnValue ~= RETURNVALUE_NOERROR then
creature:sendCancelMessage(returnValue)
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
condition:setOutfit(monsterType:getOutfit())
creature:addCondition(condition)
creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
return true
end
spell:name("Creature Illusion")
spell:words("utevo res ina")
spell:group("support")
spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true")
spell:castSound(SOUND_EFFECT_TYPE_SPELL_CREATURE_ILLUSION)
spell:id(38)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:level(23)
spell:mana(100)
spell:hasParams(true)
spell:isAggressive(false)
spell:needLearn(false)
spell:register()
I read over them so many times I'm ashamed. Thanks.The lines Apollos referred to in his example do exist in there, I can see them!
You can find them too, I believe in you!
Just an update, in a canary server. (from what I can tell) I had to remove the 2 lines from both databases. but it did work as explained by Apollos.Not sure what distro you are using but for example with this 1.4 file you would just remove lines 9 and 10. The goal in any distro would be to remove the section that checks if it is illusionable.
Lua:local condition = Condition(CONDITION_OUTFIT) condition:setTicks(180000) function onCastSpell(creature, variant) local returnValue = RETURNVALUE_NOERROR local monsterType = MonsterType(variant:getString()) if not monsterType then returnValue = RETURNVALUE_CREATUREDOESNOTEXIST elseif not creature:hasFlag(PlayerFlag_CanIllusionAll) and not monsterType:isIllusionable() then returnValue = RETURNVALUE_NOTPOSSIBLE end if returnValue ~= RETURNVALUE_NOERROR then creature:sendCancelMessage(returnValue) creature:getPosition():sendMagicEffect(CONST_ME_POFF) return false end condition:setOutfit(monsterType:getOutfit()) creature:addCondition(condition) creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) return true end