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

Magiceffect when hitted

Sizaro

Advanced OT User
Joined
Aug 20, 2007
Messages
5,153
Solutions
5
Reaction score
212
Location
Sweden
GitHub
coldensjo
Can someone make this script for me?

If you get hit by anything, you will see an magiceffect 62, 63 and 64 ( randoms ) on yourself! But only if the hit has a number, I mean if example: A goblin hit player. Goblin hit player for 0, then = no effect. If the goblin hit players 1 or more then = effect.

Is this possible? :thumbup:
 
Last edited:
It's possible.

Player.cpp : onAttackedCreatureDrainHealth
Code:
if (points > 0)
	sendMagicEffect(getPosition(), random_range(62, 64));
 
demon.xml

PHP:
<attack name="melee" interval="2000" min="-100" max="-200">
<attribute key="areaEffect" value="blueshimmer"/>

I think this is what you are talking about. :thumbup:
 
PHP:
<attack name="melee" interval="2000" min="-100" max="-200">
<attribute key="areaEffect" value="blueshimmer"/>

I think this is what you are talking about. :thumbup:

1. He want rondom effect.
2. Should he add it in all monsters?
3. He want if you lose nothing, that there don't comes an effect.
 
Perhaps something like that:
Lua:
function onStatsChange(cid, attacker, type, combat, value)
	if type == STATSCHANGE_HEALTHLOSS and value >= 1 then
		doSendMagicEffect(getCreaturePosition(cid), math.random(62, 64))
	end
	return TRUE
end
 
Back
Top