Hi
I need alert if somewhere on my screen is more than 1 monster in same SQM
Can someone help me?
Hi
I need alert if somewhere on my screen is more than 1 monster in same SQM
Can someone help me?
Last edited by Etee; 02-21-2017 at 06:12 PM.
My Trades:
Sold 452 ED open PvP to @Hersiek
Sold 394 EK open PvP to Adam
Sold 232 MS retro PvP to @Dworak
Sold 12 DV acc to @necon
Sold 7 DV acc to @GPower
Sold 7 DV acc to @javikrintos
Sold 5 DV acc to @darko
Sold 312 RP open PvP to @Smerfik
Sold 305 EK retro PvP to @shyo
Sold 283 ED open PvP to @shyo
Sold 304 MS open PvP to @Kinito
Helped you? REP+
Someone knows how to do it?
My Trades:
Sold 452 ED open PvP to @Hersiek
Sold 394 EK open PvP to Adam
Sold 232 MS retro PvP to @Dworak
Sold 12 DV acc to @necon
Sold 7 DV acc to @GPower
Sold 7 DV acc to @javikrintos
Sold 5 DV acc to @darko
Sold 312 RP open PvP to @Smerfik
Sold 305 EK retro PvP to @shyo
Sold 283 ED open PvP to @shyo
Sold 304 MS open PvP to @Kinito
Helped you? REP+
still waiting for that, Can someone help me?
My Trades:
Sold 452 ED open PvP to @Hersiek
Sold 394 EK open PvP to Adam
Sold 232 MS retro PvP to @Dworak
Sold 12 DV acc to @necon
Sold 7 DV acc to @GPower
Sold 7 DV acc to @javikrintos
Sold 5 DV acc to @darko
Sold 312 RP open PvP to @Smerfik
Sold 305 EK retro PvP to @shyo
Sold 283 ED open PvP to @shyo
Sold 304 MS open PvP to @Kinito
Helped you? REP+
@Imba
I really try to do that persistent and only lost my time.
I know how to do it if more than 1 monster is in exact position xyz. Here you are:
function floorCheck(x,y,z, dist, ...)
local Monsters = {...}
local amount = 0
foreach creature m "m" do
if table.find(Monsters, m.name) and m.posz == z and math.abs(m.posx - x) <= dist and math.abs(m.posy - y) <= dist then
amount = amount + 1
end
end
return amount
end
--
auto(1000)
if floorCheck(33608, 31950, 7, 0, "Rat") > 1 then
playsound('playeronscreen.wav')
end
but I dont know how to make if SOMEWHERE (random xyz) on my screen is more than 1 monster is in same sqm.
Can you help me?
Last edited by Etee; 02-26-2017 at 01:27 AM.
My Trades:
Sold 452 ED open PvP to @Hersiek
Sold 394 EK open PvP to Adam
Sold 232 MS retro PvP to @Dworak
Sold 12 DV acc to @necon
Sold 7 DV acc to @GPower
Sold 7 DV acc to @javikrintos
Sold 5 DV acc to @darko
Sold 312 RP open PvP to @Smerfik
Sold 305 EK retro PvP to @shyo
Sold 283 ED open PvP to @shyo
Sold 304 MS open PvP to @Kinito
Helped you? REP+
is that possible to have more than 1 monster in same sqm?
@Etee, this could work, although i didn't test it.
init start
local function findStackedCreatures()
for x, y in screentiles() do
local creatures = {}
foreach creature m 'm' do
if m.posx == x and m.posy == y and m.posz == $posz then
table.insert(creatures, m)
end
end
if #creatures > 1 then
return creatures
end
end
return nil
end
init end
auto(500)
local creatures = findStackedCreatures()
if creatures then
print('Found more than one creature on the same sqm.')
end
Latest Scripts: Ultimate Dawnport FACC Spots Souleater Tunnels Useful Lua:
@mistgun your action doesnt work.
When I put monster nameand chagelocal creatures = {"Rat"}toprint('Found more than one creature on the same sqm.')then your action play alert all the time if see ANY monster on my screen and that monster dont need to be in list (something like if I have rat on the list and I see only spider it play sound also)playsound('playeronscreen.wav')
My Trades:
Sold 452 ED open PvP to @Hersiek
Sold 394 EK open PvP to Adam
Sold 232 MS retro PvP to @Dworak
Sold 12 DV acc to @necon
Sold 7 DV acc to @GPower
Sold 7 DV acc to @javikrintos
Sold 5 DV acc to @darko
Sold 312 RP open PvP to @Smerfik
Sold 305 EK retro PvP to @shyo
Sold 283 ED open PvP to @shyo
Sold 304 MS open PvP to @Kinito
Helped you? REP+
init start
local function findStackedCreatures(...)
local monsters = {...}
for x, y in screentiles() do
local creatures = {}
foreach creature m 'm' do
if m.posx == x and m.posy == y and m.posz == $posz and table.find(monsters, m.name) then
table.insert(creatures, m)
end
end
if #creatures > 1 then
return true
end
end
return false
end
init end
auto(500)
if findStackedCreatures("rat", "cave rat") then
beep()
end