Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

widget delay

Featured Replies

i have a script for tanning, but when character trades with NPC there is huge(5 sec) delay in which the character doesnt tan hides :

any help would be appreciated biggrin.png

conditions:

	if (inventory.isEmptyExcept(995))
			//just withdraws hides to initiate script
			return State.BANK;
		 if(inventory.contains(1743)&&bank.isOpen())
			//if there is tanned hides and bank is open it deposits them/ withdraws untanned hides	
			 return State.BANKB;
		 
		 if(inventory.contains(1743))
			//returns to bank from tanner to open it	
			 return State.BACK;
		 
		 if(ellis!=null&&inventory.contains(1739))
			//tans hides when at tanner	
			 return State.TAN;
		if(inventory.contains(1739))
			//goes to tanner from bank
			return State.WALK;
		
		 

tan action:

case TAN:
			NPC ellis = npcs.closest("Ellis");
			ellis.interact("Trade"); 
			sleep(random(10, 15));
			getWidgets().getWidgetContainingText("Hard leather").interact("Tan All");
			  sleep(random(50, 200));
			break; 

Use conditional wait and return if next widget is visible.

i think the problem could be where you declared the npc inside the TAN but. u refer to it in the decision processing, and I feel like the decsion processing comes before the case TAN. I could be wrong dou xD

case TAN:
        RS2Widget w = getWidgets().getWidgetContainingText("Hard leather");
        if (w != null && w.isVisible()) {
              w.interact("Tan All");
        } else {
	NPC ellis = npcs.closest("Ellis");
        if (ellis != null && ellis.exists()) {
	    ellis.interact("Trade"); 
            //either put a conditional sleep until interface is open here, or just stick with a static sleep and let state machine do the work eg:
            sleep(random(400,500) + random(400,500));
        } else {
            sleep(random(400,500) + random(400,500));
        }
	break; 

Re-written tan case... change the tan condition in the getState to:

 if(ellis!=null&& ellis.exists() && inventory.contains(1739))
			//tans hides when at tanner	
			 return State.TAN;

Edited by Apaec

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.