Results 1 to 6 of 6

Thread: Withdraw Problem

  1. #1
    Normal User
    Join Date
    Jun 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5

    Withdraw Problem

    Why isn't this working?

    Code:
    local All = ((((Cap - (2,7 * 100))/20)- 3)* 15)
    
    depositall()
    npcsay("withdraw "..All) wait(1000)
    npcsay("yes") wait(1000)

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Try:
    Code:
    local all = math.floor(cap - (2.7 * 100)/(20-3))*(15)
    depositall()
    npcsay("withdraw "..all) wait(1000)
    npcsay("yes") wait(1000)
    Last edited by soder; 09-22-2012 at 05:50 PM.

  3. #3
    Normal User
    Join Date
    Jun 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    What im trying to do here is , Checking the current cap, count how much 100 manas will weigh, witch is 2,7 * 100, then divide it with 20, to get how many spears I can carry with that cap, then minus 3 so I have 60 cap left then multiplice it with 15 witch is the spear price.

    But the bot is withdrawing. withdraw 11107

    Whats wrong?
    Example
    Current cap is = 750
    2.7 * 100 = 270
    Spear cap = 20
    Minus 3 spears
    Spear Price

    local all = math.floor(((750 - (2.7 * 100)/20)-3)*15)
    I get it to 315, but bot is withdrawing 11107
    Last edited by Brallan; 09-22-2012 at 06:05 PM.

  4. #4
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    math.floor(cap - (2.7 * 100))/(20-3)*(15)
    933 cap returned 585gp for me.
    Last edited by soder; 09-22-2012 at 06:27 PM.

  5. #5
    Normal User
    Join Date
    Jun 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    But why are you using (20-3), one spear is 20 cap not 17 -.-

  6. #6
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    math.floor(cap - (2.7 * 100) - (60))/(20)*(15)
    Last edited by soder; 09-23-2012 at 08:43 AM.

Posting Permissions

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