Thread: Adding custom items (trying to understand)

Results 1 to 5 of 5
  1. #1 Adding custom items (trying to understand) 
    Donator
    Zenpex's Avatar
    Join Date
    Mar 2021
    Posts
    42
    Thanks given
    6
    Thanks received
    0
    Discord
    View profile
    Rep Power
    36
    Not really sure with what I am doing wrong, as I have tried everything I can think of except for ask for help... Clients I have a hard time understanding to a point, and cache I really do as well, idk why.

    So using for an example here is the steps and attempt.

    Item I am trying to add: Ghostly Bow
    https://gyazo.com/07dbc6b7454fdd88da7e043592d685ce

    GZ & DAT FILES: 12246.gz 12245.gz extract them into the cache/data files with the reset of the .dat files

    Do I know the models are even to the bow: Yes, used RSMV before hand

    Did I repack the cache: Yes, tried without using TomsSuite & with using it

    ItemDef.txt that came with the models:
    Code:
    if(i == 12245)  // change this if you need to "item number"
    {
    class8.aStringArray189 = new String[5];
    class8.aStringArray189[1] = "Wield";//New option
    class8.anInt174 = 12246; //Model ID
    class8.anInt181 = 2128;//Model Zoom
    class8.anInt190 = 591;//Model Rotation
    class8.anInt198 = 1034;//model rotate side ways increase to move right in circle
    class8.anInt204 = 138;//Unknown
    class8.anInt199 = -1;//noteable
    class8.anInt169 = 8;// model offset increase to move to the right
    class8.anInt194 = 11;//model offset increase to move up
    class8.anInt165 = 12245;//male wearing
    class8.anInt200 = 12245;//female wearing
    class8.anInt175 = -1;//Unknown
    class8.aBoolean176 = false;//Stackable//Unknown
    class8.anInt164 = -1;//Female arms/sleeves
    class8.anInt188 = -1;//male arms/sleeves
    class8.aBoolean176 = false;//Stackable
    class8.aString170 = "Ghostly Bow";//Name of the new item
    class8.aByteArray178 = "A very powerfull bow used by ghosts.".getBytes();//examin info
    }
    My itemDef.java:
    Code:
    	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.certTemplateID != -1)
    			itemDef.toNote();
    		if(!isMembers && itemDef.membersObject) {
    			itemDef.name = "Members Object";
    			itemDef.description = "Login to a members' server to use this object.".getBytes();
    			itemDef.groundActions = null;
    			itemDef.actions = null;
    			itemDef.team = 0;
    		}
    			switch (itemDef.id) {
    				case 11722:
    				itemDef.femaleEquip1 = itemDef.maleEquip1;
    				itemDef.femaleEquip2 = itemDef.maleEquip2;
    				break;
    				
    			
    				
    				
    			}
    		/* Hardcoded items start here */
    		/**/
    		if (i == 12445)
    		{
    			itemDef.actions = new String[5];
    			itemDef.actions[1] = "Weild";
    			itemDef.modelID = 12246;
    			itemDef.modelZoom = 2128;
    			itemDef.modelRotation1 = 591;
    			itemDef.modelRotation2 = 1034;
    			itemDef.anInt204 = 138;
    			itemDef.anInt199 = -1;
    			itemDef.modelOffset1 = 8;
    			itemDef.modelOffset2 = 11;
    			itemDef.maleEquip1 = 12245;
    			itemDef.femaleEquip1 = 12245;
    			itemDef.anInt175 = -1;
    			itemDef.stackable = false;
    			itemDef.maleEquip2 = -1;
    			itemDef.femaleEquip2 = -1;
    			itemDef.stackable = false;
    			itemDef.name = "Ghostly Bow";
    			itemDef.description = "A very powerfull bow used by ghosts".getBytes();
    		}
    		return itemDef;
    	}
    My item.cfg:
    Code:
    item = 12245	Ghostly_bow	A_very_powerfull_bow_used_by_ghosts.	48000	72000	0	0	0	0	0	95	0	0	0	0	0	0	0


    FINAL RESULT... Yes, it is atleast called a ghostly bow, and it goes on my head slot as well ..



    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2021
    Posts
    41
    Thanks given
    16
    Thanks received
    12
    Rep Power
    2
    youare using the wrong model id
    Reply With Quote  
     

  3. #3  
    Donator
    Zenpex's Avatar
    Join Date
    Mar 2021
    Posts
    42
    Thanks given
    6
    Thanks received
    0
    Discord
    View profile
    Rep Power
    36
    Quote Originally Posted by Sergei Draguno View Post
    youare using the wrong model id
    I have tried everything possible
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Feb 2016
    Posts
    224
    Thanks given
    169
    Thanks received
    51
    Discord
    View profile
    Rep Power
    119
    Quote Originally Posted by sudo. View Post
    I have tried everything possible
    I dont think you packed it properly or it wouldnt be that model did you repack the cache with this?
    https://www.rune-server.ee/runescape...repacking.html
    Reply With Quote  
     

  5. #5  
    l e l w o t
    Dank's Avatar
    Join Date
    Jan 2016
    Posts
    184
    Thanks given
    44
    Thanks received
    39
    Discord
    View profile
    Rep Power
    15
    /* Hardcoded items start here */
    /**/
    if (i == 12445)
    {
    itemDef.actions = new String[5];
    itemDef.actions[1] = "Weild";
    itemDef.modelID = 12246;
    itemDef.modelZoom = 2128;
    itemDef.modelRotation1 = 591;
    itemDef.modelRotation2 = 1034;
    itemDef.anInt204 = 138;
    itemDef.anInt199 = -1;
    itemDef.modelOffset1 = 8;
    itemDef.modelOffset2 = 11;
    itemDef.maleEquip1 = 12245;
    itemDef.femaleEquip1 = 12245;
    itemDef.anInt175 = -1;
    itemDef.stackable = false;
    itemDef.maleEquip2 = -1;
    itemDef.femaleEquip2 = -1;
    itemDef.stackable = false;
    itemDef.name = "Ghostly Bow";
    itemDef.description = "A very powerfull bow used by ghosts".getBytes();
    }
    return itemDef;
    }
    Shouldn't that be 12245?
    Last edited by Dank; 06-15-2021 at 11:31 PM. Reason: Changed 12445? to 12245?
    DON'T PM ME FOR MY DISCORD I WILL IGNORE ANY FURTHER REQUESTS
    Reply With Quote  
     


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: 0
    Last Post: 10-26-2016, 07:19 PM
  2. Adding Custom items to 718/742
    By samuni34 in forum Help
    Replies: 3
    Last Post: 05-24-2014, 04:01 PM
  3. Adding Custom Items? How to
    By Pandora7 in forum Help
    Replies: 0
    Last Post: 10-31-2013, 05:35 AM
  4. Adding custom items to trisidiax v3
    By gad123123 in forum Help
    Replies: 0
    Last Post: 03-19-2013, 06:27 PM
  5. Help adding custom items to ErasedPkz/Hybrid PvP?
    By CursedOrionScape in forum Help
    Replies: 12
    Last Post: 05-07-2012, 01:31 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •