Jump to content

Request Script


Recommended Posts

21 hours ago, asktheages said:

Hello!

 

Im very happy with your bot. Unfortunately i lack scripting skills. Thats why i ask for one.

I need a script that pauses every activity of the bot, when character leaves certain X Y box. If the character leaves it, script plays alarm. Also, after a little delay it presses a button (f1-f12).  End.

 

To explain it better - if GM tp's me out of my respawn when i cavebot to another resp with same monsters, the bot will run ASAP to them. This is a sure ban, as human player would never act like this. He would stay and write some "??". 
I had it on blackd back in the days. Thanks!

 

local x =
local y =
local z =

pos = g_game.getLocalPlayer():getPosition()

if pos.x ~= x or pos.y ~= y or pos.z ~= z then
  playSound("alarm.wav")
    if getOption("Global/BotPaused") == "false" then
        setOption("Global/BotPaused", "true")
        sleep(300000)
    end
    if getOption("Global/BotPaused") == "true" then
        setOption("Global/BotPaused", "flase")
    end
end

auto(500)

 

Link to post
Share on other sites
  • Replies 307
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

local idsToFind = {3031, 3035} local tiles = g_map.getTiles() for _, tile in pairs(tiles) do local topItem = tile:getTopItem() if topItem then for _, id in pairs(idsToFind) do

if g_game.isOnScreen("Wolf") then playSound("alarm.wav") sleep(2000) end auto(100)     I'll take a look at it

You can load the “Keep Target” script that is already included in the bot.   Keep soul at 100: local player = g_game.getLocalPlayer() if player:getSoul() ~= 100 then   g_game.talk("furie

Posted Images

9 hours ago, asktheages said:

Also - if the script for MsgCheck on dbl doesnt work - is there a way for you to make a script that interracts with the chat window that opens - and based on that alarm player? Or some other creative way to get alarmed on MsgCheck?

As for now, there is no way to use the bot safely...

He stated that it will work in the future update because now the bot does not properly read system messages at the moment

Link to post
Share on other sites
5 hours ago, victinhods said:

Its possible some script to check task?

17/200 Monster Killeds -> Check this msg in Default Channel

 

Exemp: when 200/200 go to label "x" in cavebot

local TextToFind = xxx
local FoundMessage = false
for k,v in pairs(g_game.getTextMessages()) do
  if v = TextToFind then
	return FoundMessage = true
  end
end

if FoundMessage then
gotolabel("HUNTING", "start-hunting")
end

 

  • Like 1
Link to post
Share on other sites

@Zelek its possible Create a channel with some hotkeys to make scripts 100% afk?
1. Check position, Potions, Cap, money to "buy", 

2. Travel Npc

3. Sell items

4. Buy Potions

4. Deposit Items

Edited by victinhods
  • Like 1
Link to post
Share on other sites
3 hours ago, victinhods said:

@Zelek its possible Create a channel with some hotkeys to make scripts 100% afk?
1. Check position, Potions, Cap, money to "buy", 

2. Travel Npc

3. Sell items

4. Buy Potions

4. Deposit Items

 

 

and check potions, check cap, for leave hunt

Link to post
Share on other sites
On 11/10/2020 at 1:52 PM, Zelek said:

if not g_game.isOnline() then return end
local messageToDetect = {"msgheck", "bot"}
local lastMessage = g_game.lastTalkMessage().message
if not lastMessage then return end
for v, k in pairs(messageToDetect) do
  if string.find(lastMessage, k, 1, true) then
    setOption("Global/BotPaused", "true")
    g_game.lastTalkMessage().message = ""
    for i = 1, 5 do
      playSound("alarm.wav")
      sleep(1000)
    end
  end
end
auto(50)

 

will it now work in dbl after this new update? and do we put what he has to respond between " " after g_game.lasttalMessage().message =" "??

Link to post
Share on other sites
1 hour ago, lediv said:

will it now work in dbl after this new update? and do we put what he has to respond between " " after g_game.lasttalMessage().message =" "??

It should work, yes. Also this script does not have an option to respond to the message, it will only play an alarm for 5 seconds and pause the bot when the word has been detected in any message.

Link to post
Share on other sites
6 minutes ago, Zelek said:

It should work, yes. Also this script does not have an option to respond to the message, it will only play an alarm for 5 seconds and pause the bot when the word has been detected in any message.

Could you make it that so it automatically responds? It could be either on default chat or in the new opened window because it's completely useless without auto-respond. If I get a bot-check, not respond and the bot just stops activity it's 100% sure ban. That's the only thing I actually care about. Everything else is secondary

Edited by lediv
Link to post
Share on other sites
27 minutes ago, Mojzesz said:

If possible, I would like a script that searches the entire screen for items whose id is contained in an array.
I just need to search on the surface, z =7.
Thank you in advance!

local idsToFind = {3031, 3035}

local tiles = g_map.getTiles()
for _, tile in pairs(tiles) do
    local topItem = tile:getTopItem()
    if topItem then
        for _, id in pairs(idsToFind) do
            if topItem:getId() == id then
                playSound("alarm.wav")
                break
            end
        end
    end
end
auto(100)

Remember to enable the "read map tiles" box in info & options tab.

Also reading tiles is limited to the current floor you are at the moment. I'm looking into expanding this tho.

  • Like 1
  • Thanks 1
Link to post
Share on other sites
10 minutes ago, Zelek said:


local idsToFind = {3031, 3035}

local tiles = g_map.getTiles()
for _, tile in pairs(tiles) do
    local topItem = tile:getTopItem()
    if topItem then
        for _, id in pairs(idsToFind) do
            if topItem:getId() == id then
                playSound("alarm.wav")
                break
            end
        end
    end
end
auto(100)

Remember to enable the "read map tiles" box in info & options tab.

Also reading tiles is limited to the current floor you are at the moment. I'm looking into expanding this tho.

So I now understand why the one I wrote myself didn't work for me, it's just that the search on other floors is not yet implemented.
Will this be hard to implement?
When can we expect to add searching of other floors?
To tell the truth, for me this is the most important function.

Edited by Mojzesz
Link to post
Share on other sites

Hey, I was using a simple script which was

Quote

auto(250)
g_game.talk("charge")

wait(25000)

I was using this script since its toggable that means support spams it instead of casting it once. I tried replacing wait with sleep but it doesnt seem to work can you create a replacement for me zelek :)?

Edited by shirako
Link to post
Share on other sites
7 minutes ago, shirako said:

Hey, I was using a simple script which was

I was using this script since its toggable that means support spams it instead of casting it once. I tried replacing wait with sleep but it doesnt seem to work can you create a replacement for me zelek :)?

if you replace wait with sleep it definitely should work

Link to post
Share on other sites

If targetting enable and cavebot enable set walk delay with arrow keys to 200 if targeting disabled set arrow keys walk to 25 is that possible? It would make the bot look much more human-like with the new lure mode wchich is extremaly good new function

Edited by lediv
Link to post
Share on other sites
33 minutes ago, lediv said:

If targetting enable and cavebot enable set walk delay with arrow keys to 200 if targeting disabled set arrow keys walk to 25 is that possible? It would make the bot look much more human-like with the new lure mode wchich is extremaly good new function

if getOption("Targeting/Enabled") == "true" and getOption("Cavebot/Enabled") == "true" then
	setOption("Cavebot/WalkDelay", "200")
elseif getOption("Targeting/Enabled") == "false" then
	setOption("Cavebot/WalkDelay", "25")
end
auto(100)

 

Link to post
Share on other sites
20 minutes ago, Zelek said:

if getOption("Targeting/Enabled") == "true" and getOption("Cavebot/Enabled") == true then
	setOption("Cavebot/WalkDelay", "200")
elseif getOption("Targeting/Disabled") == "false" then
	setOption("Cavebot/WalkDelay", "25")
end
auto(100)

 

hmm It doesnt exactly work as I imagined, i forgot that targeting doesnt just switch off like that when the bot walks. Maybe there is a possibility to keep those walk delays but not with cavebot/targeting on/off but while we attack a monster and while we do not attack anything?

Link to post
Share on other sites
1 minute ago, lediv said:

hmm It doesnt exactly work as I imagined, i forgot that targeting doesnt just switch off like that when the bot walks. Maybe there is a possibility to keep those walk delays but not with cavebot/targeting on/off but while we attack a monster and while we do not attack anything?

if g_game.isAttacking() then
  setOption("Cavebot/WalkDelay", "200")
else
  setOption("Cavebot/WalkDelay", "25")
end
auto(100)

 

  • Like 1
Link to post
Share on other sites
44 minutes ago, Gregorian said:

I can't search in forum scrypt for targeting on/off in hotkeys.

if getOption("Targeting/Enabled") == "true" then
  setOption("Targeting/Enabled", "false")
else
  setOption("Targeting/Enabled", "true")
end

Above script will make the bot non responding, please don't use getOption and setOption in hotkeys until I fix that.

Link to post
Share on other sites
On 1/30/2021 at 7:28 PM, zakne11 said:

local x =
local y =
local z =

pos = g_game.getLocalPlayer():getPosition()

if pos.x ~= x or pos.y ~= y or pos.z ~= z then
  playSound("alarm.wav")
    if getOption("Global/BotPaused") == "false" then
        setOption("Global/BotPaused", "true")
        sleep(300000)
    end
    if getOption("Global/BotPaused") == "true" then
        setOption("Global/BotPaused", "flase")
    end
end

auto(500)

 

Dear Zelek,

 

Could you tell me how to set the X Y Z properly? If i put a certain value it wont work as intended. I need a range - lets say X range 931 - 999 , Y - 700-750 (so the box goes around all the respawn where i cavebot). Thanks

Link to post
Share on other sites

×
×
  • Create New...