March 8, 201510 yr 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
March 8, 201510 yr 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.
March 8, 201510 yr 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 March 8, 201510 yr by grzekru
March 8, 201510 yr 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?
March 8, 201510 yr 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.