Signup Now
Results 1 to 6 of 6
  1. #1
    Free User xinxs's Avatar
    Join Date
    Sep 2014
    Posts
    50
    Reputation
    18
    Rep Power
    20

    Safe and simple resupply

    local cat = 's' --- supply category

    foreach supplyitem item cat do
    while item.amounttobuy > 0 do
    resupply(cat)
    wait(2000,3000)
    end
    end

    PS: 1- MAKE SURE YOUR BPS ARE CORRECTLY OPEN, or the resupply() action will not work correctly and you get stuck
    2- I commend you get a safe bank script too
    Last edited by xinxs; 06-30-2015 at 03:13 AM.
    if you like, REP+

  2. #2
    Free User ozzix's Avatar
    Join Date
    Jan 2014
    Location
    Sweden
    Posts
    4,769
    Reputation
    151
    Rep Power
    31
    you know this will work aswell, right?
    resupply('s')

    Level Latest Scripts
    250+
    Oramond Sewers [MAGE |RP X1 | RP X2 |RP X3|EK X2 | EK X1]
    200+
    Banuta X2 [MAGE | RP]
    280+
    Roshamuul Mountain [RP]
    280+
    Ferumbras Lair [RP]
    250+
    Roshamuul North Silencers [RP]

  3. #3
    Free User xinxs's Avatar
    Join Date
    Sep 2014
    Posts
    50
    Reputation
    18
    Rep Power
    20
    Quote Originally Posted by ozzix View Post
    you know this will work aswell, right?
    resupply('s')
    yeah, but some times this dont buy 100 / 200 potions, like need to buy 800, buy only 700 or 600
    i think its happens because of my ping ;/
    and i decide to share my solution ^^
    if you like, REP+

  4. #4
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by xinxs View Post
    yeah, but some times this dont buy 100 / 200 potions, like need to buy 800, buy only 700 or 600
    i think its happens because of my ping ;/
    and i decide to share my solution ^^
    never happened this with me ^^
    Helped you? REP+

  5. #5
    Free User CroiX's Avatar
    Join Date
    Jan 2014
    Posts
    890
    Reputation
    61
    Rep Power
    22
    THIS is the resupply() code in full

    function resupply(category)
    opentrade(3, true)
    for i=283,285 do
    local count = tradecount('sell', i)
    while $tradeopen and count > 0 do
    sellitems(i, count)
    count = tradecount('sell', i)
    end
    end

    foreach supplyitem s category do
    while $tradeopen and s.amounttobuy > 0 and tradecount('buy', s.id) >= math.min(100, s.amounttobuy) do
    local amount = math.min(100, s.amounttobuy)
    buyitems(s.id, amount) waitping()

    if s.destination ~= '' then
    moveitems(s.id, s.destination)
    end

    -- equip item if it is equippable
    if $rhand.id == s.id and $rhand.count < 100 then
    while itemcount(s.id, '0-15') > 0 and $rhand.count < 100 do
    equipitem(s.id, 'rhand', '', 100) waitping()
    end
    elseif $belt.id == s.id and $belt.count < 100 then
    while itemcount(s.id, '0-15') > 0 and $rhand.count < 100 do
    equipitem(s.id, 'belt', '', 100) waitping()
    end
    end
    end
    end
    end


    So, it already kinda contains the exact extra code u wrote =D

    ---

    Quote or Tag me if you want me to reply quicker


  6. #6
    Free User pirudma's Avatar
    Join Date
    Sep 2015
    Posts
    9
    Reputation
    10
    Rep Power
    0
    me too, but with me he dont buy anypotions in the resupply('s') i testing your solution now..

 

 

Posting Permissions

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