Jump to content
  • 0
Sign in to follow this  
milf hunter

[562] Button configuration

Question

[SIZE=3]So for some reason, I can't get this interface to display the item I want made. I've tried sending BConfig 755, itemId but it still won't work. Revision is 562 loading 668 by the way.[/SIZE]

[IMG]http://img20.imageshack.us/img20/7189/qc6i.png[/IMG]

Any help is greatly appreciated! Will Rep++ if someone helps!

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Try to make a for int i loop, it should help you.

[code]for (int i =0 ; i < 800; i++) {
player.getPackets().sendBitConfig(i.... //<-- [B]Whatever is ur config method[/B]
player.sendinterface....

}[/code]

Share this post


Link to post
Share on other sites
  • 0
[quote name='Fuzen Seth']Try to make a for int i loop, it should help you.

[code]for (int i =0 ; i < 800; i++) {
player.getPackets().sendBitConfig(i.... //<-- [B]Whatever is ur config method[/B]
player.sendinterface....

}[/code][/QUOTE]
Already tried, didn't work. thanks though xd

Share this post


Link to post
Share on other sites
  • 0
[quote name='milf hunter']Already tried, didn't work. thanks though xd[/QUOTE]
I have figured it out for you, here you go!
[code]
player.getInterfaceManager().sendChatBoxInterface(905);
player.getPackets().sendInterface(true, 905, 4, 916);
player.getPackets().sendUnlockIComponentOptionSlots(916, 8, -1, 0,0); // unlocks all option
player.getPackets().sendIComponentText(916, 1, explanation);
player.getPackets().sendGlobalConfig(754, option);
[/code]

Method example
[code] public static void openSkillingInterface(Player player, int option,
String explanation, int maxQuantity, int[] items,
ItemNameFilter filter) {
player.getInterfaceManager().sendChatBoxInterface(905);
player.getPackets().sendInterface(true, 905, 4, 916);
if (option != MAKE_SETS && option != MAKE_NO_ALL_NO_CUSTOM)
player.getPackets().sendUnlockIComponentOptionSlots(916, 8, -1, 0,
0); // unlocks all option
player.getPackets().sendIComponentText(916, 1, explanation);
player.getPackets().sendGlobalConfig(754, option);
for (int i = 0; i < 10; i++) {
if (i >= items.length) {
player.getPackets().sendGlobalConfig(
i >= 6 ? (1139 + i - 6) : 755 + i, -1);
continue;
}
player.getPackets().sendGlobalConfig(
i >= 6 ? (1139 + i - 6) : 755 + i, items[i]);
String name = ItemDefinitions.getItemDefinitions(items[i])
.getName();
if (filter != null)
name = filter.rename(name);
player.getPackets().sendGlobalString(
i >= 6 ? (280 + i - 6) : 132 + i, name);
}
setMaxQuantity(player, maxQuantity);
setQuantity(player, maxQuantity);
setItem(items);
}[/code]

EDIT: Extra:
[code]public static final int MAKE = 0, MAKE_SETS = 1, COOK = 2, ROAST = 3,
OFFER = 4, SELL = 5, BAKE = 6, CUT = 7, DEPOSIT = 8,
MAKE_NO_ALL_NO_CUSTOM = 9, TELEPORT = 10, SELECT = 11, TAKE = 13;[/code]

[code] public static interface ItemNameFilter {

public String rename(String name);
}
private static int[] items;

public static void setItem(int... item) {
items = item;
}

public static int getItem(int slot) {
return items[slot];
}[/code]

Share this post


Link to post
Share on other sites
Sign in to follow this  

×