Jump to content

Zelek

Administrators
  • Posts

    669
  • Joined

  • Last visited

  • Days Won

    75

Posts posted by Zelek

  1. 53 minutes ago, lediv said:

    2) both "target must be reachable" and "target must be shootable" doesnt work. Sometimes the bot will mark a monster (ones that hits us only from distance) and stand forever in one place unless we set "reach" in targetting

    it targets monsters behind walls or whats the issue exactly? because the second sentence doesn’t make sense to me, if there is a distance monster then of course you have to set reach to get to it.

     

    I’ll take look at other things you have mentioned, thanks for the feedback

  2. 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

  3. 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
  4. 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.

  5. that's intended, you should use a script to extend the functionality.

     

    here are some quick examples:

    if g_game.isAttacking() then
      g_game.talk("spell1")
      sleep(900, 1250)
    end
    auto(100)
    if g_game.isAttacking() and #g_game.getMonstersAround(1) >= 1 then
      g_game.talk("spell1")
      sleep(900, 1250)
    end
    auto(100)

     

  6. You can download it here: OTClientBot-v2.0.0-beta13e

    Also please remember to install Visual C++ Redistributable for Visual Studio 2015 - 2019 x86 if you haven't already.

     

    It is advised to completly uninstall the previous bot version form your computer before installing the new one.
    Please make a backup of your scripts and cavebot files before doing so.

     

    Known issues:

    1. In targeting while setting the "stick" priority to higher than health/proximity may result in bot crashing and/or targeting not working correctly
      as a workaround please don't use a stick priority at all.
         -- fixed in beta13a
    2. Condition healer settings are not being loaded from save files -- fixed in beta 13b
    3. Bad lua scripts are crashing the bot instead of throwing an error -- fixed in beta 13b -- actually fixed in beta 13d
    4. Under rare circumstances the targeting can cause the bot to crash -- fixed in beta 13d
    5. "playersettings" folder is missing -- fixed in beta 13b
    6. In cavebot while using ladder/rope/pick etc the bot is trying to use the item from far away resulting in cavebot getting stuck -- fixed in beta 13b
    7. Bot can crash while saving hotkey scripts  -- fixed in beta 13b
    8. Alerts don't work when loading save file from older versions -- fixed in beta 13c
    9. Lua functions don't work without explicitly setting default parameters where it applies -- fixed in beta 13c
    10. File->New doesn't reset looting tab -- fixed in beta 13c
    11. getOption and setOption functions will make bot non responding while using those functions in hotkeys -- fixed in beta 13d
    12. Tile:getTopItem() doesn't return the correct item if there are multiple items on the stack -- fixed in beta 13d
    13. Bot will crash after adding new persistent/cavebot script after deleting one while editor on the first column was open -- fixed in beta 13e
    14. Bot will crash if it can't find valid next waypoint while changing floors -- fixed in beta 13e

     

    List of changes:

    1. General
      • bot has been rewritten from scratch and that's the main reason why there weren't any updates past month
      • added automatic crash reporting
      • bot stability has been increased tremendously and not a single crash has occured over a week of internal testing
      • added lua console where you can execute scripts and print output into
      • if for some reason the bot can't connect to the login server instead of closing the application it will pause all functionality and wait for the connection to come back with proper dialog displaying it
      • 99% of scripts should be back compatible with the previous version, however it is possible that some may not work
      • after loading a save file from an older version you may have to re-configure some options as the interface and available options are different
    2. UI changes
      • various UI changes to increase quality of life and clarity of informations and options presented to the user
      • added dark mode
      • added new tab "Info & options" where you can see various information about the logged character including experience per hour, as well as quick toggles to enable/disable bot functions and more
    3. Healer
      • you can now specify a value range for every condition
      • moved the "enable" toggle into the table widget directly
      • every change in the editor will be applied in real time
    4. Alerts
      • fixed the whitelist not registering multiple names where it applies
      • added spinboxes for easier editing where it applies
    5. Targeting
      • fixed a bug where setting a creature action to "ignore" would not ignore it while using "all" as a creature name
      • fixed a bug where creature count would be ignored or not working correctly
      • every change in the editor will be applied in real time
    6. Cavebot
      • fixed a bug where cavebot scripts would continue to work even with cavebot turned off
      • added new waypoint types:
        • Lure - character will continue to walk even while attacking
        • Ladder
      • waypoints are now editable directly in the table widget
      • you can drag and drop the waypoints to move their position
      • fixed a bug with high CPU usage while using an action waypoint with get/set option script
      • fixed a bug where action script would not execute immediately
    7. Hotkeys
      • fixed a bug that prevented some users from selecting a key combination
    8. Looting
      • fixed a bug that ignored selected looting policy
      • fixed a bug where containers inside a body weren't being open
      • fixed a bug that caused some bodies to be skipped from looting
      • fixed a bug where character was not trying to reach the body if it was killed from a distance
      • you can now select containers from a dropdown box
    9. Lua interface
      • fixed a bug where g_game.isFollowing() was not working correctly
      • fixed a bug where text messages wasn't being captured from a distance (other channel/system message)
      • added following functions to the LocalPlayer class:
        • LocalPlayer:getCapacity
        • LocalPlayer:getExperience
      • added new functions:
        • g_game.cancelAttack

        • g_game.cancelFollow

        • g_game.getFollowingCreature

        • g_game.getBestAreaTurnDirection

        • g_game.getCreaturesInArea

        • g_map.getTiles

      • added reading of map tiles with following functions (it must be enabled in the options first):

        • Tile:getPosition

        • Tile:getItems

        • Tile:getCreatures

        • Tile:isPathable

        • Tile:isWalkable

        • Tile:getTopItem

        • Tile:getTopCreature

      • added every alphanumerical key as well as space to the g_game.sendKey function

     

    I'll make my best to update the lua documentation available at the website as soon as possible, however if you have questions regarding certain new functions please make a new post about it in the proper category and I'll try to answer it with an example as soon as possible.

    Please keep in mind that this update is huge and I've most likely missed few things.

     

    Thank you for your support and hope that you enjoy.

     

    • Like 3
  7. On 1/11/2021 at 12:38 AM, lediv said:

    script to reply to bot check on dbl? it's like a system messege not prive nor default. is that possible?

    Currently there is a bug that prevents some messages from being captured, it will be fixed in the next version and script that I posted before in this topic will work. 

     

    • Like 1
×
×
  • Create New...