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

Monster Can't Walk on Fields

Lucenzo

The Way You Move :)
Joined
Jan 29, 2011
Messages
363
Reaction score
14
Location
UK
Hey


Is it possible to make monsters not being able to walk on x element?

Tried
LUA:
<immunity fire="-1"/>
but not to sure whats the exact line for it. :P

Thanks for helping x x
 
Add this before "Voices"

Code:
	<immunities>
		<immunity fire="0"/>
	</immunities>

0 = false, or not immune.
1 = true, or is immune.

Hope that helps. ^_^
 
Tried 0 but it doesn't seem to work

Guess this would be correct?

LUA:
<?xml version="1.0" encoding="utf-8"?>
<monster name="Deathspawn" namedescription="a deathspawn" race="blood" experience="0" speed="230" manacost="0">
	<health now="225" max="225"/>
	<look type="226" head="114" body="98" legs="97" feet="114" corpse="2220"/>
	<targetchange interval="5000" chance="8"/>
	<strategy attack="100" defense="0"/>
	<flags>
		<flag summonable="0"/>
		<flag attackable="1"/>
		<flag hostile="0"/>
		<flag illusionable="0"/>
		<flag convinceable="0"/>
		<flag pushable="0"/>
		<flag canpushitems="1"/>
		<flag canpushcreatures="0"/>
		<flag staticattack="0"/>
		<flag targetdistance="0"/>
		<flag runonhealth="0"/>
	</flags>
	<attacks>
		<attack name="melee" interval="2000" skill="30" attack="20"/>
		<attack name="death" interval="2000" chance="20" range="3" target="1" min="-400" max="-700">
			<attribute key="shootEffect" value="death"/>
			<attribute key="areaEffect" value="mortarea"/>
		</attack>	
		<attack name="energy" interval="2000" chance="20" range="3" target="1" min="-200" max="-450">
			<attribute key="shootEffect" value="energyball"/>
			<attribute key="areaEffect" value="energy"/>
		</attack>			
	</attacks>
	<defenses armor="1" defense="5"/>
		<elements>
		<element icePercent="15"/>
		<element firePercent="15"/>
		<element energyPercent="15"/>
		<element holyPercent="-10"/>
	</elements>
	<immunities>
		<immunity death="1"/>
		<immunity earth="1"/>
              <immunity fire="0"/>
		<immunity invisible="1"/>
	</immunities>
</monster>

Or did i understand it wrong? :P
 
I have pretty much the same script, it seems to be fine. I don't know why yours is not working.
 
I have other question, Is it possible to make all creatures ignore all fire,poison,electricity fields? not be immune but just ignore, like if they attacking a players they will ignore fields and just walk on them and take damage.
 
I have other question, Is it possible to make all creatures ignore all fire,poison,electricity fields? not be immune but just ignore, like if they attacking a players they will ignore fields and just walk on them and take damage.
tile.cpp, replace
[cpp]//
CombatType_t combatType = field->getCombatType();
//There is 3 options for a monster to enter a magic field
//1) Monster is immune
if(monster->isImmune(combatType))
return RET_NOERROR;

//1) Monster is "strong" enough to handle the damage
//2) Monster is already afflicated by this type of condition
if(!hasBitSet(FLAG_IGNOREFIELDDAMAGE, flags))
return RET_NOTPOSSIBLE;

return !monster->hasCondition(Combat::DamageToConditionType(combatType), -1, false)
&& !monster->canPushItems() ? RET_NOTPOSSIBLE : RET_NOERROR;[/cpp]
with
[cpp]//
return monster->canPushItems() ? RET_NOERROR : RET_NOTPOSSIBLE;[/cpp]
or just leave return RET_NOERROR if you want weak monsters which can't push items to walk through fields too :p
 
Last edited:
tile.cpp, replace
[cpp]//
CombatType_t combatType = field->getCombatType();
//There is 3 options for a monster to enter a magic field
//1) Monster is immune
if(monster->isImmune(combatType))
return RET_NOERROR;

//1) Monster is "strong" enough to handle the damage
//2) Monster is already afflicated by this type of condition
if(!hasBitSet(FLAG_IGNOREFIELDDAMAGE, flags))
return RET_NOTPOSSIBLE;

return !monster->hasCondition(Combat::DamageToConditionType(combatType), -1, false)
&& !monster->canPushItems() ? RET_NOTPOSSIBLE : RET_NOERROR;[/cpp]
with
[cpp]//
return monster->canPushItems() ? RET_NOERROR : RET_NOTPOSSIBLE;[/cpp]
or just leave return RET_NOERROR if you want weak monsters which can't push items to walk through fields too :p

Change ALL that to just a single line? :S

Tell me exactly what that will change? :p
 
is there a lib file that could make effect on my problem if i use mix of old and new libs? 3676 and 3872 or so. But mixed libs, could this be a problem?

Thanks in Advance x x
 
depends on how much was changed inbetween and how bad is your mess. either way it should cause problems elsewhere, not with this UNLESS this was broken in one of the revs
 
Back
Top