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

Lua Monster Inmortal when have summons but mortal when dead summons

Izaack

Member
Joined
Jun 18, 2012
Messages
70
Solutions
1
Reaction score
17
Location
México
hello otland, I'm making a script to make a monster immortal (does not take damage), when there is a specific monster for example a summon, and when the summons die it is mortal (takes damage), and when I summon them again he becomes immortal again and so on, I already started a script where he is completely immortal but I am new to this so I don't know what else to move him, if someone could help me I would appreciate it, I currently use Otx 2.9.

I have done so far this part of the code the code works is a creaturescript.
Lua:
local percent = 100
local percent2 = 0
local monster = "Rotworm"


function onStatsChange(cid, attacker, type, combat, value)
if (type == STATSCHANGE_HEALTHLOSS) and isCreature(attacker) then
value = math.ceil(value*(percent))
doTargetCombatHealth(attacker, cid, combat, -value, 255)
doSendAnimatedText(getCreaturePos(cid), "Inmortal", 6)
return false
end
return true
end
 
Back
Top