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

sestorme

Member
Joined
Dec 9, 2011
Messages
272
Reaction score
6
Location
Birmingham, UK
LUA:
function onStatsChange(cid, attacker, type, combat, value)
	if type == STATSCHANGE_HEALTHLOSS and combat == COMBAT_PHYSICALDAMAGE then
		if isPlayer(cid) == TRUE then
			local weapon = getPlayerSlotItem(cid, CONST_SLOT_ARMOR)
			if(weapon.itemid == 2464) then
				if math.random(1,10) == 1 then
				doSendAnimatedText(getPlayerPosition(cid), "Dodge!", 18)
				doTargetCombatHealth(attacker, cid, COMBAT_PHYSICALDAMAGE, value, value, CONST_ME_NONE)
				end
			end
		end
	end
	return true
end

Script works absolutely fine, however, it's rather annoying that damage dealing number still comes up. It cannot kill, as when I created a demon dealing +1k damage it was constantly dealing only 1 damage to 1max hp player and couldn't kill it, but damage number is still visible. Is there any way to get rid of it?
 
Back
Top