Since some people are having problems with the built-in alerts, this aims to replace it.
Configuration
Simply set to true or false the playSound, pauseBot and logout options for each desired alerts, as well as their other options such as safelist, stuckTime and pcBelow.
Code
init start
-- local SCRIPT_VERSION = '1.0.1'
local alerts = {
{
name = 'Player on Screen',
sound = 'playeronscreen.wav',
do
local tests = {
function(safelist) return paroundignore(10, table.unpack(safelist)) > 0 end,
function(safelist) return $pattacker.id ~= 0 and not table.find(safelist, $pattacker.name:lower()) end,
function(safelist) return $mattacker.id ~= 0 and not table.find(safelist, $mattacker.name:lower()) end,
function(safelist) foreach newmessage m do if m.type == MSG_PVT then return true end end return false end,
function(safelist) foreach newmessage m do if m.type == MSG_WHISPER or m.type == MSG_DEFAULT or m.type == MSG_YELL then return true end end return false end,
function() foreach creature c do if c.name:starts('GM') or c.name:starts('CM') then return true end end return false end,
function() return not $connected end,
function(stuckTime) return $standtime > stuckTime end,
function(pcBelow) return $hppc < pcBelow end,
function(pcBelow) return $mppc < pcBelow end
}
for i = 1, #alerts do
local alert = alerts[i]
alert.test = tests[i]
if alert.safelist then
table.lower(alert.safelist)
end
end
end
init end
auto(100)
listas('Alerts')
for _, v in ipairs(alerts) do
if v.test(v.safelist or v.stuckTime or v.pcBelow) then
if v.playSound then
playsound(v.sound)
end
if v.pauseBot then
pausebot(true)
end
if v.logout then
xlog()
end
end
end
mto bom funciono para alerta player queria pedir se tem como adiciona para nao da alerta em pz ?
05-12-2014, 09:26 AM
Bryan Scott
dauto, bota pra desativar a persistent quando for repotar, e reativa quando voltar pra cave
05-13-2014, 04:29 AM
thaleschardt
you can put alerts to energy fields on the screen?
05-30-2014, 11:20 AM
Korpos
Looking msg when raid like feru,ghaz,pale count , morga etc appears how do it ??
08-23-2014, 11:41 AM
wybocenooba
Quote:
Originally Posted by Korpos
Looking msg when raid like feru,ghaz,pale count , morga etc appears how do it ??
init start
local raids = {
libertybay = {'Orc activity near Thais reported', 'Pirates are launching a surprise attack on Liberty Bay'}, -- lb raids
farmine = {'A massive orc force is gathering', 'Orc reinforcements', 'An orcish horde, ready for', 'The dragons of the Dragonblaze'}, -- farmine raids
bosses = {'The ancient volcano on Goroma', 'There is an evil presence', 'Evil Cultists have called an ancient evil', 'old cidatel are glowing', 'return is at hand.', 'has returned to his citadel once', 'An ancient evil is awakening in the mines beneath Hrodmir.', 'Demonic entities are entering', 'The demonic master has revealed itself', 'The Pale Count has risen from his crypt deep under Drefia', 'LEAVE Edron at once', 'is about to make his way into the mortal realm'} -- bosses raids
}
local beeptimes = 53 -- how many times play alarm
table.lower(raids)
init end
auto(200)
foreach newmessage m do
if m.type == MSG_RAID then
for _, v in pairs(raids) do
for k, vv in ipairs(v) do
if m.content:lower():find(vv:lower()) then
for i = 1, beeptimes do
beep() wait(450, 820)
end
end
end
end
end
end
can you help me i need alert when my friend its OFFLINE
08-23-2014, 11:02 PM
mistgun
Quote:
Originally Posted by wybocenooba
init start
local raids = {
libertybay = {'Orc activity near Thais reported', 'Pirates are launching a surprise attack on Liberty Bay'}, -- lb raids
farmine = {'A massive orc force is gathering', 'Orc reinforcements', 'An orcish horde, ready for', 'The dragons of the Dragonblaze'}, -- farmine raids
bosses = {'The ancient volcano on Goroma', 'There is an evil presence', 'Evil Cultists have called an ancient evil', 'old cidatel are glowing', 'return is at hand.', 'has returned to his citadel once', 'An ancient evil is awakening in the mines beneath Hrodmir.', 'Demonic entities are entering', 'The demonic master has revealed itself', 'The Pale Count has risen from his crypt deep under Drefia', 'LEAVE Edron at once', 'is about to make his way into the mortal realm'} -- bosses raids
}
local beeptimes = 53 -- how many times play alarm
table.lower(raids)
init end
auto(200)
foreach newmessage m do
if m.type == MSG_RAID then
for _, v in pairs(raids) do
for k, vv in ipairs(v) do
if m.content:lower():find(vv:lower()) then
for i = 1, beeptimes do
beep() wait(450, 820)
end
end
end
end
end
end
can you help me i need alert when my friend its OFFLINE
init start
local vipNames = { -- name(s) of vips (you can add as many as you want)
{name = "name"},
{name = "name"},
{name = "name"}
}
local beepTimes = 4 -- how many times play alarm
local printInfo = true -- printing information about vip who logged out
-- Dont edit here.
for _,j in ipairs(vipNames) do
j.wasonline = false
j.name = j.name:lower()
end
init end
auto(100)
foreach vipentry v do
local pos = table.find(vipNames, v.name:lower(), 'name')
if pos then
if vipNames[pos].wasonline and not v.isonline then
if printInfo then
printerror('Player ' .. v.name .. ' has logged out')
end
for _ = 1, beepTimes do
playsoundflash('disconnected.wav') wait(1200, 1400)
end
end
vipNames[pos].wasonline = v.isonline
end
end
09-16-2014, 06:44 PM
marcink
need alert if i get ... lvl
10-08-2015, 09:31 PM
giroleka
Please, alert if x straong mana potion below
01-22-2016, 01:38 AM
klabaternik
Safe list monsters dont working property
and if you can add "and m.sender ~= $name" to default messages alert cuz bot alert when own character cast spells etc