Posted August 25, 20186 yr comment_21758 if (hotKey == 508) { if (i == KeyEvent.VK_ESCAPE && Client.openInterfaceID != -1) { Client.instance.clearTopInterfaces(); //Client.setTab(10); } else if (i == KeyEvent.VK_F1) { Client.setTab(3); } else if (i == KeyEvent.VK_F2) { Client.setTab(4); } else if (i == KeyEvent.VK_F3) { Client.setTab(5); } else if (i == KeyEvent.VK_F4) { Client.setTab(6); } else if (i == KeyEvent.VK_F5) { Client.setTab(0); } else if (i == KeyEvent.VK_F6) { Client.setTab(1); } else if (i == KeyEvent.VK_F7) { Client.setTab(2); } else if (i == KeyEvent.VK_F8) { Client.setTab(7); } else if (i == KeyEvent.VK_F9) { Client.setTab(8); } else if (i == KeyEvent.VK_F10) { Client.setTab(9); } else if (i == KeyEvent.VK_F11) { Client.setTab(12); } else if (i == KeyEvent.VK_F12) { Client.setTab(11); } } else { if (i == KeyEvent.VK_ESCAPE && Client.openInterfaceID != -1) { Client.instance.clearTopInterfaces(); //Client.setTab(10); } else if (i == KeyEvent.VK_F1) { Client.setTab(3); } else if (i == KeyEvent.VK_F2) { Client.setTab(4); } else if (i == KeyEvent.VK_F3) { Client.setTab(5); } else if (i == KeyEvent.VK_F4) { Client.setTab(6); } else if (i == KeyEvent.VK_F5) { Client.setTab(0); } else if (i == KeyEvent.VK_F6) { Client.setTab(1); } else if (i == KeyEvent.VK_F7) { Client.setTab(2); } else if (i == KeyEvent.VK_F8) { Client.setTab(7); } else if (i == KeyEvent.VK_F9) { Client.setTab(8); } else if (i == KeyEvent.VK_F10) { Client.setTab(9); } else if (i == KeyEvent.VK_F11) { Client.setTab(12); } else if (i == KeyEvent.VK_F12) { Client.setTab(11); } } if (j < 30) j = 0; if (i == 37) j = 1; if (i == 39) j = 2; if (i == 38) j = 3; if (i == 40) j = 4; if (i == 17) j = 5; if (i == 8) j = 8; if (i == 127) j = 8; if (i == 9) j = 9; if (i == 10) j = 10; if (i >= 112 && i <= 123) j = (1008 + i) - 112; if (i == 36) j = 1000; if (i == 35) j = 1001; if (i == 33) j = 1002; if (i == 34) j = 1003; if (j > 0 && j < 128) keyArray[j] = 1; if (j > 4) { charQueue[writeIndex] = j; writeIndex = writeIndex + 1 & 0x7f; } } public void replyLastPM() { } RsApplet- What this code is doing? The VK_ESCAPE is in the name.. Closes the interfaces with ESC Here i have listed what tab numbers equal to what tab you wish to use for F keys [hot keys] tab in rsapplet.java 3 = inventory tab F1 4 = weapon slots F2 5 = prayer tab F3 6 = Mage book F4 0 = attack style F5 1 = skills tab F6 2 = quest tab F7 7 = clan chat F8 8 = friends list tab F9 9 = ignore list tab F10 10 = log out tab F11 11 = settings tab F12 12 = charactor animations 13 = summoning tab 14 = achievements tab 15 = summoning tab 16 = random inventory If you wish for the ESc key to open a tab aswel as close an interface then add the extra bit of code underneith - Client.setTab(10); I have done so to give you an idea. if (i == KeyEvent.VK_ESCAPE && Client.openInterfaceID != -1) { Client.instance.clearTopInterfaces(); Client.setTab(10); Which 10 is the log out tab, you can change the number to what ever number you like or leave alone so what ever tab you had opened before the interface gets opened is there when you close the interface, Private message me or mention me in the comments section below if i have confused anyone and i will be happy to do this for you. The server i tested this on was immortalX which is known to work 100 percent on. I have not yet tested on other servers. Good luck~
May 9, 20205 yr comment_54865 Cascading if statements really would be better of suited as a switch statement but nice work
Create an account or sign in to comment