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
01-22-2016, 12:24 PM
Raphael
Quote:
Originally Posted by 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
This script is 'deprecated', you should really stick with the built in alerts.
01-22-2016, 04:55 PM
klabaternik
Quote:
Originally Posted by Raphael
This script is 'deprecated', you should really stick with the built in alerts.
i know but i want player alert in depending to my $wpsection and build in alerts dont allow that. But I changed this a little and working fine.
01-23-2016, 12:01 AM
Raphael
Quote:
Originally Posted by klabaternik
i know but i want player alert in depending to my $wpsection and build in alerts dont allow that. But I changed this a little and working fine.
Just enable/disable it using a hotkey?
01-23-2016, 12:12 AM
klabaternik
Quote:
Originally Posted by Raphael
Just enable/disable it using a hotkey?
I had in mind player on screen alert when player is on screen on some wpsection. But i got it alredy
01-23-2016, 12:36 AM
zoxovsky
doesnt work, i just want use pm messages sound alert replacing false to true and nothing. persistent turn on.
03-22-2016, 06:44 PM
lcuadrosdub
hello, i need an alert when my ping rate grows up, also a function to use a ring when pings grows or use a certain spell
can some1 helps me ? =)
thx
06-13-2016, 02:54 PM
saweh
Is there a way to turn on an alarm on a label? I want to activate player on screen alarm when i enter the cave.
08-09-2016, 08:23 AM
crashzin
can put if disconnect dont play alarm?
example if disconnect this play alarm of character stucked..
09-12-2016, 03:15 AM
Oxis Dane
Is there any way you could make an alarm for X amount of small stones?
11-12-2016, 01:14 AM
Honeronn
Could someone help me with an alert for SD lower than [...] ?
01-03-2017, 03:45 AM
heartfiliatv
@Raphael There is any way for add if any member of my guild or academy is on screen don't make the alert?