XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 7 of 7

Thread: Mana Training w/ Xeno

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6

    Join Date
    Nov 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mana trainer

    Quote Originally Posted by Rydan View Post
    Change Rydan to the character on which you want to use mana potions.
    Open the main backpack of your "mana-using" character and then the backpack that is on the ground which contains the mana potions.
    Be sure that the backpack containing the mana potions is stacked (1 in 1) and the next backpack is always at the last spot.
    Then start the script.
    It should always take 100 manas from the backpack > use them until empty > drop flasks > take 100 manas > ...

    lua code:
    PLAYERNAME = "Rydan"

    --DO NOT EDIT BELOW
    mainContainer = Container.New(0)
    manaContainer = Container.New(1)
    usePlayer = Creature.New(PLAYERNAME)


    Module.New("Use Mana", function()
    if (Self.ItemCount("mana potion", mainContainer:Index()) >= 1) then
    for containerSpot = 0, mainContainer:ItemCount()-1 do
    if (mainContainer:GetItemData(containerSpot).id == Item.GetID("mana potion")) then
    repeat
    mainContainer:UseItemWithCreature(containerSpot, usePlayer:ID())
    wait(1000, 1050)
    until
    mainContainer:GetItemData(containerSpot).id ~= Item.GetID("mana potion")
    break
    end
    end
    else
    if (Self.ItemCount(285, mainContainer:Index()) >= 1) then
    for containerSpot = 0, mainContainer:ItemCount()-1 do
    if (mainContainer:GetItemData(containerSpot).id == 285) then
    mainContainer:MoveItemToGround(containerSpot, Self.Position().x, Self.Position().y, Self.Position().z, 100)
    local waitTries = 0
    repeat
    wait(100)
    waitTries = waitTries+1
    until
    waitTries >= 20 or Self.ItemCount(285, mainContainer:Index()) == 0
    break
    end
    end
    elseif (Self.ItemCount(285, mainContainer:Index()) == 0) then
    if (Self.ItemCount("mana potion", manaContainer:Index()) >= 100) then
    for containerSpot = 0, manaContainer:ItemCount()-1 do
    if (manaContainer:GetItemData(containerSpot).id == Item.GetID("mana potion")) then
    manaContainer:MoveItemToContainer(containerSpot, mainContainer:Index(), mainContainer:ItemCapacity()-1, 100)
    local waitTries = 0
    repeat
    wait(100)
    waitTries = waitTries+1
    until
    waitTries >= 20 or Self.ItemCount("mana potion", mainContainer:Index()) >= 1
    break
    end
    end
    else
    manaContainer:UseItem(manaContainer:ItemCount()-1, true)
    wait(250)
    end
    end
    end
    end)


    how can i edit this to do it with great mana potions? i cant make it work it will only open all bps without taking any great manas.
    Last edited by Tizoq; 09-08-2017 at 06:27 PM.

Posting Permissions

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