I see many people doing it totally wrong, meaning they think that the graphic type decides what interfaces needs to be set.
That is so wrong.
I'm talking about when RuneScape didn't allow LD set to FullScreen.
If a players log in on a HD client, a packet is send to the server with some info about what screen is used.
3 things are send, the client height, the client width and the screentype.
Screentype is 0/1/2
0: Normal
1: Resizeable
2: Full Screen
So we all know that the resizeable/fullscreen interface is 746. On that interface you need to let show all other interfaces (tabs,chatbox,etc...)
So what you need to do:
Somehow you need to let the server know what interface is used (548 or 746) and then edit all the packets that have to do with interfaces so they support it.
Code:
public int mainInterface;
You also need to use the packet that is sent on login (in 508 it's packet 129)
508 example:
Code:
int screenType = packet.readByte();
int width = packet.readShort();
int height = packet.readShort();
switch(screenType) {
case 0:
p.getActionSender().mainInterface = 548;
break;
case 1:
case 2:
p.getActionSender().mainInterface = 746;
break;
}
p.getActionSender().sendWindowPane(p.getActionSender().mainInterface);
p.getActionSender().sendLoginInterfaces();
Then you need to change all the packets (frames) that have to do with interfaces
Example:
Code:
public void sendInterface(int id, boolean isInventoryInterface) {
sendCloseInterface();
if (mainInterface == 746) {
sendInterface(0, mainInterface, isInventoryInterface ? 4 : 6, id);
}
sendInterface(0, mainInterface, 8, id);
}