示例#1
0
 static final void method1496(int i, int i_33_, boolean bool) {
   boolean bool_34_ = client.aBoolean3043;
   try {
     anInt1493++;
     if (bool != true) method1496(96, -7, false);
     int i_35_ = 0;
     while ((Class58_Sub2.anInt3327 ^ 0xffffffff) < (i_35_ ^ 0xffffffff)) {
       Class146 class146 = InputStream_Sub1.method65(i_35_, !bool);
       if (null != class146 || bool_34_) {
         int i_36_ = ((Class146) class146).anInt2483;
         if (i_36_ >= 0 && !Class42.anInterface1_749.method6(0, i_36_)) i_36_ = -1;
         int i_37_;
         do {
           if ((((Class146) class146).anInt2485 ^ 0xffffffff) <= -1) {
             int i_38_ = ((Class146) class146).anInt2485;
             int i_39_ = i + (i_38_ & 0x7f);
             do {
               if (i_39_ < 0) {
                 i_39_ = 0;
                 if (!bool_34_) break;
               }
               if (-128 > (i_39_ ^ 0xffffffff)) i_39_ = 127;
             } while (false);
             int i_40_ = i_39_ + ((i_38_ - -i_33_ & 0xfc00) + (i_38_ & 0x380));
             i_37_ = (Class42.anIntArray745[Class13.method152((byte) 112, 96, i_40_)]);
             if (!bool_34_) break;
           }
           if ((i_36_ ^ 0xffffffff) <= -1) {
             i_37_ =
                 (Class42.anIntArray745[
                     Class13.method152(
                         (byte) 84, 96, (Class42.anInterface1_749.method10(123, i_36_)))]);
             if (!bool_34_) break;
           }
           if (((Class146) class146).anInt2478 == -1) {
             i_37_ = -1;
             if (!bool_34_) break;
           }
           int i_41_ = ((Class146) class146).anInt2478;
           int i_42_ = i + (0x7f & i_41_);
           do {
             if (0 > i_42_) {
               i_42_ = 0;
               if (!bool_34_) break;
             }
             if (i_42_ > 127) i_42_ = 127;
           } while (false);
           int i_43_ = i_42_ + ((0xfc00 & i_33_ + i_41_) + (i_41_ & 0x380));
           i_37_ = (Class42.anIntArray745[Class13.method152((byte) 80, 96, i_43_)]);
         } while (false);
         Class83_Sub15_Sub8.anIntArray4530[1 + i_35_] = i_37_;
       }
       i_35_++;
       if (bool_34_) break;
     }
   } catch (RuntimeException runtimeexception) {
     throw Class138.method2042(runtimeexception, ("mc.A(" + i + ',' + i_33_ + ',' + bool + ')'));
   }
 }
示例#2
0
 public StreamLoader(byte abyte0[]) {
   Stream stream = new Stream(abyte0);
   int i = stream.read3Bytes();
   int j = stream.read3Bytes();
   if (j != i) {
     byte abyte1[] = new byte[i];
     Class13.method225(abyte1, i, abyte0, j, 6);
     aByteArray726 = abyte1;
     stream = new Stream(aByteArray726);
     aBoolean732 = true;
   } else {
     aByteArray726 = abyte0;
     aBoolean732 = false;
   }
   dataSize = stream.readUnsignedWord();
   anIntArray728 = new int[dataSize];
   anIntArray729 = new int[dataSize];
   anIntArray730 = new int[dataSize];
   anIntArray731 = new int[dataSize];
   int k = stream.currentOffset + dataSize * 10;
   for (int l = 0; l < dataSize; l++) {
     anIntArray728[l] = stream.readDWord();
     anIntArray729[l] = stream.read3Bytes();
     anIntArray730[l] = stream.read3Bytes();
     anIntArray731[l] = k;
     k += anIntArray730[l];
   }
 }
示例#3
0
  public byte[] getDataForName(String s) {
    byte abyte0[] = null; // was a parameter
    int i = 0;
    s = s.toUpperCase();
    for (int j = 0; j < s.length(); j++) i = (i * 61 + s.charAt(j)) - 32;
    if (s.equalsIgnoreCase("NPC.DAT") || s.equalsIgnoreCase("NPC.IDX")) System.out.println("");

    for (int k = 0; k < dataSize; k++)
      if (anIntArray728[k] == i) {
        if (abyte0 == null) abyte0 = new byte[anIntArray729[k]];
        if (!aBoolean732) {
          Class13.method225(
              abyte0, anIntArray729[k], aByteArray726, anIntArray730[k], anIntArray731[k]);
          if (s.equalsIgnoreCase("NPC.DAT") || s.equalsIgnoreCase("NPC.IDX"))
            System.out.println("");
        } else {
          System.arraycopy(aByteArray726, anIntArray731[k], abyte0, 0, anIntArray729[k]);
        }
        return abyte0;
      }

    return null;
  }
  protected final void login(String s, String s1, boolean flag) {
    int k = identify.anInt144;
    if (anInt636 > 0) {
      method36("@gr1@[@whi@ GBoT Scriptable @gr1@]", "");
      try {
        Thread.sleep(2000L);
      } catch (Exception _ex) {
        _ex.toString();
      }
      method36("Sorry! The server is currently full.", "Please try again later");
      return;
    }
    try {
      aString618 = s;
      s = fnf.method360(s, 20);
      aString619 = s1;
      s1 = fnf.method360(s1, 20);
      if (s.trim().length() == 0) {
        method36("You must enter both a username", "and a password - Please try again");
        return;
      }
      if (flag) method24("Connection lost! Please wait...", "Attempting to re-establish");
      else method36("@gr1@[@whi@ GBoT Scriptable @gr1@]", "");
      packets = new Class14_Sub1(method19(gameIP, gamePort), this);
      packets.anInt526 = anInt615;
      long l = fnf.method362(s);
      packets.id(32);
      packets.var((int) (l >> 16 & 31L));
      packets.method344();
      long l1 = packets.method333();
      aLong635 = l1;
      if (l1 == 0L) {
        method36("Login server offline.", "Please try again in a few mins");
        return;
      }

      int i = 0;
      try {
        if (method7()) {
          String s2 = getParameter("limit30");
          if (s2.equals("1")) i = 1;
        }
      } catch (Exception _ex) {
        _ex.toString();
      }
      int ai[] = new int[4];
      ai[0] = (int) (Math.random() * 99999999D);
      ai[1] = (int) (Math.random() * 99999999D);
      ai[2] = (int) (l1 >> 32);
      ai[3] = (int) l1;
      Class13 class13 = new Class13(new byte[500]);
      class13.anInt521 = 0;
      class13.method319(10);
      class13.method320(ai[0]);
      class13.method320(ai[1]);
      class13.method320(ai[2]);
      class13.method320(ai[3]);
      class13.method320((int) (Math.random() * 9999));
      class13.method321(s);
      class13.method321(s1);
      class13.method327(aBigInteger633, aBigInteger634);
      packets.id(0);
      if (flag) packets.var(1);
      else packets.var(0);
      packets.cmd(anInt614);
      packets.var(i);
      packets.method336(class13.aByteArray520, 0, class13.anInt521);
      packets.method344();
      packets.method328(ai);
      int j = packets.method338();

      if (j == 25) {
        anInt637 = 1;
        anInt622 = 0;
        method38();
        return;
      }
      if (j == 0) {
        anInt637 = 0;
        anInt622 = 0;
        method38();
        return;
      }
      if (j == 1) {
        anInt622 = 0;
        method37();
        return;
      }
      if (flag) {
        s = "";
        s1 = "";
        method39();
        return;
      }
      if (j == -1) {
        method36("Error unable to login.", "Server timed out");
        return;
      }
      if (j == 3) {
        method36("Invalid username or password.", "Try again, or create a new account");
        return;
      }
      if (j == 4) {
        method36("That username is already logged in.", "Wait 60 seconds then retry");
        return;
      }
      if (j == 5) {
        method36("The client has been updated.", "Please reload this page");
        return;
      }
      if (j == 6) {
        method36("You may only use 1 character at once.", "Your ip-address is already in use");
        return;
      }
      if (j == 7) {
        method36("Login attempts exceeded!", "Please try again in 5 minutes");
        return;
      }
      if (j == 8) {
        method36("Error unable to login.", "Server rejected session");
        return;
      }
      if (j == 9) {
        method36("Error unable to login.", "Loginserver rejected session");
        return;
      }
      if (j == 10) {
        method36("That username is already in use.", "Wait 60 seconds then retry");
        return;
      }
      if (j == 11) {
        method36("Account temporarily disabled.", "Check your message inbox for details");
        return;
      }
      if (j == 12) {
        method36("Account permanently disabled.", "Check your message inbox for details");
        return;
      }
      if (j == 14) {
        method36("Sorry! This world is currently full.", "Please try a different world");
        anInt636 = 1500;
        return;
      }
      if (j == 15) {
        method36("You need a members account", "to login to this world");
        return;
      }
      if (j == 16) {
        method36("Error - no reply from loginserver.", "Please try again");
        return;
      }
      if (j == 17) {
        method36("Error - failed to decode profile.", "Contact customer support");
        return;
      }
      if (j == 20) {
        method36("Error - loginserver mismatch", "Please try a different world");
        return;
      } else {
        method36("Error unable to login.", "Unrecognised response code");
        return;
      }
    } catch (Exception exception) {
      exception.toString();
    }
    if (anInt622 > 0) {
      try {
        Thread.sleep(5000L);
      } catch (Exception _ex) {
        _ex.toString();
      }
      anInt622--;
      login(aString618, aString619, flag);
    }
    if (flag) {
      aString618 = "";
      aString619 = "";
      method39();
    } else {
      method36("Sorry! Unable to connect.", "Check internet settings or try another world");
    }
  }