Thread: [PI] Loading ALL 634 item stats

Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1 [PI] Loading ALL 634 item stats 
    Registered Member
    Join Date
    Jun 2010
    Age
    24
    Posts
    2,530
    Thanks given
    544
    Thanks received
    584
    Rep Power
    411
    Item.cfg: [Only registered and activated users can see links. ]

    Go to src/server/world/

    Open itemHandler.java, search for
    Code:
    public void newItemList(int ItemId
    Replace the whole void with
    Code:
    	public void newItemList(int ItemId, String ItemName, String ItemDescription, double ShopValue, double LowAlch, double HighAlch, int Bonuses[]) {
    		// first, search for a free slot
    		int slot = -1;
    		for (int i = 0; i < 20082; i++) {
    			if (ItemList[i] == null) {
    				slot = i;
    				break;
    			}
    		}
    
    		if(slot == -1) return;		// no free slot found
    		ItemList newItemList = new ItemList(ItemId);
    		newItemList.itemName = ItemName;
    		newItemList.itemDescription = ItemDescription;
    		newItemList.ShopValue = ShopValue;
    		newItemList.LowAlch = LowAlch;
    		newItemList.HighAlch = HighAlch;
    		newItemList.Bonuses = Bonuses;
    		ItemList[slot] = newItemList;
    	}
    open config.java, search for
    Code:
    ITEM_LIMIT
    replace the line with
    Code:
    	public static final int ITEM_LIMIT = 20083;
    Really easy, yea.
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    King of the North
    Lord Stark's Avatar
    Join Date
    Jan 2010
    Age
    27
    Posts
    1,071
    Thanks given
    105
    Thanks received
    41
    Rep Power
    28
    oh nice bro! repped
    spoiler for people i respect
    [SPOIL]galkon, Cocoa, infexis, daza, SWAT, penor, clienthax, k4rn4ge, garyking, Ghost++, kenneh, coder alex, sanity, badger41, vagoo [/SPOIL]
    most epic series [email protected]!!
    [SPOIL]
    [/SPOIL]
    Reply With Quote  
     

  4. #3 634 Items. 
    Registered Member DestriX's Avatar
    Join Date
    Nov 2008
    Posts
    1,329
    Thanks given
    490
    Thanks received
    152
    Rep Power
    257
    Quote Originally Posted by Alex! View Post
    Item.cfg: [Only registered and activated users can see links. ]

    Go to src/server/world/

    Open itemHandler.java, search for
    Code:
    public void newItemList(int ItemId
    Replace the whole void with
    Code:
    	public void newItemList(int ItemId, String ItemName, String ItemDescription, double ShopValue, double LowAlch, double HighAlch, int Bonuses[]) {
    		// first, search for a free slot
    		int slot = -1;
    		for (int i = 0; i < 20082; i++) {
    			if (ItemList[i] == null) {
    				slot = i;
    				break;
    			}
    		}
    
    		if(slot == -1) return;		// no free slot found
    		ItemList newItemList = new ItemList(ItemId);
    		newItemList.itemName = ItemName;
    		newItemList.itemDescription = ItemDescription;
    		newItemList.ShopValue = ShopValue;
    		newItemList.LowAlch = LowAlch;
    		newItemList.HighAlch = HighAlch;
    		newItemList.Bonuses = Bonuses;
    		ItemList[slot] = newItemList;
    	}
    open config.java, search for
    Code:
    ITEM_LIMIT
    replace the line with
    Code:
    	public static final int ITEM_LIMIT = 20083;
    Really easy, yea.

    Great Job! I will use if I ever decide to add 634 Items.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #4  
    Banned
    Join Date
    Mar 2008
    Posts
    1,937
    Thanks given
    131
    Thanks received
    61
    Rep Power
    0
    oh god, thanks saves a whole lotta time!
    Reply With Quote  
     

  6. #5  
    Fremennik


    Join Date
    Sep 2010
    Age
    24
    Posts
    919
    Thanks given
    3
    Thanks received
    90
    Discord
    View profile
    Rep Power
    105
    Thanks mate!
    I guess this helped a few people, like it helped me!
    REP.
    Reply With Quote  
     

  7. #6  
    Registered Member Trivzor's Avatar
    Join Date
    Dec 2010
    Posts
    544
    Thanks given
    102
    Thanks received
    109
    Rep Power
    17
    Thanks, I'm using it now

    If you using DSPK sourche replace Afro to Afro_helm, in item.cfg
    HyBriD PvP - Reborn - Coming soon!
    Reply With Quote  
     

  8. #7  
    Banned

    Join Date
    Oct 2010
    Posts
    1,731
    Thanks given
    56
    Thanks received
    97
    Rep Power
    0
    thanks alex but does runeverfix source come with this?
    Reply With Quote  
     

  9. #8  
    Registered Member
    Join Date
    Jun 2010
    Age
    24
    Posts
    2,530
    Thanks given
    544
    Thanks received
    584
    Rep Power
    411
    Quote Originally Posted by brianm23 View Post
    thanks alex but does runeverfix source come with this?
    No it dosent.
    Reply With Quote  
     

  10. #9  
    Registered Member

    Join Date
    Jan 2008
    Age
    28
    Posts
    1,380
    Thanks given
    76
    Thanks received
    384
    Rep Power
    962
    Code:
    public void newItemList(int ItemId, String ItemName, String ItemDescription, double ShopValue, double LowAlch, double HighAlch, int Bonuses[]) {
    		// first, search for a free slot
    		int slot = -1;
    		for (int i = 0; i < 20082; i++) {
    			if (ItemList[i] == null) {
    				slot = i;
    				break;
    			}
    		}
    
    		if(slot == -1) return;		// no free slot found
    		ItemList newItemList = new ItemList(ItemId);
    		newItemList.itemName = ItemName;
    		newItemList.itemDescription = ItemDescription;
    		newItemList.ShopValue = ShopValue;
    		newItemList.LowAlch = LowAlch;
    		newItemList.HighAlch = HighAlch;
    		newItemList.Bonuses = Bonuses;
    		ItemList[slot] = newItemList;
    	}
    lololol use a list instead of an array for the ItemList variable that way you don't have to worry about setting the index.
    Reply With Quote  
     

  11. #10  
    Community Veteran

    Dexter Morgan's Avatar
    Join Date
    Nov 2008
    Age
    16
    Posts
    4,364
    Thanks given
    1,027
    Thanks received
    703
    Discord
    View profile
    Rep Power
    2991
    Quote Originally Posted by BFMV View Post
    Code:
    public void newItemList(int ItemId, String ItemName, String ItemDescription, double ShopValue, double LowAlch, double HighAlch, int Bonuses[]) {
    		// first, search for a free slot
    		int slot = -1;
    		for (int i = 0; i < 20082; i++) {
    			if (ItemList[i] == null) {
    				slot = i;
    				break;
    			}
    		}
    
    		if(slot == -1) return;		// no free slot found
    		ItemList newItemList = new ItemList(ItemId);
    		newItemList.itemName = ItemName;
    		newItemList.itemDescription = ItemDescription;
    		newItemList.ShopValue = ShopValue;
    		newItemList.LowAlch = LowAlch;
    		newItemList.HighAlch = HighAlch;
    		newItemList.Bonuses = Bonuses;
    		ItemList[slot] = newItemList;
    	}
    lololol use a list instead of an array for the ItemList variable that way you don't have to worry about setting the index.
    It's not like he made the code.
    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 2
    Last Post: 01-28-2011, 04:53 PM
  2. [Help] Item Stats - Rep++ - [PI]
    By Razulo in forum Help
    Replies: 4
    Last Post: 08-17-2010, 09:07 AM
  3. item.cfg with stats for new items
    By Ryan™ in forum Snippets
    Replies: 10
    Last Post: 05-02-2010, 09:24 PM
  4. Item Stats dumping
    By Tyler in forum Requests
    Replies: 19
    Last Post: 03-30-2010, 05:26 AM
  5. Item stats interface help.
    By mumi_ in forum Help
    Replies: 6
    Last Post: 04-27-2009, 11:46 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •