def handle_cancelling_sell(runescape_window, ge_slot, list_of_items_in_use):
# click box 2
box_2_loc = pointfrombox.random_point((runescape_window.bottom_right_corner[0]-254, runescape_window.bottom_right_corner[1]-165), (runescape_window.bottom_right_corner[0]-224, runescape_window.bottom_right_corner[1]-139))
realmouse.move_mouse_to(box_2_loc[0], box_2_loc[1])
pyautogui.click()
# runescape_window.update_money(runescape_window.money+((ge_slot.item.quantity_to_buy-2)*ge_slot.item.price_instant_sold_at)) think this line is breaking it
# click collect box 1
box_1_loc = pointfrombox.random_point((runescape_window.bottom_right_corner[0]-303, runescape_window.bottom_right_corner[1]-164), (runescape_window.bottom_right_corner[0]-273, runescape_window.bottom_right_corner[1]-139))
realmouse.move_mouse_to(box_1_loc[0], box_1_loc[1])
pyautogui.click()
# if not then click box 2 and proceed to sell the item
wait_for('Tools/screenshots/lent_item_box.png', runescape_window)
if ge_slot.item.number_available_to_buy > 0:
find_up_to_date_sell_price(runescape_window, ge_slot)
ge_slot.item.set_price_instant_bought_at(ge_slot.item.price_instant_bought_at-1)
else:
ge_slot.item.set_price_instant_bought_at(int(ge_slot.item.price_instant_bought_at*0.98)-1)
sell_items(runescape_window, ge_slot)
# item didnt buy any of so we can just mark this slot as open and start again
评论列表
文章目录