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

Possible or not? Creatures

clario

OTS based on Heroes III Might and Magic
Joined
Feb 4, 2018
Messages
98
Reaction score
5
Hello there ! IM using TSF 0.4 i have a questions about :

ITs possible or not to give that spell for monster :

IGNORES 80 % of Defence what you got ? (basic def , armor , shield etc)


Debuff a player (example: i have 60 mlvl and he debuff me to 50 mlvl )


Debuff player of HP % (i got 1000 HP i got debuff and i get 800 hp for like 3 sec?)

Its possible to create this scripts ?
 
@bayview
you got any sollution to this? im just look around for any lua but i dont find any in google
Search for scripts on this forum that use onStatsChange. But mainly what you should be doing is reading up on lua and then modify existing scripts til you have a good idea why there are separate folders for separate scripts then you can start writing your own... Learn know what I am saying?

If you have no time then make time... just think about all the time you've wasted waiting for someone to answer this question and any other questions you may have had or will have in the future?
 
the three spells you asked have one thing in common: CONDITIONS.
Just create a script for each one using conditions, as if they would be used for players. Then make your monsters use it.
 
Hello there ! IM using TSF 0.4 i have a questions about :

ITs possible or not to give that spell for monster :

IGNORES 80 % of Defence what you got ? (basic def , armor , shield etc)


Debuff a player (example: i have 60 mlvl and he debuff me to 50 mlvl )


Debuff player of HP % (i got 1000 HP i got debuff and i get 800 hp for like 3 sec?)

Its possible to create this scripts ?

Here is an example how to reduce a players melee and shielding skills for 4 seconds (ice golem spell)
Its made for 0.3.6 but should also work for 0.4
But you should be able to change it to magic level and other conditions, im not sure if hp reduce is possible but dont quote me on that.
You have to look what constants you can use (hint: search in data/lib/000-constant.lua)

data/spells/scripts/monster/ice_golem_skill_reducer.lua (If you dont have the monster folder just add it :))
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)

local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 4 * 1000) -- 4 * 1000 = 4000 ms (4 seconds)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 85) -- set players  shielding to 85% (debuff), if the value is 110 then the players shielding would be 110% (buff)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 85) -- set players  meleeskills to 85% (debuff), if the value is 110 then the players meleeskills would be 110% (buff)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end

You have to add this inside
data/spells/spells.xml
XML:
<instant name="ice_golem_skill_reducer" words="###4" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/ice_golem_skill_reducer.lua" />

Then you edit your monster you want to use this spell, this is what you have to add to the monsters xml file
XML:
<attack name="ice_golem_skill_reducer" interval="2000" chance="10" />

Then the monster should have a spell like exori to reduce every player inside the exori area down to 85% of the players regular skill. (You can edit this the way you want, inside the lua file)
skill * 0.85 = temporary skill for 4 seconds

Edit:
This might not be what you are looking for but its a good start.

There is a way to change the maxHealth of a player, but it seems you want to change the current health of a player, its possible but need to make some custom function to calculate the percent for players current health.

About the defence, armor and shielding as a condition, im sure there is way to make that possible, but the thing i provided in the example reduce shielding skill only i didnt find anything about armor, so that has to be something custom aswell.

Magic level is just as the shielding or melee condition just use CONDITION_PARAM_STAT_MAGICLEVELPERCENT
Then you have to test what percent suits you
 
Last edited:
Here is an example how to reduce a players melee and shielding skills for 4 seconds (ice golem spell)
Its made for 0.3.6 but should also work for 0.4
But you should be able to change it to magic level and other conditions, im not sure if hp reduce is possible but dont quote me on that.
You have to look what constants you can use (hint: search in data/lib/000-constant.lua)
THANKS TO @Mummrik it's helped me alot , also got all spells based on yours help!
IGNORES 80 %
Debuff a player
Debuff player of HP %
 
THANKS TO @Mummrik it's helped me alot , also got all spells based on yours help!
I remember when i was going to add those spells to my monsters i had no clue how to make it. But i did manage to get it to work, and also make it possible to teach someone else. :)

Since most classic TFS servers dont have debuff spells on monsters, that actually add alot to the gameplay.
I know newer TFS versions have monsters whit debuff spells though.
 
Back
Top