1. //==================================================//
  2. // Patch Functions wrapping over ExtendBox function //
  3. //==================================================//
  4. function ExtendChatBox() {
  5. return ExtendBox(3);
  6. }
  7. function ExtendChatRoomBox() {
  8. return ExtendBox(0);
  9. }
  10. function ExtendPMBox() {
  11. return ExtendBox(2);
  12. }
  13. //##############################################################
  14. //# Purpose: Change the Box Limit from 70 (0x46) to 234 (0xEA) #
  15. //##############################################################
  16. function ExtendBox(index) {
  17. //Step 1 - Find the Box Limiter Code - Atleast 4 matches should be there
  18. // MOV DWORD PTR DS:[EAX+byte], 0x46
  19. var offsets = exe.findCodes(" C7 40 AB 46 00 00 00", PTYPE_HEX, true, "\xAB");
  20. // new client detected, so!
  21. if (offsets.length < 4)
  22. offsets = exe.findCodes(" C7 80 AB AB AB AB 46 00 00 00", PTYPE_HEX, true, "\xAB");
  23. if (offsets.length < 4)
  24. return "Failed in Step 1";
  25. //Step 2 - Change the limit
  26. // 0 = Chat Room
  27. // 1 = Unknown
  28. // 2 = Private Message
  29. // 3 = Chat Box
  30. exe.replace(offsets[index] + 3, "EA", PTYPE_HEX);
  31. return true;
  32. }

ExtendBox.qs