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
FREE Alert / Pause if tile effect detected
#1
Hello.

You can use this script to try to detect if a monster has been summoned or if you got teleported, but that depends on effects that shows up.

I don't believe that there's a way to make 100% sure that a monster was summoned, because it could be respawn or even a creature summon (like orc shaman with snakes).

I can tell you two options that I have in my mind now that you could do to check that, but not sure if it's 100%. Both methods are not 100% accurate, but worth to try.

1. gettileeffect(number posx, number posy, number posz) or gettileseffect(). You can use those functions to detect effects on sqm like healing effect (shinning stars), etc.
Example: This script will play sound, flash client whenever there's a effect in any tile in your screen.
local tilesEffects = gettileseffect()
for _, tile in ipairs(tilesEffects) do
    if tile.count > 0 then
        playsound('default')
        flashclient()
        pausebot(true)
    end
end

The script above would not be good, because healing would trigger that. So you could check for specific effects only:
local EFFECTS = { 11 } -- Effects ids

local tilesEffects = gettileseffect()
for _, tile in ipairs(tilesEffects) do
    for __, effect in ipairs(tile.effects) do
        if table.find(EFFECTS, effect) ~= nil then
            playsound('default')
            flashclient()
            pausebot(true)
        end
    end
end

How to find effect id? Simple. Just reproduce the effect, make it happen in your screen and run the script below. You must do it really fast (you can let the script running on a persistent with low intervals). For example: If you wanna find the blue ball effect (that shows up when you login and perhaps when you get teleported, not sure if when gm does that you get that effect) then let the script running on persistents with low interval (like 100ms) and relog.
local tilesEffects = gettileseffect()
for _, tile in ipairs(tilesEffects) do
    for __, effect in ipairs(tile.effects) do
        print('effect id:', effect)
    end
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016