Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
raid, invasion
#1
Good night, I looked and didn't find it, I need a script to alert about an invasion, raid etc, for example witch invasion
Reply

#2
That depends on the server you are playing... The script below will try to detect based on selected channel messages and static texts.
local RAID_MESSAGES = {
    'Rat plague in Thais!',
    'Hungry lions scout the western Darashian desert. Travellers beware!'
}

if connected() then
    table.lower(RAID_MESSAGES)

    local screenMsg = screenmessage(true)
    if screenMsg ~= nil and screenMsg ~= '' then
        if table.find(RAID_MESSAGES, screenMsg:lower()) ~= nil then
            playsound('default')
            flashclient()
        end
    end

    local messages = getnewmessages()
    for _, message in ipairs(messages) do
        if message.sender == '' and table.find(RAID_MESSAGES, message.content:lower()) ~= nil then
            playsound('default')
            flashclient()
        end
    end

    local static_messages = getnewstatictexts()
    for _, message in ipairs(static_messages) do
        if message.sender == '' and table.find(RAID_MESSAGES, message.content:lower()) ~= nil then
            playsound('default')
            flashclient()
        end
    end
end


Alternatively, if you wanna search for just a piece of that message.
local RAID_MESSAGES = {
    'Rat plague',
    'western Darashian'
}

if connected() then
    table.lower(RAID_MESSAGES)

    local screenMsg = screenmessage(true)
    if screenMsg ~= nil and screenMsg ~= '' then
        screenMsg = screenMsg:lower()
        for _, raidMessage in ipairs(RAID_MESSAGES) do
            if string.find(raidMessage:lower(), screenMsg) ~= nil then
                playsound('default')
                flashclient()
            end
        end
    end

    local messages = getnewmessages()
    for _, message in ipairs(messages) do
        if message.sender == '' and message.content ~= nil and message.content ~= '' then
            message.content = message.content:lower()
            for _, raidMessage in ipairs(RAID_MESSAGES) do
                if string.find(raidMessage:lower(), message.content) ~= nil then
                    playsound('default')
                    flashclient()
                end
            end
        end
    end

    local static_messages = getnewstatictexts()
    for _, message in ipairs(static_messages) do
        if message.sender == '' and message.content ~= nil and message.content ~= '' then
            message.content = message.content:lower()
            for _, raidMessage in ipairs(RAID_MESSAGES) do
                if string.find(raidMessage:lower(), message.content) ~= nil then
                    playsound('default')
                    flashclient()
                end
            end
        end
    end
end
Reply

#3
Good afternoon, I play 'dura server', it has a raid channel, and the message appears on the screen in orange, this script did not work ?
Reply

#4
Hello.

Are you asking or stating that it doesn't works? I'm confused. hehe

I've applied a small change on it. The script searches for the message in your current selected channel, in screen messages (such as the green messages in middle of screen when you look something) and static message (such as creature speak).
Reply

#5
I said it already worked for me, I'm going to test this concert, thanks
Reply

#6
unfortunately it doesn't work =/
a blank message appears on the screen, and in the raid channel in orange, the same message
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Confused" title="Confused" class="smilie smilie_13" />
Reply

#7
can you check?
Reply

#8
and very important 'dura server' has many invasions =/
Reply

#9
the script works, i've tested it myself multiple times.
Reply

#10
|Only Registered members can see download links. | Click here to buy subscription or here to register.
As I said on the screen, the raid message appears in white, and in the raid channel, it appears in orange, should I lower the persistent milliseconds?
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016