|
4 | 4 | import org.runejs.client.cache.media.gameInterface.GameInterface;
|
5 | 5 | import org.runejs.client.cache.media.gameInterface.GameInterfaceArea;
|
6 | 6 | import org.runejs.client.cache.media.gameInterface.GameInterfaceType;
|
7 |
| -import org.runejs.client.chat.ChatColorEffect; |
8 |
| -import org.runejs.client.chat.ChatShapeEffect; |
9 | 7 | import org.runejs.client.frame.Minimap;
|
10 | 8 | import org.runejs.client.frame.ScreenController;
|
11 | 9 | import org.runejs.client.frame.ScreenMode;
|
12 |
| -import org.runejs.client.frame.console.Console; |
13 | 10 | import org.runejs.client.frame.tab.parts.TabParts;
|
14 | 11 | import org.runejs.client.input.MouseHandler;
|
15 | 12 | import org.runejs.client.io.Buffer;
|
16 | 13 | import org.runejs.client.media.Rasterizer;
|
17 | 14 | import org.runejs.client.media.renderable.Item;
|
18 | 15 | import org.runejs.client.media.renderable.Model;
|
19 |
| -import org.runejs.client.message.outbound.chat.*; |
20 |
| -import org.runejs.client.message.outbound.widget.input.*; |
21 | 16 | import org.runejs.client.net.UpdateServer;
|
22 | 17 | import org.runejs.client.node.HashTable;
|
23 | 18 | import org.runejs.client.node.NodeCache;
|
|
34 | 29 | import org.runejs.client.media.renderable.GameObject;
|
35 | 30 | import org.runejs.client.media.renderable.Renderable;
|
36 | 31 | import org.runejs.client.net.ISAAC;
|
37 |
| -import org.runejs.client.net.OutgoingPackets; |
38 | 32 | import org.runejs.client.net.PacketBuffer;
|
39 | 33 | import org.runejs.client.scene.*;
|
40 | 34 | import org.runejs.client.scene.camera.CameraRotation;
|
|
44 | 38 | import org.runejs.client.util.BitUtils;
|
45 | 39 | import org.runejs.client.util.Signlink;
|
46 | 40 | import org.runejs.client.util.SignlinkNode;
|
47 |
| -import org.runejs.client.util.TextUtils; |
48 | 41 | import org.runejs.client.cache.def.*;
|
49 | 42 | import org.runejs.client.media.renderable.actor.*;
|
50 | 43 | import org.runejs.client.scene.tile.*;
|
@@ -581,21 +574,6 @@ public static String method204(int arg0) {
|
581 | 574 | return (0xff & arg0 >> 24) + Native.period + ((arg0 & 0xffca88) >> 16) + Native.period + ((0xfff8 & arg0) >> 8) + Native.period + (0xff & arg0);
|
582 | 575 | }
|
583 | 576 |
|
584 |
| - public static void method838(long arg1) { |
585 |
| - for (int i = 0; i < anInt1008; i++) { |
586 |
| - if (Player.ignores[i] == arg1) { |
587 |
| - GameInterface.redrawTabArea = true; |
588 |
| - anInt1008--; |
589 |
| - for (int i_16_ = i; anInt1008 > i_16_; i_16_++) |
590 |
| - Player.ignores[i_16_] = Player.ignores[1 + i_16_]; |
591 |
| - |
592 |
| - OutgoingPackets.sendMessage( |
593 |
| - new ModifySocialListOutboundMessage(arg1, ModifySocialListOutboundMessage.SocialList.IGNORE, ModifySocialListOutboundMessage.SocialListAction.REMOVE)); |
594 |
| - break; |
595 |
| - } |
596 |
| - } |
597 |
| - } |
598 |
| - |
599 | 577 | public static ImageRGB[] method526(CacheArchive arg0, String arg2, String arg3) {
|
600 | 578 | int i = arg0.getHash(arg2);
|
601 | 579 | int i_4_ = arg0.method179(i, arg3);
|
@@ -714,38 +692,6 @@ else if (lightness > 126)
|
714 | 692 | return (0xff80 & hsl) + lightness;
|
715 | 693 | }
|
716 | 694 |
|
717 |
| - public static void addFriend(long name) { |
718 |
| - if(name != 0L) { |
719 |
| - if(Player.friendsCount >= 100 && Class44.anInt1049 != 1 || Player.friendsCount >= 200) { |
720 |
| - ChatBox.addChatMessage("", English.friendsListIsFull, 0); |
721 |
| - } else { |
722 |
| - String username = TextUtils.formatName(TextUtils.longToName(name)); |
723 |
| - for(int i = 0; Player.friendsCount > i; i++) { |
724 |
| - if(Class59.friends[i] == name) { |
725 |
| - ChatBox.addChatMessage("", username + English.isAlreadyOnYourFriendList, 0); |
726 |
| - return; |
727 |
| - } |
728 |
| - } |
729 |
| - for(int i = 0; anInt1008 > i; i++) { |
730 |
| - if(Player.ignores[i] == name) { |
731 |
| - ChatBox.addChatMessage("", English.pleaseRemove + username + English.suffixFromYourIgnoreListFirst, 0); |
732 |
| - return; |
733 |
| - } |
734 |
| - } |
735 |
| - if(!username.equals(Player.localPlayer.playerName)) { |
736 |
| - Player.friendUsernames[Player.friendsCount] = username; |
737 |
| - Class59.friends[Player.friendsCount] = name; |
738 |
| - Player.friendWorlds[Player.friendsCount] = 0; |
739 |
| - Player.friendsCount++; |
740 |
| - GameInterface.redrawTabArea = true; |
741 |
| - |
742 |
| - OutgoingPackets.sendMessage( |
743 |
| - new ModifySocialListOutboundMessage(name, ModifySocialListOutboundMessage.SocialList.FRIEND, ModifySocialListOutboundMessage.SocialListAction.ADD)); |
744 |
| - } |
745 |
| - } |
746 |
| - } |
747 |
| - } |
748 |
| - |
749 | 695 | public static void method1013() {
|
750 | 696 | int lasthash = -1;
|
751 | 697 | if (MovedStatics.itemSelected == 0 && Main.widgetSelected == 0) {
|
@@ -1354,214 +1300,7 @@ public static void drawMenu(int xOffSet, int yOffSet) {
|
1354 | 1300 | }
|
1355 | 1301 | }
|
1356 | 1302 |
|
1357 |
| - public static void manageTextInputs() { |
1358 |
| - while(method416()) { |
1359 |
| - if(ItemDefinition.anInt2854 == 28) { |
1360 |
| - break; |
1361 |
| - } |
1362 |
| - if(Console.console.consoleOpen) { |
1363 |
| - Console.console.handleInput(); |
1364 |
| - break; |
1365 |
| - } |
1366 |
| - if(GameInterface.gameScreenInterfaceId != -1 && HuffmanEncoding.reportAbuseInterfaceID == GameInterface.gameScreenInterfaceId) { |
1367 |
| - if(ItemDefinition.anInt2854 == 85 && Native.reportedName.length() > 0) |
1368 |
| - Native.reportedName = Native.reportedName.substring(0, -1 + Native.reportedName.length()); |
1369 |
| - if((Class40_Sub5_Sub15.method735(Class59.anInt1388) || Class59.anInt1388 == 32) && Native.reportedName.length() < 12) |
1370 |
| - Native.reportedName = Native.reportedName + (char) Class59.anInt1388; |
1371 |
| - } else if(ChatBox.messagePromptRaised) { |
1372 |
| - if(ItemDefinition.anInt2854 == 85 && ChatBox.chatMessage.length() > 0) { |
1373 |
| - ChatBox.chatMessage = ChatBox.chatMessage.substring(0, -1 + ChatBox.chatMessage.length()); |
1374 |
| - ChatBox.redrawChatbox = true; |
1375 |
| - } |
1376 |
| - if(Player.method793(Class59.anInt1388) && ChatBox.chatMessage.length() < 80) { |
1377 |
| - ChatBox.chatMessage = ChatBox.chatMessage + (char) Class59.anInt1388; |
1378 |
| - ChatBox.redrawChatbox = true; |
1379 |
| - } |
1380 |
| - if(ItemDefinition.anInt2854 == 84) { |
1381 |
| - ChatBox.messagePromptRaised = false; |
1382 |
| - ChatBox.redrawChatbox = true; |
1383 |
| - if(Class37.anInt876 == 1) { |
1384 |
| - long l = RSString.nameToLong(ChatBox.chatMessage); |
1385 |
| - addFriend(l); |
1386 |
| - } |
1387 |
| - if(Class37.anInt876 == 2 && Player.friendsCount > 0) { |
1388 |
| - long l = RSString.nameToLong(ChatBox.chatMessage); |
1389 |
| - GameInterface.removeFriend(l); |
1390 |
| - } |
1391 |
| - if(Class37.anInt876 == 3 && ChatBox.chatMessage.length() > 0) { |
1392 |
| - // private messages |
1393 |
| - ChatBox.filterInput(); |
1394 |
| - |
1395 |
| - OutgoingPackets.sendMessage(new SendPrivateMessageOutboundMessage(PacketBuffer.aLong2241, ChatBox.chatboxInput)); |
1396 |
| - |
1397 |
| - if(ChatBox.privateChatMode == 2) { |
1398 |
| - ChatBox.privateChatMode = 1; |
1399 |
| - redrawChatbox = true; |
1400 |
| - |
1401 |
| - OutgoingPackets.sendMessage(new SetChatOptionsOutboundMessage( |
1402 |
| - ChatBox.publicChatMode, |
1403 |
| - ChatBox.privateChatMode, |
1404 |
| - ChatBox.tradeMode |
1405 |
| - )); |
1406 |
| - } |
1407 |
| - } |
1408 |
| - if(Class37.anInt876 == 4 && anInt1008 < 100) { |
1409 |
| - long l = RSString.nameToLong(ChatBox.chatMessage); |
1410 |
| - Class17.method275(l); |
1411 |
| - } |
1412 |
| - if(Class37.anInt876 == 5 && anInt1008 > 0) { |
1413 |
| - long l = RSString.nameToLong(ChatBox.chatMessage); |
1414 |
| - method838(l); |
1415 |
| - } |
1416 |
| - } |
1417 |
| - } else if(ChatBox.inputType == 1) { |
1418 |
| - if(ItemDefinition.anInt2854 == 85 && ChatBox.inputMessage.length() > 0) { |
1419 |
| - ChatBox.inputMessage = ChatBox.inputMessage.substring(0, ChatBox.inputMessage.length() - 1); |
1420 |
| - ChatBox.redrawChatbox = true; |
1421 |
| - } |
1422 |
| - if(HuffmanEncoding.method1027(Class59.anInt1388) && ChatBox.inputMessage.length() < 10) { |
1423 |
| - ChatBox.inputMessage = ChatBox.inputMessage + (char) Class59.anInt1388; |
1424 |
| - ChatBox.redrawChatbox = true; |
1425 |
| - } |
1426 |
| - if(ItemDefinition.anInt2854 == 84) { |
1427 |
| - if(ChatBox.inputMessage.length() > 0) { |
1428 |
| - int inputValue = 0; |
1429 |
| - try { |
1430 |
| - inputValue = Integer.parseInt(ChatBox.inputMessage); |
1431 |
| - } catch(Exception _ex) { |
1432 |
| - /* empty */ |
1433 |
| - } |
1434 |
| - |
1435 |
| - OutgoingPackets.sendMessage(new SubmitChatboxWidgetNumericInputOutboundMessage(inputValue)); |
1436 |
| - } |
1437 |
| - ChatBox.redrawChatbox = true; |
1438 |
| - ChatBox.inputType = 0; |
1439 |
| - } |
1440 |
| - } else if(ChatBox.inputType == 2) { |
1441 |
| - if(ItemDefinition.anInt2854 == 85 && ChatBox.inputMessage.length() > 0) { |
1442 |
| - ChatBox.inputMessage = ChatBox.inputMessage.substring(0, -1 + ChatBox.inputMessage.length()); |
1443 |
| - ChatBox.redrawChatbox = true; |
1444 |
| - } |
1445 |
| - if((Class40_Sub5_Sub15.method735(Class59.anInt1388) || Class59.anInt1388 == 32) && ChatBox.inputMessage.length() < 12) { |
1446 |
| - ChatBox.inputMessage = ChatBox.inputMessage + (char) Class59.anInt1388; |
1447 |
| - ChatBox.redrawChatbox = true; |
1448 |
| - } |
1449 |
| - if(ItemDefinition.anInt2854 == 84) { |
1450 |
| - if(ChatBox.inputMessage.length() > 0) { |
1451 |
| - long name = RSString.nameToLong(ChatBox.inputMessage); |
1452 |
| - |
1453 |
| - OutgoingPackets.sendMessage(new SubmitChatboxWidgetNameInputOutboundMessage(name)); |
1454 |
| - } |
1455 |
| - ChatBox.inputType = 0; |
1456 |
| - ChatBox.redrawChatbox = true; |
1457 |
| - } |
1458 |
| - } else if(ChatBox.inputType == 3) { |
1459 |
| - if(ItemDefinition.anInt2854 == 85 && ChatBox.inputMessage.length() > 0) { |
1460 |
| - ChatBox.inputMessage = ChatBox.inputMessage.substring(0, ChatBox.inputMessage.length() - 10); |
1461 |
| - ChatBox.redrawChatbox = true; |
1462 |
| - } |
1463 |
| - if(Player.method793(Class59.anInt1388) && ChatBox.inputMessage.length() < 40) { |
1464 |
| - ChatBox.inputMessage = ChatBox.inputMessage + (char) Class59.anInt1388; |
1465 |
| - ChatBox.redrawChatbox = true; |
1466 |
| - } |
1467 |
| - } else if(GameInterface.chatboxInterfaceId == -1 && GameInterface.fullscreenInterfaceId == -1) { |
1468 |
| - if(ItemDefinition.anInt2854 == 85 && ChatBox.chatboxInput.length() > 0) { |
1469 |
| - ChatBox.chatboxInput = ChatBox.chatboxInput.substring(0, ChatBox.chatboxInput.length() - 1); |
1470 |
| - ChatBox.redrawChatbox = true; |
1471 |
| - } |
1472 |
| - if(Player.method793(Class59.anInt1388) && ChatBox.chatboxInput.length() < 80) { |
1473 |
| - ChatBox.chatboxInput = ChatBox.chatboxInput + (char) Class59.anInt1388; |
1474 |
| - ChatBox.redrawChatbox = true; |
1475 |
| - } |
1476 |
| - if(ItemDefinition.anInt2854 == 84 && ChatBox.chatboxInput.length() > 0) { |
1477 |
| - if(InteractiveObject.playerRights > 1) { |
1478 |
| - if(ChatBox.chatboxInput.equals(English.commandClientDrop)) |
1479 |
| - Class59.dropClient(); |
1480 |
| - if(ChatBox.chatboxInput.equals(English.commandFpson)) { |
1481 |
| - InteractiveObject.showFps = true; |
1482 |
| - ChatBox.inputType = 3; |
1483 |
| - } |
1484 |
| - if(ChatBox.chatboxInput.startsWith("::region")) { |
1485 |
| - for(int qq = 0; qq < 469; qq++) { |
1486 |
| - if(GameInterface.decodeGameInterface(qq)) { |
1487 |
| - GameInterface[] gameInterfaces = GameInterface.cachedInterfaces[qq]; |
1488 |
| - for(int y = 0; gameInterfaces.length > y; y++) { |
1489 |
| - GameInterface gameInterface = gameInterfaces[y]; |
1490 |
| - if(gameInterface.disabledText != null) { |
1491 |
| - String text = gameInterface.disabledText.toString().toLowerCase(); |
1492 |
| - if(gameInterface.disabledText.toString().toLowerCase().contains("bank")) { |
1493 |
| - System.out.println(qq + " contains " + text); |
1494 |
| - } |
1495 |
| - } |
1496 |
| - } |
1497 |
| - } |
1498 |
| - } |
1499 |
| - } |
1500 |
| - |
1501 |
| - if(ChatBox.chatboxInput.equals(Native.cmd_fpsoff)) |
1502 |
| - InteractiveObject.showFps = false; |
1503 |
| - if(ChatBox.chatboxInput.equals(English.commandNoclip)) { |
1504 |
| - for(int i = 0; i < 4; i++) { |
1505 |
| - for(int i_9_ = 1; i_9_ < 103; i_9_++) { |
1506 |
| - for(int i_10_ = 1; i_10_ < 103; i_10_++) |
1507 |
| - Landscape.currentCollisionMap[i].clippingData[i_9_][i_10_] = 0; |
1508 |
| - } |
1509 |
| - } |
1510 |
| - } |
1511 |
| - if(ChatBox.chatboxInput.equals(English.commandErrorTest) && Main.modewhere == 2) |
1512 |
| - throw new RuntimeException(); |
1513 |
| - if(ChatBox.chatboxInput.equals(Native.cmd_hiddenbuttontest)) |
1514 |
| - PacketBuffer.hiddenButtonTest = true; |
1515 |
| - } |
1516 |
| - if(ChatBox.chatboxInput.startsWith(Native.cmd_prefix)) { |
1517 |
| - // remove the :: prefix |
1518 |
| - String command = ChatBox.chatboxInput.substring(2); |
1519 |
| - |
1520 |
| - OutgoingPackets.sendMessage(new ChatCommandOutboundMessage(command)); |
1521 |
| - } else { |
1522 |
| - ChatColorEffect chatColorEffect = ChatColorEffect.fromString(ChatBox.chatboxInput.toLowerCase()); |
1523 |
| - |
1524 |
| - if (chatColorEffect != null) { |
1525 |
| - ChatBox.chatboxInput = ChatBox.chatboxInput.substring(chatColorEffect.getPrefixLength()); |
1526 |
| - } |
1527 |
| - |
1528 |
| - ChatShapeEffect chatShapeEffect = ChatShapeEffect.fromString(ChatBox.chatboxInput.toLowerCase()); |
1529 |
| - |
1530 |
| - if (chatShapeEffect != null) { |
1531 |
| - ChatBox.chatboxInput = ChatBox.chatboxInput.substring(chatShapeEffect.getPrefixLength()); |
1532 |
| - } |
1533 |
| - |
1534 |
| - ChatBox.filterInput(); |
1535 |
| - |
1536 |
| - SendChatMessageOutboundMessage message = new SendChatMessageOutboundMessage( |
1537 |
| - chatColorEffect != null ? chatColorEffect : ChatColorEffect.YELLOW, |
1538 |
| - chatShapeEffect != null ? chatShapeEffect : ChatShapeEffect.NONE, |
1539 |
| - ChatBox.chatboxInput |
1540 |
| - ); |
1541 |
| - |
1542 |
| - OutgoingPackets.sendMessage(message); |
1543 |
| - |
1544 |
| - // I guess resets from 'off' to... 'friends'? public? |
1545 |
| - if(ChatBox.publicChatMode == 2) { |
1546 |
| - redrawChatbox = true; |
1547 |
| - ChatBox.publicChatMode = 3; |
1548 |
| - |
1549 |
| - OutgoingPackets.sendMessage(new SetChatOptionsOutboundMessage( |
1550 |
| - ChatBox.publicChatMode, |
1551 |
| - ChatBox.privateChatMode, |
1552 |
| - ChatBox.tradeMode |
1553 |
| - )); |
1554 |
| - } |
1555 |
| - } |
1556 |
| - ChatBox.redrawChatbox = true; |
1557 |
| - ChatBox.chatboxInput = ""; |
1558 |
| - } |
1559 |
| - } |
1560 |
| - } |
1561 |
| - |
1562 |
| - } |
1563 |
| - |
1564 |
| - private static char VALID_CHARACTERS[] = {' ', 'e', 't', 'a', 'o', 'i', 'h', 'n', 's', 'r', 'd', 'l', 'u', 'm', 'w', |
| 1303 | + private static char VALID_CHARACTERS[] = {' ', 'e', 't', 'a', 'o', 'i', 'h', 'n', 's', 'r', 'd', 'l', 'u', 'm', 'w', |
1565 | 1304 | 'c', 'y', 'f', 'g', 'p', 'b', 'v', 'k', 'x', 'j', 'q', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8',
|
1566 | 1305 | '9', ' ', '!', '?', '.', ',', ':', ';', '(', ')', '-', '&', '*', '\\', '\'', '@', '#', '+', '=', '\243',
|
1567 | 1306 | '$', '%', '"', '[', ']'};
|
|
0 commit comments