[317] Stop Items Going In The Wrong Slot

Results 1 to 12 of 12
  1. #1
    Account Upgraded | Title Enabled! I-Am-No-Fool is offline
    MemberRank
    Sep 2007 Join Date
    Location
    366Posts

    [317] Stop Items Going In The Wrong Slot

    Purpose: Stopping Items Going into the wrong slot

    Difficulty: 2/10

    Assumed Knowledge: You know how to copy and paste

    Server Base: N00bscap3, Devolution V7.0

    Classes Modified: item.java

    What to do before I start: See what Item you want to go to the right bit and know which bit it goes into.

    Procedure:

    Step One.
    Go into your server folder and open item.java. you should see something like this:
    Code:
    // a collection of item methods
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    public class Item {
     public static int amulets[] = { 10519, 10413, 11204, 11205, 1120611146,
       11147, 11148, 11149, 11150, 11151, 11152, 11141, 6857, 6859, 6861,
       6863, 1724, 1718, 6585, 86, 774, 87, 295, 421, 552, 589, 1478,
       1692, 1694, 1696, 1698, 1700, 1702, 1704, 1706, 1708, 1710, 1712,
       1725, 1727, 1729, 1731, 4021, 4081, 4250, 4677, 6040, 6041, 6208,
       11274, 11275, 11276, 11273, 11941 };
     public static int arrows[] = { 11774, 11775, 11776, 11777, 11778, 11779,
       78, 598, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887,
       888, 889, 890, 891, 892, 893, 942, 2532, 2533, 2534, 2535, 2536,
       2537, 2538, 2539, 2540, 2541, 2866, 4160, 4172, 4173, 4174, 4175,
       4740, 5616, 5617, 5618, 5619, 5620, 5621, 5622, 5623, 5624, 5625,
       5626, 5627, 6061, 6062 };
    NOTE: I have not put in all of the file because it is a big file!

    You've probably noticed that it says "Public static in arrows[] = {...". All the numbers seperated by a comma are item IDs. Find the ID of the object you want using this: http://silabsoft.org/index.php?grab=output.html (Only For Silab). And put it in that box if it is an arrow.

    There are other ones you can put things into, just open Item.java and scroll down and you can see all the different ones, to see which one is which just look at the words that are green and it will tell you what that section is about.
    Code:
     public static int fullHelm[] = { 10307, 10931, 10934, 10928, 11195, 11196,
       11197, 11951, 11950, 10867, 11490, 10407, 10706, 10709, 10712,
       10715, 10718, 10721, 10724, 10727, 10730, 10733, 10736, 10739,
       10742, 10745, 10748, 10751, 10754, 10757, 10760, 10763, 10766,
       10769, 10771, 11824, 11974, 11939, 11940, 11168, 11165, 11144,
       11140, 3748, 7112, 7124, 7130, 7136, 7539, 6621, 6623, 7594, 6131,
       6137, 6128, 4732, 1149, 4753, 6188, 4511, 4056, 4071, 4724, 6109,
       2665, 1153, 1155, 1157, 1159, 1161, 1163, 1165, 2587, 2595, 2605,
       2613, 2619, 2627, 2657, 2673, 3486, 6402, 6394, 3751, 7594, 4708,
       4716, 4745, 4732, 5554, 4753, 7624, 7631 };
     public static int fullMask[] = { 11298, 11144, 7539, 6621, 6623, 5574,
       7594, 6326, 6131, 6137, 6128, 9128, 4732, 5554, 4753, 4611, 6188,
       3507, 4511, 4056, 4071, 4724, 2665, 6109, 1053, 1055, 1057, 3751,
       7594, 4708, 4716, 4745, 4732, 5554, 4753, 7652, 7647, 7627, 7649,
       7629, 7633, 7635, 7641, 7651, 7637, 7639, 7654, 7656, 7657, 7663,
       7658, 7673, 7675, 7677, 7679, 7681, 7683, 7686 };
     // All other IDs are weapons (I hope)
     public static int gloves[] = { 11271, 10947, 10948, 10949, 10950, 10951,
       10952, 10225, 10410, 11710, 11161, 11157, 11153, 11137, 6629, 6720,
       7595, 6330, 6922, 2491, 1065, 2487, 2489, 3060, 1495, 775, 777,
       778, 6708, 1059, 1063, 1065, 1580, 2487, 2489, 2491, 2902, 2912,
       2922, 2932, 2942, 3060, 3799, 4095, 4105, 4115, 4308, 5556, 6068,
       6110, 6149, 6151, 6153, 7454, 7455, 7456, 7457, 7458, 7459, 7460,
       7461, 7462, 1050, 3057, 7671, 7688 };
     public static int hats[] = { 10307, 11264, 11265, 11266, 11446, 8454, 8453,
       10931, 10934, 10928, 11195, 11196, 11197, 11812, 11813, 11809,
       11810, 11951, 11950, 11949, 10867, 11298, 11490, 10407, 10706,
       10709, 10712, 10715, 10718, 10721, 10724, 10727, 10730, 10733,
       10736, 10739, 10742, 10745, 10748, 10751, 10754, 10757, 10760,
       10763, 10766, 10769, 10771, 11824, 11974, 11938, 11939, 11940,
       11168, 11165, 11164, 11160, 11156, 11144, 11140, 11136, 7663, 7652,
       7646, 7645, 7649, 7627, 7641, 7639, 7637, 7635, 7633, 7629, 7631,
       7621, 7624, 6621, 4745, 6623, 6858, 6860, 6862, 6856, 6918, 6656,
       7400, 7321, 7323, 7219, 7325, 7327, 7396, 7394, 4732, 4753, 4611,
       6188, 6182, 4511, 4056, 4071, 4724, 2639, 2641, 2643, 2665, 6109,
       5525, 5527, 5529, 5531, 5533, 5535, 5537, 5539, 5541, 5543, 5545,
       5547, 5549, 5551, 74, 579, 656, 658, 660, 662, 664, 740, 1017,
       1037, 1038, 1040, 1042, 1044, 1046, 1048, 1050, 1053, 1055, 1057,
       1137, 1139, 1141, 1143, 1145, 1147, 1149, 1151, 1153, 1155, 1157,
       1159, 1161, 1163, 1165, 1506, 1949, 2422, 2581, 2587, 2595, 2605,
       2613, 2619, 2627, 2631, 2633, 2635, 2637, 2651, 2657, 2673, 2900,
       2910, 2920, 2930, 2940, 2978, 2979, 2980, 2981, 2982, 2983, 2984,
       2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995,
       3057, 3385, 3486, 3748, 3749, 3751, 3753, 3755, 3797, 4041, 4042,
       4071, 4089, 4099, 4109, 4164, 4302, 4506, 4511, 4513, 4515, 4551,
       4567, 4708, 4716, 4724, 4753, 4856, 4857, 4858, 4859, 4880, 4881,
       4882, 4883, 4904, 4905, 4906, 4907, 4952, 4953, 4954, 4955, 4976,
       4977, 4978, 4979, 5013, 5014, 5554, 5574, 6109, 6128, 6131, 6137,
       6182, 6188, 6335, 6337, 6339, 6345, 6355, 6365, 6375, 6382, 6392,
       6400, 13663, 13662, 9231, 14833 };
    If a section looks like this:
    Code:
    public static int hats[] = { 10307, 11264, 11265, 11266, 11446, 8454, 8453 };
    to add another ID just put a comma after the last ID then a space then The ID you want. If the ID I wanted to add was 1596 (Random ID, Nothing Special I dont Think) Then It would look like this once it has been added
    Code:
    public static int hats[] = { 10307, 11264, 11265, 11266, 11446, 8454, 8453, 1596 };
    Hope This Helped
    Last edited by I-Am-No-Fool; 26-12-08 at 10:43 PM. Reason: Typo


  2. #2
    Apprentice Java4Lyfe is offline
    MemberRank
    Apr 2007 Join Date
    9Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    It helped me a little bit

  3. #3
    Member YourMaster is offline
    MemberRank
    Apr 2008 Join Date
    The Netherlands :)Location
    59Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    If a party had id stays at
    public static int boots[] = {6619,3393,4084,6920,6061,6106,88,89,626,628,630,632,634,1061,1837,1846,2577,2579,2894,2904,2914,2924,2934,3061,3105,3107,3791,4097,4107,4117,4119,4121,4123,4125,4127,4129,4131,4310,5064,5345,5557,6069,6106,6143,6145,6147,6328};

    the hat will going to the boots slot

    Where can i find a list with item names and ids ??

  4. #4
    Apprentice mike623030 is offline
    MemberRank
    Nov 2007 Join Date
    9Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    i need wep things

  5. #5
    Novice Elvijs is offline
    MemberRank
    Dec 2008 Join Date
    1Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    I did do it but it still keeps to go into wrong spot :(

  6. #6
    Account Upgraded | Title Enabled! TehByte is offline
    MemberRank
    Nov 2008 Join Date
    313Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    Its nice, but you could shorten it and make it start with what the item ends in, this limits how big your file is. And wow, 396 views, 4 replys? Awesome.

  7. #7
    Account Upgraded | Title Enabled! I-Am-No-Fool is offline
    MemberRank
    Sep 2007 Join Date
    Location
    366Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    Quote Originally Posted by TehByte View Post
    Its nice, but you could shorten it and make it start with what the item ends in, this limits how big your file is. And wow, 396 views, 4 replys? Awesome.
    I don't understand what you mean.

  8. #8
    Account Upgraded | Title Enabled! TehByte is offline
    MemberRank
    Nov 2008 Join Date
    313Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    Ok, your tut says to do this;
    helms {ID, ID, ID, ID, ID, ID, ID};

    instead of that to lower the coding you can use;

    helms {"Full helm", "Med helm", "Netziot"};

    and so on, this lowers the amount of coding that is needed and means it uses a range of items ending in that text instead of writing the ID's for each one.

    ------
    0000000000000000000000000000000000000
    0000000000000000000000000000000000000
    0000000000000000000000000000000000000
    0000000000000000000000000000000000000
    find the 0

    refering to your PM, they are all 0's :o

  9. #9
    Account Upgraded | Title Enabled! kreeftje is offline
    MemberRank
    May 2008 Join Date
    netherlandsLocation
    232Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    dont work for me (whit party hats an santas)

  10. #10
    Account Upgraded | Title Enabled! I-Am-No-Fool is offline
    MemberRank
    Sep 2007 Join Date
    Location
    366Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    I did this ages ago so It's not guaranteed to work on all servers

  11. #11
    Proficient Member stability666 is offline
    MemberRank
    Jan 2009 Join Date
    Maine, USA.Location
    165Posts

    Re: [Tut] Stop Items Going In The Wrong Slot

    Quote Originally Posted by TehByte View Post
    Ok, your tut says to do this;
    helms {ID, ID, ID, ID, ID, ID, ID};

    instead of that to lower the coding you can use;

    helms {"Full helm", "Med helm", "Netziot"};

    and so on, this lowers the amount of coding that is needed and means it uses a range of items ending in that text instead of writing the ID's for each one.

    ------
    0000000000000000000000000000000000000
    0000000000000000000000000000000000000
    0000000000000000000000000000000000000
    0000000000000000000000000000000000000
    find the 0

    refering to your PM, they are all 0's :o
    Netiznot* lol

    Edit for ontopicness: I know this is for begginers but if you guys' cant write a couple arrays and a void to call it there's something wrong lol.

    Edit 2: I just realised the tut was on adding ids not adding an item handler.. Sorryyy. ^^
    Last edited by stability666; 24-09-09 at 04:28 PM.

  12. #12
    Apprentice Wesare1 is offline
    MemberRank
    Feb 2009 Join Date
    23Posts

    Re: [Tut -A] [317] Stop Items Going In The Wrong Slot

    nice TuT for me Thankx alot!



Advertisement