Jump to content

interacting with shop


tirana

Recommended Posts

So just noticed, that sometimes it fails to interact with shop.

 

post-117632-0-18810100-1405251993_thumb.gif

 

Happens like every 5 minutes, sometimes few times in a minute.

 

Although, it's not the missclick itself, becouse sometimes he does missclick on item, or missclicks to buy, but re-tries instantly.

 

I'm quite sure its not code

	if (sA.store.isOpen()) {
		if (sA.store.getAmount("Feather pack") == 100) {
			if (sA.store.interact("Buy 10", "Feather pack")) {
				return new ConditionalSleep(1250) {
					@Override
					public boolean condition() throws InterruptedException {
						return sA.inventory.contains("Feather pack");
					}
				}.sleep();						
			}		
		}			
	}
Edited by tirana
Link to comment
Share on other sites

 

So just noticed, that sometimes it fails to interact with shop.

 

attachicon.gifbloggif_53c271721e9a6.gif

 

Happens like every 5 minutes, sometimes few times in a minute.

 

Although, it's not the missclick itself, becouse sometimes he does missclick on item, or missclicks to buy, but re-tries instantly.

 

I'm quite sure its not code

	if (sA.store.isOpen()) {
		if (sA.store.getAmount("Feather pack") == 100) {
			if (sA.store.interact("Buy 10", "Feather pack")) {
				return new ConditionalSleep(1250) {
					@Override
					public boolean condition() throws InterruptedException {
						return sA.inventory.contains("Feather pack");
					}
				}.sleep();						
			}		
		}			
	}

 

your condition in your conditional sleep should be changed as it will always return true if your inventory contains  a feather pack, meaning no sleep.

 

change it to this:

if (sA.store.isOpen()) {
		if (sA.store.getAmount("Feather pack") == 100) {
                     int amount = sA.inventory.getAmount("Feather pack");
			if (sA.store.interact("Buy 10", "Feather pack")) {
				return new ConditionalSleep(1250) {
					@Override
					public boolean condition() throws InterruptedException {
						return  amount < sA.inventory.getAmount("Feather pack");
					}
				}.sleep();						
			}		
		}			
	}
Link to comment
Share on other sites

 

your condition in your conditional sleep should be changed as it will always return true if your inventory contains  a feather pack, meaning no sleep.

 

change it to this:

if (sA.store.isOpen()) {
		if (sA.store.getAmount("Feather pack") == 100) {
                     int amount = sA.inventory.getAmount("Feather pack");
			if (sA.store.interact("Buy 10", "Feather pack")) {
				return new ConditionalSleep(1250) {
					@Override
					public boolean condition() throws InterruptedException {
						return  amount < sA.inventory.getAmount("Feather pack");
					}
				}.sleep();						
			}		
		}			
	}

It will sleep enough. Bot will open shop with no feather packs, then buy 10. After packs appears in inventory condition breaks, it will close shop and open them. Repeat.

 

Btw, sleep prevents script to run buy task again(if small lag spike appears, and items appears in inventory after 500ms or so).

Edited by tirana
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...