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

Monster auto heal script

rudger

Active Member
Joined
Oct 1, 2010
Messages
255
Solutions
1
Reaction score
34
Location
The Netherlands
Does anyone have a script so that monsters heal themselves without a player on screen?

Currently monsters only heal when a player on screen.

I'm using tfs 0.4.
 
This doesn't work:

XML:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Dragon Lord" nameDescription="a dragon lord" race="blood" experience="2100" speed="240" manacost="0">
	<health now="1900" max="1900"/>
	<look type="39" corpse="5984"/>
	<targetchange interval="5000" chance="8"/>
	<strategy attack="100" defense="0"/>
	<flags>
		<flag summonable="0"/>
		<flag attackable="1"/>
		<flag hostile="1"/>
		<flag illusionable="1"/>
		<flag convinceable="1"/>
		<flag pushable="0"/>
		<flag canpushitems="1"/>
		<flag canpushcreatures="1"/>
		<flag targetdistance="1"/>
		<flag staticattack="90"/>
		<flag runonhealth="300"/>
	</flags>
	
	<script name="healing" interval="1000" chance="100" min="100" max="200">
			</script>
 
Here you got put this text under attacks..

<defenses armor="22" defense="35">
<defense name="healing" interval="1000" chance="25" min="57" max="93">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
 
Using script tags instead of defense tags should work.
Well no, it requires onThink to be used but it's only executed when players are around so it's pointless. Though it's possible to require onThink to be only executed once, and then use an addEvent to heal in Lua (but it's not fully CPU-efficient)
 
Back
Top