Examples of RSClass


Examples of smart.updater.RSClass

public class NPCNodes extends Search{

  @Override
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    for(Entry<String, ClassGen> c : classes.entrySet()){
      RSClass npcNode = data.getProperClass("NPCNode");
      //if(c.getValue()){
        ConstantPoolGen cpg = c.getValue().getConstantPool();
        for(Field f : c.getValue().getFields()){
          if(f.isStatic() && f.getType().toString().equals(npcNode.className+"[]")){
            data.addField("NPCNodes", c.getValue().getClassName()+'.'+f.getName());
View Full Code Here

Examples of smart.updater.RSClass

import smart.updater.Search.SearchResult;

public class Animation extends Search{
 
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    RSClass player = data.getProperClass("Player");
    RSClass character = data.getProperClass("Character");
        for (Entry<String, ClassGen> c : classes.entrySet()) {
            for (Method m : c.getValue().getMethods()) {
              ClassGen cg = new ClassGen(c.getValue().getJavaClass());
              ConstantPoolGen cpg = c.getValue().getConstantPool();
                MethodGen gen = new MethodGen(m, c.getValue().getClassName(), cpg);
                MethodSearcher mS = new MethodSearcher(m, cg, cpg);
              if(m.isFinal() && m.isStatic() && m.getReturnType().equals(Type.VOID) &&
                  mS.getArgCount() == 4 && mS.getTypeCount(player.className) == 1){
                    InstructionList il = gen.getInstructionList();
                    if (il == null) {
                        continue;
                    }
                    InstructionSearcher2 iS = new InstructionSearcher2(cg, m);
                    while(iS.nextFieldInstruction() != null){
                      FieldInstruction fi = (FieldInstruction)iS.current();
                      if(fi.getClassName(cpg).equals(character.className)){
                        String anim = fi.getFieldName(cpg);
                        character.addField("Animation", anim);
                        int count = 0;
                        while(iS.nextFieldInstruction() != null){
                          fi = (FieldInstruction)iS.current();
                          if((fi instanceof GETFIELD) && (fi.getClassName(cpg)+'.'+fi.getFieldName(cpg)).equals(character.className+'.'+anim)){
                            count++;
                            if(count==2){
                              while(iS.nextGETFIELD() != null){
                                GETFIELD gf = ((GETFIELD)iS.current());
                                if(gf.getClassName(cpg).equals(character.className)){
                                  character.addField("Motion", gf.getFieldName(cpg));
                                  return SearchResult.Success;
                                }
                              }
                            }
                          }
View Full Code Here

Examples of smart.updater.RSClass

public class GetPlayers extends Search{

  @Override
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    RSClass player = data.getProperClass("Player");
    for(Entry<String, ClassGen> c : classes.entrySet()){
      for(Method m : c.getValue().getMethods()){
        if(m.getName().equals("<clinit>")){
          ClassGen cg = new ClassGen(c.getValue().getJavaClass());
          ConstantPoolGen cpg = cg.getConstantPool();
View Full Code Here

Examples of smart.updater.RSClass

  public String getNodeListClass(RSClient data, HashMap<String, ClassGen> classes) {
        for (Entry<String, ClassGen> c : classes.entrySet()) {
          ClassGen cg = new ClassGen(c.getValue().getJavaClass());
          ConstantPoolGen cpg = c.getValue().getConstantPool();
          RSClass renderClass = data.getProperClass("Toolkit");
          RSClass sdToolkit = data.getProperClass("SDToolkit");
          if(sdToolkit == null || renderClass == null)
            return null;
          if(c.getValue().getSuperclassName().equals(renderClass.className) &&
              !(c.getValue().getClassName().equals(sdToolkit.className)) &&
                !(cpg.lookupUtf8("microsoft") > 0) &&
View Full Code Here

Examples of smart.updater.RSClass

        return null;
    }
 
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes){
    if(getNodeListClass(data, classes) != null){
      RSClass nodeList = data.getProperClass("NodeList");
      for(Entry<String, ClassGen> c : classes.entrySet()){
        if(c.getValue().getClassName().equals(nodeList.className)){
          for(Field fi : c.getValue().getFields()){
            if(fi.isPrivate()){
              nodeList.addField("Current", fi.getName());
              for(Field head: c.getValue().getFields()){
                if(!head.isPrivate() && head.getType().equals(fi.getType())){
                  nodeList.addField("Head", head.getName());
                  data.addClass("Node", head.getType().toString());
                  return SearchResult.Success;
                }
              }
            }
View Full Code Here

Examples of smart.updater.RSClass

public class RSInteractable extends Search{

  @Override
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    RSClass animable = data.getProperClass("Animable");
    for(Entry<String, ClassGen> c : classes.entrySet()){
      if(c.getValue().getClassName().equals(animable.className)){
        data.addClass("RSInteractable", c.getValue().getSuperclassName());
        return SearchResult.Success;
     
View Full Code Here

Examples of smart.updater.RSClass

public class LoopCycleStatus extends Search{

  @Override
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    RSField loopcycle = data.getProperField("LoopCycle");
    RSClass player = data.getProperClass("Player");
    RSClass character = data.getProperClass("Character");
    if(loopcycle == null)
      return SearchResult.Failure;
    for(Entry<String, ClassGen> c : classes.entrySet()){
      ClassGen cg = new ClassGen(c.getValue().getJavaClass());
      ConstantPoolGen cpg = cg.getConstantPool();
      for(Method m : cg.getMethods()){
        MethodGen mg = new MethodGen(m, cg.getClassName(), cpg);
        MethodSearcher mS = new MethodSearcher(m, cg, cpg);
        if(m.isStatic() && m.isFinal() && m.getReturnType().equals(Type.VOID) &&
            mS.getTypeCount(player.className) == 1){
          InstructionList il = mg.getInstructionList();
          if(il == null)
            continue;
          InstructionSearcher2 iS = new InstructionSearcher2(cg, m, il);
          if(iS.nextSIPUSH(-300) != null){
            FieldInstruction fi = iS.previousGETSTATIC();
            if(fi != null && (fi.getClassName(cpg)+'.'+fi.getFieldName(cpg)).equals(loopcycle.path)){
              fi = iS.nextPUTFIELD();
              if(fi != null && fi.getClassName(cpg).equals(character.className)){
                character.addField("LoopCycleStatus", fi.getFieldName(cpg));
                return SearchResult.Success;
              }
            }
          }
        }
View Full Code Here

Examples of smart.updater.RSClass

public class PlayerName extends Search{

  @Override
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    RSClass player = data.getProperClass("Player");
    RSField myplayer = data.getProperField("MyPlayer");
    for(Entry<String, ClassGen> c : classes.entrySet()){
      ClassGen cg = new ClassGen(c.getValue().getJavaClass());
      ConstantPoolGen cpg = cg.getConstantPool();
      int count = 0;
      for(Method m : cg.getMethods()){
        if(m.isPrivate() && m.isStatic() && m.isFinal() && m.getReturnType().equals(Type.VOID)
            && m.getArgumentTypes().length == 2){
          MethodGen mg = new MethodGen(m, cg.getClassName(), cpg);
          InstructionList il = mg.getInstructionList();
          if(il == null)
            continue;
          InstructionSearcher2 iS = new InstructionSearcher2(cg, m, il);
          if(iS.nextSIPUSH(3326) != null){
            FieldInstruction fi = iS.nextGETFIELD();
            FieldInstruction tester = iS.previousGETSTATIC();
            if((tester.getClassName(cpg)+'.'+tester.getFieldName(cpg)).equals(myplayer.path)){
              player.addField("GetLevel", fi.getFieldName(cpg));
              count++;
              if(count==2)
                return SearchResult.Success;
            }
          }
          iS = new InstructionSearcher2(cg, m, il);
          if(iS.nextSIPUSH(5015) != null){
            FieldInstruction fi = iS.nextGETSTATIC();
            if(fi != null && (fi.getClassName(cpg)+'.'+fi.getFieldName(cpg)).equals(myplayer.path)){
              fi = iS.nextGETFIELD();
              if(fi != null && fi.getType(cpg).equals(Type.STRING)){
                player.addField("GetName", fi.getFieldName(cpg));
                count++;
                if(count==2)
                  return SearchResult.Success;
             
            }
View Full Code Here

Examples of smart.updater.RSClass

    }
    return null;
  }
  @Override
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    RSClass player = data.getProperClass("Player");
    RSClass playerDef = getPlayerDefClass(data, classes);
    if(playerDef == null)
      return SearchResult.Failure;
    for(Entry<String, ClassGen> c : classes.entrySet()){
      if(c.getValue().getClassName().equals(player.className)){
        for(Field f : c.getValue().getFields()){
View Full Code Here

Examples of smart.updater.RSClass

public class HPRatio extends Search{

  @Override
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    RSClass character = data.getProperClass("Character");
    for(Entry<String, ClassGen> c : classes.entrySet()){
      ClassGen cg = new ClassGen(c.getValue().getJavaClass());
      ConstantPoolGen cpg = cg.getConstantPool();
      for(Method m : cg.getMethods()){
        if(m.isStatic() && m.isFinal() && m.getReturnType().equals(Type.VOID) && m.getArgumentTypes().length == 7){
          MethodGen mg = new MethodGen(m, cg.getClassName(), cpg);
          InstructionList il = mg.getInstructionList();
          if(il == null)
            continue;
          InstructionSearcher2 iS = new InstructionSearcher2(cg, m, il);
          if(iS.nextSIPUSH(255) != null){
            FieldInstruction fi = iS.previousGETFIELD();
            if(fi != null && fi.getClassName(cpg).equals(character.className)){
              fi = iS.nextGETFIELD();
              if(fi != null && fi.getClassName(cpg).equals(character.className)){
                character.addField("HPRatio", fi.getFieldName(cpg));
                return SearchResult.Success;
              }
            }
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.