Marcus
User.postCount++;
With this you can easily detect whoever use auto-heal in your server.
It will remove nearly all health for 0.3 seconds and then give it back.
Look closely and see if the player cast a healing spell or use potion/rune within a little "too short" time.
Tip, Test a player when he looks half-afk so you can be certain he wont heal by himself..
Etc bad idea testing him if he's attacking a demon, he might have a finger on healing and might react to the health change.
talkaction to run it:
/autoheal PLAYERNAME
etc: /autoheal Eternal Oblivion
Enjoy it, and get those damn botters!
talkactions.xml
auto_heal.lua
It will remove nearly all health for 0.3 seconds and then give it back.
Look closely and see if the player cast a healing spell or use potion/rune within a little "too short" time.
Tip, Test a player when he looks half-afk so you can be certain he wont heal by himself..
Etc bad idea testing him if he's attacking a demon, he might have a finger on healing and might react to the health change.
talkaction to run it:
/autoheal PLAYERNAME
etc: /autoheal Eternal Oblivion
Enjoy it, and get those damn botters!
talkactions.xml
PHP:
<talkaction words="/autoheal" separator=" " script="auto_heal.lua" />
auto_heal.lua
PHP:
function onSay(player, words, param)
if player:getGroup():getId() < 3 then
return true
end
local name = param
local separatorPos = param:find(',')
if separatorPos ~= nil then
name = param:sub(0, separatorPos - 1)
end
if name ~= "" then
target = Player(name)
if target then
target:addHealth(-(target:getHealth()-50))
addEvent(autoHeal_healthback, 300, target.uid)
player:sendTextMessage(22, target:getName() ..": health was removed.")
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Player not found")
end
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "/autoheal PLAYERNAME")
end
return true
end
function autoHeal_healthback(cid)
target = Player(cid)
target:addHealth(target:getMaxHealth())
return true
end