Thread: Can't figure this out myself.. any ideas?

Results 1 to 4 of 4
  1. #1 Can't figure this out myself.. any ideas? 
    Registered Member Grandpa's Avatar
    Join Date
    Dec 2015
    Posts
    106
    Thanks given
    13
    Thanks received
    3
    Rep Power
    13
    Trying to add models / items for my new project.
    I'm using Galkons methode for cache packing models etc - https://www.rune-server.ee/runescape...repacking.html
    Therefor i need to have the ints inside class8 or itemDef. In my case i have ItemDef.
    My problem is - i can't find the switch statement or where i add the Ints.

    Here is my ItemDef
    http://pastebin.com/4KPb1yVg

    I found this -
    Code:
     private ItemDef()
    	{
    		id = -1;
    	}
    Could this be it? not quite sure.

    Attached image
    Last edited by Grandpa; 02-15-2017 at 06:12 PM. Reason: Not Fixed
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2017
    Posts
    196
    Thanks given
    15
    Thanks received
    22
    Rep Power
    11
    Try something similar to this

    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 (i) {
    		
    		case 16000:
    			itemDef.name = "Dice (up to 100)";
    			itemDef.modelID = 47852;
    			itemDef.itemActions = new String[5];
    			itemDef.itemActions[0] = "Private-roll";
    			itemDef.itemActions[1] = "Clan-roll";
    			itemDef.itemActions[2] = "Choose-dice";
    			itemDef.itemActions[3] = "Put-away";
    			itemDef.itemActions[4] = "Drop";
    			itemDef.certID = 15099;
    			itemDef.certTemplateID = -1;
    			itemDef.modelRotationX = 215;
    			itemDef.modelRotationY = 94;
    			itemDef.modelZoom = 1104;
    			break;
    		}
    		
    		if (itemDef.certTemplateID != -1)
    			itemDef.toNote();
    		return itemDef;
    	}
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member Grandpa's Avatar
    Join Date
    Dec 2015
    Posts
    106
    Thanks given
    13
    Thanks received
    3
    Rep Power
    13
    Quote Originally Posted by Sami2427 View Post
    Try something similar to this
    Thanks worked, really appreciate.
    Reply With Quote  
     

  5. #4  
    Registered Member lmao6's Avatar
    Join Date
    Feb 2017
    Posts
    22
    Thanks given
    3
    Thanks received
    6
    Rep Power
    10
    Quote Originally Posted by Grandpa View Post
    Thanks worked, really appreciate.
    Btw you should use 05prime release if you want to work on #289
    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. [PI] Can't figure this out..
    By Y So Serious in forum Help
    Replies: 10
    Last Post: 12-03-2011, 09:38 AM
  2. Can't Figure This Out. Please Help
    By Skyn in forum Help
    Replies: 10
    Last Post: 02-06-2011, 07:29 PM
  3. [614] I can't Figure This Out [614]
    By Ecstacy Pkz in forum Help
    Replies: 2
    Last Post: 12-03-2010, 11:25 PM
  4. Can't figure this out, Rep.
    By sadgrills in forum Help
    Replies: 0
    Last Post: 04-14-2010, 01:01 AM
  5. I can't figure this out...
    By Soulevoker in forum Help
    Replies: 12
    Last Post: 12-03-2009, 07:53 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
  •