Results 1 to 10 of 10

Thread: if market x itemcount > 0 and market x itemprice < y then buyitemmarket(x, 10, y)

  1. #1
    Focus Group kamil123's Avatar
    Join Date
    Apr 2012
    Location
    Poland
    Posts
    339
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    106
    Rep Power
    6

    if market x itemcount > 0 and market x itemprice < y then buyitemmarket(x, 10, y)

    is it possible to check these 2 things in market?

    1. if market x itemcount > 0 then...
    2. if market x itemprice < y then...
    Last edited by kamil123; 04-06-2014 at 10:09 AM.

  2. #2
    iBot User
    Join Date
    Aug 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    14
    Rep Power
    4
    nope

  3. #3
    iBot User
    Join Date
    Aug 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    14
    Rep Power
    4
    btw buyitemmarket() already buys the item if the price is under the int you specified but you cant make it check for it as a conditional to something else

    edit:
    tell me what do you need this for, maybe I can make it work
    ive been messing with market functions during these last weeks since createselloffer() magically started working
    Last edited by lggmartins; 04-06-2014 at 10:36 AM.

  4. #4
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    956 Post(s)
    Reputation
    586
    Rep Power
    10
    @kamil123

    That's not possible yet, probably in iBot+ we'll got new functions like itemcountmarket(); balancemarket()

  5. #5
    Focus Group kamil123's Avatar
    Join Date
    Apr 2012
    Location
    Poland
    Posts
    339
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    106
    Rep Power
    6
    Quote Originally Posted by lggmartins View Post
    btw buyitemmarket() already buys the item if the price is under the int you specified but you cant make it check for it as a conditional to something else

    edit:
    tell me what do you need this for, maybe I can make it work
    ive been messing with market functions during these last weeks since createselloffer() magically started working
    I make it working but it takes too much time and I thought that i could fix it


    for example i want to buy 10 dwarven rings for <500gp.
    if there are offers in market like
    1 dwarven ring 480gp
    2 dwarven ring 480gp
    1dwarven ring 490gp
    3 dwarven ring 490gp
    1 dwarven ring 490gp
    2 dwarven ring 495gp

    now I have to use:
    PHP Code:
    buyitemmarket("dwarven ring"1500)
    wait(100,200)
    buyitemmarket("dwarven ring"1500)
    wait(100,200)
    buyitemmarket("dwarven ring"1500)
    wait(100,200)
    buyitemmarket("dwarven ring"1500)
    wait(100,200)
    buyitemmarket("dwarven ring"1500)
    wait(100,200)
    buyitemmarket("dwarven ring"1500)
    wait(100,200)
    buyitemmarket("dwarven ring"1500)
    wait(100,200)
    buyitemmarket("dwarven ring"1500)
    wait(100,200)
    buyitemmarket("dwarven ring"1500)
    wait(100,200
    if I wanted to use just one line, then it would buy only first ring for 480gp:
    PHP Code:
    buyitemmarket("dwarven ring"10500)
    wait(100,200

    and what I was looking for it's something like this:

    PHP Code:
    if offered_market_itemcount("dwarven ring") > and marketitemprice 500 then
    buyitemmarket
    ("dwarven ring"2500)
    end 
    second action (without closing market):
    PHP Code:
    if bought_market_itemcount("dwarven ring") < 10 then
    gotolabel
    ("dwarven1")
    end 
    it would save much time.







    or I think the fastest and easiest way would be improved function buyitemmarket (and sellitemmarket):

    buyitemmarket("dwarven ring", 10, 500)
    - it would buy first 10 dwarven rings for price under 500 (NOT just from the first listed offer. if there would be 10 offers with 1 dwarven ring it should buy all 10 offers so bought 10 rings in total)





    Quote Originally Posted by Eli View Post
    @kamil123

    That's not possible yet, probably in iBot+ we'll got new functions like itemcountmarket(); balancemarket()
    that's good news
    Last edited by kamil123; 04-06-2014 at 11:20 AM.

  6. #6
    iBot User
    Join Date
    Aug 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    14
    Rep Power
    4
    yeah it has to be done the crude way as you did
    good job making it work tho

    have you ever thought about instead of using buyitemmarket() using:

    Code:
    createbuyoffer("dwarven ring", 10, 510)
    and then the checkers

    since createbuyoffer() and createselloffer() are now working, this would instantly buy every dwarven ring you need and would decrease the time you spend at the market

  7. #7
    iBot User walukasz's Avatar
    Join Date
    Feb 2012
    Location
    Poland
    Posts
    312
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    25 Post(s)
    Reputation
    67
    Rep Power
    5
    you could just open inbox, then market and buy rings while there is not enough in your inbox
    or do like
    for i = 1, 20 do
    if itemcount(ring, inbox) >= rings_to_get then break end
    buyitemsmarket(...)
    end

  8. #8
    Focus Group kamil123's Avatar
    Join Date
    Apr 2012
    Location
    Poland
    Posts
    339
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    106
    Rep Power
    6
    Quote Originally Posted by lggmartins View Post
    since createbuyoffer() and createselloffer() are now working
    createselloffer() actually doesn't work for me, it clicks "sell" everytime, so even if it's checked then it unchecks it and all is the same like before (already re-downloaded client)

    Quote Originally Posted by walukasz View Post
    you could just open inbox, then market and buy rings while there is not enough in your inbox
    or do like
    for i = 1, 20 do
    if itemcount(ring, inbox) >= rings_to_get then break end
    buyitemsmarket(...)
    end
    didn't know that ibot can read itemcount if market window is opened. does it work that way?

  9. #9
    iBot User walukasz's Avatar
    Join Date
    Feb 2012
    Location
    Poland
    Posts
    312
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    25 Post(s)
    Reputation
    67
    Rep Power
    5
    ofc, as long as it sees open container.

  10. #10
    iBot User
    Join Date
    Aug 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    14
    Rep Power
    4
    they are working
    ive abused so bad of them (shouldve done something better, now I know) that my market selling function for those chars are now muted

    ill try to code something that might work there
    it ocasionally does that in here

Posting Permissions

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