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);
}