Nightimarez
New Member
- Joined
- Jul 24, 2008
- Messages
- 287
- Reaction score
- 2
I'd like a script that says Finish Him! in red letters above the player when he is below 10% health.
function onStatsChange(cid, attacker, type, combat, value)
if getCreatureMaxHealth(cid)*0.1 <= getCreatureHealth(cid) then
doCreatureSay(cid, 'Finish Him!', TALKTYPE_MONSTER)
end
return true
end
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) and isPlayer(attacker) and getCreatureMaxHealth(cid)*0.1 <= getCreatureHealth(cid) then
doCreatureSay(cid, 'Finish Him!', TALKTYPE_MONSTER)
end
return true
end
function onLogin(cid)
registerCreatureEvent(cid, "finishim")
return true
end
<event type="statschange" name="finishim" event="script" value="finish.lua"/>
<event type="login" name="finish" event="script" value="finish.lua"/>
getCreatureMaxHealth[B](cid)[/B]*0.1 <= getCreatureHealth[B](cid)[/B] then
doCreatureSay[B](cid,[/B] 'Finish Him!', TALKTYPE_MONSTER)
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) and isPlayer(attacker) and getCreatureHealth(cid) <= getCreatureMaxHealth(cid)*0.1 and combat ~= 128 or type == 1 then
doCreatureSay(cid, 'Finish Him!', TALKTYPE_MONSTER)
end
return true
end
function onLogin(cid)
registerCreatureEvent(cid, "finishim")
return true
end
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) and isPlayer(attacker) and getCreatureHealth(cid) <= getCreatureMaxHealth(cid)*0.1 and combat ~= 128 or type == 1 then
doCreatureSay(cid, getPlayerSex(cid) == 0 and 'Finish Her!' or 'Finish Him!', TALKTYPE_MONSTER)
end
return true
end
function onLogin(cid)
registerCreatureEvent(cid, "finishim")
return true
end
local exhaustTime = 60
local exhaustStorage = 1020
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) and isPlayer(attacker) and getCreatureHealth(cid) <= getCreatureMaxHealth(cid)*0.1 and combat ~= 128 or type == 1 then
if exhaustion.check(cid, exhaustStorage) then
return true
else
exhaustion.set(cid, exhaustStorage, exhaustTime)
doCreatureSay(cid, getPlayerSex(cid) == 0 and 'Finish Her!' or 'Finish Him!', TALKTYPE_MONSTER)
end
end
return true
end
function onLogin(cid)
registerCreatureEvent(cid, "finishim")
return true
end
function onThink(interval)
for _,cid in ipairs(getPlayersOnline()) do
if getCreatureHealth(cid) <= getCreatureMaxHealth(cid)*0.1 then
doSendAnimatedText(getThingPos(cid),(getPlayerSex(cid) == 0 and "Kill her" or "Kill him"), TEXTCOLOR_RED)
end
end
return true
end
local exhaustTime = 60
local exhaustStorage = 1020
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) and isPlayer(attacker) and type == 1 then
if getCreatureHealth(cid) <= math.floor((getCreatureMaxHealth(cid)*0.10))
if exhaustion.check(cid, exhaustStorage) then
return true
else
exhaustion.set(cid, exhaustStorage, exhaustTime)
doCreatureSay(cid, getPlayerSex(cid) == 0 and 'Finish Her!' or 'Finish Him!', TALKTYPE_MONSTER)
end
end
end
return true
end
function onLogin(cid)
registerCreatureEvent(cid, "finishim")
return true
end