Posts: 6
Threads: 3
Joined: Jul 2022
Reputation:
0
Hello, if a GM spawns monsters on you, there is a blue spawn port on the monster that is spawned.
Is there anyway for the bot to recognize this and stop/auto talk?
Or is there anyway for the bot to realize a creep spawned and did not walk in on the screen?
Thank you in advance!
Posts: 2,619
Threads: 429
Joined: Jul 2018
Reputation:
69
Hello.
Yes... You can develop a LUA Script to try to guess whenever a monster was summoned, for example: if a monster suddenly show up 4 sqms or less from you (but may not work fine when monster that actually summon XD) and certainly possible to detect such "screen effects" like using one of the functions below, certainly gettileseffects.
1. Detect monster:
getcreatures(string filter) [table]: (p, m, n, f and s) - You can combine all as you like
p: The creature has to be player.
m: The creature has to be monster.
n: The creature has to be npc.
f: The creature must be on the same floor as you.
s: The creature must be on the same floor as you and visible on screen.
.id [number]
.name [string]:
.hppc [number]
.posx [number]
.posy [number]
.posz [number]
.dir [number] (0 = "n", 2 = "s", 1 = "e" or 3 = "w")
.speed [number]
.dist [number]
.outfitid [number]
.skull [number]
.party [number]
.visible [boolean]
.walking [boolean]
.ignored [boolean]
.isattackme [boolean]
.ismonster [boolean]
.isplayer [boolean]
.isshootable [boolean]
.isreachable [boolean]
2. Detect effects:
gettileeffects(number posx, number posy, number posz) [table]: Return a table with effects on this tile..
gettileseffects() [table]: Return a table with tiles that has at least one effect.
.posx [number]
.posy [number]
.posz [number]
.effects [table(number)] -> Table with effects ids