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
Selected Message Yells
#1
Hello,

It's possible to make a script if the player writes caps lock or yells then the alarm does not react for that?
Always if someone writes from afar, the alarm sceram, can it be avoided?

Thanks!
|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="Smile" title="Smile" class="smilie smilie_1" />
Reply

#2
Hello.

This script will play sound and flash client if someone sends a uppercase message and it's not on screen or any message by GM.

local SAFE_LIST = { 'player', 'player two' }
table.lower(SAFE_LIST)

local messages = getnewmessages()
local player_name = name()

for _, msg in ipairs(messages) do
    if msg.sender ~= '' and msg.sender ~= player_name and table.find(SAFE_LIST, msg.sender:lower()) == nil then
        local is_gm = false
        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
                is_gm = true
            end
        end
        if len_sender >= 4 then
            local str_sender = msg.sender:sub(0, 4)
            if str_sender == 'GOD ' then
                is_gm = true
            end
        end
        if len_sender >= 6 then
            local str_sender = msg.sender:sub(0, 6)
            if str_sender == 'Admin ' then
                is_gm = true
            end
        end
        local upper_msg = msg.content:upper()
        if is_gm or (msg.content == upper_msg and paround(0, msg.sender) > 0) then
            playsound('alert_selectedchatmessage')
            flashclient()
            break
        end
    end
end

This script will play sound and flash client if someone sends a message and it's not on screen or any message by GM.
local SAFE_LIST = { 'player', 'player two' }
table.lower(SAFE_LIST)

local messages = getnewmessages()
local player_name = name()

for _, msg in ipairs(messages) do
    if msg.sender ~= '' and msg.sender ~= player_name and table.find(SAFE_LIST, msg.sender:lower()) == nil then
        local is_gm = false
        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
                is_gm = true
            end
        end
        if len_sender >= 4 then
            local str_sender = msg.sender:sub(0, 4)
            if str_sender == 'GOD ' then
                is_gm = true
            end
        end
        if len_sender >= 6 then
            local str_sender = msg.sender:sub(0, 6)
            if str_sender == 'Admin ' then
                is_gm = true
            end
        end
        if is_gm or paround(0, msg.sender) > 0 then
            playsound('alert_selectedchatmessage')
            flashclient()
            break
        end
    end
end
Reply

#3
My point is not to play sound if the player sends a message and is not on the screen
|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="Tongue" title="Tongue" class="smilie smilie_5" />
If he writes in capital letters(yells), I would like the alarm not to scream (except for gm).
Reply

#4
Hello.

If you check the first script, you will notice that it works like you want, except that it also checks if it's on screen, because it's not possible to know when a message is whisper, default or so... So people could easily record a .cam talking to you using uppercase and you would not notice.

Anyway, this will play sound and flash client if someone sends a message and it's uppercase or if it's a gm.
local SAFE_LIST = { 'player', 'player two' }
table.lower(SAFE_LIST)

local messages = getnewmessages()
local player_name = name()

for _, msg in ipairs(messages) do
    if msg.sender ~= '' and msg.sender ~= player_name and table.find(SAFE_LIST, msg.sender:lower()) == nil then
        local is_gm = false
        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
                is_gm = true
            end
        end
        if len_sender >= 4 then
            local str_sender = msg.sender:sub(0, 4)
            if str_sender == 'GOD ' then
                is_gm = true
            end
        end
        if len_sender >= 6 then
            local str_sender = msg.sender:sub(0, 6)
            if str_sender == 'Admin ' then
                is_gm = true
            end
        end
        local upper_msg = msg.content:upper()
        if is_gm or (msg.content == upper_msg then
            playsound('alert_selectedchatmessage')
            flashclient()
            break
        end
    end
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016