Results 1 to 4 of 4

Thread: gotolabel() right usage. Can I use without the CaveBot enabled?

  1. #1
    iBot User
    Join Date
    Feb 2015
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    10
    Rep Power
    2

    gotolabel() right usage. Can I use without the CaveBot enabled?

    Hello guys,

    That's my first post here, so I have to say: Awesome piece of software you guys have, congratulations!
    I am learning how to use it yet, and I am facing one tricky problem:

    I have seen many people using things like gotolabel('depot'), and I tried it with no success.
    I defined the proper waypoint with the name 'depot' but I figured out that it only works when the CaveBot is running.
    Logical once it's the CaveBot who uses it.

    I am making an action to train magic level: waste mana with spells, refill with potions, when potions over grab more in depot.
    I made like this (grabbing in depot instead of buying) because I can't find a way to gotolabel('manashop') for example. If cavebot is enabled my char just keep walking around the waypoints. And I can't imagine how it will work when I define gotolabel('huntexit') (again, for example like hunting with CaveBot), because in my mind the bot will try to reach huntexit everytime (because it go in every waypoint as part of the path, right?)

    So I came around by using reachlocation(), but I don't know how to make it go upstairs, like the CaveBot does.

    Here is my code, it's my first Action ever:

    -- Setup
    mainBackpack = "moon backpack"
    flaskBackpack = 7342
    manaPotionBackpack = "purple backpack"
    manaPotion = "strong mana potion"

    castPointX = 32775
    castPointY = 31246
    castPointZ = 7


    -- If potions ended, leave flasks in depot and grab more.
    if itemcount(manaPotion) == 0 then

    -- Put flasks inside depot
    closewindows()
    wait(1000)
    openitem(mainBackpack, 'back')
    wait(1000)
    reachgrounditem("depot")
    wait(1000)
    openitem("depot")
    wait(1000)
    openitem(3502, "locker")
    wait(1000)
    openitem(flaskBackpack, 3502)
    wait(1000)
    moveitems(283, mainBackpack, flaskBackpack, 100)
    wait(1000)
    moveitems(283, mainBackpack, flaskBackpack, 100)
    wait(1000)
    moveitems(283, mainBackpack, flaskBackpack, 100)
    wait(1000)
    closewindows()
    wait(1000)

    -- Grab mana potions
    openitem("depot")
    wait(1000)
    openitem(3502, "locker")
    wait(1000)
    openitem(manaPotionBackpack, 3502)
    wait(1000)
    openitem(mainBackpack, 'back')
    wait(1000)
    moveitems(manaPotion, manaPotionBackpack, mainBackpack, 100)
    wait(1000)
    moveitems(manaPotion, manaPotionBackpack, mainBackpack, 100)
    wait(1000)
    moveitems(manaPotion, manaPotionBackpack, mainBackpack, 100)
    wait(1000)

    -- Go to my training spot.
    reachlocation(castPointX, castPointY, castPointZ)

    elseif mppc == 100 then

    -- Cast those spells to spent my entire mana.
    cast('exevo gran mas vis')
    wait(3500)
    cast('utana vid')
    wait(2500)
    cast('exevo vis hur')
    wait(2500)
    wait(cooldown('exevo vis hur'))
    cast('exevo vis hur')
    wait(2500)
    wait(cooldown('exevo gran vis lux'))
    cast('exevo gran vis lux')
    wait(2500)
    wait(cooldown('exevo gran vis lux'))
    cast('exevo gran vis lux')
    wait(2500)
    wait(cooldown('exevo gran vis lux'))
    cast('exevo gran vis lux')
    wait(2500)

    -- Use 11 mana potions, it's what I need to fill up the mana.
    i = 0
    while (i < 11) do
    useitemontarget(manaPotion, name)
    wait(1500)
    i = i + 1
    end

    -- Sometimes still needed a little bit of mana, potions don't recover exaclty portions.
    -- Don't mind with minimal wastes, I want the mana full!
    if mp < 1680 then
    useitemontarget(manaPotion, name)
    wait(1500)
    end

    end



    Any help?
    Thank you.

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Yeah... go to label is for cave bot only, but you could just use something like Yalahar Potion shop, which is safe zone, and stand there at all times selling/buying flasks

    Or to just walk there and sell, but wpts to walk back to the depo.

    the way to stop it walking would be to add an action waypoint, instead of a persistant script so that the cavebot stops walking until it's finisied with the action.

    Furthermore, I would simplify things by adding a healing option to use mana potions when you have less than mana required for a spell, then add the light spell to healing as well to cast when you mana is over a certain amount too, this replaces the loops to use potions on yourself, and cast spells.

    Then all you need is an action to keep withdrawing potions and depositing the empty ones. But if you wanted you can still walk and sell them.

    This is all you need
    Lua Code:
    -- Setup
    mainBackpack = "moon backpack"
    flaskBackpack = 7342
    manaPotionBackpack = "purple backpack"
    manaPotion = "strong mana potion"



    Lua Code:
     -- Put flasks inside depot
      closewindows()
      wait(1000)
      openitem(mainBackpack, 'back')
      wait(1000)
      reachgrounditem("depot")
      wait(1000)
      openitem("depot")
      wait(1000)
      openitem(3502, "locker")
      wait(1000)
      openitem(flaskBackpack, 3502)
      wait(1000)
      while itemcount(283, mainBackpack) > 100 do
    	  moveitems(283, mainBackpack, flaskBackpack, 100)
    	  wait(1000)
      end
     
      -- Grab mana potions
      openitem("depot")
      wait(1000)
      openitem(3502, "locker")
      wait(1000)
      openitem(manaPotionBackpack, 3502)
      wait(1000)
      openitem(mainBackpack, 'back')
      wait(1000)
     
      while itemcount(manaPotion, mainBackpack) < 300 do
    	  moveitems(manaPotion, manaPotionBackpack, mainBackpack, 100)
    	  wait(1000)
      end


    Then make 2 healing rules to drink mana pots when less than max mana, and cast spells with no condition (Eg, above 0 hp)

  3. #3
    iBot User
    Join Date
    Jan 2013
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    10
    Rep Power
    4
    Create one persistent action to check if you have x amount of pots with you
    if, true = cavebot disabled
    if false = cavebot enabled

    create your waypoints to do whatever you want and go back to the place you are, and create an action to disable cavebot.

  4. #4
    iBot User
    Join Date
    Feb 2015
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    10
    Rep Power
    2
    That makes everything clear now, I wasn't aware of the Actions inside waypoints, I'm such a noob, hahaha. Thank you guys.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •