# Monster attack tutorial

#### Sentielo

##### Intermediate OT User
Hello all,

Got currently nothing to do so I was about making a monster tutorial. So here we go.

Attack name:
This are the attacknames, TFS got (if I am missing one, please report).
physical
energy
earth
fire
undefined
lifedrain OR life drain
healing
drown
ice
holy
death
This mean if you got hit by an attack from a monster. It will causes for example an energy attack. You have to write it, as the following:
<attack name="energy"/>
This is quite important , because there are items in tibia, which loweres / higheres the attacks from monsters!!

Some more attacks!
Poisoncondition
Energycondition
Firecondition
Drowncondition
Skill
On the condition attacks, the formula is (for example, they are on all the same unfortunately):
You will get burned, poisoned, etc. This will have the same formula as "poison" do, but poison will not work on attack names to create conditions. So ... / 20 = ... etc. The difference is, that you can fill in a min damage and a maxdamage (look below)!

A condition will look like:
</attack name="poisoncondition" target="1" range="7" min="-20" max="-100"
Means: min poison = 1, max poison = 5.
Skill will work the following:
If a monster does that attack on you, you will drop a skill for some time (duration=5000, means 5 seconds). I guess (aint sure) that you can also use percentages. So a player will drop 60% of a skill.
Now a list of which skills will work:
First, club, sword, axe, distance, dist, shielding, shield, fishing, fish, level, magic level, magiclevel
How will the attack look like?
<attack name="skills" interval="2000" chance="5" range="7" radius="1" target="1" axe="-1">
I beleave axe="-60%" will also work, aint sure!!!
</attack>
Every 2 seconds there is a 5 percent change that a target will directly get hit from a max of 7 sqm range and he will lose -1 skill (or -60% of his skills).

Melee damage.
There are two ways of making melee damages. You can use the min and max formulas or you can use the skill and attack formulas. I really don't know if there are any difference, but Cykotitan told me there weren't. First I will post how the scripts looks like, after that I will explain how it works.
<attack name="melee" interval="2000" min="-0" max="-100"/>
This will mean a monster will hit between 0 and 100. This isn't that hard to understand indeed.
<attack name="melee" interval="2000" skill="10" attack="8"/>
TFS have used this formula to know how hard a monster will hit with skill and attack. maxhit = skill*(attack*0,05)+(attack*0,5). When you fill in this you will get the following outcome:
10*(8*0,05)+(8*0,5) = 8. A monster will hit max with 8 hitpoints.
Finally remember that the attack name is always melee (or physical with range="1"). Finally (this is only for melee hits) you can at
poison="20" / poison="100"
The formula for this attack type is:
Poison / 20 = how hard the potion will hit. So if poison is 100, than a poison will hit with 100/20 = 5 hitpoints at the beginning. After getting 20 times hit by poison, the poison will change from 5, to 4, etc.
Now we will have a look at the different areaeffects and shooteffects! Areaeffects are the effect which you see on a wave, beam, bomb or when a monster gots hit by it or around it. On like every attack there are areaeffects, but not on melee hits and sometimes on paralyze spells (could be more, but nvm).
Now a list for the able Areaeffects (taken from the svn):
{"redspark", MAGIC_EFFECT_DRAW_BLOOD},
{"bluebubble", MAGIC_EFFECT_LOSE_ENERGY},
{"poff", MAGIC_EFFECT_POFF},
{"yellowspark", MAGIC_EFFECT_BLOCKHIT},
{"explosionarea", MAGIC_EFFECT_EXPLOSION_AREA},
{"explosion", MAGIC_EFFECT_EXPLOSION_DAMAGE},
{"firearea", MAGIC_EFFECT_FIRE_AREA},
{"yellowbubble", MAGIC_EFFECT_YELLOW_RINGS},
{"greenbubble", MAGIC_EFFECT_POISON_RINGS},
{"blackspark", MAGIC_EFFECT_HIT_AREA},
{"teleport", MAGIC_EFFECT_TELEPORT},
{"energy", MAGIC_EFFECT_ENERGY_DAMAGE},
{"blueshimmer", MAGIC_EFFECT_WRAPS_BLUE},
{"redshimmer", MAGIC_EFFECT_WRAPS_RED},
{"greenshimmer", MAGIC_EFFECT_WRAPS_GREEN},
{"fire", MAGIC_EFFECT_HITBY_FIRE},
{"greenspark", MAGIC_EFFECT_POISON},
{"mortarea", MAGIC_EFFECT_MORT_AREA},
{"greennote", MAGIC_EFFECT_SOUND_GREEN},
{"rednote", MAGIC_EFFECT_SOUND_RED},
{"poison", MAGIC_EFFECT_POISON_AREA},
{"yellownote", MAGIC_EFFECT_SOUND_YELLOW},
{"purplenote", MAGIC_EFFECT_SOUND_PURPLE},
{"bluenote", MAGIC_EFFECT_SOUND_BLUE},
{"whitenote", MAGIC_EFFECT_SOUND_WHITE},
{"bubbles", MAGIC_EFFECT_BUBBLES},
{"dice", MAGIC_EFFECT_CRAPS},
{"yellowfirework", MAGIC_EFFECT_FIREWORK_YELLOW},
{"redfirework", MAGIC_EFFECT_FIREWORK_RED},
{"bluefirework", MAGIC_EFFECT_FIREWORK_BLUE},
{"stun", MAGIC_EFFECT_STUN},
{"sleep", MAGIC_EFFECT_SLEEP},
{"watercreature", MAGIC_EFFECT_WATERCREATURE},
{"groundshaker", MAGIC_EFFECT_GROUNDSHAKER},
{"hearts", MAGIC_EFFECT_HEARTS},
{"fireattack", MAGIC_EFFECT_FIREATTACK},
{"energyarea", MAGIC_EFFECT_ENERGY_AREA},
{"smallclouds", MAGIC_EFFECT_SMALLCLOUDS},
{"holydamage", MAGIC_EFFECT_HOLYDAMAGE},
{"bigclouds", MAGIC_EFFECT_BIGCLOUDS},
{"icearea", MAGIC_EFFECT_ICEAREA},
{"iceattack", MAGIC_EFFECT_ICEATTACK},
{"stones", MAGIC_EFFECT_STONES},
{"smallplants", MAGIC_EFFECT_SMALLPLANTS},
{"carniphila", MAGIC_EFFECT_CARNIPHILA},
{"purpleenergy", MAGIC_EFFECT_PURPLEENERGY},
{"yellowenergy", MAGIC_EFFECT_YELLOWENERGY},
{"holyarea", MAGIC_EFFECT_HOLYAREA},
{"bigplants", MAGIC_EFFECT_BIGPLANTS},
{"cake", MAGIC_EFFECT_CAKE},
{"giantice", MAGIC_EFFECT_GIANTICE},
{"watersplash", MAGIC_EFFECT_WATERSPLASH},
{"plantattack", MAGIC_EFFECT_PLANTATTACK},
{"tutorialarrow", MAGIC_EFFECT_TUTORIALARROW},
{"tutorialsquare", MAGIC_EFFECT_TUTORIALSQUARE},
{"mirrorhorizontal", MAGIC_EFFECT_MIRRORHORIZONTAL},
{"mirrorvertical", MAGIC_EFFECT_MIRRORVERTICAL},
{"skullhorizontal", MAGIC_EFFECT_SKULLHORIZONTAL},
{"skullvertical", MAGIC_EFFECT_SKULLVERTICAL},
{"assassin", MAGIC_EFFECT_ASSASSIN},
{"stepshorizontal", MAGIC_EFFECT_STEPSHORIZONTAL},
{"bloodysteps", MAGIC_EFFECT_BLOODYSTEPS},
{"stepsvertical", MAGIC_EFFECT_STEPSVERTICAL},
{"yalaharighost", MAGIC_EFFECT_YALAHARIGHOST},
{"bats", MAGIC_EFFECT_BATS},
{"smoke", MAGIC_EFFECT_SMOKE},
{"insects", MAGIC_EFFECT_INSECTS}
The shooteffect are used by attack in a range from more than 1 sqm distance! It are the effects that a spell uses to go from A to B . So you will use this spells for missile spells, explosion spells, gfb spells (used on creatures), etc.

Here is a list with shooteffects:
{"spear", SHOOT_EFFECT_SPEAR},
{"bolt", SHOOT_EFFECT_BOLT},
{"arrow", SHOOT_EFFECT_ARROW},
{"fire", SHOOT_EFFECT_FIRE},
{"energy", SHOOT_EFFECT_ENERGY},
{"poisonarrow", SHOOT_EFFECT_POISONARROW},
{"burstarrow", SHOOT_EFFECT_BURSTARROW},
{"throwingstar", SHOOT_EFFECT_THROWINGSTAR},
{"throwingknife", SHOOT_EFFECT_THROWINGKNIFE},
{"smallstone", SHOOT_EFFECT_SMALLSTONE},
{"death", SHOOT_EFFECT_DEATH},
{"largerock", SHOOT_EFFECT_LARGEROCK},
{"snowball", SHOOT_EFFECT_SNOWBALL},
{"powerbolt", SHOOT_EFFECT_POWERBOLT},
{"poison", SHOOT_EFFECT_POISONFIELD},
{"infernalbolt", SHOOT_EFFECT_INFERNALBOLT},
{"huntingspear", SHOOT_EFFECT_HUNTINGSPEAR},
{"enchantedspear", SHOOT_EFFECT_ENCHANTEDSPEAR},
{"redstar", SHOOT_EFFECT_REDSTAR},
{"greenstar", SHOOT_EFFECT_GREENSTAR},
{"royalspear", SHOOT_EFFECT_ROYALSPEAR},
{"sniperarrow", SHOOT_EFFECT_SNIPERARROW},
{"onyxarrow", SHOOT_EFFECT_ONYXARROW},
{"piercingbolt", SHOOT_EFFECT_PIERCINGBOLT},
{"whirlwindsword", SHOOT_EFFECT_WHIRLWINDSWORD},
{"whirlwindaxe", SHOOT_EFFECT_WHIRLWINDAXE},
{"whirlwindclub", SHOOT_EFFECT_WHIRLWINDCLUB},
{"etherealspear", SHOOT_EFFECT_ETHEREALSPEAR},
{"ice", SHOOT_EFFECT_ICE},
{"earth", SHOOT_EFFECT_EARTH},
{"holy", SHOOT_EFFECT_HOLY},
{"suddendeath", SHOOT_EFFECT_SUDDENDEATH},
{"flasharrow", SHOOT_EFFECT_FLASHARROW},
{"flammingarrow", SHOOT_EFFECT_FLAMMINGARROW},
{"flamingarrow", SHOOT_EFFECT_FLAMMINGARROW},
{"shiverarrow", SHOOT_EFFECT_SHIVERARROW},
{"energyball", SHOOT_EFFECT_ENERGYBALL},
{"smallice", SHOOT_EFFECT_SMALLICE},
{"smallholy", SHOOT_EFFECT_SMALLHOLY},
{"smallearth", SHOOT_EFFECT_SMALLEARTH},
{"eartharrow", SHOOT_EFFECT_EARTHARROW},
{"explosion", SHOOT_EFFECT_EXPLOSION},
{"cake", SHOOT_EFFECT_CAKE}
Finally I would love to give some explanation of how the attacks should look like.
length="8" spread="3" is a wave. The length means how long the wave is (8 sqm). And the spread is just some kind of a spread.
IF spread="0" you will use a beam (just one long line). You also got range = 7 and target = 0 or target = 1. The range is the .. sqm the monster will hit you away from and target="1" means you will hit the target and 0 is you wont hit the target directly. Radius has been used for GFBs and other bombs. Radius = 5 is like how a GFB is.

Hope you like the tutorial,
Sentielo

Will probably be updated (is not ready yet, but wanna sleep).

Last edited:

Nice

#### monodark

##### Member
Nice only one thing.. In the TFS distro I use (TFS 0.2.9 Mystic Spirit) skills is not a legal attack name..

I am getting errors like this:

Error: [Monsters::deserializeSpell] - Barbarian Brutetamer - Unknown spell name: skills

=D (I am using your monster pack btw)

Guess I'll have to rename it all?

#### Exedion

##### Excellent OT User
Nice! now work on area spells for monsters!

#### Piltrafa

##### New Member
Nice Sentinelo, but if you have nothing to do, why don't fix loot from your Monsterpack ? haha, its joke!

Now newbies can edit attacks/spells from monsters.

#### Animera

##### * * * * *
Thanks a lot i always wondering how to to make that losing skill ability.

nice sentielo!

#### Oso001

##### New Member
What is the attackname for exori. I want to Fix The exori attack in Fury, but I dont know which one it is.

<attack name="melee" interval="2000" skill="50" attack="170"/>
<attack name="physical" interval="2000" chance="17" range="7" min="-140" max="-200">
<attribute key="shootEffect" value="throwingstar"/>
</attack>
<attack name="melee" interval="1000" chance="15" range="7" radius="3" target="0" min="-115" max="-155">
<attribute key="areaEffect" value="blackspark"/>
</attack>
<attack name="melee" interval="3000" chance="30" length="8" spread="0" min="-300" max="-420">
<attribute key="areaEffect" value="redspark"/>
</attack>
<attack name="physical" interval="1000" chance="25" range="7" min="-170" max="-200">
<attribute key="shootEffect" value="snowball"/>
<attribute key="areaEffect" value="poff"/>
</attack>

#### Skrypton

##### Unknown
Looks like it's this one:

Code:
``````<attack name="melee" interval="1000" chance="15" range="7" radius="3" target="0" min="-115" max="-155">
<attribute key="areaEffect" value="blackspark"/>
</attack>``````
You probably already figured that out by now though

#### GOD Half

##### Intermediate OT User
Hi, how I show print dmg max in console?
<attack name="melee" interval="2000" min="-0" max="-100"/>