PDA

View Full Version : Alarm if default message



drullitos
08-11-2012, 11:11 PM
it would be very useful to have alarm when someone writes in the local chat

Bushu
08-12-2012, 04:28 PM
you'd have to look at your pc every time the bot refill ;p
It will be better if you set alarm 'player on screen'

drullitos
08-12-2012, 06:42 PM
i dont use refiller and because there are always people botting here the alarm would go off all the time, but sometimes someone comes and ask stuff like "botter?" etc and this must be a pretty simple thing to add anyway

drullitos
08-15-2012, 07:06 PM
bump...!

l4z
12-02-2015, 01:50 PM
indeed bump!
You wont set alarm player on screen when for example is 10 botters on same cave.
Thats why would be nice to get script to alarm when msg on default.
Thanks!

xto94
12-02-2015, 04:19 PM
LocalSpeechProxy.OnReceive('proxy', function(proxy, mtype, speaker, level, text)
if text then
if speaker ~= Self.Name() then
alert()
end
end

end) probably this is what you guys are looking for

l4z
12-02-2015, 06:12 PM
xto94 dzieki
Is there any option to ignore casting spells from players to this script?

shadowart
12-02-2015, 07:40 PM
I'd disable the alarms if there's more than one other player on the screen or if there's an npc on screen as that likely means that we're inside a town:

local function npcsOnScreen()
local count = 0
for _, _ in Creature.iNpcs(7) do
count = count + 1
end
return count
end

local function playersOnScreen()
local count = 0
for name, _ in Creature.iPlayers(7) do
if name ~= Self.Name() then
count = count + 1
end
end
return count
end

LocalSpeechProxy.OnReceive("Chat Alarm", function(_, msgType, speaker, level, text)
if msgType == "say" and speaker ~= Self.Name() and npcsOnScreen() == 0 and playersOnScreen() < 2 then
alert()
end
end)


Spellcasts are disabled by checking mtype.

rodrigokiller
01-31-2017, 12:13 AM
its possible to get an alarm when a friend send a private message?