Signup Now
Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Alerts

  1. #1
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,440
    Reputation
    283
    Rep Power
    27

    Alerts

    Alerts


    Description

    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',

    playSound = false,
    pauseBot = false,
    logout = false,
    safelist = {'Bubble', 'Cachero'}
    },
    {
    name = 'Player Attacking',
    sound = 'playerattacking.wav',

    playSound = false,
    pauseBot = false,
    logout = false,
    safelist = {'Bubble', 'Cachero'}
    },
    {
    name = 'Monster Attacking',
    sound = 'monsterattacking.wav',

    playSound = false,
    pauseBot = false,
    logout = false,
    safelist = {'Rat', 'Bat'}
    },
    {
    name = 'Private Message',
    sound = 'privatemessage.wav',

    playSound = false,
    pauseBot = false,
    logout = false,
    safelist = {'Bubble', 'Cachero'}
    },
    {
    name = 'Default Message',
    sound = 'defaultmessage.wav',

    playSound = false,
    pauseBot = false,
    logout = false,
    safelist = {'Bubble', 'Cachero'}
    },
    {
    name = 'GM Detected',
    sound = 'gmdetected.wav',

    playSound = false,
    pauseBot = false,
    logout = false
    },
    {
    name = 'Disconnected',
    sound = 'disconnected.wav',

    playSound = false,
    pauseBot = false,
    logout = false
    },
    {
    name = 'Character Stuck',
    sound = 'characterstuck.wav',

    playSound = false,
    pauseBot = false,
    logout = false,
    stuckTime = 30000 -- ms
    },
    {
    name = 'Health Below',
    sound = 'lowhealth.wav',

    playSound = false,
    pauseBot = false,
    logout = false,
    pcBelow = 50
    },
    {
    name = 'Mana Below',
    sound = 'lowmana.wav',

    playSound = false,
    pauseBot = false,
    logout = false,
    pcBelow = 50
    }
    }

    -- Do not edit below this line

    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

    Git
    Last edited by Raphael; 04-26-2014 at 08:41 PM.
    RaphSeller
    PayPal Instantaneous Reseller


    raphseller.com

  2. #2
    Free User
    Join Date
    Dec 2013
    Posts
    32
    Reputation
    10
    Rep Power
    0
    mto bom funciono para alerta player queria pedir se tem como adiciona para nao da alerta em pz ?

  3. #3
    Free User
    Join Date
    Dec 2013
    Posts
    32
    Reputation
    10
    Rep Power
    0
    dauto, bota pra desativar a persistent quando for repotar, e reativa quando voltar pra cave

  4. #4
    Free User
    Join Date
    Apr 2014
    Posts
    25
    Reputation
    10
    Rep Power
    0
    you can put alerts to energy fields on the screen?

  5. #5
    Free User
    Join Date
    Apr 2014
    Posts
    2
    Reputation
    10
    Rep Power
    0
    Looking msg when raid like feru,ghaz,pale count , morga etc appears how do it ??

  6. #6
    Wind Powered wybocenooba's Avatar
    Join Date
    Jan 2014
    Posts
    409
    Reputation
    16
    Rep Power
    21
    Quote Originally Posted by Korpos View Post
    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

  7. #7
    Moderator mistgun's Avatar
    Join Date
    Dec 2013
    Location
    Lodz, Poland
    Posts
    1,821
    Reputation
    220
    Rep Power
    26
    Quote Originally Posted by wybocenooba View Post
    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
    grab it ty to @Raphael
    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
    Last edited by mistgun; 08-24-2014 at 12:38 PM. Reason: modified.

  8. #8
    Free User
    Join Date
    Jul 2014
    Posts
    71
    Reputation
    10
    Rep Power
    20
    need alert if i get ... lvl

  9. #9
    Free User
    Join Date
    Sep 2015
    Posts
    3
    Reputation
    10
    Rep Power
    0
    Please, alert if x straong mana potion below

  10. #10
    Free User
    Join Date
    Dec 2015
    Posts
    70
    Reputation
    10
    Rep Power
    17
    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

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •