11 Posts
Posts
0
Warning level
0
Likes
0
Dislikes
Joined: 2022-04-24
Quote from Adam on April 24, 2022, 3:31 pmCode:if (JagString.opcode == 162) { // Regular map area XXX Class39.parseMapRegion(false); JagString.opcode = -1; return true; } else if (JagString.opcode == 214) { // Constructed map area XXX Class39.parseMapRegion(true); JagString.opcode = -1; return true; } else if (JagString.opcode == 26) {// Start location packets TODO Class65.locationPacketX = GraphicEffectConfig.packetStream.g_ubyte_negate(); Class107.locationPacketZ = GraphicEffectConfig.packetStream.g_ubyte(); JagString.opcode = -1; return true; } else if (JagString.opcode == 230) { // Parse multiple location packets TODO Class107.locationPacketZ = GraphicEffectConfig.packetStream.g_ubyte_add(); Class65.locationPacketX = GraphicEffectConfig.packetStream.g_ubyte_subs(); while (~Class130.packetSize < ~GraphicEffectConfig.packetStream.position) { JagString.opcode = GraphicEffectConfig.packetStream.g_ubyte(); Class39.parseLocationPacket((byte) -82); } JagString.opcode = -1; return true; } else if (60 == JagString.opcode) {// VarP small XXX int id = GraphicEffectConfig.packetStream.g_ushort_add(); byte set = GraphicEffectConfig.packetStream.g_byte_negate(); Class3_Sub13_Sub23.setVarP(id, set); JagString.opcode = -1; return true; } else if (JagString.opcode == 226) {// VarP big XXX int set = GraphicEffectConfig.packetStream.g_int(); int id = GraphicEffectConfig.packetStream.g_ushort_add(); Class3_Sub13_Sub23.setVarP(id, set); JagString.opcode = -1; return true; } else if (128 == JagString.opcode) {// Force VarP refresh XXX for (int var = 0; ~Class163_Sub1.varP.length < ~var; ++var) { if (~Class57.updatedVarP[var] != ~Class163_Sub1.varP[var]) { Class163_Sub1.varP[var] = Class57.updatedVarP[var]; Class46.refreshMagicVarP(var); Class44.cs2_updatedVarP[ClientScript.and(Class36.varpUpdateCount++, 31)] = var; } } JagString.opcode = -1; return true; } else if (89 == JagString.opcode) {// Reset transient varp XXX Class3_Sub13_Sub2.resetTransientVarP(); CipherStream.method819(false); Class36.varpUpdateCount += 32; JagString.opcode = -1; return true; } else if (37 == JagString.opcode) {// VarBit small XXX int set = GraphicEffectConfig.packetStream.g_ubyte_add(); int id = GraphicEffectConfig.packetStream.g_ushort_le(); Class163.setVarBit(id, set); JagString.opcode = -1; return true; } else if (JagString.opcode == 84) {// VarBit big XXX int set = GraphicEffectConfig.packetStream.g_int_le(); int id = GraphicEffectConfig.packetStream.g_ushort_le_add(); Class163.setVarBit(id, set); JagString.opcode = -1; return true; } else if (65 == JagString.opcode) {// VarC small XXX int trcknum = GraphicEffectConfig.packetStream.g_ushort_le(); int set = GraphicEffectConfig.packetStream.g_ubyte_negate(); int varId = GraphicEffectConfig.packetStream.g_ushort_le_add(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateVarC(varId, set); } JagString.opcode = -1; return true; } else if (JagString.opcode == 69) {// VarC big XXX int trcknum = GraphicEffectConfig.packetStream.g_ushort_le_add(); int set = GraphicEffectConfig.packetStream.g_int(); int varId = GraphicEffectConfig.packetStream.g_ushort_add(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateVarC(varId, set); } JagString.opcode = -1; return true; } else if (JagString.opcode == 123) {// XXX int id = GraphicEffectConfig.packetStream.g_ushort_le(); int trcknum = GraphicEffectConfig.packetStream.g_ushort_add(); JagString set = GraphicEffectConfig.packetStream.gjstr(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateVarString(id, set); } JagString.opcode = -1; return true; } else if (JagString.opcode == 48) {// XXX int trcknum = GraphicEffectConfig.packetStream.g_ushort(); JagString set = GraphicEffectConfig.packetStream.gjstr(); int id = GraphicEffectConfig.packetStream.g_ushort_le_add(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateVarString(id, set); } JagString.opcode = -1; return true; } else if (JagString.opcode == 171) { // XXX int id = GraphicEffectConfig.packetStream.g_int_le_inverse(); JagString text = GraphicEffectConfig.packetStream.gjstr(); int tracknum = GraphicEffectConfig.packetStream.g_ushort_add(); if (AbstractWheelListener.setPacketTracker(tracknum)) { RefreshRequest.setWidgetText(id, text); } JagString.opcode = -1; return true; } else if (JagString.opcode == 130) {// Model on interface XXX int ptr = GraphicEffectConfig.packetStream.g_int_le(); int trcknum = GraphicEffectConfig.packetStream.g_ushort_le_add(); int id = GraphicEffectConfig.packetStream.g_ushort_add(); if (id == 65535) { id = -1; } if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateWidgetMedia(ptr, 1, id, -1); } JagString.opcode = -1; return true; } else if (JagString.opcode == 73) {// Npc on interface XXX int id = GraphicEffectConfig.packetStream.g_ushort_add(); int ptr = GraphicEffectConfig.packetStream.g_int_le(); if (id == 65535) { id = -1; } int trcknum = GraphicEffectConfig.packetStream.g_ushort_le(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateWidgetMedia(ptr, 2, id, -1); } JagString.opcode = -1; return true; } else if (JagString.opcode == 66) { // Player on interface XXX int trcknum = GraphicEffectConfig.packetStream.g_ushort_le_add(); int ptr = GraphicEffectConfig.packetStream.g_int_inverse(); if (AbstractWheelListener.setPacketTracker(trcknum)) { int set = 0; if (RSTextureLoader.localPlayer.identityKit != null) { set = RSTextureLoader.localPlayer.identityKit.method1163(-24861); } RefreshRequest.updateWidgetMedia(ptr, 3, set, -1); } JagString.opcode = -1; return true; } else if (JagString.opcode == 111) {// Generate chat head from body parts TODO int trcknum = GraphicEffectConfig.packetStream.g_ushort_add(); int ptr = GraphicEffectConfig.packetStream.g_int_le_inverse(); int set1 = GraphicEffectConfig.packetStream.g_ushort_le_add(); int set = GraphicEffectConfig.packetStream.g_ushort_le(); int set2 = GraphicEffectConfig.packetStream.g_ushort_le_add(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateWidgetMedia(ptr, 7, set << -311274832 | set2, set1); } JagString.opcode = -1; return true; } else if (JagString.opcode == 36) {// Type 5 XXX int pointer = GraphicEffectConfig.packetStream.g_int_le_inverse(); int value = GraphicEffectConfig.packetStream.g_short_le(); int trcknum = GraphicEffectConfig.packetStream.g_ushort_add(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateWidgetAnimation(pointer, value); } JagString.opcode = -1; return true; } else if (JagString.opcode == 2) {// RGB XXX int ptr = GraphicEffectConfig.packetStream.g_int_inverse(); int trcknum = GraphicEffectConfig.packetStream.g_ushort_add(); int set = GraphicEffectConfig.packetStream.g_ushort_le_add(); if (AbstractWheelListener.setPacketTracker(trcknum)) { // color = (blue << 3) + (green << 11) + (red << 19); RefreshRequest.updateColor(ptr, set); } JagString.opcode = -1; return true; } else if (JagString.opcode == 21) {// Set widget visibility XXX int set = GraphicEffectConfig.packetStream.g_ubyte_negate(); int trcknum = GraphicEffectConfig.packetStream.g_ushort(); int pointer = GraphicEffectConfig.packetStream.g_int_le(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateVisibility(pointer, set); } JagString.opcode = -1; return true; } else if (JagString.opcode == 132) {// set pitch, yaw and scale TODO int pitch = GraphicEffectConfig.packetStream.g_ushort(); int trcknum = GraphicEffectConfig.packetStream.g_ushort_add(); int scale = GraphicEffectConfig.packetStream.g_ushort_le_add(); int yaw = GraphicEffectConfig.packetStream.g_ushort_le_add(); int ptr = GraphicEffectConfig.packetStream.g_int(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.updateView(ptr, pitch, scale, yaw); } JagString.opcode = -1; return true; } else if (50 == JagString.opcode) {// Item on widget XXX int slot = GraphicEffectConfig.packetStream.g_int(); int ptr = GraphicEffectConfig.packetStream.g_int_le_inverse(); int itemId = GraphicEffectConfig.packetStream.g_ushort_le_add(); if (itemId == 65535) { itemId = -1; } int tracker = GraphicEffectConfig.packetStream.g_ushort_le(); if (AbstractWheelListener.setPacketTracker(tracker)) { Widget widget = Class7.getWidget(ptr); ItemDefinition itemDef; if (widget.aBoolean233) { RefreshRequest.update9(ptr, itemId, slot); itemDef = ItemDefinition.load(itemId); RefreshRequest.updateView(ptr, itemDef.iconPitch, itemDef.iconScale, itemDef.iconYaw); Class84.method1420(ptr, itemDef.iconRoll, itemDef.iconOffsetY, itemDef.iconOffsetX, (byte) -85); } else { if (-1 == itemId) { widget.mediaType = 0; JagString.opcode = -1; return true; } itemDef = ItemDefinition.load(itemId); widget.pitch = itemDef.iconPitch; widget.scale = 100 * itemDef.iconScale / slot; widget.mediaType = 4; widget.mediaId = itemId; widget.yaw = itemDef.iconYaw; Class20.method909(117, widget); } } JagString.opcode = -1; return true; } else if (JagString.opcode == 119) {// Reposition child? TODO: Unsure int trcknum = GraphicEffectConfig.packetStream.g_ushort_add(); int ptr = GraphicEffectConfig.packetStream.g_int_le(); int set = GraphicEffectConfig.packetStream.g_short(); int set1 = GraphicEffectConfig.packetStream.g_short_add(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.update11(ptr, set, set1); } JagString.opcode = -1; return true; } else if (JagString.opcode == 220) {// Set scroll bar XXX: int ptr = GraphicEffectConfig.packetStream.g_int_le_inverse(); int set = GraphicEffectConfig.packetStream.g_ushort_le(); int trcknum = GraphicEffectConfig.packetStream.g_ushort(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.update12(ptr, set); } JagString.opcode = -1; return true; } else if (JagString.opcode == 207) {//Changes yaw and pitch related to client tick TODO: ??? int ptr = GraphicEffectConfig.packetStream.g_int_le_inverse(); int trcknum = GraphicEffectConfig.packetStream.g_ushort_add(); int pitchStep = GraphicEffectConfig.packetStream.g_ushort(); int yawStep = GraphicEffectConfig.packetStream.g_ushort_add(); if (AbstractWheelListener.setPacketTracker(trcknum)) { RefreshRequest.showcaseRoll(ptr, yawStep + (pitchStep << 16)); } JagString.opcode = -1; return true; } else if (JagString.opcode == 105) {// Init inventory XXX int ptr = GraphicEffectConfig.packetStream.g_int(); int invId = GraphicEffectConfig.packetStream.g_ushort(); if (~ptr > 69999) { invId += '\u8000'; } Widget parent = null; if (0 <= ptr) { parent = Class7.getWidget(ptr); } if (parent != null) { for (int slot = 0; parent.inventoryId.length > slot; ++slot) { parent.inventoryId[slot] = 0; parent.inventoryAmt[slot] = 0; } } Class10.resetInventory(invId); int len = GraphicEffectConfig.packetStream.g_ushort(); for (int slot = 0; slot < len; ++slot) { int amt = GraphicEffectConfig.packetStream.g_ubyte_subs(); if (255 == amt) { amt = GraphicEffectConfig.packetStream.g_int(); } int itemId = GraphicEffectConfig.packetStream.g_ushort(); if (null != parent && ~slot > ~parent.inventoryId.length) { parent.inventoryId[slot] = itemId; parent.inventoryAmt[slot] = amt; } FloorOverlayConfig.setInvItem(invId, slot, itemId - 1, amt); } if (parent != null) { Class20.method909(-9, parent); } CipherStream.method819(false); QuickChatDefinition.cs2_updatedInv[ClientScript.and(ReferenceTable.invUpdateCount++, 31)] = ClientScript.and(32767, invId); JagString.opcode = -1; return true; } else if (JagString.opcode == 22) { // Update inventory XXX int ptr = GraphicEffectConfig.packetStream.g_int(); int invId = GraphicEffectConfig.packetStream.g_ushort(); if (69999 < ~ptr) { invId += '\u8000'; } Widget widget = null; if (ptr >= 0) { widget = Class7.getWidget(ptr); } for (; ~GraphicEffectConfig.packetStream.position > ~Class130.packetSize;) { int slot = GraphicEffectConfig.packetStream.g_usmart(); int itemId = GraphicEffectConfig.packetStream.g_ushort(); int amt = 0; if (itemId != 0) { amt = GraphicEffectConfig.packetStream.g_ubyte(); if (amt == 255) { amt = GraphicEffectConfig.packetStream.g_int(); } } if (widget != null && ~slot <= -1 && ~widget.inventoryId.length < ~slot) { widget.inventoryId[slot] = itemId; widget.inventoryAmt[slot] = amt; } FloorOverlayConfig.setInvItem(invId, slot, itemId - 1, amt); } if (widget != null) { Class20.method909(-128, widget); } CipherStream.method819(false); QuickChatDefinition.cs2_updatedInv[ClientScript.and(ReferenceTable.invUpdateCount++, 31)] = ClientScript.and(32767, invId); JagString.opcode = -1; return true; } else if (JagString.opcode == 144) {// reset inventory XXX int pointer = GraphicEffectConfig.packetStream.g_int_le_inverse(); Widget widget = Class7.getWidget(pointer); for (int slot = 0; widget.inventoryId.length > slot; ++slot) { widget.inventoryId[slot] = -1; widget.inventoryAmt[slot] = 0; } Class20.method909(123, widget); JagString.opcode = -1; return true; } else if (JagString.opcode == 191) {// Delete inventory XXX int invId = GraphicEffectConfig.packetStream.g_ushort_le(); Class3_Sub28_Sub1.deleteInventory(invId); QuickChatDefinition.cs2_updatedInv[ClientScript.and(31, ReferenceTable.invUpdateCount++)] = ClientScript.and(invId, 32767); JagString.opcode = -1; return true; } else if (JagString.opcode == 115) {// CS2 XXX int trcknum = GraphicEffectConfig.packetStream.g_ushort(); JagString instr = GraphicEffectConfig.packetStream.gjstr(); Object[] args = new Object[instr.length() - -1]; for (int pos = instr.length() + -1; -1 >= ~pos; --pos) { if (115 == instr.method1569(pos, (byte) -45)) { args[1 + pos] = GraphicEffectConfig.packetStream.gjstr(); } else { args[1 + pos] = new Integer(GraphicEffectConfig.packetStream.g_int()); } } args[0] = new Integer(GraphicEffectConfig.packetStream.g_int()); if (AbstractWheelListener.setPacketTracker(trcknum)) { CS2Request var66 = new CS2Request(); var66.arguments = args; Class43.method1065(var66); } JagString.opcode = -1; return true; } else if (JagString.opcode == 145) {// Main game frame XXX int parentId = GraphicEffectConfig.packetStream.g_ushort_le_add(); int reset = GraphicEffectConfig.packetStream.g_ubyte_add(); int trcknum = GraphicEffectConfig.packetStream.g_ushort_le_add(); if (AbstractWheelListener.setPacketTracker(trcknum)) { if (reset == 2) { Class7.resetWorldMap((byte) -86); } InventoryConfig.parentWidgetId = parentId; Class3_Sub13_Sub13.method232(parentId, 16182); Class124.method1746(false, (byte) -64); Class3_Sub13_Sub12.runOpenScripts(InventoryConfig.parentWidgetId); for (int ix = 0; -101 < ~ix; ++ix) { GroundItemWrapper.aBooleanArray3674[ix] = true; } } JagString.opcode = -1; return true; } else if (JagString.opcode == 155) { // Open widget XXX int type = GraphicEffectConfig.packetStream.g_ubyte(); int pointer = GraphicEffectConfig.packetStream.g_int_le_inverse(); int tracknum = GraphicEffectConfig.packetStream.g_ushort_add(); int widgetId = GraphicEffectConfig.packetStream.g_ushort(); if (AbstractWheelListener.setPacketTracker(tracknum)) { WidgetPointer ptr = (WidgetPointer) WidgetPointer.pointers.get(pointer); if (null != ptr) { Class3_Sub13_Sub18.closeWidget(ptr.widgetId != widgetId, ptr, false); } Class21.openWidget(pointer, widgetId, type); } JagString.opcode = -1; return true; } else if (JagString.opcode == 176) {// Switch widget XXX int source = GraphicEffectConfig.packetStream.g_int_inverse(); int tracknum = GraphicEffectConfig.packetStream.g_ushort_add(); int target = GraphicEffectConfig.packetStream.g_int_inverse(); if (AbstractWheelListener.setPacketTracker(tracknum)) { WidgetPointer srcWidget = (WidgetPointer) WidgetPointer.pointers.get(source); WidgetPointer tgtWidget = (WidgetPointer) WidgetPointer.pointers.get(target); if (null != tgtWidget) { Class3_Sub13_Sub18.closeWidget( null == srcWidget || tgtWidget.widgetId != srcWidget.widgetId, tgtWidget, false); } if (null != srcWidget) { srcWidget.unlink(); WidgetPointer.pointers.put(target, srcWidget, 1); } Widget widget = Class7.getWidget(source); if (widget != null) { Class20.method909(var0 + 57, widget); } widget = Class7.getWidget(target); if (null != widget) { Class20.method909(119, widget); Class151_Sub1.method2104(widget, true); } if (0 != ~InventoryConfig.parentWidgetId) { Class3_Sub8.runScripts(1, InventoryConfig.parentWidgetId); } } JagString.opcode = -1; return true; } else if (JagString.opcode == 149) {// Close widget XXX int tracknum = GraphicEffectConfig.packetStream.g_ushort(); int ptr = GraphicEffectConfig.packetStream.g_int(); if (AbstractWheelListener.setPacketTracker(tracknum)) { WidgetPointer pointer = (WidgetPointer) WidgetPointer.pointers.get(ptr); if (null != pointer) { Class3_Sub13_Sub18.closeWidget(true, pointer, false); } if (null != Class3_Sub13_Sub7.aClass11_3087) { Class20.method909(115, Class3_Sub13_Sub7.aClass11_3087); Class3_Sub13_Sub7.aClass11_3087 = null; } } JagString.opcode = -1; return true; } else if (JagString.opcode == 165) {// Widget settings/access mask XXX int tracknum = GraphicEffectConfig.packetStream.g_ushort_le(); int end = GraphicEffectConfig.packetStream.g_ushort_le(); if (end == '\uffff') { end = -1; } int pointer = GraphicEffectConfig.packetStream.g_int(); int start = GraphicEffectConfig.packetStream.g_ushort_add(); int accessMask = GraphicEffectConfig.packetStream.g_int_inverse(); if (~start == -65536) { start = -1; } if (AbstractWheelListener.setPacketTracker(tracknum)) { for (int slot = start; slot <= end; ++slot) { long ptr = slot + ((long) pointer << 32); WidgetSettings prev = (WidgetSettings) Class124.widgetSettings.get(ptr); WidgetSettings settings; if (prev == null) { if (-1 == slot) { settings = new WidgetSettings(accessMask, Class7.getWidget(pointer).settings.anInt2202); } else { settings = new WidgetSettings(accessMask, -1); } } else { settings = new WidgetSettings(accessMask, prev.anInt2202); prev.unlink(); } Class124.widgetSettings.put(ptr, settings, 1); } } JagString.opcode = -1; return true; } else if (JagString.opcode == 9) { // Why? Widgetstruct setting XXX int set = GraphicEffectConfig.packetStream.g_ushort_le_add(); int pointer = GraphicEffectConfig.packetStream.g_int_le(); int tracknum = GraphicEffectConfig.packetStream.g_ushort_add(); int end = GraphicEffectConfig.packetStream.g_ushort_le(); if (end == 65535) { end = -1; } int start = GraphicEffectConfig.packetStream.g_ushort_add(); if (start == 65535) { start = -1; } if (AbstractWheelListener.setPacketTracker(tracknum)) { for (int slot = start; slot <= end; ++slot) { long ptr = slot + ((long) pointer << 32); WidgetSettings prev = (WidgetSettings) Class124.widgetSettings.get(ptr); WidgetSettings settings; if (null != prev) { settings = new WidgetSettings(prev.accessMask, set); prev.unlink(); } else if (0 != ~slot) { settings = new WidgetSettings(0, set); } else { settings = new WidgetSettings(Class7.getWidget(pointer).settings.accessMask, set); } Class124.widgetSettings.put(ptr, settings, 1); } } JagString.opcode = -1; return true; } else if (JagString.opcode == 209) { // Some kind of game frame scripts TODO: if (InventoryConfig.parentWidgetId != -1) { Class3_Sub8.runScripts(0, InventoryConfig.parentWidgetId); } JagString.opcode = -1; return true; } else if (JagString.opcode == 192) {// Map/compass blackout XXX Class161.mapcompassBlackout = GraphicEffectConfig.packetStream.g_ubyte(); JagString.opcode = -1; return true; } else if (JagString.opcode == 153) {// Reset map flag XXX JagString.opcode = -1; Class65.mapFlagX = 0; return true; } else if (JagString.opcode == 225) {// Update player XXX Class163_Sub3.updatePlayers(); JagString.opcode = -1; return true; } else if (JagString.opcode == 32) {// Update NPC XXX Class3_Sub13_Sub14.updateNpc(); JagString.opcode = -1; return true; } else if (JagString.opcode == 160) {// Set walk text XXX if (0 != Class130.packetSize) { Class3_Sub13_Sub28.walkText = GraphicEffectConfig.packetStream.gjstr(); } else { Class3_Sub13_Sub28.walkText = Class56.WALK_HERE; } JagString.opcode = -1; return true; } else if (JagString.opcode == 44) { // Click option TODO int cursorId = GraphicEffectConfig.packetStream.g_ushort_le_add(); if (cursorId == '\uffff') { cursorId = -1; } int top = GraphicEffectConfig.packetStream.g_ubyte(); int optId = GraphicEffectConfig.packetStream.g_ubyte(); JagString option = GraphicEffectConfig.packetStream.gjstr(); if (1 <= optId && ~optId >= -9) { if (option.method1531(Class50.null_)) { option = null; } CollisionMap.playerOptions[optId - 1] = option; Class3_Sub13_Sub26.playerOptCursor[optId - 1] = cursorId; Class1.secondaryOption[optId - 1] = top == 0; } JagString.opcode = -1; return true; } else if (JagString.opcode == 38) { // Skill XXX CipherStream.method819(false); int level = GraphicEffectConfig.packetStream.g_ubyte_add(); int experience = GraphicEffectConfig.packetStream.g_int_inverse(); int skillId = GraphicEffectConfig.packetStream.g_ubyte(); StockMarketOffer.experience[skillId] = experience; Class3_Sub13_Sub15.level[skillId] = level; Class3_Sub20.maxLevel[skillId] = 1; for (int x = 0; 98 > x; ++x) { if (ItemDefinition.levelxpLookup[x] <= experience) { Class3_Sub20.maxLevel[skillId] = x + 2; } } Class3_Sub28_Sub19.anIntArray3780[ClientScript.and(31, GZIPDecompressor.anInt815++)] = skillId; JagString.opcode = -1; return true; } else if (JagString.opcode == 116) { // Grand Exchange/GE offer TODO int slot = GraphicEffectConfig.packetStream.g_ubyte(); if (GraphicEffectConfig.packetStream.g_ubyte() != 0) { GraphicEffectConfig.packetStream.position--; Class3_Sub13_Sub33.aClass133Array3393[slot] = new StockMarketOffer( GraphicEffectConfig.packetStream); } else { Class3_Sub13_Sub33.aClass133Array3393[slot] = new StockMarketOffer(); } JagString.opcode = -1; Class121.anInt1642 = Class3_Sub13_Sub17.anInt3213; return true; } else if (JagString.opcode == 217) {// Hint map marker TODO int flags = GraphicEffectConfig.packetStream.g_ubyte(); HintMapMarker mapMarker = new HintMapMarker(); int slot = flags >> 340093798; mapMarker.type = flags & 63; mapMarker.anInt1351 = GraphicEffectConfig.packetStream.g_ubyte(); if (~mapMarker.anInt1351 <= -1 && ~mapMarker.anInt1351 > ~Class166.hint_headicons.length) { if (~mapMarker.type != -2 && 10 != mapMarker.type) { if (-3 >= ~mapMarker.type && 6 >= mapMarker.type) { if (mapMarker.type == 2) { mapMarker.anInt1346 = 64; mapMarker.anInt1350 = 64; } if (mapMarker.type == 3) { mapMarker.anInt1346 = 0; mapMarker.anInt1350 = 64; } if (mapMarker.type == 4) { mapMarker.anInt1346 = 128; mapMarker.anInt1350 = 64; } if (mapMarker.type == 5) { mapMarker.anInt1346 = 64; mapMarker.anInt1350 = 0; } if (mapMarker.type == 6) { mapMarker.anInt1346 = 64; mapMarker.anInt1350 = 128; } mapMarker.type = 2; mapMarker.targetX = GraphicEffectConfig.packetStream.g_ushort(); mapMarker.anInt1347 = GraphicEffectConfig.packetStream.g_ushort(); mapMarker.anInt1353 = GraphicEffectConfig.packetStream.g_ubyte(); } } else { mapMarker.actorTargetId = GraphicEffectConfig.packetStream.g_ushort(); GraphicEffectConfig.packetStream.position += 3; } mapMarker.playerModelId = GraphicEffectConfig.packetStream.g_ushort(); if (mapMarker.playerModelId == '\uffff') { mapMarker.playerModelId = -1; } RuntimeException_Sub1.hintMapMarkers[slot] = mapMarker; } JagString.opcode = -1; return true; } else if (JagString.opcode == 4) {// Play music XXX int id = GraphicEffectConfig.packetStream.g_ushort_le_add(); if (id == '\uffff') { id = -1; } Class86.playMusic(id); JagString.opcode = -1; return true; } else if (JagString.opcode == 208) {// Play jingle XXX int volume = GraphicEffectConfig.packetStream.g_tri_le(); int jingleId = GraphicEffectConfig.packetStream.g_ushort_le(); if (jingleId == '\uffff') { jingleId = -1; } Class167.playJingle(volume, jingleId, (byte) -1); JagString.opcode = -1; return true; } else if (JagString.opcode == 172) {// Play sfx TODO int trackId = GraphicEffectConfig.packetStream.g_ushort(); if (-65536 == ~trackId) { trackId = -1; } int volume = GraphicEffectConfig.packetStream.g_ubyte();// ?? int short2 = GraphicEffectConfig.packetStream.g_ushort();// ??? Class3_Sub13_Sub6.playSfx(trackId, volume, short2); JagString.opcode = -1; return true; } else if (JagString.opcode == 187) {// Set camera pitch & yaw XXX int yaw = GraphicEffectConfig.packetStream.g_ushort_le(); int tracknum = GraphicEffectConfig.packetStream.g_ushort(); int pitch = GraphicEffectConfig.packetStream.g_ushort(); if (AbstractWheelListener.setPacketTracker(tracknum)) { GraphicEffectConfig.yawTarget = yaw; Soundbox.pitchTarget = pitch; if (StockMarketOffer.cameraMode == 2) { Class139.cameraPitch = Soundbox.pitchTarget; Class3_Sub13_Sub25.cameraYaw = GraphicEffectConfig.yawTarget; } Class47.method1098((byte) -117); } JagString.opcode = -1; return true; } else if (JagString.opcode == 154) {// Camera detach TODO int slot = GraphicEffectConfig.packetStream.g_ushort(); int experience = GraphicEffectConfig.packetStream.g_ubyte(); int skillId = GraphicEffectConfig.packetStream.g_ubyte(); int x = GraphicEffectConfig.packetStream.g_ushort(); int accessMask = GraphicEffectConfig.packetStream.g_ubyte(); int var30 = GraphicEffectConfig.packetStream.g_ubyte(); if (AbstractWheelListener.setPacketTracker(slot)) { Class3_Sub20.method390(true, accessMask, x, var30, (byte) -124, skillId, experience); } JagString.opcode = -1; return true; } else if (JagString.opcode == 24) {// Reset camera, start of cinematic effects XXX int tracknum = GraphicEffectConfig.packetStream.g_ushort(); if (AbstractWheelListener.setPacketTracker(tracknum)) { Class3_Sub28_Sub5.resetCameraEffects(); } JagString.opcode = -1; return true; } else if (JagString.opcode == 27) { // Camera shake TODO int tracknum = GraphicEffectConfig.packetStream.g_ushort(); int slot = GraphicEffectConfig.packetStream.g_ubyte(); int shake1 = GraphicEffectConfig.packetStream.g_ubyte(); int shake2 = GraphicEffectConfig.packetStream.g_ubyte(); int shake3 = GraphicEffectConfig.packetStream.g_ubyte(); int shake4 = GraphicEffectConfig.packetStream.g_ushort(); if (AbstractWheelListener.setPacketTracker(tracknum)) { Class104.cameraShakeEnabled[slot] = true; Class3_Sub13_Sub32.anIntArray3383[slot] = shake1; Class166.anIntArray2073[slot] = shake2; Class3_Sub13_Sub29.anIntArray3359[slot] = shake3; Class163_Sub1_Sub1.anIntArray4009[slot] = shake4; } JagString.opcode = -1; return true; } else if (JagString.opcode == 125) {// Camera look target XXX int tracknum = GraphicEffectConfig.packetStream.g_ushort(); int tx = GraphicEffectConfig.packetStream.g_ubyte(); int tz = GraphicEffectConfig.packetStream.g_ubyte(); int cy = GraphicEffectConfig.packetStream.g_ushort(); int step = GraphicEffectConfig.packetStream.g_ubyte(); int dur = GraphicEffectConfig.packetStream.g_ubyte(); if (AbstractWheelListener.setPacketTracker(tracknum)) { Class164_Sub1.method2238(tx, tz, cy, step, dur); } JagString.opcode = -1; return true; } else if (JagString.opcode == 13) {// Teleport local player on area TODO int pos1 = GraphicEffectConfig.packetStream.g_ubyte_subs(); int flags = GraphicEffectConfig.packetStream.g_ubyte_add(); int pos2 = GraphicEffectConfig.packetStream.g_ubyte(); Class26.localPlane = flags >> 1; RSTextureLoader.localPlayer.setPosition(pos1, pos2, ~(flags & 1) == -2); JagString.opcode = -1; return true; } else if (JagString.opcode == 102) {// Animate npc TODO int npcId = GraphicEffectConfig.packetStream.g_ushort_le(); int progress = GraphicEffectConfig.packetStream.g_ubyte_subs(); int animationId = GraphicEffectConfig.packetStream.g_ushort(); NPC npc = Class3_Sub13_Sub24.localNpcs[npcId]; if (null != npc) { Class130.animateNpc(npc, animationId, progress); } JagString.opcode = -1; return true; } else if (JagString.opcode == 235) {// Global object animation on absolute position TODO int slot = GraphicEffectConfig.packetStream.g_ubyte_subs(); int type = slot >> -518983614; int rotation = 3 & slot; int homotype = Class75.anIntArray1107[type]; int animationId = GraphicEffectConfig.packetStream.g_ushort(); int position = GraphicEffectConfig.packetStream.g_int(); if ('\uffff' == animationId) { animationId = -1; } int var10 = 16383 & position; int i = 16383 & position >> 2070792462; i -= WorldMapLabels.lowestVisibleTileX; var10 -= Class82.lowestVisibleTileZ; int plane = 3 & position >> 765199868; Class50.method1131(plane, 110, rotation, type, var10, homotype, i, animationId); JagString.opcode = -1; return true; } else if (JagString.opcode == 131) {// Reset entity animations TODO for (int id = 0; id < Class3_Sub13_Sub22.localPlayers.length; ++id) { if (Class3_Sub13_Sub22.localPlayers[id] != null) { Class3_Sub13_Sub22.localPlayers[id].animationId = -1; } } for (int id = 0; id < Class3_Sub13_Sub24.localNpcs.length; ++id) { if (Class3_Sub13_Sub24.localNpcs[id] != null) { Class3_Sub13_Sub24.localNpcs[id].animationId = -1; } } JagString.opcode = -1; return true; } else if (JagString.opcode == 112) {// Clear ground items on chunk TODO Class65.locationPacketX = GraphicEffectConfig.packetStream.g_ubyte(); Class107.locationPacketZ = GraphicEffectConfig.packetStream.g_ubyte_negate(); for (int x = Class65.locationPacketX; x < 8 + Class65.locationPacketX; ++x) { for (int z = Class107.locationPacketZ; ~z > ~(8 + Class107.locationPacketZ); ++z) { if (null != Class3_Sub13_Sub22.groundItemStacks[Class26.localPlane][x][z]) { Class3_Sub13_Sub22.groundItemStacks[Class26.localPlane][x][z] = null; Class128.updateGroundItems(x, z); } } } for (Class3_Sub4 var68 = (Class3_Sub4) Class3_Sub13_Sub6.aClass61_3075 .method1222(); null != var68; var68 = (Class3_Sub4) Class3_Sub13_Sub6.aClass61_3075 .method1221()) { if (~var68.anInt2264 <= ~Class65.locationPacketX && 8 + Class65.locationPacketX > var68.anInt2264 && var68.anInt2248 >= Class107.locationPacketZ && ~var68.anInt2248 > ~(8 + Class107.locationPacketZ) && var68.anInt2250 == Class26.localPlane) { var68.anInt2259 = 0; } } JagString.opcode = -1; return true; } else if (JagString.opcode == 56) {// Create GFX on actor/position TODO int delay = GraphicEffectConfig.packetStream.g_ushort(); int height = GraphicEffectConfig.packetStream.g_ushort_le(); int target = GraphicEffectConfig.packetStream.g_int_inverse(); int gfxId = GraphicEffectConfig.packetStream.g_ushort_le_add(); if ((target >> 30) == 0) { AnimationSequence animDef; if (target >> 29 != 0) { int npcId = '\uffff' & target; NPC npc = Class3_Sub13_Sub24.localNpcs[npcId]; if (npc != null) { if (gfxId == 65535) { gfxId = -1; } boolean animate = true; if (gfxId != -1 && npc.graphicId != -1 && ~client.getAnimationDef(GraphicEffectConfig.getGraphicDef((byte) 42, gfxId).animationId).priority > ~client.getAnimationDef( GraphicEffectConfig.getGraphicDef((byte) 42, npc.graphicId).animationId).priority) { animate = false; } if (animate) { npc.anInt2761 = 0; npc.graphicId = gfxId; npc.gfxDelay = Class44.anInt719 + delay; npc.anInt2805 = 0; if (npc.gfxDelay > Class44.anInt719) { npc.anInt2805 = -1; } npc.gfxPosY = height; npc.anInt2826 = 1; if (~npc.graphicId != 0 && Class44.anInt719 == npc.gfxDelay) { int anim = GraphicEffectConfig.getGraphicDef((byte) 42, npc.graphicId).animationId; if (anim != -1) { animDef = client.getAnimationDef(anim); if (animDef != null && null != animDef.frames) { Class89.updateAnimationSounds(npc.absoluteX, npc.absoluteZ, animDef, false, 0); } } } } } } else if ((target >> 28) != 0) { int playerId = target & '\uffff'; Player plr; if (WidgetSettings.localPlrId == playerId) { plr = RSTextureLoader.localPlayer; } else { plr = Class3_Sub13_Sub22.localPlayers[playerId]; } if (plr != null) { if (gfxId == '\uffff') { gfxId = -1; } boolean animate = true; if (gfxId != -1 && plr.graphicId != -1 && ~client.getAnimationDef(GraphicEffectConfig.getGraphicDef((byte) 42, gfxId).animationId).priority > ~client.getAnimationDef( GraphicEffectConfig.getGraphicDef((byte) 42, plr.graphicId).animationId).priority) { animate = false; } if (animate) { plr.gfxDelay = delay + Class44.anInt719; plr.gfxPosY = height; plr.graphicId = gfxId; if (plr.graphicId == 65535) { plr.graphicId = -1; } plr.anInt2826 = 1; plr.anInt2761 = 0; plr.anInt2805 = 0; if (plr.gfxDelay > Class44.anInt719) { plr.anInt2805 = -1; } if (0 != ~plr.graphicId && ~plr.gfxDelay == ~Class44.anInt719) { int anim = GraphicEffectConfig.getGraphicDef((byte) 42, plr.graphicId).animationId; if (0 != ~anim) { animDef = client.getAnimationDef(anim); if (null != animDef && null != animDef.frames) { Class89.updateAnimationSounds(plr.absoluteX, plr.absoluteZ, animDef, plr == RSTextureLoader.localPlayer, 0); } } } } } } } else { int plane = 3 & target >> 28; int posX = ((target & 268434277) >> 14) - WorldMapLabels.lowestVisibleTileX; int posZ = (target & 16383) - Class82.lowestVisibleTileZ; if (~posX <= -1 && posZ >= 0 && 104 > posX && ~posZ > -105) { posZ = 128 * posZ + 64; posX = 128 * posX + 64; SpotGFX graphic = new SpotGFX(gfxId, plane, posX, posZ, -height + Class121.method1736(plane, posX, posZ), delay, Class44.anInt719); Class3_Sub13_Sub15.aClass61_3177.method1215(true, new Class3_Sub28_Sub2(graphic)); } } JagString.opcode = -1; return true; } else if (JagString.opcode == 234) {// Run energy XXX CipherStream.method819(false); Class9.runPower = GraphicEffectConfig.packetStream.g_ubyte(); Class140_Sub6.genericCs2UpdateTime = Class3_Sub13_Sub17.anInt3213; JagString.opcode = -1; return true; } else if (JagString.opcode == 159) {// One opcode up run energy, ?? TODO CipherStream.method819(false); Class149.anInt1925 = GraphicEffectConfig.packetStream.g_short(); Class140_Sub6.genericCs2UpdateTime = Class3_Sub13_Sub17.anInt3213; JagString.opcode = -1; return true; } else if (JagString.opcode == 164) {// Last login adress XXX int ip32 = GraphicEffectConfig.packetStream.g_int_inverse(); Class136.lastlogAdress = Class38.signlink.dnsResolve(ip32); JagString.opcode = -1; return true; } else if (JagString.opcode == 197) {// End utility, start socials, contact server state TODO HintMapMarker.contactServerState = GraphicEffectConfig.packetStream.g_ubyte(); Class110.socialUpdateTick = Class3_Sub13_Sub17.anInt3213; JagString.opcode = -1; return true; } else if (232 == JagString.opcode) {// Chat settings TODO Class3_Sub13_Sub8.anInt3101 = GraphicEffectConfig.packetStream.g_ubyte(); PlayerBodyPart.anInt467 = GraphicEffectConfig.packetStream.g_ubyte(); Class45.anInt734 = GraphicEffectConfig.packetStream.g_ubyte(); JagString.opcode = -1; return true; } else if (JagString.opcode == 62) {// Add/Update friend TODO long usr = GraphicEffectConfig.packetStream.g_long(); int worldId = GraphicEffectConfig.packetStream.g_ushort(); int x = GraphicEffectConfig.packetStream.g_ubyte(); boolean idk = true; if (usr < 0L) { usr &= Long.MAX_VALUE; idk = false; } JagString worldName = GroundItemWrapper.empty_string; if (-1 > ~worldId) { worldName = GraphicEffectConfig.packetStream.gjstr(); } JagString userame = Class41.decodeBase37(usr).method1545(); for (int i = 0; i < Class8.totalFriendCount; ++i) { if (usr == Class50.friendNameLong[i]) { if (~worldId != ~CursorConfig.friendWorldId[i]) { CursorConfig.friendWorldId[i] = worldId; if (0 < worldId) { CipherStream.addMessage(5, Renderkit.toString( new JagString[] { userame, Class3_Sub28_Sub10_Sub1.LOGGED_IN }), GroundItemWrapper.empty_string, -1); } if (worldId == 0) { CipherStream.addMessage(5, Renderkit.toString(new JagString[] { userame, Class50.LOGGED_OUT }), GroundItemWrapper.empty_string, -1); } } Class3_Sub28.friendWorldName[i] = worldName; Class57.anIntArray904[i] = x; userame = null; Node.aBooleanArray73[i] = idk; break; } } boolean sorting = false; if (null != userame && 200 > Class8.totalFriendCount) { Class50.friendNameLong[Class8.totalFriendCount] = usr; Class70.friendNameString[Class8.totalFriendCount] = userame; CursorConfig.friendWorldId[Class8.totalFriendCount] = worldId; Class3_Sub28.friendWorldName[Class8.totalFriendCount] = worldName; Class57.anIntArray904[Class8.totalFriendCount] = x; Node.aBooleanArray73[Class8.totalFriendCount] = idk; ++Class8.totalFriendCount; } Class110.socialUpdateTick = Class3_Sub13_Sub17.anInt3213; int _friends = Class8.totalFriendCount; while (~_friends < -1) { --_friends; sorting = true; for (int var11 = 0; var11 < _friends; ++var11) { if (~CursorConfig.friendWorldId[var11] != ~CS2Request.localWorldId && ~CS2Request.localWorldId == ~CursorConfig.friendWorldId[var11 - -1] || CursorConfig.friendWorldId[var11] == 0 && CursorConfig.friendWorldId[var11 - -1] != 0) { sorting = false; int var12 = CursorConfig.friendWorldId[var11]; CursorConfig.friendWorldId[var11] = CursorConfig.friendWorldId[var11 - -1]; CursorConfig.friendWorldId[1 + var11] = var12; JagString var64 = Class3_Sub28.friendWorldName[var11]; Class3_Sub28.friendWorldName[var11] = Class3_Sub28.friendWorldName[var11 + 1]; Class3_Sub28.friendWorldName[var11 - -1] = var64; JagString var57 = Class70.friendNameString[var11]; Class70.friendNameString[var11] = Class70.friendNameString[var11 + 1]; Class70.friendNameString[var11 - -1] = var57; long var15 = Class50.friendNameLong[var11]; Class50.friendNameLong[var11] = Class50.friendNameLong[var11 - -1]; Class50.friendNameLong[var11 - -1] = var15; int var17 = Class57.anIntArray904[var11]; Class57.anIntArray904[var11] = Class57.anIntArray904[var11 - -1]; Class57.anIntArray904[1 + var11] = var17; boolean var18 = Node.aBooleanArray73[var11]; Node.aBooleanArray73[var11] = Node.aBooleanArray73[var11 - -1]; Node.aBooleanArray73[var11 - -1] = var18; } } if (sorting) { break; } } JagString.opcode = -1; return true; } else if (JagString.opcode == 71) {// Outgoing private message XXX long target = GraphicEffectConfig.packetStream.g_long(); JagString message = Class3_Sub28_Sub17 .method686(Class32.huffmanDecode(GraphicEffectConfig.packetStream).trim()); CipherStream.addMessage(6, message, Class41.decodeBase37(target).method1545(), var0 ^ 82); JagString.opcode = -1; return true; } else if (141 == JagString.opcode) {// Outgoing private quick message XXX long username = GraphicEffectConfig.packetStream.g_long(); int chatId = GraphicEffectConfig.packetStream.g_ushort(); JagString chat = StringEntryNode.load(chatId).toChat(GraphicEffectConfig.packetStream); InventoryConfig.addChat(chatId, 19, chat, (JagString) null, (byte) 50, Class41.decodeBase37(username).method1545()); JagString.opcode = -1; return true; } else if (JagString.opcode == 0) {// Incoming private message XXX long username = GraphicEffectConfig.packetStream.g_long(); int mid_topbit = GraphicEffectConfig.packetStream.g_ushort(); int mid_botbit = GraphicEffectConfig.packetStream.g_tri(); int rights = GraphicEffectConfig.packetStream.g_ubyte(); boolean ignored = false; long messageId = mid_botbit + (mid_topbit << -1802335520); int var12 = 0; label1651: while (true) { if (-101 >= ~var12) { if (rights <= 1) { if ((!Class3_Sub15.chatbool1 || Class121.chatbool2) && !Class3_Sub13_Sub14.chatbool3) { for (var12 = 0; var12 < Class3_Sub28_Sub5.ignoreCount; ++var12) { if (~username == ~Class114.ignoreList[var12]) { ignored = true; break label1651; } } } else { ignored = true; } } break; } if (messageId == Class163_Sub2_Sub1.recentMessages[var12]) { ignored = true; break; } ++var12; } if (!ignored && -1 == ~Class44_Sub1.anInt2622) { Class163_Sub2_Sub1.recentMessages[Class149.messageCounter] = messageId; Class149.messageCounter = (Class149.messageCounter + 1) % 100; JagString message = Class3_Sub28_Sub17 .method686(Class32.huffmanDecode(GraphicEffectConfig.packetStream).trim()); if (-3 != ~rights && ~rights != -4) { if (rights != 1) { CipherStream.addMessage(3, message, Class41.decodeBase37(username).method1545(), var0 + 82); } else { CipherStream.addMessage(7, message, Renderkit.toString(new JagString[] { Class32.IMG_TAG_MODERATOR, Class41.decodeBase37(username).method1545() }), -1); } } else { CipherStream.addMessage(7, message, Renderkit.toString(new JagString[] { Class21.IMG_TAG_ADMIN, Class41.decodeBase37(username).method1545() }), -1); } } JagString.opcode = -1; return true; } else if (JagString.opcode == 247) {// Incoming private quick message XXX long username = GraphicEffectConfig.packetStream.g_long(); int top = GraphicEffectConfig.packetStream.g_ushort(); int bot = GraphicEffectConfig.packetStream.g_tri(); int rights = GraphicEffectConfig.packetStream.g_ubyte(); int chatId = GraphicEffectConfig.packetStream.g_ushort(); boolean ignore = false; long messageId = (top << 24) + bot; int ix = 0; check: while (true) { if (100 > ix) { if (~messageId != ~Class163_Sub2_Sub1.recentMessages[ix]) { ++ix; continue; } ignore = true; break; } if (rights <= 1) { for (ix = 0; ~ix > ~Class3_Sub28_Sub5.ignoreCount; ++ix) { if (username == Class114.ignoreList[ix]) { ignore = true; break check; } } } break; } if (!ignore && ~Class44_Sub1.anInt2622 == -1) { Class163_Sub2_Sub1.recentMessages[Class149.messageCounter] = messageId; Class149.messageCounter = (1 + Class149.messageCounter) % 100; JagString chat = StringEntryNode.load(chatId).toChat(GraphicEffectConfig.packetStream); if (rights == 2) { InventoryConfig.addChat(chatId, 18, chat, (JagString) null, (byte) 50, Renderkit.toString(new JagString[] { Class21.IMG_TAG_ADMIN, Class41.decodeBase37(username).method1545() })); } else if (rights == 1) { InventoryConfig.addChat(chatId, 18, chat, (JagString) null, (byte) 50, Renderkit.toString(new JagString[] { Class32.IMG_TAG_MODERATOR, Class41.decodeBase37(username).method1545() })); } else { InventoryConfig.addChat(chatId, 18, chat, (JagString) null, (byte) 50, Class41.decodeBase37(username).method1545()); } } JagString.opcode = -1; return true; } else if (JagString.opcode == 126) {// Ignore list TODO Class3_Sub28_Sub5.ignoreCount = Class130.packetSize / 8; for (int i = 0; i < Class3_Sub28_Sub5.ignoreCount; i++) { Class114.ignoreList[i] = GraphicEffectConfig.packetStream.g_long(); Class3_Sub13_Sub27.ignoreList_str[i] = Class41.decodeBase37(Class114.ignoreList[i]); } Class110.socialUpdateTick = Class3_Sub13_Sub17.anInt3213; JagString.opcode = -1; return true; } else if (JagString.opcode == 55) {// Join clan chat TODO Class167.anInt2087 = Class3_Sub13_Sub17.anInt3213; long ownerName37 = GraphicEffectConfig.packetStream.g_long(); if (~ownerName37 == -1L) { Class161.chatOwnerName = null; JagString.opcode = -1; Widget.chatroomName = null; ClientScript.clanChatMembers = null; Class3_Sub28.clanMemberCount = 0; return true; } else { long chatroomName37 = GraphicEffectConfig.packetStream.g_long(); Widget.chatroomName = Class41.decodeBase37(chatroomName37); Class161.chatOwnerName = Class41.decodeBase37(ownerName37); Player.aByte3953 = GraphicEffectConfig.packetStream.g_byte(); int amtUsers = GraphicEffectConfig.packetStream.g_ubyte(); if (255 == amtUsers) { JagString.opcode = -1; return true; } else { Class3_Sub28.clanMemberCount = amtUsers; ClanChatMember[] members = new ClanChatMember[100]; for (int x = 0; ~Class3_Sub28.clanMemberCount < ~x; ++x) { members[x] = new ClanChatMember(); members[x].identifier = GraphicEffectConfig.packetStream.g_long(); members[x].username = Class41.decodeBase37(members[x].identifier); members[x].worldId = GraphicEffectConfig.packetStream.g_ushort(); members[x].rights = GraphicEffectConfig.packetStream.g_byte(); members[x].worldName = GraphicEffectConfig.packetStream.gjstr(); if (~Class3_Sub13_Sub16.localName37 == ~members[x].identifier) { CollisionMap.userClanRights = members[x].rights; } } boolean var32 = false; int var10 = Class3_Sub28.clanMemberCount; while (-1 > ~var10) { var32 = true; --var10; for (int var11 = 0; ~var10 < ~var11; ++var11) { if (-1 > ~members[var11].username .method1559(members[var11 - -1].username)) { var32 = false; ClanChatMember var9 = members[var11]; members[var11] = members[1 + var11]; members[var11 + 1] = var9; } } if (var32) { break; } } ClientScript.clanChatMembers = members; JagString.opcode = -1; return true; } } } else if (JagString.opcode == 196) {// Update clan, clean this mess TODO long username = GraphicEffectConfig.packetStream.g_long(); int worldId = GraphicEffectConfig.packetStream.g_ushort(); byte rights = GraphicEffectConfig.packetStream.g_byte(); boolean remove = false; if (-1L != ~(Long.MIN_VALUE & username)) { remove = true; } if (!remove) { JagString worldName = GraphicEffectConfig.packetStream.gjstr(); ClanChatMember member = new ClanChatMember(); member.identifier = username; member.username = Class41.decodeBase37(member.identifier); member.rights = rights; member.worldName = worldName; member.worldId = worldId; int i; for (i = -1 + Class3_Sub28.clanMemberCount; ~i <= -1; --i) {// Sort int var10 = ClientScript.clanChatMembers[i].username.method1559(member.username); if (-1 == ~var10) { ClientScript.clanChatMembers[i].worldId = worldId; ClientScript.clanChatMembers[i].rights = rights; ClientScript.clanChatMembers[i].worldName = worldName; if (~username == ~Class3_Sub13_Sub16.localName37) { CollisionMap.userClanRights = rights; } Class167.anInt2087 = Class3_Sub13_Sub17.anInt3213; JagString.opcode = -1; return true; } if (var10 < 0) { break; } } if (ClientScript.clanChatMembers.length <= Class3_Sub28.clanMemberCount) { JagString.opcode = -1; return true; } for (int var10 = Class3_Sub28.clanMemberCount + -1; ~i > ~var10; --var10) { ClientScript.clanChatMembers[1 + var10] = ClientScript.clanChatMembers[var10]; } if (-1 == ~Class3_Sub28.clanMemberCount) { ClientScript.clanChatMembers = new ClanChatMember[100]; } ClientScript.clanChatMembers[1 + i] = member; if (Class3_Sub13_Sub16.localName37 == username) { CollisionMap.userClanRights = rights; } ++Class3_Sub28.clanMemberCount; } else { if (~Class3_Sub28.clanMemberCount == -1) { JagString.opcode = -1; return true; } username &= Long.MAX_VALUE; int var30; for (var30 = 0; ~Class3_Sub28.clanMemberCount < ~var30 && (username != ClientScript.clanChatMembers[var30].identifier || ~worldId != ~ClientScript.clanChatMembers[var30].worldId); ++var30) { ; } if (var30 < Class3_Sub28.clanMemberCount) { while (~(-1 + Class3_Sub28.clanMemberCount) < ~var30) { ClientScript.clanChatMembers[var30] = ClientScript.clanChatMembers[1 + var30]; ++var30; } --Class3_Sub28.clanMemberCount; ClientScript.clanChatMembers[Class3_Sub28.clanMemberCount] = null; } } JagString.opcode = -1; Class167.anInt2087 = Class3_Sub13_Sub17.anInt3213; return true; } else if (JagString.opcode == 54) {// Clan chat XXX long username = GraphicEffectConfig.packetStream.g_long(); GraphicEffectConfig.packetStream.g_byte(); long chatname = GraphicEffectConfig.packetStream.g_long(); int top = GraphicEffectConfig.packetStream.g_ushort(); int bot = GraphicEffectConfig.packetStream.g_tri(); long messageId = (top << -164903776) + bot; int var10 = GraphicEffectConfig.packetStream.g_ubyte(); boolean skip = false; int var14 = 0; label1774: while (true) { if (var14 >= 100) { if (1 >= var10) { if ((!Class3_Sub15.chatbool1 || Class121.chatbool2) && !Class3_Sub13_Sub14.chatbool3) { for (var14 = 0; Class3_Sub28_Sub5.ignoreCount > var14; ++var14) { if (Class114.ignoreList[var14] == username) { skip = true; break label1774; } } } else { skip = true; } } break; } if (Class163_Sub2_Sub1.recentMessages[var14] == messageId) { skip = true; break; } ++var14; } if (!skip && 0 == Class44_Sub1.anInt2622) { Class163_Sub2_Sub1.recentMessages[Class149.messageCounter] = messageId; Class149.messageCounter = (Class149.messageCounter + 1) % 100; JagString chat = Class3_Sub28_Sub17 .method686(Class32.huffmanDecode(GraphicEffectConfig.packetStream).trim()); if (var10 != 2 && var10 != 3) { if (var10 == 1) { Class3_Sub13_Sub11.method221(-1, chat, Renderkit.toString(new JagString[] { Class32.IMG_TAG_MODERATOR, Class41.decodeBase37(username).method1545() }), Class41.decodeBase37(chatname).method1545(), 9); } else { Class3_Sub13_Sub11.method221(-1, chat, Class41.decodeBase37(username).method1545(), Class41.decodeBase37(chatname).method1545(), 9); } } else { Class3_Sub13_Sub11.method221(-1, chat, Renderkit.toString(new JagString[] { Class21.IMG_TAG_ADMIN, Class41.decodeBase37(username).method1545() }), Class41.decodeBase37(chatname).method1545(), 9); } } JagString.opcode = -1; return true; } else if (JagString.opcode == 81) {// Clan Quick chat XXX long username = GraphicEffectConfig.packetStream.g_long(); GraphicEffectConfig.packetStream.g_byte(); long clanName = GraphicEffectConfig.packetStream.g_long(); int top = GraphicEffectConfig.packetStream.g_ushort(); int bot = GraphicEffectConfig.packetStream.g_tri(); int rights = GraphicEffectConfig.packetStream.g_ubyte(); boolean skip = false; int quickChatId = GraphicEffectConfig.packetStream.g_ushort(); long msgId = (top << 32) + bot; int var54 = 0; label1521: while (true) { if (100 > var54) { if (~msgId != ~Class163_Sub2_Sub1.recentMessages[var54]) { ++var54; continue; } skip = true; break; } if (1 >= rights) { for (var54 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var54; ++var54) { if (~Class114.ignoreList[var54] == ~username) { skip = true; break label1521; } } } break; } if (!skip && 0 == Class44_Sub1.anInt2622) { Class163_Sub2_Sub1.recentMessages[Class149.messageCounter] = msgId; Class149.messageCounter = (1 + Class149.messageCounter) % 100; JagString chat = StringEntryNode.load(quickChatId) .toChat(GraphicEffectConfig.packetStream); if (-3 != ~rights && 3 != rights) { if (~rights != -2) { InventoryConfig.addChat(quickChatId, 20, chat, Class41.decodeBase37(clanName).method1545(), (byte) 50, Class41.decodeBase37(username).method1545()); } else { InventoryConfig.addChat(quickChatId, 20, chat, Class41.decodeBase37(clanName).method1545(), (byte) 50, Renderkit.toString(new JagString[] { Class32.IMG_TAG_MODERATOR, Class41.decodeBase37(username).method1545() })); } } else { InventoryConfig.addChat(quickChatId, 20, chat, Class41.decodeBase37(clanName).method1545(), (byte) 50, Renderkit.toString(new JagString[] { Class21.IMG_TAG_ADMIN, Class41.decodeBase37(username).method1545() })); } } JagString.opcode = -1; return true; } else if (JagString.opcode == 85) {// System Update TODO Class38_Sub1.systemUpdateTime = GraphicEffectConfig.packetStream.g_ushort() * 30; JagString.opcode = -1; Class140_Sub6.genericCs2UpdateTime = Class3_Sub13_Sub17.anInt3213; return true; } else if (JagString.opcode == 86) {// Logout XXX Class167.logoutReset((byte) 46); JagString.opcode = -1; return false; } else if (JagString.opcode == 114) {// Reflection cheat check TODO Class3_Sub13_Sub29.method305(Class38.signlink, GraphicEffectConfig.packetStream, Class130.packetSize, (byte) -126); JagString.opcode = -1; return true; } else if (JagString.opcode == 142) {// Set settings string XXX StringEntryNode.setSettingsString(0, GraphicEffectConfig.packetStream.gjstr()); JagString.opcode = -1; return true; } else if (JagString.opcode == 169) { // Set random.dat TODO Class162.writeRandom(GraphicEffectConfig.packetStream); JagString.opcode = -1; return true; } else if (JagString.opcode == 42) {// Open URL TODO if (null != Class3_Sub13_Sub10.frame_fullscreen) { Entity.requestWindowMode(false, Class3_Sub28.anInt2577, -1, -1); } byte[] data = new byte[Class130.packetSize]; GraphicEffectConfig.packetStream.g_bytes_isaac((byte) 30, 0, data, Class130.packetSize); JagString url = Class3_Sub13_Sub3.fromArray(data, 0, Class130.packetSize); if (null == Class3_Sub13_Sub7.frame && (3 == Signlink.anInt1214 || !Signlink.aString1202.startsWith("win") || Class106.aBoolean1451)) { Class99.openUrl(true, url); } else { Class3_Sub13_Sub24.aClass94_3295 = url; JagString.aBoolean2154 = true; Class15.aClass64_351 = Class38.signlink .method1452(new String(url.method1568(0), "ISO-8859-1"), true); } JagString.opcode = -1; return true; } JagString insn; long var28; boolean ignored; int var30; JagString worldName; if (JagString.opcode == 70) {// Server message XXX JagString message = GraphicEffectConfig.packetStream.gjstr(); if (!message.startsWith(Class117.tradereq)) { if (!message.startsWith(Class30.chalreq)) { if (message.startsWith(Class3_Sub13_Sub26.assistreq)) { ignored = false; insn = message.slice(0, message.method1551(Class155.aClass94_1970)); var28 = insn.toLong(); for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) { if (var28 == Class114.ignoreList[var30]) { ignored = true; break; } } if (!ignored && ~Class44_Sub1.anInt2622 == -1) { CipherStream.addMessage(10, GroundItemWrapper.empty_string, insn, -1); } } else if (message.startsWith(Class3_Sub20.clan)) { insn = message.slice(0, message.method1551(Class3_Sub20.clan)); CipherStream.addMessage(11, insn, GroundItemWrapper.empty_string, -1); } else if (!message.startsWith(NPC.trade)) { if (message.startsWith(Class143.assist)) { insn = message.slice(0, message.method1551(Class143.assist)); if (Class44_Sub1.anInt2622 == 0) { CipherStream.addMessage(13, insn, GroundItemWrapper.empty_string, -1); } } else if (!message.startsWith(Class27.duelstake)) { if (!message.startsWith(ISAACCipher.duelfriendly)) { if (message.startsWith(Class3_Sub13_Sub30.clanreq)) { insn = message.slice(0, message.method1551(Class155.aClass94_1970)); var28 = insn.toLong(); ignored = false; for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) { if (~var28 == ~Class114.ignoreList[var30]) { ignored = true; break; } } if (!ignored && Class44_Sub1.anInt2622 == 0) { CipherStream.addMessage(16, GroundItemWrapper.empty_string, insn, -1); } } else if (message.startsWith(JagString.allyreq)) { insn = message.slice(0, message.method1551(Class155.aClass94_1970)); ignored = false; var28 = insn.toLong(); for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) { if (~Class114.ignoreList[var30] == ~var28) { ignored = true; break; } } if (!ignored && Class44_Sub1.anInt2622 == 0) { worldName = message.slice( 1 + message.method1551(Class155.aClass94_1970), message.length() - 9); CipherStream.addMessage(21, worldName, insn, -1); } } else { CipherStream.addMessage(0, message, GroundItemWrapper.empty_string, var0 + 82); } } else { insn = message.slice(0, message.method1551(Class155.aClass94_1970)); ignored = false; var28 = insn.toLong(); for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) { if (~Class114.ignoreList[var30] == ~var28) { ignored = true; break; } } if (!ignored && 0 == Class44_Sub1.anInt2622) { CipherStream.addMessage(15, GroundItemWrapper.empty_string, insn, -1); } } } else { ignored = false; insn = message.slice(0, message.method1551(Class155.aClass94_1970)); var28 = insn.toLong(); for (var30 = 0; Class3_Sub28_Sub5.ignoreCount > var30; ++var30) { if (var28 == Class114.ignoreList[var30]) { ignored = true; break; } } if (!ignored && -1 == ~Class44_Sub1.anInt2622) { CipherStream.addMessage(14, GroundItemWrapper.empty_string, insn, -1); } } } else { insn = message.slice(0, message.method1551(NPC.trade)); if (0 == Class44_Sub1.anInt2622) { CipherStream.addMessage(12, insn, GroundItemWrapper.empty_string, -1); } } } else { insn = message.slice(0, message.method1551(Class155.aClass94_1970)); var28 = insn.toLong(); ignored = false; for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) { if (Class114.ignoreList[var30] == var28) { ignored = true; break; } } if (!ignored && Class44_Sub1.anInt2622 == 0) { worldName = message.slice(1 + message.method1551(Class155.aClass94_1970), message.length() + -9); CipherStream.addMessage(8, worldName, insn, var0 ^ 82); } } } else { insn = message.slice(0, message.method1551(Class155.aClass94_1970)); var28 = insn.toLong(); ignored = false; for (var30 = 0; ~var30 > ~Class3_Sub28_Sub5.ignoreCount; ++var30) { if (~Class114.ignoreList[var30] == ~var28) { ignored = true; break; } } if (!ignored && ~Class44_Sub1.anInt2622 == -1) { CipherStream.addMessage(4, Class3_Sub6.aClass94_2285, insn, var0 + 82); } } JagString.opcode = -1; return true; } else { if (JagString.opcode != 104 && 121 != JagString.opcode && -98 != ~JagString.opcode && ~JagString.opcode != -15 && ~JagString.opcode != -203 && ~JagString.opcode != -136 && ~JagString.opcode != -18 && JagString.opcode != 16 && JagString.opcode != 240 && JagString.opcode != 33 && -21 != ~JagString.opcode && 195 != JagString.opcode && 179 != JagString.opcode) { GZIPDecompressor.clientError( "T1 - " + JagString.opcode + "," + Class7.anInt2166 + "," + PlayerBodyPart.anInt469 + " - " + Class130.packetSize, (Throwable) null); Class167.logoutReset((byte) 46); return true; } else { Class39.parseLocationPacket((byte) -99); JagString.opcode = -1; return true; } } } } } } catch (RuntimeException var19) { var19.printStackTrace(); throw Class44.method1067(var19, "ac.C(" + var0 + ')'); } }
Also, if someone can enlighten me what the top level scripts are that opcode 209 calls or wtf the int opcode 159 changes is for
Code:
if (JagString.opcode == 162) { // Regular map area XXX
Class39.parseMapRegion(false);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 214) { // Constructed map area XXX
Class39.parseMapRegion(true);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 26) {// Start location packets TODO
Class65.locationPacketX = GraphicEffectConfig.packetStream.g_ubyte_negate();
Class107.locationPacketZ = GraphicEffectConfig.packetStream.g_ubyte();
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 230) { // Parse multiple location packets TODO
Class107.locationPacketZ = GraphicEffectConfig.packetStream.g_ubyte_add();
Class65.locationPacketX = GraphicEffectConfig.packetStream.g_ubyte_subs();
while (~Class130.packetSize < ~GraphicEffectConfig.packetStream.position) {
JagString.opcode = GraphicEffectConfig.packetStream.g_ubyte();
Class39.parseLocationPacket((byte) -82);
}
JagString.opcode = -1;
return true;
} else if (60 == JagString.opcode) {// VarP small XXX
int id = GraphicEffectConfig.packetStream.g_ushort_add();
byte set = GraphicEffectConfig.packetStream.g_byte_negate();
Class3_Sub13_Sub23.setVarP(id, set);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 226) {// VarP big XXX
int set = GraphicEffectConfig.packetStream.g_int();
int id = GraphicEffectConfig.packetStream.g_ushort_add();
Class3_Sub13_Sub23.setVarP(id, set);
JagString.opcode = -1;
return true;
} else if (128 == JagString.opcode) {// Force VarP refresh XXX
for (int var = 0; ~Class163_Sub1.varP.length < ~var; ++var) {
if (~Class57.updatedVarP[var] != ~Class163_Sub1.varP[var]) {
Class163_Sub1.varP[var] = Class57.updatedVarP[var];
Class46.refreshMagicVarP(var);
Class44.cs2_updatedVarP[ClientScript.and(Class36.varpUpdateCount++, 31)] = var;
}
}
JagString.opcode = -1;
return true;
} else if (89 == JagString.opcode) {// Reset transient varp XXX
Class3_Sub13_Sub2.resetTransientVarP();
CipherStream.method819(false);
Class36.varpUpdateCount += 32;
JagString.opcode = -1;
return true;
} else if (37 == JagString.opcode) {// VarBit small XXX
int set = GraphicEffectConfig.packetStream.g_ubyte_add();
int id = GraphicEffectConfig.packetStream.g_ushort_le();
Class163.setVarBit(id, set);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 84) {// VarBit big XXX
int set = GraphicEffectConfig.packetStream.g_int_le();
int id = GraphicEffectConfig.packetStream.g_ushort_le_add();
Class163.setVarBit(id, set);
JagString.opcode = -1;
return true;
} else if (65 == JagString.opcode) {// VarC small XXX
int trcknum = GraphicEffectConfig.packetStream.g_ushort_le();
int set = GraphicEffectConfig.packetStream.g_ubyte_negate();
int varId = GraphicEffectConfig.packetStream.g_ushort_le_add();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateVarC(varId, set);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 69) {// VarC big XXX
int trcknum = GraphicEffectConfig.packetStream.g_ushort_le_add();
int set = GraphicEffectConfig.packetStream.g_int();
int varId = GraphicEffectConfig.packetStream.g_ushort_add();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateVarC(varId, set);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 123) {// XXX
int id = GraphicEffectConfig.packetStream.g_ushort_le();
int trcknum = GraphicEffectConfig.packetStream.g_ushort_add();
JagString set = GraphicEffectConfig.packetStream.gjstr();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateVarString(id, set);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 48) {// XXX
int trcknum = GraphicEffectConfig.packetStream.g_ushort();
JagString set = GraphicEffectConfig.packetStream.gjstr();
int id = GraphicEffectConfig.packetStream.g_ushort_le_add();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateVarString(id, set);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 171) { // XXX
int id = GraphicEffectConfig.packetStream.g_int_le_inverse();
JagString text = GraphicEffectConfig.packetStream.gjstr();
int tracknum = GraphicEffectConfig.packetStream.g_ushort_add();
if (AbstractWheelListener.setPacketTracker(tracknum)) {
RefreshRequest.setWidgetText(id, text);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 130) {// Model on interface XXX
int ptr = GraphicEffectConfig.packetStream.g_int_le();
int trcknum = GraphicEffectConfig.packetStream.g_ushort_le_add();
int id = GraphicEffectConfig.packetStream.g_ushort_add();
if (id == 65535) {
id = -1;
}
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateWidgetMedia(ptr, 1, id, -1);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 73) {// Npc on interface XXX
int id = GraphicEffectConfig.packetStream.g_ushort_add();
int ptr = GraphicEffectConfig.packetStream.g_int_le();
if (id == 65535) {
id = -1;
}
int trcknum = GraphicEffectConfig.packetStream.g_ushort_le();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateWidgetMedia(ptr, 2, id, -1);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 66) { // Player on interface XXX
int trcknum = GraphicEffectConfig.packetStream.g_ushort_le_add();
int ptr = GraphicEffectConfig.packetStream.g_int_inverse();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
int set = 0;
if (RSTextureLoader.localPlayer.identityKit != null) {
set = RSTextureLoader.localPlayer.identityKit.method1163(-24861);
}
RefreshRequest.updateWidgetMedia(ptr, 3, set, -1);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 111) {// Generate chat head from body parts TODO
int trcknum = GraphicEffectConfig.packetStream.g_ushort_add();
int ptr = GraphicEffectConfig.packetStream.g_int_le_inverse();
int set1 = GraphicEffectConfig.packetStream.g_ushort_le_add();
int set = GraphicEffectConfig.packetStream.g_ushort_le();
int set2 = GraphicEffectConfig.packetStream.g_ushort_le_add();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateWidgetMedia(ptr, 7, set << -311274832 | set2, set1);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 36) {// Type 5 XXX
int pointer = GraphicEffectConfig.packetStream.g_int_le_inverse();
int value = GraphicEffectConfig.packetStream.g_short_le();
int trcknum = GraphicEffectConfig.packetStream.g_ushort_add();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateWidgetAnimation(pointer, value);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 2) {// RGB XXX
int ptr = GraphicEffectConfig.packetStream.g_int_inverse();
int trcknum = GraphicEffectConfig.packetStream.g_ushort_add();
int set = GraphicEffectConfig.packetStream.g_ushort_le_add();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
// color = (blue << 3) + (green << 11) + (red << 19);
RefreshRequest.updateColor(ptr, set);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 21) {// Set widget visibility XXX
int set = GraphicEffectConfig.packetStream.g_ubyte_negate();
int trcknum = GraphicEffectConfig.packetStream.g_ushort();
int pointer = GraphicEffectConfig.packetStream.g_int_le();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateVisibility(pointer, set);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 132) {// set pitch, yaw and scale TODO
int pitch = GraphicEffectConfig.packetStream.g_ushort();
int trcknum = GraphicEffectConfig.packetStream.g_ushort_add();
int scale = GraphicEffectConfig.packetStream.g_ushort_le_add();
int yaw = GraphicEffectConfig.packetStream.g_ushort_le_add();
int ptr = GraphicEffectConfig.packetStream.g_int();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.updateView(ptr, pitch, scale, yaw);
}
JagString.opcode = -1;
return true;
} else if (50 == JagString.opcode) {// Item on widget XXX
int slot = GraphicEffectConfig.packetStream.g_int();
int ptr = GraphicEffectConfig.packetStream.g_int_le_inverse();
int itemId = GraphicEffectConfig.packetStream.g_ushort_le_add();
if (itemId == 65535) {
itemId = -1;
}
int tracker = GraphicEffectConfig.packetStream.g_ushort_le();
if (AbstractWheelListener.setPacketTracker(tracker)) {
Widget widget = Class7.getWidget(ptr);
ItemDefinition itemDef;
if (widget.aBoolean233) {
RefreshRequest.update9(ptr, itemId, slot);
itemDef = ItemDefinition.load(itemId);
RefreshRequest.updateView(ptr, itemDef.iconPitch, itemDef.iconScale, itemDef.iconYaw);
Class84.method1420(ptr, itemDef.iconRoll, itemDef.iconOffsetY, itemDef.iconOffsetX,
(byte) -85);
} else {
if (-1 == itemId) {
widget.mediaType = 0;
JagString.opcode = -1;
return true;
}
itemDef = ItemDefinition.load(itemId);
widget.pitch = itemDef.iconPitch;
widget.scale = 100 * itemDef.iconScale / slot;
widget.mediaType = 4;
widget.mediaId = itemId;
widget.yaw = itemDef.iconYaw;
Class20.method909(117, widget);
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 119) {// Reposition child? TODO: Unsure
int trcknum = GraphicEffectConfig.packetStream.g_ushort_add();
int ptr = GraphicEffectConfig.packetStream.g_int_le();
int set = GraphicEffectConfig.packetStream.g_short();
int set1 = GraphicEffectConfig.packetStream.g_short_add();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.update11(ptr, set, set1);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 220) {// Set scroll bar XXX:
int ptr = GraphicEffectConfig.packetStream.g_int_le_inverse();
int set = GraphicEffectConfig.packetStream.g_ushort_le();
int trcknum = GraphicEffectConfig.packetStream.g_ushort();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.update12(ptr, set);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 207) {//Changes yaw and pitch related to client tick TODO: ???
int ptr = GraphicEffectConfig.packetStream.g_int_le_inverse();
int trcknum = GraphicEffectConfig.packetStream.g_ushort_add();
int pitchStep = GraphicEffectConfig.packetStream.g_ushort();
int yawStep = GraphicEffectConfig.packetStream.g_ushort_add();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
RefreshRequest.showcaseRoll(ptr, yawStep + (pitchStep << 16));
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 105) {// Init inventory XXX
int ptr = GraphicEffectConfig.packetStream.g_int();
int invId = GraphicEffectConfig.packetStream.g_ushort();
if (~ptr > 69999) {
invId += '\u8000';
}
Widget parent = null;
if (0 <= ptr) {
parent = Class7.getWidget(ptr);
}
if (parent != null) {
for (int slot = 0; parent.inventoryId.length > slot; ++slot) {
parent.inventoryId[slot] = 0;
parent.inventoryAmt[slot] = 0;
}
}
Class10.resetInventory(invId);
int len = GraphicEffectConfig.packetStream.g_ushort();
for (int slot = 0; slot < len; ++slot) {
int amt = GraphicEffectConfig.packetStream.g_ubyte_subs();
if (255 == amt) {
amt = GraphicEffectConfig.packetStream.g_int();
}
int itemId = GraphicEffectConfig.packetStream.g_ushort();
if (null != parent && ~slot > ~parent.inventoryId.length) {
parent.inventoryId[slot] = itemId;
parent.inventoryAmt[slot] = amt;
}
FloorOverlayConfig.setInvItem(invId, slot, itemId - 1, amt);
}
if (parent != null) {
Class20.method909(-9, parent);
}
CipherStream.method819(false);
QuickChatDefinition.cs2_updatedInv[ClientScript.and(ReferenceTable.invUpdateCount++,
31)] = ClientScript.and(32767, invId);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 22) { // Update inventory XXX
int ptr = GraphicEffectConfig.packetStream.g_int();
int invId = GraphicEffectConfig.packetStream.g_ushort();
if (69999 < ~ptr) {
invId += '\u8000';
}
Widget widget = null;
if (ptr >= 0) {
widget = Class7.getWidget(ptr);
}
for (; ~GraphicEffectConfig.packetStream.position > ~Class130.packetSize;) {
int slot = GraphicEffectConfig.packetStream.g_usmart();
int itemId = GraphicEffectConfig.packetStream.g_ushort();
int amt = 0;
if (itemId != 0) {
amt = GraphicEffectConfig.packetStream.g_ubyte();
if (amt == 255) {
amt = GraphicEffectConfig.packetStream.g_int();
}
}
if (widget != null && ~slot <= -1 && ~widget.inventoryId.length < ~slot) {
widget.inventoryId[slot] = itemId;
widget.inventoryAmt[slot] = amt;
}
FloorOverlayConfig.setInvItem(invId, slot, itemId - 1, amt);
}
if (widget != null) {
Class20.method909(-128, widget);
}
CipherStream.method819(false);
QuickChatDefinition.cs2_updatedInv[ClientScript.and(ReferenceTable.invUpdateCount++,
31)] = ClientScript.and(32767, invId);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 144) {// reset inventory XXX
int pointer = GraphicEffectConfig.packetStream.g_int_le_inverse();
Widget widget = Class7.getWidget(pointer);
for (int slot = 0; widget.inventoryId.length > slot; ++slot) {
widget.inventoryId[slot] = -1;
widget.inventoryAmt[slot] = 0;
}
Class20.method909(123, widget);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 191) {// Delete inventory XXX
int invId = GraphicEffectConfig.packetStream.g_ushort_le();
Class3_Sub28_Sub1.deleteInventory(invId);
QuickChatDefinition.cs2_updatedInv[ClientScript.and(31,
ReferenceTable.invUpdateCount++)] = ClientScript.and(invId, 32767);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 115) {// CS2 XXX
int trcknum = GraphicEffectConfig.packetStream.g_ushort();
JagString instr = GraphicEffectConfig.packetStream.gjstr();
Object[] args = new Object[instr.length() - -1];
for (int pos = instr.length() + -1; -1 >= ~pos; --pos) {
if (115 == instr.method1569(pos, (byte) -45)) {
args[1 + pos] = GraphicEffectConfig.packetStream.gjstr();
} else {
args[1 + pos] = new Integer(GraphicEffectConfig.packetStream.g_int());
}
}
args[0] = new Integer(GraphicEffectConfig.packetStream.g_int());
if (AbstractWheelListener.setPacketTracker(trcknum)) {
CS2Request var66 = new CS2Request();
var66.arguments = args;
Class43.method1065(var66);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 145) {// Main game frame XXX
int parentId = GraphicEffectConfig.packetStream.g_ushort_le_add();
int reset = GraphicEffectConfig.packetStream.g_ubyte_add();
int trcknum = GraphicEffectConfig.packetStream.g_ushort_le_add();
if (AbstractWheelListener.setPacketTracker(trcknum)) {
if (reset == 2) {
Class7.resetWorldMap((byte) -86);
}
InventoryConfig.parentWidgetId = parentId;
Class3_Sub13_Sub13.method232(parentId, 16182);
Class124.method1746(false, (byte) -64);
Class3_Sub13_Sub12.runOpenScripts(InventoryConfig.parentWidgetId);
for (int ix = 0; -101 < ~ix; ++ix) {
GroundItemWrapper.aBooleanArray3674[ix] = true;
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 155) { // Open widget XXX
int type = GraphicEffectConfig.packetStream.g_ubyte();
int pointer = GraphicEffectConfig.packetStream.g_int_le_inverse();
int tracknum = GraphicEffectConfig.packetStream.g_ushort_add();
int widgetId = GraphicEffectConfig.packetStream.g_ushort();
if (AbstractWheelListener.setPacketTracker(tracknum)) {
WidgetPointer ptr = (WidgetPointer) WidgetPointer.pointers.get(pointer);
if (null != ptr) {
Class3_Sub13_Sub18.closeWidget(ptr.widgetId != widgetId, ptr, false);
}
Class21.openWidget(pointer, widgetId, type);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 176) {// Switch widget XXX
int source = GraphicEffectConfig.packetStream.g_int_inverse();
int tracknum = GraphicEffectConfig.packetStream.g_ushort_add();
int target = GraphicEffectConfig.packetStream.g_int_inverse();
if (AbstractWheelListener.setPacketTracker(tracknum)) {
WidgetPointer srcWidget = (WidgetPointer) WidgetPointer.pointers.get(source);
WidgetPointer tgtWidget = (WidgetPointer) WidgetPointer.pointers.get(target);
if (null != tgtWidget) {
Class3_Sub13_Sub18.closeWidget(
null == srcWidget || tgtWidget.widgetId != srcWidget.widgetId, tgtWidget,
false);
}
if (null != srcWidget) {
srcWidget.unlink();
WidgetPointer.pointers.put(target, srcWidget, 1);
}
Widget widget = Class7.getWidget(source);
if (widget != null) {
Class20.method909(var0 + 57, widget);
}
widget = Class7.getWidget(target);
if (null != widget) {
Class20.method909(119, widget);
Class151_Sub1.method2104(widget, true);
}
if (0 != ~InventoryConfig.parentWidgetId) {
Class3_Sub8.runScripts(1, InventoryConfig.parentWidgetId);
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 149) {// Close widget XXX
int tracknum = GraphicEffectConfig.packetStream.g_ushort();
int ptr = GraphicEffectConfig.packetStream.g_int();
if (AbstractWheelListener.setPacketTracker(tracknum)) {
WidgetPointer pointer = (WidgetPointer) WidgetPointer.pointers.get(ptr);
if (null != pointer) {
Class3_Sub13_Sub18.closeWidget(true, pointer, false);
}
if (null != Class3_Sub13_Sub7.aClass11_3087) {
Class20.method909(115, Class3_Sub13_Sub7.aClass11_3087);
Class3_Sub13_Sub7.aClass11_3087 = null;
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 165) {// Widget settings/access mask XXX
int tracknum = GraphicEffectConfig.packetStream.g_ushort_le();
int end = GraphicEffectConfig.packetStream.g_ushort_le();
if (end == '\uffff') {
end = -1;
}
int pointer = GraphicEffectConfig.packetStream.g_int();
int start = GraphicEffectConfig.packetStream.g_ushort_add();
int accessMask = GraphicEffectConfig.packetStream.g_int_inverse();
if (~start == -65536) {
start = -1;
}
if (AbstractWheelListener.setPacketTracker(tracknum)) {
for (int slot = start; slot <= end; ++slot) {
long ptr = slot + ((long) pointer << 32);
WidgetSettings prev = (WidgetSettings) Class124.widgetSettings.get(ptr);
WidgetSettings settings;
if (prev == null) {
if (-1 == slot) {
settings = new WidgetSettings(accessMask,
Class7.getWidget(pointer).settings.anInt2202);
} else {
settings = new WidgetSettings(accessMask, -1);
}
} else {
settings = new WidgetSettings(accessMask, prev.anInt2202);
prev.unlink();
}
Class124.widgetSettings.put(ptr, settings, 1);
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 9) { // Why? Widgetstruct setting XXX
int set = GraphicEffectConfig.packetStream.g_ushort_le_add();
int pointer = GraphicEffectConfig.packetStream.g_int_le();
int tracknum = GraphicEffectConfig.packetStream.g_ushort_add();
int end = GraphicEffectConfig.packetStream.g_ushort_le();
if (end == 65535) {
end = -1;
}
int start = GraphicEffectConfig.packetStream.g_ushort_add();
if (start == 65535) {
start = -1;
}
if (AbstractWheelListener.setPacketTracker(tracknum)) {
for (int slot = start; slot <= end; ++slot) {
long ptr = slot + ((long) pointer << 32);
WidgetSettings prev = (WidgetSettings) Class124.widgetSettings.get(ptr);
WidgetSettings settings;
if (null != prev) {
settings = new WidgetSettings(prev.accessMask, set);
prev.unlink();
} else if (0 != ~slot) {
settings = new WidgetSettings(0, set);
} else {
settings = new WidgetSettings(Class7.getWidget(pointer).settings.accessMask,
set);
}
Class124.widgetSettings.put(ptr, settings, 1);
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 209) { // Some kind of game frame scripts TODO:
if (InventoryConfig.parentWidgetId != -1) {
Class3_Sub8.runScripts(0, InventoryConfig.parentWidgetId);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 192) {// Map/compass blackout XXX
Class161.mapcompassBlackout = GraphicEffectConfig.packetStream.g_ubyte();
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 153) {// Reset map flag XXX
JagString.opcode = -1;
Class65.mapFlagX = 0;
return true;
} else if (JagString.opcode == 225) {// Update player XXX
Class163_Sub3.updatePlayers();
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 32) {// Update NPC XXX
Class3_Sub13_Sub14.updateNpc();
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 160) {// Set walk text XXX
if (0 != Class130.packetSize) {
Class3_Sub13_Sub28.walkText = GraphicEffectConfig.packetStream.gjstr();
} else {
Class3_Sub13_Sub28.walkText = Class56.WALK_HERE;
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 44) { // Click option TODO
int cursorId = GraphicEffectConfig.packetStream.g_ushort_le_add();
if (cursorId == '\uffff') {
cursorId = -1;
}
int top = GraphicEffectConfig.packetStream.g_ubyte();
int optId = GraphicEffectConfig.packetStream.g_ubyte();
JagString option = GraphicEffectConfig.packetStream.gjstr();
if (1 <= optId && ~optId >= -9) {
if (option.method1531(Class50.null_)) {
option = null;
}
CollisionMap.playerOptions[optId - 1] = option;
Class3_Sub13_Sub26.playerOptCursor[optId - 1] = cursorId;
Class1.secondaryOption[optId - 1] = top == 0;
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 38) { // Skill XXX
CipherStream.method819(false);
int level = GraphicEffectConfig.packetStream.g_ubyte_add();
int experience = GraphicEffectConfig.packetStream.g_int_inverse();
int skillId = GraphicEffectConfig.packetStream.g_ubyte();
StockMarketOffer.experience[skillId] = experience;
Class3_Sub13_Sub15.level[skillId] = level;
Class3_Sub20.maxLevel[skillId] = 1;
for (int x = 0; 98 > x; ++x) {
if (ItemDefinition.levelxpLookup[x] <= experience) {
Class3_Sub20.maxLevel[skillId] = x + 2;
}
}
Class3_Sub28_Sub19.anIntArray3780[ClientScript.and(31,
GZIPDecompressor.anInt815++)] = skillId;
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 116) { // Grand Exchange/GE offer TODO
int slot = GraphicEffectConfig.packetStream.g_ubyte();
if (GraphicEffectConfig.packetStream.g_ubyte() != 0) {
GraphicEffectConfig.packetStream.position--;
Class3_Sub13_Sub33.aClass133Array3393[slot] = new StockMarketOffer(
GraphicEffectConfig.packetStream);
} else {
Class3_Sub13_Sub33.aClass133Array3393[slot] = new StockMarketOffer();
}
JagString.opcode = -1;
Class121.anInt1642 = Class3_Sub13_Sub17.anInt3213;
return true;
} else if (JagString.opcode == 217) {// Hint map marker TODO
int flags = GraphicEffectConfig.packetStream.g_ubyte();
HintMapMarker mapMarker = new HintMapMarker();
int slot = flags >> 340093798;
mapMarker.type = flags & 63;
mapMarker.anInt1351 = GraphicEffectConfig.packetStream.g_ubyte();
if (~mapMarker.anInt1351 <= -1 && ~mapMarker.anInt1351 > ~Class166.hint_headicons.length) {
if (~mapMarker.type != -2 && 10 != mapMarker.type) {
if (-3 >= ~mapMarker.type && 6 >= mapMarker.type) {
if (mapMarker.type == 2) {
mapMarker.anInt1346 = 64;
mapMarker.anInt1350 = 64;
}
if (mapMarker.type == 3) {
mapMarker.anInt1346 = 0;
mapMarker.anInt1350 = 64;
}
if (mapMarker.type == 4) {
mapMarker.anInt1346 = 128;
mapMarker.anInt1350 = 64;
}
if (mapMarker.type == 5) {
mapMarker.anInt1346 = 64;
mapMarker.anInt1350 = 0;
}
if (mapMarker.type == 6) {
mapMarker.anInt1346 = 64;
mapMarker.anInt1350 = 128;
}
mapMarker.type = 2;
mapMarker.targetX = GraphicEffectConfig.packetStream.g_ushort();
mapMarker.anInt1347 = GraphicEffectConfig.packetStream.g_ushort();
mapMarker.anInt1353 = GraphicEffectConfig.packetStream.g_ubyte();
}
} else {
mapMarker.actorTargetId = GraphicEffectConfig.packetStream.g_ushort();
GraphicEffectConfig.packetStream.position += 3;
}
mapMarker.playerModelId = GraphicEffectConfig.packetStream.g_ushort();
if (mapMarker.playerModelId == '\uffff') {
mapMarker.playerModelId = -1;
}
RuntimeException_Sub1.hintMapMarkers[slot] = mapMarker;
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 4) {// Play music XXX
int id = GraphicEffectConfig.packetStream.g_ushort_le_add();
if (id == '\uffff') {
id = -1;
}
Class86.playMusic(id);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 208) {// Play jingle XXX
int volume = GraphicEffectConfig.packetStream.g_tri_le();
int jingleId = GraphicEffectConfig.packetStream.g_ushort_le();
if (jingleId == '\uffff') {
jingleId = -1;
}
Class167.playJingle(volume, jingleId, (byte) -1);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 172) {// Play sfx TODO
int trackId = GraphicEffectConfig.packetStream.g_ushort();
if (-65536 == ~trackId) {
trackId = -1;
}
int volume = GraphicEffectConfig.packetStream.g_ubyte();// ??
int short2 = GraphicEffectConfig.packetStream.g_ushort();// ???
Class3_Sub13_Sub6.playSfx(trackId, volume, short2);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 187) {// Set camera pitch & yaw XXX
int yaw = GraphicEffectConfig.packetStream.g_ushort_le();
int tracknum = GraphicEffectConfig.packetStream.g_ushort();
int pitch = GraphicEffectConfig.packetStream.g_ushort();
if (AbstractWheelListener.setPacketTracker(tracknum)) {
GraphicEffectConfig.yawTarget = yaw;
Soundbox.pitchTarget = pitch;
if (StockMarketOffer.cameraMode == 2) {
Class139.cameraPitch = Soundbox.pitchTarget;
Class3_Sub13_Sub25.cameraYaw = GraphicEffectConfig.yawTarget;
}
Class47.method1098((byte) -117);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 154) {// Camera detach TODO
int slot = GraphicEffectConfig.packetStream.g_ushort();
int experience = GraphicEffectConfig.packetStream.g_ubyte();
int skillId = GraphicEffectConfig.packetStream.g_ubyte();
int x = GraphicEffectConfig.packetStream.g_ushort();
int accessMask = GraphicEffectConfig.packetStream.g_ubyte();
int var30 = GraphicEffectConfig.packetStream.g_ubyte();
if (AbstractWheelListener.setPacketTracker(slot)) {
Class3_Sub20.method390(true, accessMask, x, var30, (byte) -124, skillId, experience);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 24) {// Reset camera, start of cinematic effects XXX
int tracknum = GraphicEffectConfig.packetStream.g_ushort();
if (AbstractWheelListener.setPacketTracker(tracknum)) {
Class3_Sub28_Sub5.resetCameraEffects();
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 27) { // Camera shake TODO
int tracknum = GraphicEffectConfig.packetStream.g_ushort();
int slot = GraphicEffectConfig.packetStream.g_ubyte();
int shake1 = GraphicEffectConfig.packetStream.g_ubyte();
int shake2 = GraphicEffectConfig.packetStream.g_ubyte();
int shake3 = GraphicEffectConfig.packetStream.g_ubyte();
int shake4 = GraphicEffectConfig.packetStream.g_ushort();
if (AbstractWheelListener.setPacketTracker(tracknum)) {
Class104.cameraShakeEnabled[slot] = true;
Class3_Sub13_Sub32.anIntArray3383[slot] = shake1;
Class166.anIntArray2073[slot] = shake2;
Class3_Sub13_Sub29.anIntArray3359[slot] = shake3;
Class163_Sub1_Sub1.anIntArray4009[slot] = shake4;
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 125) {// Camera look target XXX
int tracknum = GraphicEffectConfig.packetStream.g_ushort();
int tx = GraphicEffectConfig.packetStream.g_ubyte();
int tz = GraphicEffectConfig.packetStream.g_ubyte();
int cy = GraphicEffectConfig.packetStream.g_ushort();
int step = GraphicEffectConfig.packetStream.g_ubyte();
int dur = GraphicEffectConfig.packetStream.g_ubyte();
if (AbstractWheelListener.setPacketTracker(tracknum)) {
Class164_Sub1.method2238(tx, tz, cy, step, dur);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 13) {// Teleport local player on area TODO
int pos1 = GraphicEffectConfig.packetStream.g_ubyte_subs();
int flags = GraphicEffectConfig.packetStream.g_ubyte_add();
int pos2 = GraphicEffectConfig.packetStream.g_ubyte();
Class26.localPlane = flags >> 1;
RSTextureLoader.localPlayer.setPosition(pos1, pos2, ~(flags & 1) == -2);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 102) {// Animate npc TODO
int npcId = GraphicEffectConfig.packetStream.g_ushort_le();
int progress = GraphicEffectConfig.packetStream.g_ubyte_subs();
int animationId = GraphicEffectConfig.packetStream.g_ushort();
NPC npc = Class3_Sub13_Sub24.localNpcs[npcId];
if (null != npc) {
Class130.animateNpc(npc, animationId, progress);
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 235) {// Global object animation on absolute position TODO
int slot = GraphicEffectConfig.packetStream.g_ubyte_subs();
int type = slot >> -518983614;
int rotation = 3 & slot;
int homotype = Class75.anIntArray1107[type];
int animationId = GraphicEffectConfig.packetStream.g_ushort();
int position = GraphicEffectConfig.packetStream.g_int();
if ('\uffff' == animationId) {
animationId = -1;
}
int var10 = 16383 & position;
int i = 16383 & position >> 2070792462;
i -= WorldMapLabels.lowestVisibleTileX;
var10 -= Class82.lowestVisibleTileZ;
int plane = 3 & position >> 765199868;
Class50.method1131(plane, 110, rotation, type, var10, homotype, i, animationId);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 131) {// Reset entity animations TODO
for (int id = 0; id < Class3_Sub13_Sub22.localPlayers.length; ++id) {
if (Class3_Sub13_Sub22.localPlayers[id] != null) {
Class3_Sub13_Sub22.localPlayers[id].animationId = -1;
}
}
for (int id = 0; id < Class3_Sub13_Sub24.localNpcs.length; ++id) {
if (Class3_Sub13_Sub24.localNpcs[id] != null) {
Class3_Sub13_Sub24.localNpcs[id].animationId = -1;
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 112) {// Clear ground items on chunk TODO
Class65.locationPacketX = GraphicEffectConfig.packetStream.g_ubyte();
Class107.locationPacketZ = GraphicEffectConfig.packetStream.g_ubyte_negate();
for (int x = Class65.locationPacketX; x < 8 + Class65.locationPacketX; ++x) {
for (int z = Class107.locationPacketZ; ~z > ~(8 + Class107.locationPacketZ); ++z) {
if (null != Class3_Sub13_Sub22.groundItemStacks[Class26.localPlane][x][z]) {
Class3_Sub13_Sub22.groundItemStacks[Class26.localPlane][x][z] = null;
Class128.updateGroundItems(x, z);
}
}
}
for (Class3_Sub4 var68 = (Class3_Sub4) Class3_Sub13_Sub6.aClass61_3075
.method1222(); null != var68; var68 = (Class3_Sub4) Class3_Sub13_Sub6.aClass61_3075
.method1221()) {
if (~var68.anInt2264 <= ~Class65.locationPacketX
&& 8 + Class65.locationPacketX > var68.anInt2264
&& var68.anInt2248 >= Class107.locationPacketZ
&& ~var68.anInt2248 > ~(8 + Class107.locationPacketZ)
&& var68.anInt2250 == Class26.localPlane) {
var68.anInt2259 = 0;
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 56) {// Create GFX on actor/position TODO
int delay = GraphicEffectConfig.packetStream.g_ushort();
int height = GraphicEffectConfig.packetStream.g_ushort_le();
int target = GraphicEffectConfig.packetStream.g_int_inverse();
int gfxId = GraphicEffectConfig.packetStream.g_ushort_le_add();
if ((target >> 30) == 0) {
AnimationSequence animDef;
if (target >> 29 != 0) {
int npcId = '\uffff' & target;
NPC npc = Class3_Sub13_Sub24.localNpcs[npcId];
if (npc != null) {
if (gfxId == 65535) {
gfxId = -1;
}
boolean animate = true;
if (gfxId != -1 && npc.graphicId != -1
&& ~client.getAnimationDef(GraphicEffectConfig.getGraphicDef((byte) 42,
gfxId).animationId).priority > ~client.getAnimationDef(
GraphicEffectConfig.getGraphicDef((byte) 42,
npc.graphicId).animationId).priority) {
animate = false;
}
if (animate) {
npc.anInt2761 = 0;
npc.graphicId = gfxId;
npc.gfxDelay = Class44.anInt719 + delay;
npc.anInt2805 = 0;
if (npc.gfxDelay > Class44.anInt719) {
npc.anInt2805 = -1;
}
npc.gfxPosY = height;
npc.anInt2826 = 1;
if (~npc.graphicId != 0 && Class44.anInt719 == npc.gfxDelay) {
int anim = GraphicEffectConfig.getGraphicDef((byte) 42,
npc.graphicId).animationId;
if (anim != -1) {
animDef = client.getAnimationDef(anim);
if (animDef != null && null != animDef.frames) {
Class89.updateAnimationSounds(npc.absoluteX, npc.absoluteZ,
animDef, false, 0);
}
}
}
}
}
} else if ((target >> 28) != 0) {
int playerId = target & '\uffff';
Player plr;
if (WidgetSettings.localPlrId == playerId) {
plr = RSTextureLoader.localPlayer;
} else {
plr = Class3_Sub13_Sub22.localPlayers[playerId];
}
if (plr != null) {
if (gfxId == '\uffff') {
gfxId = -1;
}
boolean animate = true;
if (gfxId != -1 && plr.graphicId != -1
&& ~client.getAnimationDef(GraphicEffectConfig.getGraphicDef((byte) 42,
gfxId).animationId).priority > ~client.getAnimationDef(
GraphicEffectConfig.getGraphicDef((byte) 42,
plr.graphicId).animationId).priority) {
animate = false;
}
if (animate) {
plr.gfxDelay = delay + Class44.anInt719;
plr.gfxPosY = height;
plr.graphicId = gfxId;
if (plr.graphicId == 65535) {
plr.graphicId = -1;
}
plr.anInt2826 = 1;
plr.anInt2761 = 0;
plr.anInt2805 = 0;
if (plr.gfxDelay > Class44.anInt719) {
plr.anInt2805 = -1;
}
if (0 != ~plr.graphicId && ~plr.gfxDelay == ~Class44.anInt719) {
int anim = GraphicEffectConfig.getGraphicDef((byte) 42,
plr.graphicId).animationId;
if (0 != ~anim) {
animDef = client.getAnimationDef(anim);
if (null != animDef && null != animDef.frames) {
Class89.updateAnimationSounds(plr.absoluteX, plr.absoluteZ,
animDef, plr == RSTextureLoader.localPlayer, 0);
}
}
}
}
}
}
} else {
int plane = 3 & target >> 28;
int posX = ((target & 268434277) >> 14) - WorldMapLabels.lowestVisibleTileX;
int posZ = (target & 16383) - Class82.lowestVisibleTileZ;
if (~posX <= -1 && posZ >= 0 && 104 > posX && ~posZ > -105) {
posZ = 128 * posZ + 64;
posX = 128 * posX + 64;
SpotGFX graphic = new SpotGFX(gfxId, plane, posX, posZ,
-height + Class121.method1736(plane, posX, posZ), delay, Class44.anInt719);
Class3_Sub13_Sub15.aClass61_3177.method1215(true, new Class3_Sub28_Sub2(graphic));
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 234) {// Run energy XXX
CipherStream.method819(false);
Class9.runPower = GraphicEffectConfig.packetStream.g_ubyte();
Class140_Sub6.genericCs2UpdateTime = Class3_Sub13_Sub17.anInt3213;
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 159) {// One opcode up run energy, ?? TODO
CipherStream.method819(false);
Class149.anInt1925 = GraphicEffectConfig.packetStream.g_short();
Class140_Sub6.genericCs2UpdateTime = Class3_Sub13_Sub17.anInt3213;
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 164) {// Last login adress XXX
int ip32 = GraphicEffectConfig.packetStream.g_int_inverse();
Class136.lastlogAdress = Class38.signlink.dnsResolve(ip32);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 197) {// End utility, start socials, contact server state TODO
HintMapMarker.contactServerState = GraphicEffectConfig.packetStream.g_ubyte();
Class110.socialUpdateTick = Class3_Sub13_Sub17.anInt3213;
JagString.opcode = -1;
return true;
} else if (232 == JagString.opcode) {// Chat settings TODO
Class3_Sub13_Sub8.anInt3101 = GraphicEffectConfig.packetStream.g_ubyte();
PlayerBodyPart.anInt467 = GraphicEffectConfig.packetStream.g_ubyte();
Class45.anInt734 = GraphicEffectConfig.packetStream.g_ubyte();
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 62) {// Add/Update friend TODO
long usr = GraphicEffectConfig.packetStream.g_long();
int worldId = GraphicEffectConfig.packetStream.g_ushort();
int x = GraphicEffectConfig.packetStream.g_ubyte();
boolean idk = true;
if (usr < 0L) {
usr &= Long.MAX_VALUE;
idk = false;
}
JagString worldName = GroundItemWrapper.empty_string;
if (-1 > ~worldId) {
worldName = GraphicEffectConfig.packetStream.gjstr();
}
JagString userame = Class41.decodeBase37(usr).method1545();
for (int i = 0; i < Class8.totalFriendCount; ++i) {
if (usr == Class50.friendNameLong[i]) {
if (~worldId != ~CursorConfig.friendWorldId[i]) {
CursorConfig.friendWorldId[i] = worldId;
if (0 < worldId) {
CipherStream.addMessage(5, Renderkit.toString(
new JagString[] { userame, Class3_Sub28_Sub10_Sub1.LOGGED_IN }),
GroundItemWrapper.empty_string, -1);
}
if (worldId == 0) {
CipherStream.addMessage(5,
Renderkit.toString(new JagString[] { userame, Class50.LOGGED_OUT }),
GroundItemWrapper.empty_string, -1);
}
}
Class3_Sub28.friendWorldName[i] = worldName;
Class57.anIntArray904[i] = x;
userame = null;
Node.aBooleanArray73[i] = idk;
break;
}
}
boolean sorting = false;
if (null != userame && 200 > Class8.totalFriendCount) {
Class50.friendNameLong[Class8.totalFriendCount] = usr;
Class70.friendNameString[Class8.totalFriendCount] = userame;
CursorConfig.friendWorldId[Class8.totalFriendCount] = worldId;
Class3_Sub28.friendWorldName[Class8.totalFriendCount] = worldName;
Class57.anIntArray904[Class8.totalFriendCount] = x;
Node.aBooleanArray73[Class8.totalFriendCount] = idk;
++Class8.totalFriendCount;
}
Class110.socialUpdateTick = Class3_Sub13_Sub17.anInt3213;
int _friends = Class8.totalFriendCount;
while (~_friends < -1) {
--_friends;
sorting = true;
for (int var11 = 0; var11 < _friends; ++var11) {
if (~CursorConfig.friendWorldId[var11] != ~CS2Request.localWorldId
&& ~CS2Request.localWorldId == ~CursorConfig.friendWorldId[var11 - -1]
|| CursorConfig.friendWorldId[var11] == 0
&& CursorConfig.friendWorldId[var11 - -1] != 0) {
sorting = false;
int var12 = CursorConfig.friendWorldId[var11];
CursorConfig.friendWorldId[var11] = CursorConfig.friendWorldId[var11 - -1];
CursorConfig.friendWorldId[1 + var11] = var12;
JagString var64 = Class3_Sub28.friendWorldName[var11];
Class3_Sub28.friendWorldName[var11] = Class3_Sub28.friendWorldName[var11 + 1];
Class3_Sub28.friendWorldName[var11 - -1] = var64;
JagString var57 = Class70.friendNameString[var11];
Class70.friendNameString[var11] = Class70.friendNameString[var11 + 1];
Class70.friendNameString[var11 - -1] = var57;
long var15 = Class50.friendNameLong[var11];
Class50.friendNameLong[var11] = Class50.friendNameLong[var11 - -1];
Class50.friendNameLong[var11 - -1] = var15;
int var17 = Class57.anIntArray904[var11];
Class57.anIntArray904[var11] = Class57.anIntArray904[var11 - -1];
Class57.anIntArray904[1 + var11] = var17;
boolean var18 = Node.aBooleanArray73[var11];
Node.aBooleanArray73[var11] = Node.aBooleanArray73[var11 - -1];
Node.aBooleanArray73[var11 - -1] = var18;
}
}
if (sorting) {
break;
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 71) {// Outgoing private message XXX
long target = GraphicEffectConfig.packetStream.g_long();
JagString message = Class3_Sub28_Sub17
.method686(Class32.huffmanDecode(GraphicEffectConfig.packetStream).trim());
CipherStream.addMessage(6, message, Class41.decodeBase37(target).method1545(), var0 ^ 82);
JagString.opcode = -1;
return true;
} else if (141 == JagString.opcode) {// Outgoing private quick message XXX
long username = GraphicEffectConfig.packetStream.g_long();
int chatId = GraphicEffectConfig.packetStream.g_ushort();
JagString chat = StringEntryNode.load(chatId).toChat(GraphicEffectConfig.packetStream);
InventoryConfig.addChat(chatId, 19, chat, (JagString) null, (byte) 50,
Class41.decodeBase37(username).method1545());
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 0) {// Incoming private message XXX
long username = GraphicEffectConfig.packetStream.g_long();
int mid_topbit = GraphicEffectConfig.packetStream.g_ushort();
int mid_botbit = GraphicEffectConfig.packetStream.g_tri();
int rights = GraphicEffectConfig.packetStream.g_ubyte();
boolean ignored = false;
long messageId = mid_botbit + (mid_topbit << -1802335520);
int var12 = 0;
label1651: while (true) {
if (-101 >= ~var12) {
if (rights <= 1) {
if ((!Class3_Sub15.chatbool1 || Class121.chatbool2)
&& !Class3_Sub13_Sub14.chatbool3) {
for (var12 = 0; var12 < Class3_Sub28_Sub5.ignoreCount; ++var12) {
if (~username == ~Class114.ignoreList[var12]) {
ignored = true;
break label1651;
}
}
} else {
ignored = true;
}
}
break;
}
if (messageId == Class163_Sub2_Sub1.recentMessages[var12]) {
ignored = true;
break;
}
++var12;
}
if (!ignored && -1 == ~Class44_Sub1.anInt2622) {
Class163_Sub2_Sub1.recentMessages[Class149.messageCounter] = messageId;
Class149.messageCounter = (Class149.messageCounter + 1) % 100;
JagString message = Class3_Sub28_Sub17
.method686(Class32.huffmanDecode(GraphicEffectConfig.packetStream).trim());
if (-3 != ~rights && ~rights != -4) {
if (rights != 1) {
CipherStream.addMessage(3, message, Class41.decodeBase37(username).method1545(),
var0 + 82);
} else {
CipherStream.addMessage(7, message,
Renderkit.toString(new JagString[] { Class32.IMG_TAG_MODERATOR,
Class41.decodeBase37(username).method1545() }),
-1);
}
} else {
CipherStream.addMessage(7, message, Renderkit.toString(new JagString[] {
Class21.IMG_TAG_ADMIN, Class41.decodeBase37(username).method1545() }), -1);
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 247) {// Incoming private quick message XXX
long username = GraphicEffectConfig.packetStream.g_long();
int top = GraphicEffectConfig.packetStream.g_ushort();
int bot = GraphicEffectConfig.packetStream.g_tri();
int rights = GraphicEffectConfig.packetStream.g_ubyte();
int chatId = GraphicEffectConfig.packetStream.g_ushort();
boolean ignore = false;
long messageId = (top << 24) + bot;
int ix = 0;
check: while (true) {
if (100 > ix) {
if (~messageId != ~Class163_Sub2_Sub1.recentMessages[ix]) {
++ix;
continue;
}
ignore = true;
break;
}
if (rights <= 1) {
for (ix = 0; ~ix > ~Class3_Sub28_Sub5.ignoreCount; ++ix) {
if (username == Class114.ignoreList[ix]) {
ignore = true;
break check;
}
}
}
break;
}
if (!ignore && ~Class44_Sub1.anInt2622 == -1) {
Class163_Sub2_Sub1.recentMessages[Class149.messageCounter] = messageId;
Class149.messageCounter = (1 + Class149.messageCounter) % 100;
JagString chat = StringEntryNode.load(chatId).toChat(GraphicEffectConfig.packetStream);
if (rights == 2) {
InventoryConfig.addChat(chatId, 18, chat, (JagString) null, (byte) 50,
Renderkit.toString(new JagString[] { Class21.IMG_TAG_ADMIN,
Class41.decodeBase37(username).method1545() }));
} else if (rights == 1) {
InventoryConfig.addChat(chatId, 18, chat, (JagString) null, (byte) 50,
Renderkit.toString(new JagString[] { Class32.IMG_TAG_MODERATOR,
Class41.decodeBase37(username).method1545() }));
} else {
InventoryConfig.addChat(chatId, 18, chat, (JagString) null, (byte) 50,
Class41.decodeBase37(username).method1545());
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 126) {// Ignore list TODO
Class3_Sub28_Sub5.ignoreCount = Class130.packetSize / 8;
for (int i = 0; i < Class3_Sub28_Sub5.ignoreCount; i++) {
Class114.ignoreList[i] = GraphicEffectConfig.packetStream.g_long();
Class3_Sub13_Sub27.ignoreList_str[i] = Class41.decodeBase37(Class114.ignoreList[i]);
}
Class110.socialUpdateTick = Class3_Sub13_Sub17.anInt3213;
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 55) {// Join clan chat TODO
Class167.anInt2087 = Class3_Sub13_Sub17.anInt3213;
long ownerName37 = GraphicEffectConfig.packetStream.g_long();
if (~ownerName37 == -1L) {
Class161.chatOwnerName = null;
JagString.opcode = -1;
Widget.chatroomName = null;
ClientScript.clanChatMembers = null;
Class3_Sub28.clanMemberCount = 0;
return true;
} else {
long chatroomName37 = GraphicEffectConfig.packetStream.g_long();
Widget.chatroomName = Class41.decodeBase37(chatroomName37);
Class161.chatOwnerName = Class41.decodeBase37(ownerName37);
Player.aByte3953 = GraphicEffectConfig.packetStream.g_byte();
int amtUsers = GraphicEffectConfig.packetStream.g_ubyte();
if (255 == amtUsers) {
JagString.opcode = -1;
return true;
} else {
Class3_Sub28.clanMemberCount = amtUsers;
ClanChatMember[] members = new ClanChatMember[100];
for (int x = 0; ~Class3_Sub28.clanMemberCount < ~x; ++x) {
members[x] = new ClanChatMember();
members[x].identifier = GraphicEffectConfig.packetStream.g_long();
members[x].username = Class41.decodeBase37(members[x].identifier);
members[x].worldId = GraphicEffectConfig.packetStream.g_ushort();
members[x].rights = GraphicEffectConfig.packetStream.g_byte();
members[x].worldName = GraphicEffectConfig.packetStream.gjstr();
if (~Class3_Sub13_Sub16.localName37 == ~members[x].identifier) {
CollisionMap.userClanRights = members[x].rights;
}
}
boolean var32 = false;
int var10 = Class3_Sub28.clanMemberCount;
while (-1 > ~var10) {
var32 = true;
--var10;
for (int var11 = 0; ~var10 < ~var11; ++var11) {
if (-1 > ~members[var11].username
.method1559(members[var11 - -1].username)) {
var32 = false;
ClanChatMember var9 = members[var11];
members[var11] = members[1 + var11];
members[var11 + 1] = var9;
}
}
if (var32) {
break;
}
}
ClientScript.clanChatMembers = members;
JagString.opcode = -1;
return true;
}
}
} else if (JagString.opcode == 196) {// Update clan, clean this mess TODO
long username = GraphicEffectConfig.packetStream.g_long();
int worldId = GraphicEffectConfig.packetStream.g_ushort();
byte rights = GraphicEffectConfig.packetStream.g_byte();
boolean remove = false;
if (-1L != ~(Long.MIN_VALUE & username)) {
remove = true;
}
if (!remove) {
JagString worldName = GraphicEffectConfig.packetStream.gjstr();
ClanChatMember member = new ClanChatMember();
member.identifier = username;
member.username = Class41.decodeBase37(member.identifier);
member.rights = rights;
member.worldName = worldName;
member.worldId = worldId;
int i;
for (i = -1 + Class3_Sub28.clanMemberCount; ~i <= -1; --i) {// Sort
int var10 = ClientScript.clanChatMembers[i].username.method1559(member.username);
if (-1 == ~var10) {
ClientScript.clanChatMembers[i].worldId = worldId;
ClientScript.clanChatMembers[i].rights = rights;
ClientScript.clanChatMembers[i].worldName = worldName;
if (~username == ~Class3_Sub13_Sub16.localName37) {
CollisionMap.userClanRights = rights;
}
Class167.anInt2087 = Class3_Sub13_Sub17.anInt3213;
JagString.opcode = -1;
return true;
}
if (var10 < 0) {
break;
}
}
if (ClientScript.clanChatMembers.length <= Class3_Sub28.clanMemberCount) {
JagString.opcode = -1;
return true;
}
for (int var10 = Class3_Sub28.clanMemberCount + -1; ~i > ~var10; --var10) {
ClientScript.clanChatMembers[1 + var10] = ClientScript.clanChatMembers[var10];
}
if (-1 == ~Class3_Sub28.clanMemberCount) {
ClientScript.clanChatMembers = new ClanChatMember[100];
}
ClientScript.clanChatMembers[1 + i] = member;
if (Class3_Sub13_Sub16.localName37 == username) {
CollisionMap.userClanRights = rights;
}
++Class3_Sub28.clanMemberCount;
} else {
if (~Class3_Sub28.clanMemberCount == -1) {
JagString.opcode = -1;
return true;
}
username &= Long.MAX_VALUE;
int var30;
for (var30 = 0; ~Class3_Sub28.clanMemberCount < ~var30
&& (username != ClientScript.clanChatMembers[var30].identifier
|| ~worldId != ~ClientScript.clanChatMembers[var30].worldId); ++var30) {
;
}
if (var30 < Class3_Sub28.clanMemberCount) {
while (~(-1 + Class3_Sub28.clanMemberCount) < ~var30) {
ClientScript.clanChatMembers[var30] = ClientScript.clanChatMembers[1 + var30];
++var30;
}
--Class3_Sub28.clanMemberCount;
ClientScript.clanChatMembers[Class3_Sub28.clanMemberCount] = null;
}
}
JagString.opcode = -1;
Class167.anInt2087 = Class3_Sub13_Sub17.anInt3213;
return true;
} else if (JagString.opcode == 54) {// Clan chat XXX
long username = GraphicEffectConfig.packetStream.g_long();
GraphicEffectConfig.packetStream.g_byte();
long chatname = GraphicEffectConfig.packetStream.g_long();
int top = GraphicEffectConfig.packetStream.g_ushort();
int bot = GraphicEffectConfig.packetStream.g_tri();
long messageId = (top << -164903776) + bot;
int var10 = GraphicEffectConfig.packetStream.g_ubyte();
boolean skip = false;
int var14 = 0;
label1774: while (true) {
if (var14 >= 100) {
if (1 >= var10) {
if ((!Class3_Sub15.chatbool1 || Class121.chatbool2)
&& !Class3_Sub13_Sub14.chatbool3) {
for (var14 = 0; Class3_Sub28_Sub5.ignoreCount > var14; ++var14) {
if (Class114.ignoreList[var14] == username) {
skip = true;
break label1774;
}
}
} else {
skip = true;
}
}
break;
}
if (Class163_Sub2_Sub1.recentMessages[var14] == messageId) {
skip = true;
break;
}
++var14;
}
if (!skip && 0 == Class44_Sub1.anInt2622) {
Class163_Sub2_Sub1.recentMessages[Class149.messageCounter] = messageId;
Class149.messageCounter = (Class149.messageCounter + 1) % 100;
JagString chat = Class3_Sub28_Sub17
.method686(Class32.huffmanDecode(GraphicEffectConfig.packetStream).trim());
if (var10 != 2 && var10 != 3) {
if (var10 == 1) {
Class3_Sub13_Sub11.method221(-1, chat,
Renderkit.toString(new JagString[] { Class32.IMG_TAG_MODERATOR,
Class41.decodeBase37(username).method1545() }),
Class41.decodeBase37(chatname).method1545(), 9);
} else {
Class3_Sub13_Sub11.method221(-1, chat,
Class41.decodeBase37(username).method1545(),
Class41.decodeBase37(chatname).method1545(), 9);
}
} else {
Class3_Sub13_Sub11.method221(-1, chat,
Renderkit.toString(new JagString[] { Class21.IMG_TAG_ADMIN,
Class41.decodeBase37(username).method1545() }),
Class41.decodeBase37(chatname).method1545(), 9);
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 81) {// Clan Quick chat XXX
long username = GraphicEffectConfig.packetStream.g_long();
GraphicEffectConfig.packetStream.g_byte();
long clanName = GraphicEffectConfig.packetStream.g_long();
int top = GraphicEffectConfig.packetStream.g_ushort();
int bot = GraphicEffectConfig.packetStream.g_tri();
int rights = GraphicEffectConfig.packetStream.g_ubyte();
boolean skip = false;
int quickChatId = GraphicEffectConfig.packetStream.g_ushort();
long msgId = (top << 32) + bot;
int var54 = 0;
label1521: while (true) {
if (100 > var54) {
if (~msgId != ~Class163_Sub2_Sub1.recentMessages[var54]) {
++var54;
continue;
}
skip = true;
break;
}
if (1 >= rights) {
for (var54 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var54; ++var54) {
if (~Class114.ignoreList[var54] == ~username) {
skip = true;
break label1521;
}
}
}
break;
}
if (!skip && 0 == Class44_Sub1.anInt2622) {
Class163_Sub2_Sub1.recentMessages[Class149.messageCounter] = msgId;
Class149.messageCounter = (1 + Class149.messageCounter) % 100;
JagString chat = StringEntryNode.load(quickChatId)
.toChat(GraphicEffectConfig.packetStream);
if (-3 != ~rights && 3 != rights) {
if (~rights != -2) {
InventoryConfig.addChat(quickChatId, 20, chat,
Class41.decodeBase37(clanName).method1545(), (byte) 50,
Class41.decodeBase37(username).method1545());
} else {
InventoryConfig.addChat(quickChatId, 20, chat,
Class41.decodeBase37(clanName).method1545(), (byte) 50,
Renderkit.toString(new JagString[] { Class32.IMG_TAG_MODERATOR,
Class41.decodeBase37(username).method1545() }));
}
} else {
InventoryConfig.addChat(quickChatId, 20, chat,
Class41.decodeBase37(clanName).method1545(), (byte) 50,
Renderkit.toString(new JagString[] { Class21.IMG_TAG_ADMIN,
Class41.decodeBase37(username).method1545() }));
}
}
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 85) {// System Update TODO
Class38_Sub1.systemUpdateTime = GraphicEffectConfig.packetStream.g_ushort() * 30;
JagString.opcode = -1;
Class140_Sub6.genericCs2UpdateTime = Class3_Sub13_Sub17.anInt3213;
return true;
} else if (JagString.opcode == 86) {// Logout XXX
Class167.logoutReset((byte) 46);
JagString.opcode = -1;
return false;
} else if (JagString.opcode == 114) {// Reflection cheat check TODO
Class3_Sub13_Sub29.method305(Class38.signlink, GraphicEffectConfig.packetStream,
Class130.packetSize, (byte) -126);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 142) {// Set settings string XXX
StringEntryNode.setSettingsString(0, GraphicEffectConfig.packetStream.gjstr());
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 169) { // Set random.dat TODO
Class162.writeRandom(GraphicEffectConfig.packetStream);
JagString.opcode = -1;
return true;
} else if (JagString.opcode == 42) {// Open URL TODO
if (null != Class3_Sub13_Sub10.frame_fullscreen) {
Entity.requestWindowMode(false, Class3_Sub28.anInt2577, -1, -1);
}
byte[] data = new byte[Class130.packetSize];
GraphicEffectConfig.packetStream.g_bytes_isaac((byte) 30, 0, data, Class130.packetSize);
JagString url = Class3_Sub13_Sub3.fromArray(data, 0, Class130.packetSize);
if (null == Class3_Sub13_Sub7.frame && (3 == Signlink.anInt1214
|| !Signlink.aString1202.startsWith("win") || Class106.aBoolean1451)) {
Class99.openUrl(true, url);
} else {
Class3_Sub13_Sub24.aClass94_3295 = url;
JagString.aBoolean2154 = true;
Class15.aClass64_351 = Class38.signlink
.method1452(new String(url.method1568(0), "ISO-8859-1"), true);
}
JagString.opcode = -1;
return true;
}
JagString insn;
long var28;
boolean ignored;
int var30;
JagString worldName;
if (JagString.opcode == 70) {// Server message XXX
JagString message = GraphicEffectConfig.packetStream.gjstr();
if (!message.startsWith(Class117.tradereq)) {
if (!message.startsWith(Class30.chalreq)) {
if (message.startsWith(Class3_Sub13_Sub26.assistreq)) {
ignored = false;
insn = message.slice(0, message.method1551(Class155.aClass94_1970));
var28 = insn.toLong();
for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) {
if (var28 == Class114.ignoreList[var30]) {
ignored = true;
break;
}
}
if (!ignored && ~Class44_Sub1.anInt2622 == -1) {
CipherStream.addMessage(10, GroundItemWrapper.empty_string, insn, -1);
}
} else if (message.startsWith(Class3_Sub20.clan)) {
insn = message.slice(0, message.method1551(Class3_Sub20.clan));
CipherStream.addMessage(11, insn, GroundItemWrapper.empty_string, -1);
} else if (!message.startsWith(NPC.trade)) {
if (message.startsWith(Class143.assist)) {
insn = message.slice(0, message.method1551(Class143.assist));
if (Class44_Sub1.anInt2622 == 0) {
CipherStream.addMessage(13, insn, GroundItemWrapper.empty_string, -1);
}
} else if (!message.startsWith(Class27.duelstake)) {
if (!message.startsWith(ISAACCipher.duelfriendly)) {
if (message.startsWith(Class3_Sub13_Sub30.clanreq)) {
insn = message.slice(0, message.method1551(Class155.aClass94_1970));
var28 = insn.toLong();
ignored = false;
for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) {
if (~var28 == ~Class114.ignoreList[var30]) {
ignored = true;
break;
}
}
if (!ignored && Class44_Sub1.anInt2622 == 0) {
CipherStream.addMessage(16, GroundItemWrapper.empty_string,
insn, -1);
}
} else if (message.startsWith(JagString.allyreq)) {
insn = message.slice(0, message.method1551(Class155.aClass94_1970));
ignored = false;
var28 = insn.toLong();
for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) {
if (~Class114.ignoreList[var30] == ~var28) {
ignored = true;
break;
}
}
if (!ignored && Class44_Sub1.anInt2622 == 0) {
worldName = message.slice(
1 + message.method1551(Class155.aClass94_1970),
message.length() - 9);
CipherStream.addMessage(21, worldName, insn, -1);
}
} else {
CipherStream.addMessage(0, message, GroundItemWrapper.empty_string,
var0 + 82);
}
} else {
insn = message.slice(0, message.method1551(Class155.aClass94_1970));
ignored = false;
var28 = insn.toLong();
for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) {
if (~Class114.ignoreList[var30] == ~var28) {
ignored = true;
break;
}
}
if (!ignored && 0 == Class44_Sub1.anInt2622) {
CipherStream.addMessage(15, GroundItemWrapper.empty_string, insn,
-1);
}
}
} else {
ignored = false;
insn = message.slice(0, message.method1551(Class155.aClass94_1970));
var28 = insn.toLong();
for (var30 = 0; Class3_Sub28_Sub5.ignoreCount > var30; ++var30) {
if (var28 == Class114.ignoreList[var30]) {
ignored = true;
break;
}
}
if (!ignored && -1 == ~Class44_Sub1.anInt2622) {
CipherStream.addMessage(14, GroundItemWrapper.empty_string, insn, -1);
}
}
} else {
insn = message.slice(0, message.method1551(NPC.trade));
if (0 == Class44_Sub1.anInt2622) {
CipherStream.addMessage(12, insn, GroundItemWrapper.empty_string, -1);
}
}
} else {
insn = message.slice(0, message.method1551(Class155.aClass94_1970));
var28 = insn.toLong();
ignored = false;
for (var30 = 0; ~Class3_Sub28_Sub5.ignoreCount < ~var30; ++var30) {
if (Class114.ignoreList[var30] == var28) {
ignored = true;
break;
}
}
if (!ignored && Class44_Sub1.anInt2622 == 0) {
worldName = message.slice(1 + message.method1551(Class155.aClass94_1970),
message.length() + -9);
CipherStream.addMessage(8, worldName, insn, var0 ^ 82);
}
}
} else {
insn = message.slice(0, message.method1551(Class155.aClass94_1970));
var28 = insn.toLong();
ignored = false;
for (var30 = 0; ~var30 > ~Class3_Sub28_Sub5.ignoreCount; ++var30) {
if (~Class114.ignoreList[var30] == ~var28) {
ignored = true;
break;
}
}
if (!ignored && ~Class44_Sub1.anInt2622 == -1) {
CipherStream.addMessage(4, Class3_Sub6.aClass94_2285, insn, var0 + 82);
}
}
JagString.opcode = -1;
return true;
} else {
if (JagString.opcode != 104 && 121 != JagString.opcode && -98 != ~JagString.opcode
&& ~JagString.opcode != -15 && ~JagString.opcode != -203
&& ~JagString.opcode != -136 && ~JagString.opcode != -18 && JagString.opcode != 16
&& JagString.opcode != 240 && JagString.opcode != 33 && -21 != ~JagString.opcode
&& 195 != JagString.opcode && 179 != JagString.opcode) {
GZIPDecompressor.clientError(
"T1 - " + JagString.opcode + "," + Class7.anInt2166 + ","
+ PlayerBodyPart.anInt469 + " - " + Class130.packetSize,
(Throwable) null);
Class167.logoutReset((byte) 46);
return true;
} else {
Class39.parseLocationPacket((byte) -99);
JagString.opcode = -1;
return true;
}
}
}
}
}
} catch (RuntimeException var19) {
var19.printStackTrace();
throw Class44.method1067(var19, "ac.C(" + var0 + ')');
}
}
Also, if someone can enlighten me what the top level scripts are that opcode 209 calls or wtf the int opcode 159 changes is for