Results 1 to 5 of 5

Thread: Refill from depot - Problem with moveitems and counts

  1. #1
    Normal User
    Join Date
    Jul 2012
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Refill from depot - Problem with moveitems and counts

    Hello!

    I try to avoid yalahar manashop because of war. I want my script to refill sd and gmp from depot. I made some action that work but not perfectly =\


    Code:
    --Name of runes to move:
    local nameRuneToMove = (nameRune)
    
    --Name of backpack that have all potions to move:
    local from = (bpSd)
    
    --Name of backpack to move all potions into:
    local to = (supBp)
    
    
    while (itemcount(nameRuneToMove, supBp) < maxRune)
    do 
        moveitems(nameRuneToMove, from, to, 100)
        wait(1000)
    end
    
    closewindow(from)
    By the way, the actions is the same for gmp and sd.

    Whatever, if I have let's say 74 sd left and 124 gmp when I go refill script will try to move 100 gmp forever even if I only need 26 to complete my maxMP setting.

    EDIT: This result let's say my max supply is 800 sd 250 gmp I end up with 824 sd and 224 gmp and bot try to move another stack of 100 gmp to complete to 250 but I have no cap so it just stand there forever trying to move the stack

    Anyone have a clue?

    Thanks
    Last edited by splifus; 12-11-2013 at 06:24 PM.

  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
    moveitems(nameRuneToMove, from, to, 100)

    Thats because you are telling it to move 100, instead of the mount it needs.

    Try changing 100 to itemcount(nameRuneToMove, to)-maxRune
    Last edited by pink_panther; 12-11-2013 at 07:27 PM.

  3. #3
    Normal User
    Join Date
    Jul 2012
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Testing it, character is refilling

    I will reply if fixed or not =) thanks

  4. #4
    Normal User
    Join Date
    Jul 2012
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Doesn't work, the way you wrote it is like I have 142 sd left minus my maxsd(800) ..so 142-800= debug

    I tried maxRune-itemcount(nameRuneToMove, to) but then it move sd and I ended up with 842

    ?.?

  5. #5
    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
    I replied via 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
  •