local talk = TalkAction("/killall", "!killall")
function talk.onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end
local spectators = Game.getSpectators(player:getPosition(), false, false, 8, 8, 6, 6) -- should be slightly larger then the full screen.
if spectators and #spectators > 0 then
for i = 1, #spectators do
local monster = Monster(spectators[i])
if monster then
monster:addHealth((creature:getHealth() * -1))
end
end
end
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "All monsters on screen have been killed.")
return false
end
talk:separator(" ")
talk:register()