44 public static final int INTERFACE_ID = 42550;
45 private static final int TITLE_ID = 42557;
46 private static final int CATEGORY_ID = 42558;
47 private static final int RIGHT_OPTIONS_START = 42559;
48 private static final int SCROLL_LAYER = 42573;
49 private static final int ITEMS_ID = 42574;
50 private static final int TEXT_LAYER_START = 42575;
53 public static void openInterface(
Player player,
int skillId,
int optionId,
boolean update) {
54 if(player.menuOpened == skillId && player.optionOpened == optionId)
return;
59 player.send(
new SendString(data.options[optionId], CATEGORY_ID));
61 int menuLength = data.options.length, length = data.menus[optionId].option.length;
62 for(
int index = 0; index < menuLength; index++)
63 player.send(
new SendString(data.options[index], RIGHT_OPTIONS_START + index));
66 Item[] items =
new Item[length];
67 for(
int i = 0; i < length; i++)
68 items[i] =
new Item(data.menus[optionId].option[i].itemId);
70 for(
int i = 0,
id = TEXT_LAYER_START; i < length; i++,
id += 2) {
71 String level = data.menus[optionId].option[i].level == -1 ?
"" : data.menus[optionId].option[i].level +
"";
72 System.out.println(
"id: " +
id);
73 System.out.println(
"level: " + level);
74 System.out.println(
"data.menus[optionId].option[i].name: " + data.menus[optionId].option[i].name);
75 player.send(
new SendString(data.menus[optionId].option[i].name,
id));
81 cleanInterface(player, menuLength, length);
84 if(length == 58) scrollMax = ((length + 3) * 33) + 1;
85 else if(length >= 7) scrollMax = (length * 33) + 1;
88 player.menuOpened = skillId;
89 player.optionOpened = optionId;
94 private static void cleanInterface(
Player player,
int menuLength,
int start) {
98 for(
int index = menuLength; index < 14; index++) {
99 System.out.println(
"RIGHT_OPTIONS_START + index: " + (RIGHT_OPTIONS_START + index));
100 player.send(
new SendString(
"", RIGHT_OPTIONS_START + index));
106 for (
int index = 0,
id = TEXT_LAYER_START + (2 * start); index < 7; index++,
id += 2) {