Thread: "buy-x" "sell-x" issue

Results 1 to 6 of 6
  1. #1 "buy-x" "sell-x" issue 
    Irathient Developer

    mr selby's Avatar
    Join Date
    May 2011
    Age
    28
    Posts
    1,183
    Thanks given
    95
    Thanks received
    166
    Rep Power
    97
    okay so i have this problem with buying and selling X, when i do it the amount slowly rises or decreases, like it isnt an instant sell or buy. does anyone know how to fix this issue?
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Nov 2010
    Age
    14
    Posts
    2,639
    Thanks given
    158
    Thanks received
    280
    Rep Power
    0
    Idk what you mean, can you be more often?
    I'll most likely help you
    Reply With Quote  
     

  3. #3  
    Irathient Developer

    mr selby's Avatar
    Join Date
    May 2011
    Age
    28
    Posts
    1,183
    Thanks given
    95
    Thanks received
    166
    Rep Power
    97
    okay so say i buy 2000 air runes, it will not instantly buy 2000, it will start from 1 and count to 2000
    Reply With Quote  
     

  4. #4  
    Donator
    Darkness's Avatar
    Join Date
    Nov 2012
    Age
    26
    Posts
    876
    Thanks given
    121
    Thanks received
    75
    Rep Power
    47
    Quote Originally Posted by mr selby View Post
    okay so say i buy 2000 air runes, it will not instantly buy 2000, it will start from 1 and count to 2000
    For both ? Or only one kind? I saw guides ( I recently followed them too ) and 85% of the people couldn't figure the looping problem, some said they got it working but noone released a fix

    I figured out that one guide worked for buy and an other for sell so I implanted both. Can link you if you want :3!
    Attached image
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    May 2013
    Age
    26
    Posts
    683
    Thanks given
    138
    Thanks received
    115
    Rep Power
    104
    Post your 'buy-x' and 'sell-x' method please.
    Reply With Quote  
     

  6. #6  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    967
    Thanks given
    47
    Thanks received
    161
    Rep Power
    366
    When buying or selling, here's a hint:
    Instead of looping, use some mathematical formulas:

    amount = min(requestedAmount, affordableAmount, placeForAmount)
    with requestedAmount being the requested amount, affordableAmount being the amount you can buy with your currency (ignore when selling as the shop can afford to buy an infinite amount off you), placeForAmount is the amount your inventory can handle.

    when using fixed price/unit:
    price = amount * pricePerUnit

    deductCurrency(price)
    addItems(amount)

    And most important of all, send the packets after you've handled the buy/sell action.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Can't buy from shops or sell
    By nooby pube in forum Help
    Replies: 0
    Last Post: 08-24-2012, 07:30 PM
  2. Replies: 1
    Last Post: 11-25-2010, 09:21 PM
  3. [JAVA]Quote Forger
    By Mdog in forum Application Development
    Replies: 1
    Last Post: 07-04-2008, 11:39 PM
  4. Replies: 11
    Last Post: 02-15-2008, 10:13 PM
  5. Quotes
    By Whitey in forum Chat
    Replies: 0
    Last Post: 02-13-2008, 08:56 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
  •