Jump to content
  • 0
Hydra123

Sof Tab 667/***

Question

hey , well i added these in interfacemanager.java but still my sof stab dont show up in the game
any1 know how to fix this?


[CODE] sendSquealOfFortune();[/CODE]


[CODE] public void sendSquealOfFortune() {
sendTab(resizableScreen ? 119 : 179, 1139);
player.getPackets().sendGlobalConfig(823, 1);
}[/CODE]

thanks , hope some1 helps
trying to add sof in my server also if some1 can link me to a guide i'll appriciate it

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0
The code you have here shows that it only works in Resizeable. So put it in Resizeable.

Share this post


Link to post
Share on other sites
  • 0
already tried that it still not showing :/
if u got it could u post the code

Share this post


Link to post
Share on other sites
  • 0
[quote name='Citellum']The code you have here shows that it only works in Resizeable. So put it in Resizeable.[/QUOTE]No it doesn't, rofl... Stop giving people wrong information, you know nothing of which you talk about

Share this post


Link to post
Share on other sites
  • 0
[quote name='axter']No it doesn't, rofl...[/QUOTE]

Do you not see where it says "sendTab Resizeable" ofc. He'd have to add it also in Fixed then send the button.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Citellum']Do you not see where it says "sendTab Resizeable" ofc. He'd have to add it also in Fixed then send the button.[/QUOTE]Do you even know what java is? You obviously don't know what ?: operators do, and you give newbies information that will cause bad habbits. Newbies can't teach newbies.

boolean aBoolean;

System.out.println(aBoolean == true ? "Aboolean = true" : "A boolean = false");

aBoolean = true ? tells java to locate aBoolean a see if it's true or if it's false. If it's true, it will do whatever is says to do after the question mark. (Prints aBoolean = true). Than the : operator is like an "else" statement, it does whats on the other side of it, but only if aBoolaen != true Edited by axter

Share this post


Link to post
Share on other sites
  • 0
Anyhow, that code goes in interfaceManager.java

sendTab(resizableScreen ? 119 : 179, 1139); means that is the screen on log in is resizable, it's going to sendTab(119, 1139) != resizable it will send tab 179, 1139. get the pattern yet?

Share this post


Link to post
Share on other sites
  • 0
[quote name='axter']Anyhow, that code goes in interfaceManager.java

sendTab(resizableScreen ? 119 : 179, 1139); means that is the screen on log in is resizable, it's going to sendTab(119, 1139) != resizable it will send tab 179, 1139. get the pattern yet?[/QUOTE]

This.

Share this post


Link to post
Share on other sites
  • 0
soo i added
[CODE] sendTab(resizableScreen ? 119 : 179, 1139);[/CODE]

under the fixedinterfaces and fullscreenfaces and still i get nothing

if that what did you meant where to put it

Share this post


Link to post
Share on other sites
  • 0
ok here's the whole class check if i did put it wrong please,

[CODE]package com.rs.game.player;

import java.util.concurrent.ConcurrentHashMap;

public class InterfaceManager {

public static final int FIXED_WINDOW_ID = 548;
public static final int RESIZABLE_WINDOW_ID = 746;
public static final int CHAT_BOX_TAB = 13;
public static final int FIXED_SCREEN_TAB_ID = 9;
public static final int FIXED_SCREEN2_TAB_ID = 11;
public static final int RESIZABLE_SCREEN_TAB_ID = 12;
public static final int FIXED_INV_TAB_ID = 199; // wrong
public static final int RESIZABLE_INV_TAB_ID = 87;
private Player player;

private final ConcurrentHashMap<Integer, int[]> openedinterfaces = new ConcurrentHashMap<Integer, int[]>();

private boolean resizableScreen;
private int windowsPane;

public InterfaceManager(Player player) {
this.player = player;
}

public void sendTab(int tabId, int interfaceId) {
player.getPackets().sendInterface(true,
resizableScreen ? RESIZABLE_WINDOW_ID : FIXED_WINDOW_ID, tabId,
interfaceId);
}

public void sendChatBoxInterface(int interfaceId) {
player.getPackets().sendInterface(true, 752, CHAT_BOX_TAB, interfaceId);
}

public void closeChatBoxInterface() {
player.getPackets().closeInterface(CHAT_BOX_TAB);
}

public void sendInterface(int interfaceId) {
player.getPackets()
.sendInterface(
false,
resizableScreen ? RESIZABLE_WINDOW_ID : FIXED_WINDOW_ID,
resizableScreen ? RESIZABLE_SCREEN_TAB_ID
: FIXED_SCREEN_TAB_ID, interfaceId);
}

public void sendInventoryInterface(int childId) {
player.getPackets().sendInterface(false,
resizableScreen ? RESIZABLE_WINDOW_ID : FIXED_WINDOW_ID,
resizableScreen ? RESIZABLE_INV_TAB_ID : FIXED_INV_TAB_ID,
childId);
}

public final void sendInterfaces() {
if (player.getDisplayMode() == 2 || player.getDisplayMode() == 3) {
resizableScreen = true;
sendFullScreenInterfaces();
} else {
resizableScreen = false;
sendFixedInterfaces();
}
player.getCombatDefinitions().sendUnlockAttackStylesButtons();
player.getMusicsManager().unlockMusicPlayer();
player.getInventory().unlockInventoryOptions();
player.getPrayer().unlockPrayerBookButtons();
if (player.getFamiliar() != null && player.isRunning())
player.getFamiliar().unlock();
player.getControlerManager().sendInterfaces();
}

public void replaceRealChatBoxInterface(int interfaceId) {
player.getPackets().sendInterface(true, 752, 12, interfaceId);
}

public void closeReplacedRealChatBoxInterface() {
player.getPackets().closeInterface(752, 12);
}

public void sendFullScreenInterfaces() {
player.getPackets().sendWindowsPane(746, 0);
sendTab(15, 745);
sendTab(19, 751);
sendTab(72, 752);
sendTab(73, 754);
sendTab(177, 748); // 177
sendTab(178, 749);
sendTab(179, 750);
sendTab(180, 747); // summoning
player.getPackets().sendInterface(true, 752, 9, 137);
sendTab(90, 884);
sendTab(92, 320);
//sendMsPortal();
sendTab(91, 1056);// 259); // Achievement tab
sendInventory();
sendEquipment();
sendPrayerBook();
sendMagicBook();
sendSquealOfFortune();
sendTab(99, 550); // friend list
sendTab(100, 1109); // 551 ignore now friendchat
sendTab(101, 1110); // 589 old clan chat now new clan chat
sendSettings();
sendTab(103, 590); // emote, 590 in sendFullScreenInterfaces
sendTab(104, 187); // music
sendTab(105, 34); // notes
sendTab(108, 182); // logout
sendTab(resizableScreen ? 119 : 179, 1139);
}

public void sendEquipment() {
sendTab(resizableScreen ? 95 : 209, 387);
}

public void sendMsPortal() {
sendTab(resizableScreen ? 93 : 207, 506);
player.getPackets().sendIComponentText(506, 0, "ScorpionX");
player.getPackets().sendIComponentText(506, 4, "Commands");
player.getPackets().sendIComponentText(506, 6, "Teleports");
player.getPackets().sendIComponentText(506, 8, "Updates");
player.getPackets().sendIComponentText(506, 10, "Vote");
player.getPackets().sendIComponentText(506, 12, "Infomation");
player.getPackets().sendIComponentText(506, 14, "Donate<img=10> ");
if (player.prestige == 1) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <shad=D8D8D8>1</shad>");
} else if (player.prestige == 2) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <shad=D8D8D8>2</shad>");
} else if (player.prestige == 3) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <shad=D8D8D8>3</shad>");
} else if (player.prestige == 4) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <shad=D8D8D8>4</shad>");
} else if (player.prestige == 5) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <shad=D8D8D8>5</shad>");
} else if (player.prestige == 6) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <col=ff0000><shad=D8D8D8>6</shad></col>");
} else if (player.prestige == 7) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <col=ff0000><shad=D8D8D8>7</shad></col>");
} else if (player.prestige == 8) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <col=ff0000><shad=D8D8D8>8</shad></col>");
} else if (player.prestige == 9) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <col=ff0000><shad=D8D8D8>6</shad></col>");
} else if (player.prestige == 10) {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <col=ff0000><shad=FFFF00><img=5> 10 <img=5></shad></col>");
} else {
player.getPackets().sendIComponentText(506, 2, " Prestige Rank: <col=ffffff>0");
}
}

public void closeEquipment() {
player.getPackets().closeInterface(resizableScreen ? 95 : 209);
}

public void sendInventory() {
sendTab(resizableScreen ? 94 : 208, Inventory.INVENTORY_INTERFACE);
}

public void closeInventory() {
player.getPackets().closeInterface(resizableScreen ? 94 : 208);
}

public void sendSkills() {
sendTab(resizableScreen ? 30 : 151, 320);
}

public void sendSettings() {
sendSettings(261);
}

public void sendSettings(int interfaceId) {
sendTab(resizableScreen ? 102 : 216, interfaceId);
}

public void sendPrayerBook() {
sendTab(resizableScreen ? 96 : 210, 271);
}

public void sendMagicBook() {
sendTab(resizableScreen ? 97 : 211, player.getCombatDefinitions()
.getSpellBook());
}

public void sendFixedInterfaces() {
player.getPackets().sendWindowsPane(548, 0);
sendTab(15, 745);
sendTab(68, 751); // Chat options
sendTab(192, 752); // Chatbox
sendTab(17, 754);
sendTab(183, 748); // HP bar
sendTab(185, 749); // Prayer bar
sendTab(186, 750); // Energy bank
sendTab(188, 747);
player.getPackets().sendInterface(true, 752, 9, 137); // Playername on
// chat
sendTab(204, 884); // Attack tab
sendTab(206, 320); // Skill tab
sendMsPortal();// Quest tab 190
sendTab(205, 1056);// Task tab
sendInventory(); // Inventory tab
sendEquipment();
sendPrayerBook();
sendMagicBook();
sendSquealOfFortune();
sendTab(213, 550); // Friend tab
sendTab(214, 1109); // friendchat
sendTab(215, 1110); // clan chat
sendSettings();
sendTab(217, 590); // Emote tab
sendTab(218, 187); // Music tab
sendTab(219, 34); // Notes tab.
sendTab(222, 182); // Logout tab
sendTab(resizableScreen ? 119 : 179, 1139);
}

public boolean addInterface(int windowId, int tabId, int childId) {
if (openedinterfaces.containsKey(tabId))
player.getPackets().closeInterface(tabId);
openedinterfaces.put(tabId, new int[] { childId, windowId });
return openedinterfaces.get(tabId)[0] == childId;
}

public boolean containsInterface(int tabId, int childId) {
if (childId == windowsPane)
return true;
if (!openedinterfaces.containsKey(tabId))
return false;
return openedinterfaces.get(tabId)[0] == childId;
}

public int getTabWindow(int tabId) {
if (!openedinterfaces.containsKey(tabId))
return FIXED_WINDOW_ID;
return openedinterfaces.get(tabId)[1];
}

public boolean containsInterface(int childId) {
if (childId == windowsPane)
return true;
for (int[] value : openedinterfaces.values())
if (value[0] == childId)
return true;
return false;
}

public boolean containsTab(int tabId) {
return openedinterfaces.containsKey(tabId);
}

public void removeAll() {
openedinterfaces.clear();
}

public boolean containsScreenInter() {
return containsTab(resizableScreen ? RESIZABLE_SCREEN_TAB_ID
: FIXED_SCREEN_TAB_ID);
}

public void closeScreenInterface() {
player.getPackets()
.closeInterface(
resizableScreen ? RESIZABLE_SCREEN_TAB_ID
: FIXED_SCREEN_TAB_ID);
}

public boolean containsInventoryInter() {
return containsTab(resizableScreen ? RESIZABLE_INV_TAB_ID
: FIXED_INV_TAB_ID);
}

public void closeInventoryInterface() {
player.getPackets().closeInterface(
resizableScreen ? RESIZABLE_INV_TAB_ID : FIXED_INV_TAB_ID);
}

public boolean containsChatBoxInter() {
return containsTab(CHAT_BOX_TAB);
}

public boolean removeTab(int tabId) {
return openedinterfaces.remove(tabId) != null;
}

public boolean removeInterface(int tabId, int childId) {
if (!openedinterfaces.containsKey(tabId))
return false;
if (openedinterfaces.get(tabId)[0] != childId)
return false;
return openedinterfaces.remove(tabId) != null;
}

public void sendScreenInterface(int backgroundInterface, int interfaceId) {
player.getInterfaceManager().closeScreenInterface();

if (hasRezizableScreen()) {
player.getPackets().sendInterface(false, RESIZABLE_WINDOW_ID, 9,
backgroundInterface);
player.getPackets().sendInterface(false, RESIZABLE_WINDOW_ID, 11,
interfaceId);
} else
player.getPackets().sendWindowsPane(interfaceId, 0);

player.setCloseInterfacesEvent(new Runnable() {
[MENTION=15855]Over[/MENTION]ride
public void run() {
if (hasRezizableScreen()) {
player.getPackets().closeInterface(9);
player.getPackets().closeInterface(11);
} else
player.getPackets().sendWindowsPane(FIXED_WINDOW_ID, 0);
}
});
}

public boolean hasRezizableScreen() {
return resizableScreen;
}

public void setWindowsPane(int windowsPane) {
this.windowsPane = windowsPane;
}

public void sendSquealOfFortune() {
sendTab(resizableScreen ? 119 : 179, 1139);
player.getPackets().sendGlobalConfig(823, 1);
}

public int getWindowsPane() {
return windowsPane;
}

/*
* returns lastGameTab
*/
public int openGameTab(int tabId) {
player.getPackets().sendGlobalConfig(168, tabId);
int lastTab = 4; // tabId
// tab = tabId;
return lastTab;
}

}[/CODE]

Share this post


Link to post
Share on other sites

×