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
floorCheck
#1
I would like help with floorcheck if monster(name) are below or above you.
Reply

#2
Hello.

maroundfloor(optional number range, optional number floorDiff, optional string names) [number]: Returns the amount of monsters on the floor difference found in the range and list.
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.

|Only Registered members can see download links. | Click here to buy subscription or here to register.


local Monsters = { 'Demon', 'Rat', 'Goblin' }

if maroundfloor(7, 1, table.unpack(Monsters)) > 0 then
  -- do something
end
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Yeah. but i want to get info like.
creaure = samefloor then
--dothis
creature = z+>1 then
--do this
else creature = z->1 then
do this.

if unclear il try explain better.
Reply

#4
That's why I also quote getcreatures.

local Monsters = { 'Demon', 'Rat', 'Goblin' }

local player_z = posz()

local creatures = getcreatures('m')
for _, creature in ipairs(creatures) do
  if table.find(Monsters, creature.name) ~= nil then
    if player_z == creature.posz then
      -- do something
    elseif (player_z - creature.posz) == 1 then
      -- do something else
    elseif (player_z - creature.posz) == -1 then
      -- do something else
    end
  end
end
Reply

#5
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Works perfect.
|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



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016