Thread: [PI] adding models and such things [PI]

Results 1 to 10 of 10
  1. #1 [PI] adding models and such things [PI] 
    Registered Member Pyro Sauce's Avatar
    Join Date
    Jul 2010
    Age
    30
    Posts
    171
    Thanks given
    12
    Thanks received
    8
    Rep Power
    1
    Okay, so I have never added any like custom items or anything and i realised my PI doesn't have spirit shields and i kinda want them.. I downloaded some.."models" for them but idk what to do with them... =\
     

  2. #2  
    Registered Member
    Join Date
    May 2010
    Posts
    54
    Thanks given
    2
    Thanks received
    2
    Rep Power
    1
    (adding items)On client side- go in itemdef, or itemdef_2

    for my pi source its itemdef_2, there you add the ints
    this is a example of a int:

    case 15001:
    itemDef.name = "Divine Sigil";
    itemDef.itemActions = new String[5];
    itemDef.modelID = 40916;
    itemDef.modelZoom = 848;
    itemDef.modelRotationY = 267;
    itemDef.modelRotationX = 138;
    itemDef.modelOffset1 = 5;
    itemDef.modelOffset2 = 0;
    itemDef.anInt165 = -1;
    itemDef.anInt200 = -1;
    itemDef.anInt188 = -1;
    itemDef.description = "A sigil in the shape of an Divine symbol.".getBytes();
    break;

    for the model you would put them in the "raw" folder

    Just compile after that and go on server and spawn it
     

  3. #3  
    Registered Member Pyro Sauce's Avatar
    Join Date
    Jul 2010
    Age
    30
    Posts
    171
    Thanks given
    12
    Thanks received
    8
    Rep Power
    1
    Quote Originally Posted by mathun View Post
    On client side- go in itemdef, or itemdef_2

    for my pi source its itemdef_2, there you add the ints
    this is a example of a int:

    case 15001:
    itemDef.name = "Divine Sigil";
    itemDef.itemActions = new String[5];
    itemDef.modelID = 40916;
    itemDef.modelZoom = 848;
    itemDef.modelRotationY = 267;
    itemDef.modelRotationX = 138;
    itemDef.modelOffset1 = 5;
    itemDef.modelOffset2 = 0;
    itemDef.anInt165 = -1;
    itemDef.anInt200 = -1;
    itemDef.anInt188 = -1;
    itemDef.description = "A sigil in the shape of an Divine symbol.".getBytes();
    break;

    for the model you would put them in the "raw" folder

    Just compile after that and go on server and spawn it
    2 questions..

    one whats the "raw" folder and where Exactly can i find it?

    and two What code should i put the ints under?
     

  4. #4  
    Registered Member
    Join Date
    May 2010
    Posts
    54
    Thanks given
    2
    Thanks received
    2
    Rep Power
    1
    For me the raw folder is under class/.ss_474/raw

    the raw folder is for adding models

    for the int under this code

    public class ItemDef_2 {

    public static void Items(int i){
    ItemDef itemDef = ItemDef.forID(i);
    switch(i) {


    ex.
    import java.io.*;

    public class ItemDef_2 {

    public static void Items(int i){
    ItemDef itemDef = ItemDef.forID(i);
    switch(i) {

    case 15000:
    itemDef.name = "Arcane Sigil";
    itemDef.itemActions = new String[5];
    itemDef.modelID = 40914;
    itemDef.modelZoom = 789;
    itemDef.modelRotationY = 225;
    itemDef.modelRotationX = 186;
    itemDef.modelOffset1 = 4;
    itemDef.modelOffset2 = -10;
    itemDef.anInt165 = -1;
    itemDef.anInt200 = -1;
    itemDef.anInt188 = -1;
    itemDef.description = "A sigil in the shape of an arcane rune".getBytes();
    break;
     

  5. #5  
    Registered Member Pyro Sauce's Avatar
    Join Date
    Jul 2010
    Age
    30
    Posts
    171
    Thanks given
    12
    Thanks received
    8
    Rep Power
    1
    i have no raw folder =S and i only have itemdef not itemdef2 and "switch(i" was not found neither was "public static void items" when i searched for them :"( i can has ur client.zip over skype plawx?
     

  6. #6  
    Registered Member
    Join Date
    May 2010
    Posts
    54
    Thanks given
    2
    Thanks received
    2
    Rep Power
    1
    Read pm, anyways did you try checking itemdef instead of itemdef_2
     

  7. #7  
    Registered Member Diesel_'s Avatar
    Join Date
    Jul 2010
    Posts
    120
    Thanks given
    85
    Thanks received
    20
    Rep Power
    8
    Make a sub class in your client files, name is what ever you want, I suggest naming it to something ideal like Item_Def_Sub2 and put the following model scripts in them like mathun just did. It reads the models in a compressed .DAT archive, so you would have to pack the actual models in .DAT and .IDX file format, you can find a model compressor by using the search button. I tryed to explain to you in the easiest way to understand so I hope that helps.
     

  8. #8  
    Registered Member Pyro Sauce's Avatar
    Join Date
    Jul 2010
    Age
    30
    Posts
    171
    Thanks given
    12
    Thanks received
    8
    Rep Power
    1
    At this point im kinda starting to give up all hope for my server.. i guess its time for me to start from scratch again because with this one( although i have spend DAYS coding it and it looks pretty naise) nothing is working, i cant get lunars to work and i dont have GWD bosses and i cant add items.... im really kinda sad that nothing worked =S anyone know what source i should start over on? i cant find hyperion ANYWHERE and thats what EVERYONE at rl told me to use...
     

  9. #9  
    CorruptionPVP CODER
    Kronos's Avatar
    Join Date
    Aug 2011
    Posts
    850
    Thanks given
    148
    Thanks received
    32
    Rep Power
    128
    OK i need help!!! i got models added them to

    CACHE ---> RAW

    i got the ints. but what do i do with them? i dont have itemdef_2.java i got itemdef_2.class and i got itemdef.java heres my itemdef.


    import java.io.*;
    import sign.signlink;

    public final class ItemDef {

    public static ItemDef forID(int i) {
    for (int j = 0; j < 10; j++)
    if (cache[j].id == i)
    return cache[j];
    cacheIndex = (cacheIndex + 1) % 10;
    ItemDef itemDef = cache[cacheIndex];
    stream.currentOffset = streamIndices[i];
    itemDef.id = i;
    itemDef.setDefaults();
    itemDef.readValues(stream);
    if (itemDef.editedModelColor != null) {
    for (int i2 = 0; i2 < itemDef.editedModelColor.length; i2++) {
    if (itemDef.newModelColor[i2] == 0) {
    itemDef.newModelColor[i2] = 1;
    }
    }
    }
    if (itemDef.certTemplateID != -1)
    itemDef.toNote();
    if (itemDef.lentItemID != -1)
    itemDef.toLend();
    if (!isMembers && itemDef.membersObject) {
    itemDef.name = "Members Object";
    itemDef.description = "Login to a members' server to use this object.";
    itemDef.groundActions = null;
    itemDef.itemActions = null;
    itemDef.team = 0;
    }
    switch (itemDef.id) {

    case 13362:
    itemDef.modelid = 62714;
    itemDef.name = "Torva full helm";
    itemDef.description = "Torva full helm.";
    itemDef.modelZoom = 672;
    itemDef.modelRotationY = 85;
    itemDef.modelRotationX = 1867;
    itemDef.modelOffset1 = 0;
    itemDef.modelOffset2 = -3;
    itemDef.anInt165 = 62738;
    itemDef.anInt200 = 62754;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[2] = "Check-charges";
    itemDef.itemActions[4] = "Drop";
    break;
    case 13360:
    itemDef.modelid = 62701;
    itemDef.name = "Torva platelegs";
    itemDef.description = "Torva platelegs.";
    itemDef.modelZoom = 1740;
    itemDef.modelRotationY = 474;
    itemDef.modelRotationX = 2045;
    itemDef.modelOffset1 = 0;
    itemDef.modelOffset2 = -5;
    itemDef.anInt165 = 62743;
    itemDef.anInt200 = 62760;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[2] = "Check-charges";
    itemDef.itemActions[4] = "Drop";
    break;

    case 13358:
    itemDef.modelid = 62699;
    itemDef.name = "Torva platebody";
    itemDef.description = "Torva Platebody.";
    itemDef.modelZoom = 1506;
    itemDef.modelRotationY = 473;
    itemDef.modelRotationX = 2042;
    itemDef.modelOffset1 = 0;
    itemDef.modelOffset2 = 0;
    itemDef.anInt165 = 62746;
    itemDef.anInt200 = 62762;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[2] = "Check-charges";
    itemDef.itemActions[4] = "Drop";
    break;
    case 13355:
    itemDef.modelid = 62693;
    itemDef.name = "Pernix cowl";
    itemDef.description = "Pernix cowl";
    itemDef.modelZoom = 800;
    itemDef.modelRotationY = 532;
    itemDef.modelRotationX = 14;
    itemDef.modelOffset1 = -1;
    itemDef.modelOffset2 = 1;
    itemDef.anInt165 = 62739;
    itemDef.anInt200 = 62756;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[2] = "Check-charges";
    itemDef.itemActions[4] = "Drop";
    itemDef.anInt175 = 62731;
    itemDef.anInt197 = 62727;
    break;

    case 13354:
    itemDef.modelid = 62709;
    itemDef.name = "Pernix body";
    itemDef.description = "Pernix body";
    itemDef.modelZoom = 1378;
    itemDef.modelRotationY = 485;
    itemDef.modelRotationX = 2042;
    itemDef.modelOffset1 = -1;
    itemDef.modelOffset2 = 7;
    itemDef.anInt165 = 62744;
    itemDef.anInt200 = 62765;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[2] = "Check-charges";
    itemDef.itemActions[4] = "Drop";
    break;

    case 13352:
    itemDef.modelid = 62695;
    itemDef.name = "Pernix chaps";
    itemDef.description = "Pernix chaps";
    itemDef.modelZoom = 1740;
    itemDef.modelRotationY = 504;
    itemDef.modelRotationX = 0;
    itemDef.modelOffset1 = 4;
    itemDef.modelOffset2 = 3;
    itemDef.anInt165 = 62741;
    itemDef.anInt200 = 62757;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[2] = "Check-charges";
    itemDef.itemActions[4] = "Drop";
    break;

    case 13350:
    itemDef.modelid = 62710;
    itemDef.name = "Virtus mask";
    itemDef.description = "Virtus mask";
    itemDef.modelZoom = 928;
    itemDef.modelRotationY = 406;
    itemDef.modelRotationX = 2041;
    itemDef.modelOffset1 = 1;
    itemDef.modelOffset2 = -5;
    itemDef.anInt165 = 62736;
    itemDef.anInt200 = 62755;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[2] = "Check-charges";
    itemDef.itemActions[4] = "Drop";
    itemDef.anInt175 = 62728;
    itemDef.anInt197 = 62728;
    break;

    case 13348:
    itemDef.modelid = 62704;
    itemDef.name = "Virtus robe top";
    itemDef.description = "Virtus robe top";
    itemDef.modelZoom = 1122;
    itemDef.modelRotationY = 488;
    itemDef.modelRotationX = 3;
    itemDef.modelOffset1 = 1;
    itemDef.modelOffset2 = 0;
    itemDef.anInt165 = 62748;
    itemDef.anInt200 = 62764;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[2] = "Check-charges";
    itemDef.itemActions[4] = "Drop";
    break;

    case 13346:
    itemDef.modelid = 62700;
    itemDef.name = "Virtus robe legs";
    itemDef.description = "Virtus robe legs";
    itemDef.modelZoom = 1740;
    itemDef.modelRotationY = 498;
    itemDef.modelRotationX = 2045;
    itemDef.modelOffset1 = -1;
    itemDef.modelOffset2 = 4;
    itemDef.anInt165 = 62742;
    itemDef.anInt200 = 62758;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[2] = "Check-charges";
    itemDef.itemActions[4] = "Drop";
    break;
    case 13344:
    itemDef.modelid = 62694;
    itemDef.name = "Ancient ceremonial hood";
    itemDef.modelZoom = 980;
    itemDef.modelRotationY = 208;
    itemDef.modelRotationX = 220;
    itemDef.modelOffset1 = 0;
    itemDef.modelOffset2 = -18;
    itemDef.anInt165 = 62737;
    itemDef.anInt200 = 62753;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[4] = "Drop";
    itemDef.anInt175 = 62730;
    itemDef.anInt197 = 62730;
    break;

    case 13342:
    itemDef.modelid = 62705;
    itemDef.name = "Ancient ceremonial top";
    itemDef.modelZoom = 1316;
    itemDef.modelRotationY = 477;
    itemDef.modelRotationX = 9;
    itemDef.modelOffset1 = 0;
    itemDef.modelOffset2 = 13;
    itemDef.anInt165 = 62745;
    itemDef.anInt200 = 62763;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[4] = "Drop";
    itemDef.anInt204 = 54;
    break;

    case 13340:
    itemDef.modelid = 62707;
    itemDef.name = "Ancient ceremonial legs";
    itemDef.modelZoom = 1828;
    itemDef.modelRotationY = 539;
    itemDef.modelRotationX = 0;
    itemDef.modelOffset1 = -1;
    itemDef.modelOffset2 = 0;
    itemDef.anInt165 = 62740;
    itemDef.anInt200 = 62759;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[4] = "Drop";
    itemDef.anInt204 = 40;
    itemDef.anInt196 = 30;
    itemDef.anInt184 = 100;
    break;

    case 13370:
    itemDef.modelid = 62697;
    itemDef.name = "Ancient ceremonial gloves";
    itemDef.modelZoom = 548;
    itemDef.modelRotationY = 618;
    itemDef.modelRotationX = 1143;
    itemDef.modelOffset1 = 0;
    itemDef.modelOffset2 = -5;
    itemDef.anInt165 = 62735;
    itemDef.anInt200 = 62752;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[4] = "Drop";
    break;

    case 13336:
    itemDef.modelid = 62696;
    itemDef.name = "Ancient ceremonial boots";
    itemDef.modelZoom = 676;
    itemDef.modelRotationY = 63;
    itemDef.modelRotationX = 106;
    itemDef.modelOffset1 = 5;
    itemDef.modelOffset2 = -1;
    itemDef.anInt165 = 62734;
    itemDef.anInt200 = 62751;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.itemActions = new String[5];
    itemDef.itemActions[1] = "Wear";
    itemDef.itemActions[4] = "Drop";
    break;


    }
    return itemDef;
    }

    public static void unpackConfig(NamedArchive streamLoader) {
    stream = new Stream(FileOperations.ReadFile(signlink.findcached ir() + "obj.dat"));
    Stream stream = new Stream(FileOperations.ReadFile(signlink.findcached ir() + "obj.idx"));
    totalItems = stream.readUnsignedWord();
    streamIndices = new int[totalItems + 5000];
    int i = 2;
    for (int j = 0; j < totalItems; j++) {
    streamIndices[j] = i;
    i += stream.readUnsignedWord();
    }
    cache = new ItemDef[10];
    for (int k = 0; k < 10; k++)
    cache[k] = new ItemDef();
    }

    public void setDefaults() {
    modelid = 0;
    name = null;
    description = null;
    editedModelColor = null;
    newModelColor = null;
    modelZoom = 2000;
    modelRotationY = 0;
    modelRotationX = 0;
    anInt204 = 0;
    modelOffset1 = 0;
    modelOffset2 = 0;
    stackable = false;
    value = 1;
    membersObject = false;
    groundActions = null;
    itemActions = null;
    anInt165 = -1;
    anInt188 = -1;
    aByte205 = 0;
    anInt200 = -1;
    anInt164 = -1;
    aByte154 = 0;
    anInt185 = -1;
    anInt162 = -1;
    anInt175 = -1;
    anInt166 = -1;
    anInt197 = -1;
    anInt173 = -1;
    stackIDs = null;
    stackAmounts = null;
    certID = -1;
    certTemplateID = -1;
    anInt167 = 128;
    anInt192 = 128;
    anInt191 = 128;
    anInt196 = 0;
    anInt184 = 0;
    team = 0;
    lendID = -1;
    lentItemID = -1;
    }

    public void readValues(Stream stream) {
    do {
    int i = stream.readUnsignedByte();
    if (i == 0)
    return;
    if (i == 1) {
    modelid = stream.readUnsignedWord();
    } else if (i == 2)
    name = stream.readString();
    else if (i == 3)
    description = stream.readString();
    else if (i == 4)
    modelZoom = stream.readUnsignedWord();
    else if (i == 5)
    modelRotationY = stream.readUnsignedWord();
    else if (i == 6)
    modelRotationX = stream.readUnsignedWord();
    else if (i == 7) {
    modelOffset1 = stream.readUnsignedWord();
    if (modelOffset1 > 32767)
    modelOffset1 -= 0x10000;
    } else if (i == 8) {
    modelOffset2 = stream.readUnsignedWord();
    if (modelOffset2 > 32767)
    modelOffset2 -= 0x10000;
    } else if (i == 10)
    stream.readUnsignedWord();
    else if (i == 11)
    stackable = true;
    else if (i == 12)
    value = stream.readUnsignedWord();
    else if (i == 16)
    membersObject = true;
    else if (i == 23) {
    anInt165 = stream.readUnsignedWord();
    aByte205 = stream.readSignedByte();
    } else if (i == 24)
    anInt188 = stream.readUnsignedWord();
    else if (i == 25) {
    anInt200 = stream.readUnsignedWord();
    aByte154 = stream.readSignedByte();
    } else if (i == 26)
    anInt164 = stream.readUnsignedWord();
    else if (i >= 30 && i < 35) {
    if (groundActions == null)
    groundActions = new String[5];
    groundActions[i - 30] = stream.readString();
    if (groundActions[i - 30].equalsIgnoreCase("hidden"))
    groundActions[i - 30] = null;
    } else if (i >= 35 && i < 40) {
    if (itemActions == null)
    itemActions = new String[5];
    itemActions[i - 35] = stream.readString();
    if (itemActions[i - 35].equalsIgnoreCase("null"))
    itemActions[i - 35] = null;
    } else if (i == 40) {
    int j = stream.readUnsignedByte();
    editedModelColor = new int[j];
    newModelColor = new int[j];
    for (int k = 0; k < j; k++) {
    editedModelColor[k] = stream.readUnsignedWord();
    newModelColor[k] = stream.readUnsignedWord();
    }
    } else if (i == 78)
    anInt185 = stream.readUnsignedWord();
    else if (i == 79)
    anInt162 = stream.readUnsignedWord();
    else if (i == 90)
    anInt175 = stream.readUnsignedWord();
    else if (i == 91)
    anInt197 = stream.readUnsignedWord();
    else if (i == 92)
    anInt166 = stream.readUnsignedWord();
    else if (i == 93)
    anInt173 = stream.readUnsignedWord();
    else if (i == 95)
    anInt204 = stream.readUnsignedWord();
    else if (i == 97)
    certID = stream.readUnsignedWord();
    else if (i == 98)
    certTemplateID = stream.readUnsignedWord();
    else if (i >= 100 && i < 110) {
    if (stackIDs == null) {
    stackIDs = new int[10];
    stackAmounts = new int[10];
    }
    stackIDs[i - 100] = stream.readUnsignedWord();
    stackAmounts[i - 100] = stream.readUnsignedWord();
    } else if (i == 110)
    anInt167 = stream.readUnsignedWord();
    else if (i == 111)
    anInt192 = stream.readUnsignedWord();
    else if (i == 112)
    anInt191 = stream.readUnsignedWord();
    else if (i == 113)
    anInt196 = stream.readSignedByte();
    else if (i == 114)
    anInt184 = stream.readSignedByte() * 5;
    else if (i == 115)
    team = stream.readUnsignedByte();
    else if (i == 116)
    lendID = stream.readUnsignedWord();
    else if (i == 117)
    lentItemID = stream.readUnsignedWord();
    } while (true);
    }

    public static void nullLoader() {
    mruNodes2 = null;
    mruNodes1 = null;
    streamIndices = null;
    cache = null;
    stream = null;
    }

    public boolean method192(int j) {
    int k = anInt175;
    int l = anInt166;
    if (j == 1) {
    k = anInt197;
    l = anInt173;
    }
    if (k == -1)
    return true;
    boolean flag = true;
    if (!Model.method463(k))
    flag = false;
    if (l != -1 && !Model.method463(l))
    flag = false;
    return flag;
    }

    public Model method194(int j) {
    int k = anInt175;
    int l = anInt166;
    if (j == 1) {
    k = anInt197;
    l = anInt173;
    }
    if (k == -1)
    return null;
    Model model = Model.method462(k);
    if (l != -1) {
    Model model_1 = Model.method462(l);
    Model models[] = { model, model_1 };
    model = new Model(2, models);
    }
    if (editedModelColor != null) {
    for (int i1 = 0; i1 < editedModelColor.length; i1++)
    model.method476(editedModelColor[i1], newModelColor[i1]);
    }
    return model;
    }

    public boolean method195(int j) {
    int k = anInt165;
    int l = anInt188;
    int i1 = anInt185;
    if (j == 1) {
    k = anInt200;
    l = anInt164;
    i1 = anInt162;
    }
    if (k == -1)
    return true;
    boolean flag = true;
    if (!Model.method463(k))
    flag = false;
    if (l != -1 && !Model.method463(l))
    flag = false;
    if (i1 != -1 && !Model.method463(i1))
    flag = false;
    return flag;
    }

    public Model method196(int i) {
    int j = anInt165;
    int k = anInt188;
    int l = anInt185;
    if (i == 1) {
    j = anInt200;
    k = anInt164;
    l = anInt162;
    }
    if (j == -1)
    return null;
    Model model = Model.method462(j);
    if (k != -1)
    if (l != -1) {
    Model model_1 = Model.method462(k);
    Model model_3 = Model.method462(l);
    Model model_1s[] = { model, model_1, model_3 };
    model = new Model(3, model_1s);
    } else {
    Model model_2 = Model.method462(k);
    Model models[] = { model, model_2 };
    model = new Model(2, models);
    }
    if (i == 0 && aByte205 != 0)
    model.method475(0, aByte205, 0);
    if (i == 1 && aByte154 != 0)
    model.method475(0, aByte154, 0);
    if (editedModelColor != null) {
    for (int i1 = 0; i1 < editedModelColor.length; i1++)
    model.method476(editedModelColor[i1], newModelColor[i1]);
    }
    return model;
    }

    public void toNote() {
    ItemDef itemDef = forID(certTemplateID);
    modelid = itemDef.modelid;
    modelZoom = itemDef.modelZoom;
    modelRotationY = itemDef.modelRotationY;
    modelRotationX = itemDef.modelRotationX;
    anInt204 = itemDef.anInt204;
    modelOffset1 = itemDef.modelOffset1;
    modelOffset2 = itemDef.modelOffset2;
    editedModelColor = itemDef.editedModelColor;
    newModelColor = itemDef.newModelColor;
    ItemDef itemDef_1 = forID(certID);
    name = itemDef_1.name;
    membersObject = itemDef_1.membersObject;
    value = itemDef_1.value;
    String s = "a";
    char c = itemDef_1.name.charAt(0);
    if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')
    s = "an";
    description = ("Swap this note at any bank for " + s + " " + itemDef_1.name + ".");
    stackable = true;
    }

    public void toLend() {
    ItemDef itemDef = forID(lentItemID);
    itemActions = new String[5];
    modelid = itemDef.modelid;
    modelOffset1 = itemDef.modelOffset1;
    modelRotationX = itemDef.modelRotationX;
    modelOffset2 = itemDef.modelOffset2;
    modelZoom = itemDef.modelZoom;
    modelRotationY = itemDef.modelRotationY;
    anInt204 = itemDef.anInt204;
    value = 0;
    ItemDef itemDef_1 = forID(lendID);
    anInt166 = itemDef_1.anInt166;
    editedModelColor = itemDef_1.editedModelColor;
    anInt185 = itemDef_1.anInt185;
    anInt188 = itemDef_1.anInt188;
    anInt173 = itemDef_1.anInt173;
    anInt175 = itemDef_1.anInt175;
    groundActions = itemDef_1.groundActions;
    anInt165 = itemDef_1.anInt165;
    name = itemDef_1.name;
    anInt200 = itemDef_1.anInt200;
    membersObject = itemDef_1.membersObject;
    anInt197 = itemDef_1.anInt197;
    anInt164 = itemDef_1.anInt164;
    anInt162 = itemDef_1.anInt162;
    newModelColor = itemDef_1.newModelColor;
    team = itemDef_1.team;
    if (itemDef_1.itemActions != null) {
    for (int i_33_ = 0; i_33_ < 4; i_33_++)
    itemActions[i_33_] = itemDef_1.itemActions[i_33_];
    }
    itemActions[4] = "Discard";
    }

    public static Sprite getSprite(int i, int j, int k) {
    if (k == 0) {
    Sprite sprite = (Sprite) mruNodes1.insertFromCache(i);
    if (sprite != null && sprite.maxHeight != j && sprite.maxHeight != -1) {
    sprite.unlink();
    sprite = null;
    }
    if (sprite != null)
    return sprite;
    }
    ItemDef itemDef = forID(i);
    if (itemDef.stackIDs == null)
    j = -1;
    if (j > 1) {
    int i1 = -1;
    for (int j1 = 0; j1 < 10; j1++)
    if (j >= itemDef.stackAmounts[j1] && itemDef.stackAmounts[j1] != 0)
    i1 = itemDef.stackIDs[j1];
    if (i1 != -1)
    itemDef = forID(i1);
    }
    Model model = itemDef.method201(1);
    if (model == null)
    return null;
    Sprite sprite = null;
    if (itemDef.certTemplateID != -1) {
    sprite = getSprite(itemDef.certID, 10, -1);
    if (sprite == null)
    return null;
    }
    if (itemDef.lentItemID != -1) {
    sprite = getSprite(itemDef.lendID, 50, 0);
    if (sprite == null)
    return null;
    }
    Sprite sprite2 = new Sprite(32, 32);
    int k1 = Texture.textureInt1;
    int l1 = Texture.textureInt2;
    int ai[] = Texture.anIntArray1472;
    int ai1[] = DrawingArea.pixels;
    int i2 = DrawingArea.width;
    int j2 = DrawingArea.height;
    int k2 = DrawingArea.topX;
    int l2 = DrawingArea.bottomX;
    int i3 = DrawingArea.topY;
    int j3 = DrawingArea.bottomY;
    Texture.aBoolean1464 = false;
    DrawingArea.initDrawingArea(32, 32, sprite2.myPixels);
    DrawingArea.drawPixels(32, 0, 0, 0, 32);
    Texture.method364();
    int k3 = itemDef.modelZoom;
    if (k == -1)
    k3 = (int) ((double) k3 * 1.5D);
    if (k > 0)
    k3 = (int) ((double) k3 * 1.04D);
    int l3 = Texture.anIntArray1470[itemDef.modelRotationY] * k3 >> 16;
    int i4 = Texture.anIntArray1471[itemDef.modelRotationY] * k3 >> 16;
    model.method482(itemDef.modelRotationX, itemDef.anInt204, itemDef.modelRotationY, itemDef.modelOffset1, l3 + model.modelHeight / 2 + itemDef.modelOffset2, i4 + itemDef.modelOffset2);
    for (int i5 = 31; i5 >= 0; i5--) {
    for (int j4 = 31; j4 >= 0; j4--)
    if (sprite2.myPixels[i5 + j4 * 32] == 0)
    if (i5 > 0 && sprite2.myPixels[(i5 - 1) + j4 * 32] > 1)
    sprite2.myPixels[i5 + j4 * 32] = 1;
    else if (j4 > 0 && sprite2.myPixels[i5 + (j4 - 1) * 32] > 1)
    sprite2.myPixels[i5 + j4 * 32] = 1;
    else if (i5 < 31 && sprite2.myPixels[i5 + 1 + j4 * 32] > 1)
    sprite2.myPixels[i5 + j4 * 32] = 1;
    else if (j4 < 31 && sprite2.myPixels[i5 + (j4 + 1) * 32] > 1)
    sprite2.myPixels[i5 + j4 * 32] = 1;
    }
    if (k > 0) {
    for (int j5 = 31; j5 >= 0; j5--) {
    for (int k4 = 31; k4 >= 0; k4--)
    if (sprite2.myPixels[j5 + k4 * 32] == 0)
    if (j5 > 0 && sprite2.myPixels[(j5 - 1) + k4 * 32] == 1)
    sprite2.myPixels[j5 + k4 * 32] = k;
    else if (k4 > 0 && sprite2.myPixels[j5 + (k4 - 1) * 32] == 1)
    sprite2.myPixels[j5 + k4 * 32] = k;
    else if (j5 < 31 && sprite2.myPixels[j5 + 1 + k4 * 32] == 1)
    sprite2.myPixels[j5 + k4 * 32] = k;
    else if (k4 < 31 && sprite2.myPixels[j5 + (k4 + 1) * 32] == 1)
    sprite2.myPixels[j5 + k4 * 32] = k;
    }
    } else if (k == 0) {
    for (int k5 = 31; k5 >= 0; k5--) {
    for (int l4 = 31; l4 >= 0; l4--)
    if (sprite2.myPixels[k5 + l4 * 32] == 0 && k5 > 0 && l4 > 0 && sprite2.myPixels[(k5 - 1) + (l4 - 1) * 32] > 0)
    sprite2.myPixels[k5 + l4 * 32] = 0x302020;
    }
    }
    if (itemDef.certTemplateID != -1) {
    int l5 = sprite.maxWidth;
    int j6 = sprite.maxHeight;
    sprite.maxWidth = 32;
    sprite.maxHeight = 32;
    sprite.drawSprite(0, 0);
    sprite.maxWidth = l5;
    sprite.maxHeight = j6;
    }
    if (itemDef.lentItemID != -1) {
    int l5 = sprite.maxWidth;
    int j6 = sprite.maxHeight;
    sprite.maxWidth = 32;
    sprite.maxHeight = 32;
    sprite.drawSprite(0, 0);
    sprite.maxWidth = l5;
    sprite.maxHeight = j6;
    }
    if (k == 0)
    mruNodes1.removeFromCache(sprite2, i);
    DrawingArea.initDrawingArea(j2, i2, ai1);
    DrawingArea.setDrawingArea(j3, k2, l2, i3);
    Texture.textureInt1 = k1;
    Texture.textureInt2 = l1;
    Texture.anIntArray1472 = ai;
    Texture.aBoolean1464 = true;
    if (itemDef.stackable)
    sprite2.maxWidth = 33;
    else
    sprite2.maxWidth = 32;
    sprite2.maxHeight = j;
    return sprite2;
    }

    public Model method201(int i) {
    if (stackIDs != null && i > 1) {
    int j = -1;
    for (int k = 0; k < 10; k++)
    if (i >= stackAmounts[k] && stackAmounts[k] != 0)
    j = stackIDs[k];
    if (j != -1)
    return forID(j).method201(1);
    }
    Model model = (Model) mruNodes2.insertFromCache(id);
    if (model != null)
    return model;
    model = Model.method462(modelid);
    if (model == null)
    return null;
    if (anInt167 != 128 || anInt192 != 128 || anInt191 != 128)
    model.method478(anInt167, anInt191, anInt192);
    if (editedModelColor != null) {
    for (int l = 0; l < editedModelColor.length; l++)
    model.method476(editedModelColor[l], newModelColor[l]);
    }
    model.method479(64 + anInt196, 768 + anInt184, -50, -10, -50, true);
    model.aBoolean1659 = true;
    mruNodes2.removeFromCache(model, id);
    return model;
    }

    public Model method202(int i) {
    if (stackIDs != null && i > 1) {
    int j = -1;
    for (int k = 0; k < 10; k++)
    if (i >= stackAmounts[k] && stackAmounts[k] != 0)
    j = stackIDs[k];
    if (j != -1)
    return forID(j).method202(1);
    }
    Model model = Model.method462(modelid);
    if (model == null)
    return null;
    if (editedModelColor != null) {
    for (int l = 0; l < editedModelColor.length; l++)
    model.method476(editedModelColor[l], newModelColor[l]);
    }
    return model;
    }

    public ItemDef() {
    id = -1;
    }

    public byte aByte154;
    public int value;
    public int[] editedModelColor;
    public int id;
    static MRUNodes mruNodes1 = new MRUNodes(100);
    public static MRUNodes mruNodes2 = new MRUNodes(50);
    public int[] newModelColor;
    public boolean membersObject;
    public int anInt162;
    public int certTemplateID;
    public int anInt164;
    public int anInt165;
    public int anInt166;
    public int anInt167;
    public String groundActions[];
    public int modelOffset1;
    public String name;
    public static ItemDef[] cache;
    public int anInt173;
    public int modelid;
    public int anInt175;
    public boolean stackable;
    public String description;
    public int certID;
    public static int cacheIndex;
    public int modelZoom;
    public static boolean isMembers = true;
    public static Stream stream;
    public int anInt184;
    public int anInt185;
    public int anInt188;
    public String itemActions[];
    public int modelRotationY;
    public int anInt191;
    public int anInt192;
    public int[] stackIDs;
    public int modelOffset2;
    public static int[] streamIndices;
    public int anInt196;
    public int anInt197;
    public int modelRotationX;
    public int anInt200;
    public int[] stackAmounts;
    public int team;
    public static int totalItems;
    public int anInt204;
    public byte aByte205;
    public int lendID;
    public int lentItemID;
    }



    this is my itemdef_2.class =


    2
    l w
    x y x z { x | x } x ~ x  x € x   x ‚ ! x ƒ „ x … † x ‡ ˆ ‰
    x Š x ‹  Œ  + x   Ž  ' x x   ‘    ’    “ ” • O – x — ˜ x ™ x š x › R œ T  Q ž  Ÿ  " *     *    (    $      -    %    #     ,    &    x    * <init> ()V Code LineNumberTable Items (I)V
    StackMapTable 
    SourceFile ItemDef_2.java m n  Ancient ceremonial hood  java/lang/String  Take  Wear Drop  Ancient ceremonial top  Ancient ceremonial legs  Ancient ceremonial gloves Ancient ceremonial boots
    Frozen key
    Check-uses Destroy Frozen key piece (armadyl)  Assemble  Frozen key piece (bandos) Frozen key piece (zamorak) Frozen key piece (saradomin) Torva full helm
    Check-charges Torva platebody Torva platelegs Pernix cowl Pernix body Pernix chaps Virtus mask Virtus robe top Virtus robe legs
    Zaryte bow  Wield ItemDef_2 java/lang/Object ItemDef forID (I)LItemDef; modelID I name Ljava/lang/String; modelZoom modelRotationX modelRotationY modelOffset1 modelOffset2 anInt165 anInt200
    groundActions [Ljava/lang/String; itemActions anInt175 anInt197 anInt204 anInt196 anInt184 description anInt167 anInt192 anInt191 aByte154 B ! k l   m n  o    *   p    q r  o ^    L N“ N a  ; ž  V  ; *  ›  |  h  S  1+ + +Ե + е + ܵ +
    + +
    + +  + S+  + S+ S+ + G+ + +$ +ݵ + +
    +
    +
    + +  + S+  + S+ S+6 + + +$ + + +
    + +
    +! +  + S+  + S+ S+( + "+d #m+$ +% +$ +j +w +
    + +&
    +' +  + S+  + S+ S
    +( +) + +? +j +
    + +*
    ++ +  + S+  + S+ S+, +- +* +€ + +
    + +  + S+  + .S+ /SR+0 +1 +1 2+ +) + ƒ +
    + +  + S+  + 3S+ S+ 4+ 5+ 6+7 +8 +8 2+е +X + ߵ +
    + +  + S+  + 3S+ S+ 4+ 5+ 6m+9 +: +: 2+ɵ +ƒ +_ +
    +޵ +  + S+  + 3S+ S+ 4+ 5+ 6+; +< +< 2+ + + +
    +ѵ +  + S+  + 3S+ S+ 4+ 5+ 6‰+= +> +> 2+* +U +K +
    + +?
    +@ +  + S+  + S+ AS+ S+B +B 
    +C +D +D 2+ +ٵ + +
    + +E
    +F +  + S+  + S+ AS+ S+G +H +H 2+̵ +ڵ + +
    + +I
    +J +  + S+  + S+ AS+ S,+K +L +L 2+ + + +
    + +M
    +N +  + S+  + S+ AS+ S+O +P +Q +R +R 2+b + + +
    + +S
    +T +  + S+  + S+ AS+ S@+U +V +V 2+̵ + + +
    + +W
    +X +  + S+  + S+ AS+ S+Y +Z +Z 2+* +– + +
    + +[
    +\ +  + S+  + S+ AS+ S+] +] U+^ +_ +_ 2+b + + +
    + +`
    +a +  + S+  + S+ AS+ S +b +c +c 2+̵ + + +
    + +d
    +e +  + S+  + S+ AS+ S w+f +g +g 2+ + ݵ +” +
    + +h
    +h + i+  + S+  + jS+ AS+ S  p VU    
        $ * 0 8 @ H P X ^ d g m s z ! "‡ #Œ $’ %˜ &ž ' ( ) * + , - 0 1 2 3 4 5 6 7 8 9 : ; <$ =, >2 ?8 @> AA DG EM FT G[ Hb Ig Jm Ks Ly M N‰ O‘ P™ Q R U V W X Y Z [ \ ] ^ _ ` a b c f
    g h i j% k+ l1 m9 nA oI pQ qY r\ ub vh wn xu y| zƒ {‰ | }— ~Ÿ  €  ‚ ƒ „ … ˆ ‰ Š ‹ Œ  Ž   ‘ ’ “! ”) •0 –7 —> ˜A ›G œM S žZ Ÿa *g m s { ƒ ‹ “ ›                 
      " % + 1 7 > D K P V \ b j r z ‚ Š ’ ˜ ž   *                  # * 1 8 = C I O W _ g o w  ‚ ˆ Ž ” › * 
     
     $)/5;CKS[c k!n$t%z&€'‡(Ž)“*˜+,-./01234789:;<= >?@A"B*C2D:EBFJGPHVIYL _MeNkOrPyQ~RƒSˆTŽU”VœWX YZ[\_`abcdefgh i j k l $m ,n 4o 7r =s Ct Iu Pv Ww ^x cy iz o{ u| {} ƒ~ ‹ “€ › ‚ … s D   t n g q b _ W r q q q { o p z p m | m o s  u  v
     

  10. #10  
    Banned

    Join Date
    Jul 2011
    Age
    31
    Posts
    1,735
    Thanks given
    101
    Thanks received
    81
    Rep Power
    0
    Ok here is what you do make a raw folder in your cache then add them in there then go to client.java (client sided) then search preload then uncomment preload also look at the location from where it loads the models from it should be.

    Code:
    public void preloadModels() {
    		File file = new File("./Raw/");
    		File[] fileArray = file.listFiles();
    		for(int y = 0; y < fileArray.length; y++) {
    			String s = fileArray[y].getName();
    			byte[] buffer = ReadFile("./Raw/"+s);
    			Model.method460(buffer,Integer.parseInt(getFileNameWithoutExtension(s)));
    		}
    	}
    Then add the ints in itemdef.java also add the item in item.java
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •