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.

How to change fighting style?

Featured Replies

I do not believe this is supported in the API, but you can write your own method.

 

Just open your config debugger, and see what config values are changed when you switch attack style. You can then make the script read these config values to check what your current attack style is. As for changing, just open the tab and make the mouse move to the desired style, then make it click. You can probably hardcode this and it won't be too bad

 

apa

I do not believe this is supported in the API, but you can write your own method.

 

Just open your config debugger, and see what config values are changed when you switch attack style. You can then make the script read these config values to check what your current attack style is. As for changing, just open the tab and make the mouse move to the desired style, then make it click. You can probably hardcode this and it won't be too bad

 

apa

Interacting with widgets instead of clicking at a specific point would probably have a better outcome to avoid miss-clicking and gaining xp in a skill you don't want due to lag. Unless Jagex like to mess around widgets a lot.

  • Author

 Here is my code:

public int getFightingStyleId()
{
	return configs.get(43);
}
	
public void changeFightingStyle(int id)
{
	if (id == getFightingStyleId())
		return;
	Tab currentTab = tabs.getOpen();
	if (currentTab != Tab.ATTACK)
		tabs.open(Tab.ATTACK);
	switch (id)
	{
	case 0:
		widgets.get(593, 3).interact();
		break;
	case 1:
		widgets.get(593, 7).interact();
		break;
	case 2:
		widgets.get(593, 11).interact();
		break;
	case 3:
		widgets.get(593, 15).interact();
		break;
	}
	if (currentTab != Tab.ATTACK)
		tabs.open(currentTab);
}

Edited by grzekru

 

 Here is my code:

public int getFightingStyleId()
{
	return configs.get(43);
}

@SuppressWarnings("deprecation")
public void changeFightingStyle(int id)
{
	if (id == getFightingStyleId())
		return;
	Tab currentTab = tabs.getOpen();
	if (currentTab != Tab.ATTACK)
		tabs.open(Tab.ATTACK);
	switch (id)
	{
	case 0:
		interfaces.get(593).getChild(3).interact();
		break;
	case 1:
		interfaces.get(593).getChild(7).interact();
		break;
	case 2:
		interfaces.get(593).getChild(11).interact();
		break;
	case 3:
		interfaces.get(593).getChild(15).interact();
		break;
	}
	if (currentTab != Tab.ATTACK)
		tabs.open(currentTab);
}

 

Neato, do you know which ids correspond to which styles?

 

 Here is my code:

public int getFightingStyleId()
{
	return configs.get(43);
}

@SuppressWarnings("deprecation")
public void changeFightingStyle(int id)
{
	if (id == getFightingStyleId())
		return;
	Tab currentTab = tabs.getOpen();
	if (currentTab != Tab.ATTACK)
		tabs.open(Tab.ATTACK);
	switch (id)
	{
	case 0:
		interfaces.get(593).getChild(3).interact();
		break;
	case 1:
		interfaces.get(593).getChild(7).interact();
		break;
	case 2:
		interfaces.get(593).getChild(11).interact();
		break;
	case 3:
		interfaces.get(593).getChild(15).interact();
		break;
	}
	if (currentTab != Tab.ATTACK)
		tabs.open(currentTab);
}

May want to store those widget ids in an enum.

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.