Jump to content

zakne11

Members
  • Posts

    60
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by zakne11

  1. 14 hours ago, Rishi said:

    When ever I try to use this it throws this error "Direct use of "pairs(g_game.getCreatures())" is prohibited."

    creatures = g_game.getCreatures()

    pairs(creatures)
  2. 4 hours ago, zaphod1337 said:

    Need single target and aoe spell, when not on cooldown. so it ues whenever its off cooldown, prefferably 2 different UEs so i can make it spawn mas flam and mas vis

    There is no cooldown flag applied for bot,  you have to do your self countdown system

  3. 7 hours ago, shirako said:

    Hello, 

    i am looking for spells that can use for targetting that could be customizable

    like exori, exori min, exori gran on multiple monsters

    and single target when 1

    that are just simple condition like, #g_game.getMonstersAround(x) >= y

    for more complicated things you can use functions like

    • g_game.getBestAreaTurnDirection

    • g_game.getCreaturesInArea

  4. 15 hours ago, ricardo27 said:

    It didn't work unfortunately.

    It says "LUA ERROR: Direct use of "pairs(g_game.getCreatures())" is prohibited."

    Thank you so much in advance for the help. Wasn't sure how to fix this LUA error.

     

    local allcreatures = g_game.getCreatures()
    if not g_game.isAttacking() then 
      for _, creature in pairs(allcreatures) do
        if creature:isMonster() and not string.match(creature:getName()), "Pet") then
          g_game.attack(creature)
        end
      end
    end

     

  5. 2 hours ago, ricardo27 said:

    Hello,

    I needed a script where I would NOT target any creature with the name "Pet" in it.

    For example, there is a creature called "Ricardo's Pet". When I have my targetting set to attack all monsters, it would NOT target the monster with "pet" in it.

    Thank you so much in advance for all the help!

    if not g_game.isAttacking() then 
      for _, creature in pairs(g_game.getCreatures()) do
        if creature:isMonster() and not string.match(creature:getName()), "Pet") then
          g_game.attack(creature)
        end
      end
    end

     

  6. Hello subscribers and all new,
    Actual status of bot is dead, there is not any develop of fixations, for ROTS there is a bug that eliminate it from use, and it were not fixed, get respond from developer:image.png.4afee08d07dfc638e971559dfdcfc58b.png

    So for subscribers, just keep in mind there will be not any fixes for bot.
    For new persons, keep in mind same, if something happened from game server, you won't be able to use.

     

    That was a really nice time while it was working, have really good time and fun.

     

     

    • Sad 1
  7. On 4/28/2021 at 5:44 PM, Poszep said:

    Hi,

    I'm looking for a script to use inventory item for the same item. in inventory.. I try to looking for docs : inventory item use on inventory item but i can't find ;( ... someone can help ? 

    Completly dont know if it will work, but you can try

    g_game.useInventoryItemOnPosition(3031, g_game.getAttackingCreature():getPosition()

     

    instead of map position, you can try to insert bp position

  8. 55 minutes ago, shiro785 said:

    Hi i'm looking for a script that uses a spell if i'm stun by a player, or just stun. thx

    use g_game.getLocalPlayer():getStates()        to find corect state number
    and then add   
    g_game.getLocalPlayer():hasState()  condition to cast spell

     

    • Thanks 1
  9. auto(100)
    if not g_game.isOnline() then return end
    local messagesToDetect = {""} -- which words should it look for?
    local respondToMessage = false -- should it respond if trigger word is found?
    local messageToRespond = "im here" -- what should it respond?
    local pauseBot = false -- should it pause the bot?
    local playAlarm = true -- should it play alarm?
    
    connect("g_game", "onTalkMessage", checkBotMessage)
    connect("g_game", "onTextMessage", checkBotText)
    
    function checkBotMessage(name, level, mode, message, channelId, creaturePos)
      for _, messageToDetect in pairs(messagesToDetect) do
        if string.find(name, messageToDetect, 1, true) then
          if respondToMessage then
          	g_game.talk(messageToRespond)
          end
          if pauseBot then
          	setOption("Global/BotPaused", "true")
          end
          if playAlarm then
            for i = 1, 3 do
              playSound("alarm.wav")
              sleep(1000)
            end
          end
          return
        end
      end
    end
    
    
    function checkBotText(mode, message)
      for _, messageToDetect in pairs(messagesToDetect) do
        if string.find(message, messageToDetect, 1, true) then
          if respondToMessage then
          	g_game.talk(messageToRespond)
          end
          if pauseBot then
          	setOption("Global/BotPaused", "true")
          end
          if playAlarm then
            for i = 1, 3 do
              playSound("alarm.wav")
              sleep(1000)
            end
          end
          return
        end
      end
    end

     

    • Like 1
  10. Just now, zakne11 said:
    
    auto(300000)
    
    local messagesToDetect = "300/300"
    
    g_game.talk(".!task")
    -- sleep(x) --  activate and adjust if script cant detect exacly after write .!task
    connect("g_game", "onTextMessage", checkBotText)
    function checkBotText(mode, message)
    
    if string.find(message, messageToDetect, 1, true) then
    gotolabel("retask", "deliver-task")
    end

     

    as last waypoint in retask ad "ACTION" on with script  gotolabel("hunt", "start-hunt")

     

  11. 18 hours ago, asktheages said:

    Thanks for answer. Still - i have no idea how to use this. Could you please prepare a script that writes .!task every 5 min, and runs the desired "gotolabel" when it detects eg. 300/300 - and when the second waypoint tab comes back to respawn - starts the main one again? I know one buddy has written that kind of script in this thread - but it just doesnt work, the script returns error. Thanks!

    auto(300000)
    
    local messagesToDetect = "300/300"
    
    g_game.talk(".!task")
    -- sleep(x) --  activate and adjust if script can't detect exacly after write .!task
    connect("g_game", "onTextMessage", checkBotText)
    function checkBotText(mode, message)
    
    if string.find(message, messageToDetect, 1, true) then
    gotolabel("retask", "deliver-task")
    end

     

    as last waypoint in retask ad "ACTION" on with script  gotolabel("hunt", "start-hunt")

  12. 4 hours ago, asktheages said:

    Dear Zelek,

     

    Is there any option for bot to auto-back from respawn to the city and finalize the task, taking another, then coming back to respawn?

    I imagine it like this: i add a specific path and actions in Cavebot, but the specific wpt lines activate ONLY, when !task (automaticaly sent) shows 350/350.  Or maybe it just jumps and activates the Waypoints_2 tab, then switches to the Waypoints_1 when back (maybe at certain SQM)? 

     

     

    gotolabel (string sectionName , string labelName )

    Sets the current waypoint to the one of labelName Label in sectionName Section.

    gotolabel("HUNTING", "start-hunting")

    just you have to prepare tab changer in script

     

  13. 2 hours ago, kuzzuki said:

    Hello, I have a question, is there a script that turns off targeting and cavebot and you can set it in the bot on hotkey?

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

    place it in hotkey section in scripts section

×
×
  • Create New...