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
Equip an energy ring
#1
Hello,


I need such a scripts:


1.
|Only Registered members can see download links. | Click here to buy subscription or here to register.


Cheers!
Reply

#2
Hello.

1st script
local LIST = { 'Char1', 'Char2', 'Char3' }
local RingID_NotInUse = 3051
local RingID_InUse = 3088


if paround(0, table.unpack(LIST)) > 0 then
    local ring = finger()
    if ring.id ~= RingID_InUse then
        moveitems(RingID_NotInUse, 'finger')
    end
else
    local ring = finger()
    if ring.id == RingID_InUse then
        moveitems(RingID_InUse, '0', 'finger')
    end
end

2nd script
local RingID_NotInUse = 3051
local RingID_InUse = 3088


local flag = false
local creatures = getcreatures()
for _, creature in ipairs(creatures) do
    if creature.skull == 4 then
        flag = true
        break
    end
end

if flag then
    local ring = finger()
    if ring.id ~= RingID_InUse then
        moveitems(RingID_NotInUse, 'finger')
    end
else
    local ring = finger()
    if ring.id == RingID_InUse then
        moveitems(RingID_InUse, '0', 'finger')
    end
end

3rd script
local MESSAGE = 'Server is restarting in'
local ALERT_TIMES = 5

if connected() then
    MESSAGE = MESSAGE:lower()
    local flag = false

    local screen_message = screenmessage(true)
    if screen_message ~= nil and screen_message ~= '' then
        screen_message = screen_message:lower()
        if string.find(screen_message, MESSAGE) then
            flag = true
        end
    end

    if flag == false and ischannelselected('Server Log') then
        local messages = getnewmessages()
        for _, msg in ipairs(messages) do
            if msg.type == 3 and string.find(msg.content:lower(), MESSAGE) then
                flag = true
                break
            end  
        end
    end

    if flag then
        for i = 1, ALERT_TIMES do
            playsound('default')
            flashclient()
            wait(100)
        end
    end
end

3rd script for multiple messages
local MESSAGES = {
    'Server is restarting in',
    'Server is saving in',
}

local ALERT_TIMES = 5

if connected() then
    local flag = false

    local screen_message = screenmessage(true)
    if screen_message ~= nil and screen_message ~= '' then
        screen_message = screen_message:lower()
        for _, text in ipairs(MESSAGES) do
            if string.find(screen_message, text:lower()) then
                flag = true
                break
            end  
        end
    end

    if flag == false and ischannelselected('Server Log') then
        local messages = getnewmessages()
        for _, msg in ipairs(messages) do
            if msg.type == 3 then
                local messageContent = msg.content:lower()
                for __, text in ipairs(MESSAGES) do
                    if string.find(messageContent, text:lower()) then
                        flag = true
                        break
                    end  
                end
            end  
        end
    end

    if flag then
        for i = 1, ALERT_TIMES do
            playsound('default')
            flashclient()
            wait(100)
        end
    end
end
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#4
|Only Registered members can see download links. | Click here to buy subscription or here to register.

The message you setup is probably wrong due to some spaces, case sensitive or so. About case sensitive, I just updated the script to be case INSENSITIVE.
Notice You don't need to place the entire message, just the beginning, something "unique" to avoid false-positives (like other similar messages) . Because the script will do "contains" search, it will search for a piece, but  also works if you setup the entire message.
So if the message starts with "Server is saving in 15 minutes" then use like
local MESSAGE = 'Server is saving in'
...
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016