XenoBot Forums - Powered by vBulletin

User Tag List

Page 3 of 8 FirstFirst 12345 ... LastLast
Results 21 to 30 of 72

Thread: Self.Balance()

  1. #21

    Join Date
    Nov 2013
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I will not bump this thread.
    pro hakier
    Code:
    enum MessageClasses {
        MESSAGE_STATUS_CONSOLE_BLUE     = 0x04,
        MESSAGE_STATUS_CONSOLE_RED      = 0x0D,
        MESSAGE_STATUS_DEFAULT      = 0x11,
        MESSAGE_STATUS_WARNING      = 0x12,
        MESSAGE_EVENT_ADVANCE       = 0x13,
        MESSAGE_STATUS_SMALL        = 0x14,
        MESSAGE_INFO_DESCR          = 0x15,
        MESSAGE_DAMAGE_DEALT        = 0x16,
        MESSAGE_DAMAGE_RECEIVED     = 0x17,
    };

  2. #22

    Join Date
    Nov 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Come on just make Self.Balance(). That is few minute for you DarkstaR. We can not make full afk scripts without balance & market

  3. #23
    Senior Member maroxy's Avatar
    Join Date
    Apr 2014
    Location
    EUW
    Posts
    897
    Mentioned
    137 Post(s)
    Tagged
    0 Thread(s)
    You can do:

    Code:
    	elseif (labelName == "CheckWithdraw") then
    		Walker.Stop()
    
    		if Self.Money() < maxAmount then
    			os.exit()
    		else
    			print("Enough Balance, continuing...")
    		end
    
    		Walker.Start()
    Self.Money counts the coins you have and math it by his value, similar to Self.Balance()

    Stop spamming plx
    Last edited by maroxy; 08-17-2014 at 08:59 PM.


    Remember that the official XenoBot page is www.xenobot.net not xeno-bot.net or similar

  4. #24
    Senior Member RoxZin xD's Avatar
    Join Date
    Feb 2012
    Location
    Rio de Janeiro
    Posts
    709
    Mentioned
    16 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by maroxy View Post
    You can do:

    Code:
    elseif (labelName == "CheckWithdraw") then
    Walker.Stop()
    
    if Self.Money() < maxAmount then
    io.exit()
    else
    print("Enough Balance, continuing...")
    end
    
    Walker.Start()
    Self.Money counts the coins you have and math it by his value, similar to Self.Balance()

    Stop spamming plx
    Correct me if I'm wrong, but doesn't Self.Money() count what you got on you? To check balance value is a completely different thing

  5. #25
    Senior Member maroxy's Avatar
    Join Date
    Apr 2014
    Location
    EUW
    Posts
    897
    Mentioned
    137 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RoxZin xD View Post
    Correct me if I'm wrong, but doesn't Self.Money() count what you got on you? To check balance value is a completely different thing
    This label must be after the withdraw one


    Remember that the official XenoBot page is www.xenobot.net not xeno-bot.net or similar

  6. #26

    Join Date
    Nov 2013
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Self.Money() doesn't count gold in nested backpacks. Of course one could go through all bps and count all money, but it is much better and simplier to use Self.Balance . And if we want to check if we have enough money to withdraw, we are force to map starting balance of all characters and then count gold in nested backpacks and play with adding/substrackting and writing that value to file.
    pro hakier
    Code:
    enum MessageClasses {
        MESSAGE_STATUS_CONSOLE_BLUE     = 0x04,
        MESSAGE_STATUS_CONSOLE_RED      = 0x0D,
        MESSAGE_STATUS_DEFAULT      = 0x11,
        MESSAGE_STATUS_WARNING      = 0x12,
        MESSAGE_EVENT_ADVANCE       = 0x13,
        MESSAGE_STATUS_SMALL        = 0x14,
        MESSAGE_INFO_DESCR          = 0x15,
        MESSAGE_DAMAGE_DEALT        = 0x16,
        MESSAGE_DAMAGE_RECEIVED     = 0x17,
    };

  7. #27
    Senior Member Chuitox's Avatar
    Join Date
    Dec 2011
    Posts
    811
    Mentioned
    208 Post(s)
    Tagged
    2 Thread(s)
    Well... there is still a way to do it. You can try to withdraw 10k several times until the money you have in your containers doesn't change. Then you can repeat the procedure with platinums and gold coins. Sounds insane but hey you still got a solution

  8. #28
    Senior Member maroxy's Avatar
    Join Date
    Apr 2014
    Location
    EUW
    Posts
    897
    Mentioned
    137 Post(s)
    Tagged
    0 Thread(s)
    lua code:
    	elseif (labelName == "DepositGold") then
    Walker.Stop()
    Self.SayToNpc({"hi", "deposit all", "yes"}, 100)

    local withdrawManas = math.max(_MaxManas - Self.ItemCount(_ManaPotionID), 0)*_ManaCost
    local withdrawThunders = math.max(_MaxThunders - Self.ItemCount(_ThundersID), 0)*_ThundersCost
    local total = math.abs(withdrawManas + withdrawThunders)

    if total >= 1 then
    Self.SayToNpc({"withdraw " .. total, "yes", "balance"}, 100)
    end

    local monny = math.max(Self.ItemCount(3031) + (Self.ItemCount(3035) * 100) + (Self.ItemCount(3043) * 10000))

    if monny < total then
    os.exit()
    else
    print("Enough Balance")
    end
    Walker.Start()


    lua code:
    		local monny = math.max(Self.ItemCount(3031) + (Self.ItemCount(3035) * 100) + (Self.ItemCount(3043) * 10000))

    if monny < total then
    os.exit()
    else
    print("Enough Balance")
    end


    Did it naaps, enjoy!


    Remember that the official XenoBot page is www.xenobot.net not xeno-bot.net or similar

  9. #29

    Join Date
    Nov 2013
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It won't work.
    pro hakier
    Code:
    enum MessageClasses {
        MESSAGE_STATUS_CONSOLE_BLUE     = 0x04,
        MESSAGE_STATUS_CONSOLE_RED      = 0x0D,
        MESSAGE_STATUS_DEFAULT      = 0x11,
        MESSAGE_STATUS_WARNING      = 0x12,
        MESSAGE_EVENT_ADVANCE       = 0x13,
        MESSAGE_STATUS_SMALL        = 0x14,
        MESSAGE_INFO_DESCR          = 0x15,
        MESSAGE_DAMAGE_DEALT        = 0x16,
        MESSAGE_DAMAGE_RECEIVED     = 0x17,
    };

  10. #30
    Senior Member maroxy's Avatar
    Join Date
    Apr 2014
    Location
    EUW
    Posts
    897
    Mentioned
    137 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hakujewas View Post
    It won't work.
    For me, yes.

    Be sure your "total" value is asigned.


    Remember that the official XenoBot page is www.xenobot.net not xeno-bot.net or similar

Posting Permissions

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