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
Gm on screen
#1
Script 

Send message on default when gm appears!
U have?

#2
local BLACK_LIST = { 'Dev Adm', 'Dev Guy' } -- Any other GM that name doesnt starts with GM, CM, GOD or Admin. e.g.: Dev Adm
local MESSAGES = { 'hi', 'hello', 'sup', 'what', 'hi hi', '?'} -- Random stuff to say.
local DELAY = 20000 -- Milliseconds. Time to wait after saying a random message.

local GM_FOUND = false

if ischannelselected('Default') then
    table.lower(BLACK_LIST)
    local messages = getnewmessages()

    for _, msg in ipairs(messages) do
        if msg.sender ~= '' then
            if table.find(BLACK_LIST, msg.sender:lower()) ~= nil then
                GM_FOUND = true
            else
                local len_sender = msg.sender:len()
                if len_sender >= 3 then
                    local str_sender = msg.sender:sub(0, 3)
                    if str_sender == 'GM ' or str_sender == 'CM ' then
                        GM_FOUND = true
                    end
                end
                if len_sender >= 4 then
                    local str_sender = msg.sender:sub(0, 4)
                    if str_sender == 'GOD ' then
                        GM_FOUND = true
                    end
                end
                if len_sender >= 6 then
                    local str_sender = msg.sender:sub(0, 6)
                    if str_sender == 'Admin ' then
                        GM_FOUND = true
                    end
                end
            end
        end
    end
end

if not GM_FOUND then
    local creatures = getcreatures('pfs')

    for _, creature in ipairs(creatures) do
        if creature.name ~= '' then
            if table.find(BLACK_LIST, creature.name:lower()) ~= nil then
                GM_FOUND = true
            else
                local len_sender = creature.name:len()
                if len_sender >= 3 then
                    local str_sender = creature.name:sub(0, 3)
                    if str_sender == 'GM ' or str_sender == 'CM ' then
                        GM_FOUND = true
                    end
                end
                if len_sender >= 4 then
                    local str_sender = creature.name:sub(0, 4)
                    if str_sender == 'GOD ' then
                        GM_FOUND = true
                    end
                end
                if len_sender >= 6 then
                    local str_sender = creature.name:sub(0, 6)
                    if str_sender == 'Admin ' then
                        GM_FOUND = true
                    end
                end
            end
        end    
    end

end

if GM_FOUND then
    say(MESSAGES[random(1, #MESSAGES)])    
    wait(DELAY)
end



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016