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
Change targeting on/off under conditions
#1
local Monsters = { 'Ghoul' } -- Monsters
local MinMonsters = 2 -- Min. count.

if maround(1, unpack(Monsters)) >= MinMonsters then
setsettings('Targeting/Enabled', 'yes')
    end
end

I'm getting an error with this script "20:08:56 - LUA Script -> Persistent01: 8: <eof> expected near 'end'"

I'm using cavebot to stop the bot at a certain point, turn off targeting with script, wait until 2 ghouls approach then turn targeting on. If I don't do this, char will run into a room with 6 ghouls and waste uhs.
Reply

#2
Hello.

There's an extra end in your script for no reason, just fixed it.
local Monsters = { 'Ghoul' } -- Monsters
local MinMonsters = 2 -- Min. count.

if maround(1, unpack(Monsters)) >= MinMonsters then
    setsettings('Targeting/Enabled', 'yes')
end
Reply

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

Thank you. I can't write script on my own, but can manage to repurpose other ones. This was an old 'exori' script you wrote. I haven't yet figured out when an 'end' is needed and how many. Sorry for the silly post, I should try to learn the language.

-- [ Settings ] --
local Monsters = { 'Frost Giant', 'Snaek' } -- Monsters to kill
local SafeList = { 'Mrcn', 'CM Guido' } -- Your safelist
local MinMonsters = 1 -- Min. count to cast exori.
local SafeHealth = 70 -- Only if your HP % is higher or equal to this valaue.
local PVP = true -- PVP world?
local CheckAllFloor = true -- Checks all floors for players?

-- [ Safe Exori by Mrcn and fixed by Arkilys ] --       
if hppc() >= SafeHealth and mp() >= (level()*2) and cancast() and maround(1, unpack(Monsters)) >= MinMonsters then
  if not PVP or paroundignore(CheckAllFloor, unpack(SafeList)) == 0 then
       say('exori')
       wait(1200)
  end
end
Reply

#4
hi,
do u have any idea how to make this script use "exori min" if 2+ monsters in line <front/left/right/back> ofc with turn to good course?
Questions about this script: 
- " local Monsters = { 'All' } " will works?
-  " mp() >= (level()*2)" , may i change for "mp() >= 150"?
Reply

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

Yes, but you must place a request on make on Kasteria OTBot -> Scripts -> Requests. Because this thread is related to something way different than your request.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016