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

Monsters thing

Moj mistrz

Monster Creator
Joined
Feb 1, 2008
Messages
932
Solutions
10
Reaction score
295
Location
Poland
Hello everyone.
Im wondering how to make a monster that attacks(retargets) first player on its way(monster way) like on rl tibia ex. cyclops.
Waiting for answers.
Thanks.
 
Try to change:
<targetchange interval="5000" chance="8"/>
in monster file.
lower the interval and higher the chance. I think it will choose the nearest target then.

Rep++ if helped, but I don't know about that never tried it out.
 
If i change the interval to ex. 2000 and chance to 100 then a monster will retargets within 2 sec to another player, but not to the first one.
 
Cyclops.xml from real tibia monster pack :p

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Cyclops" nameDescription="a cyclops" race="blood" experience="150" speed="200" manacost="490">
	<health now="260" max="260"/>
	<look type="22" corpse="5962"/>
	<targetchange interval="5000" chance="8"/>
	<strategy attack="100" defense="0"/>
	<flags>
		<flag summonable="1"/>
		<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="0"/>
	</flags>
	<attacks>
		<attack name="melee" interval="2000" min="-0" max="-100"/>
	</attacks>
	<defenses armor="15" defense="20"/>
	<elements>
		<element energyPercent="25"/>
		<element holyPercent="20"/>
		<element earthPercent="-10"/>
		<element deathPercent="-10"/>
	</elements>
	<voices interval="5000" chance="10">
		<voice sentence="Il lorstok human!"/>
		<voice sentence="Toks utat."/>
		<voice sentence="Human, uh whil dyh!"/>
		<voice sentence="Youh ah trak!"/>
		<voice sentence="Let da mashing begin!"/>
	</voices>
	<loot>
		<item id="3976" countmax="10" chance="50000"/><!-- worm -->
		<item id="2148" countmax="80" chance="100000"/><!-- gold coin -->
		<item id="2406" chance="33333"/><!-- short sword -->
		<item id="2209" chance="2000"/><!-- club ring -->
		<item id="2490" chance="4000"/><!-- dark helmet -->
		<item id="2129" chance="6666"/><!-- wolf tooth chain -->
		<item id="2666" countmax="3" chance="33333"/><!-- meat -->
		<item id="1987" chance="100000"><!-- bag -->
			<inside>
				<item id="2513" chance="2500"/><!-- battle shield -->
				<item id="2511" chance="2857"/><!-- brass shield -->
				<item id="2381" chance="5000"/><!-- halberd -->
				<item id="2148" countmax="10" chance="20000"/><!-- gold coin -->
				<item id="2671" countmax="3" chance="33333"/><!-- ham -->
			</inside>
		</item>
	</loot>
</monster>
 
I'm pretty sure that requires a source edit. I dont think ot servers use monster strategy tbh but depends what version your running it on.

On your current system, when a monster retargets it is a random target chosen from the monster list of targets (battle list). There is an option to target closest (in source) which is used for fleeing monsters but im not sure if this will work if you changed it to be this system for all monsters.

Im looking into for my own ot so i can post back if i find anything. :)

Hallux,
 
Back
Top