Package smart.updater

Examples of smart.updater.RSClass


                    if (e.hasNext()) {
                        InstructionHandle[] handles = (InstructionHandle[]) e.next();
                        String sdviewport = ((GETFIELD)handles[3].getInstruction()).getClassName(cpg);
                        if (!sdviewport.equals(c.getKey())) continue;
                        data.addClass("Viewport",classes.get(sdviewport).getSuperclassName());
                        RSClass sdviewportClass = data.addClass("SDViewport", sdviewport);
                        sdviewportClass.addField("xOff", ((GETFIELD)handles[3].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("xX", ((GETFIELD)handles[5].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("xY", ((GETFIELD)handles[9].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("xZ", ((GETFIELD)handles[14].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("yOff", ((GETFIELD)handles[25].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("yX", ((GETFIELD)handles[27].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("yY", ((GETFIELD)handles[31].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("yZ", ((GETFIELD)handles[36].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("zOff", ((GETFIELD)handles[47].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("zX", ((GETFIELD)handles[49].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("zY", ((GETFIELD)handles[53].getInstruction()).getFieldName(cpg));
                        sdviewportClass.addField("zZ", ((GETFIELD)handles[58].getInstruction()).getFieldName(cpg));
                        return SearchResult.Success;
                    }
                }
            }
        }
View Full Code Here


                    Iterator e = f.search("GETSTATIC GETFIELD ICONST IALOAD LDC ISHR ISTORE GETSTATIC GETFIELD ICONST IALOAD LDC");
                    if (e.hasNext()) {
                        InstructionHandle[] handles = (InstructionHandle[]) e.next();
                        String queueX = ((GETFIELD) handles[8].getInstruction()).getFieldName(cpg);
                        String queueY = ((GETFIELD) handles[1].getInstruction()).getFieldName(cpg);
                        RSClass characterClass = data.getProperClass("Character");
                        characterClass.addField("WalkQueueX", queueX);
                        characterClass.addField("WalkQueueY", queueY);
                        return SearchResult.Success;
                    }
                }
            }
        }
View Full Code Here

              InstructionSearcher iS = new InstructionSearcher(il, cpg);
              iS.nextGETSTATIC();
              iS.nextGETSTATIC();
              String npcIndexArray = ((GETSTATIC)iS.current()).getClassName(cpg)+'.'+((GETSTATIC)iS.current()).getFieldName(cpg);
              data.addField("NPCIndexArray", npcIndexArray);
              RSClass character = data.getProperClass("Character");
              character.addField("GetHitDamges", getHits);
              return SearchResult.Success;
            }
          }
        }
      }
View Full Code Here

public class MenuOption extends Search{


  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    RSClass nodeClass = data.getProperClass("Node");
    for(Entry<String, ClassGen> c : classes.entrySet()){
      ClassGen cg = new ClassGen(c.getValue().getJavaClass());
      ConstantPoolGen cpg = cg.getConstantPool();
      if(c.getValue().getSuperclassName().equals(nodeClass.className) && c.getValue().isFinal()){
        for(Method m : c.getValue().getMethods()){
          MethodSearcher mS = new MethodSearcher(m, cg, cpg);
          if(m.getName().equals("<init>") && mS.getArgCount() == 10 &&
              mS.getTypeCount("int") == 5 && mS.getTypeCount("java.lang.String")==2){
            MethodGen mg = new MethodGen(m, cg.getClassName(), cpg);
            RSClass menu = data.addClass("Menu", c.getValue().getClassName());
            int found = 0;
            InstructionSearcher iS = new InstructionSearcher(mg.getInstructionList(), cpg);
            Instruction i;
            FieldInstruction option;
            FieldInstruction action;
            while(iS.next() != null){
              i = iS.current();
              if(i instanceof ALOAD){
                if(((ALOAD)i).getIndex() == 2){
                  option = iS.nextFieldInstruction();
                  menu.addField("Option", option.getFieldName(cpg));
                  found++;
                  if(found==2)
                    return SearchResult.Success;
                }
                if(((ALOAD)i).getIndex() == 1){
                  option = iS.nextFieldInstruction();
                  menu.addField("Action", option.getFieldName(cpg));
                  found++;
                  if(found==2)
                    return SearchResult.Success;
                }
              }
View Full Code Here

public class NPC extends Search{

  @Override
  public SearchResult run(RSClient data, HashMap<String, ClassGen> classes) {
    RSClass character = data.getProperClass("Character");
    RSClass player = data.getProperClass("Player");
    for(Entry<String, ClassGen> c : classes.entrySet()){
      if(c.getValue().getSuperclassName().equals(character.className) &&
          !c.getValue().getClassName().equals(player.className)){
        RSClass npc = data.addClass("NPC", c.getValue().getClassName());
        for(Field f : c.getValue().getFields()){
          if(!f.isStatic() && !f.getType().equals(Type.INT))
            for(Entry<String, ClassGen> c2 : classes.entrySet()){
              if(f.getType().toString().equals(c2.getValue().getClassName())){
                npc.addField("NPCDef", f.getName());
                data.addClass("NPCDef", f.getType().toString());
                return SearchResult.Success;
              }
            }
        }
View Full Code Here

TOP

Related Classes of smart.updater.RSClass

Copyright © 2018 www.massapicom. 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.