Thread: [ELVARG] ItemsKeptOnDeath

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11  
    what the dog doin

    mikan's Avatar
    Join Date
    Aug 2017
    Posts
    917
    Thanks given
    698
    Thanks received
    731
    Discord
    View profile
    Rep Power
    4898
    yeah theres different variations of the packet in the source, experiment with each different 1 because 1 works
    Reply With Quote  
     

  2. #12  
    Registered Member Kairon's Avatar
    Join Date
    Feb 2017
    Posts
    204
    Thanks given
    54
    Thanks received
    45
    Rep Power
    33
    Just a question, is there any changes between old and new client?

    Still haven't figured it out tho sadly.
    Reply With Quote  
     

  3. #13  
    Registered Member Kairon's Avatar
    Join Date
    Feb 2017
    Posts
    204
    Thanks given
    54
    Thanks received
    45
    Rep Power
    33
    Bump for this, still haven't figured out!

    It shows like that when I got full inv and wearing all items.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #14  
    Banned

    Join Date
    Oct 2012
    Posts
    4,716
    Thanks given
    1,682
    Thanks received
    1,105
    Rep Power
    0
    Check packet structure of packet being sent on both clients and match them in the server.
    Reply With Quote  
     

  5. Thankful user:


  6. #15  
    Registered Member Kairon's Avatar
    Join Date
    Feb 2017
    Posts
    204
    Thanks given
    54
    Thanks received
    45
    Rep Power
    33
    Fixed, thanks to Patrick.

    You must spread some Reputation around before giving it to _Patrick_ again.
    Reply With Quote  
     

  7. Thankful user:


  8. #16  
    Tea Drinker

    RSPSi's Avatar
    Join Date
    Mar 2011
    Posts
    171
    Thanks given
    68
    Thanks received
    170
    Rep Power
    328
    You only really need 2 inventory widgets instead.
    Server: [Only registered and activated users can see links. ]
    Client: [Only registered and activated users can see links. ]

    Server side needs a bit of work for the stackable stuff though.
    3D Map Editor: [Only registered and activated users can see links. ]

    Discord:RSPSi#4213
    Reply With Quote  
     

  9. Thankful user:


  10. #17  
    Registered Member Kairon's Avatar
    Join Date
    Feb 2017
    Posts
    204
    Thanks given
    54
    Thanks received
    45
    Rep Power
    33
    Quote Originally Posted by RSPSi View Post
    You only really need 2 inventory widgets instead.
    Server: [Only registered and activated users can see links. ]
    Client: [Only registered and activated users can see links. ]

    Server side needs a bit of work for the stackable stuff though.
    Would you mind to share addInventory method in widget class?
    Reply With Quote  
     

  11. #18  
    Tea Drinker

    RSPSi's Avatar
    Join Date
    Mar 2011
    Posts
    171
    Thanks given
    68
    Thanks received
    170
    Rep Power
    328
    Quote Originally Posted by Kairon View Post
    Would you mind to share addInventory method in widget class?
    Sure

    [Only registered and activated users can see links. ]
    3D Map Editor: [Only registered and activated users can see links. ]

    Discord:RSPSi#4213
    Reply With Quote  
     

  12. Thankful user:


  13. #19  
    Registered Member Kairon's Avatar
    Join Date
    Feb 2017
    Posts
    204
    Thanks given
    54
    Thanks received
    45
    Rep Power
    33
    Quote Originally Posted by RSPSi View Post
    Sure

    [Only registered and activated users can see links. ]
    Thanks for this!
    Reply With Quote  
     

  14. #20  
    Banned

    Join Date
    Nov 2014
    Posts
    615
    Thanks given
    180
    Thanks received
    156
    Rep Power
    0
    Code:
    		case OPEN_ITEMS_KEPT_ON_DEATH_SCREEN:
    			if(!player.busy()) {
    				ItemsKeptOnDeath.open(player);
    			} else {
    				player.getPacketSender().sendMessage("You cannot do that right now.");
    			}
    			break;
    Buttonclick packet listener

    Code:
    	public static void sendInterfaceData(Player player) {
    
    		player.getPacketSender().sendString(17107, ""+getAmountToKeep(player));
    
    		ArrayList<Item> toKeep = getItemsToKeep(player);
    		for(int i = 0; i < toKeep.size(); i++) {
    			player.getPacketSender().sendItemOnInterface(17108+i, toKeep.get(i).getId(), 0, 1);
    		}
    
    		int toSend = 17112;
    		for(Item item : Misc.concat(player.getInventory().getItems(), player.getEquipment().getItems())) {
    			if(item == null || item.getId() <= 0 || item.getAmount() <= 0 || !item.getDefinition().isTradeable() || toKeep.contains(item)) {
    				continue;
    			}
    			player.getPacketSender().sendItemOnInterface(toSend, item.getId(), 0, item.getAmount());
    			toSend++;
    		}
    	}
    ItemsKeptOnDeath class

    Code:
    
    	public static void itemsKeptOnDeath(GameFont[] tda) {
    
    		removeSomething(16999); //close button in text
    		Widget rsinterface = interfaceCache[10494];
    		rsinterface.spritePaddingX = 6;
    		rsinterface.spritePaddingY = 5;
    		rsinterface = interfaceCache[10600];
    		rsinterface.spritePaddingX = 6;
    		rsinterface.spritePaddingY = 5;
    
    
    		rsinterface = addInterface(17100);
    		addSpriteLoader(17101, 139);
    		/*Widget scroll = addTabInterface(17149);
    		scroll.width = 300; scroll.height = 183; scroll.scrollMax = 220;*/
    		addText(17103, "Items Kept on Death", tda, 2, 0xff981f, false, false);
    		addText(17104, "Items you will keep on death:", tda, 1, 0xff981f, false, false);
    		addText(17105, "Items you will lose on death:", tda, 1, 0xff981f, false, false);
    		addText(17106, "Info", tda, 1, 0xff981f, false, false);
    		addText(17107, "3", tda, 2, 0xffff00, false, false);
    		String[] options = {null};
    
    		/*
    		 * Items on interface
    		 */
    
    		//Top Row
    		for(int top = 17108; top <= 17111; top++) {
    			addItemOnInterface(top, 17100, options);
    		}
    		//1st row
    		for(int top = 17112; top <= 17119; top++) {
    			addItemOnInterface(top, 17100, options);
    		}
    		//2nd row
    		for(int top = 17120; top <= 17127; top++) {
    			addItemOnInterface(top, 17100, options);
    		}
    		//3rd row
    		for(int top = 17128; top <= 17135; top++) {
    			addItemOnInterface(top, 17100, options);
    		}
    		//4th row
    		for (int top = 17136; top <= 17142; top++) {
    			addItemOnInterface(top, 17100, options);
    		}
    		//5th row
    		for (int top = 17143; top <= 17148; top++) {
    			addItemOnInterface(top, 17100, options);
    		}
    
    		//6th row (4 items)
    		for(int top = 17149; top <= 17152; top++) {
    			addItemOnInterface(top, 17100, options);
    		}
    
    		setChildren(56, rsinterface);
    		//addTabInterface(5);
    		setBounds(17101, 7,8, 0, rsinterface);
    		setBounds(16999, 478, 14, 1, rsinterface);
    		setBounds(17103, 185, 18, 2, rsinterface);
    		setBounds(17104, 22, 50, 3, rsinterface);
    		setBounds(17105, 22, 110, 4, rsinterface);
    		setBounds(17106, 347, 50, 5, rsinterface);
    
    		setBounds(17107, 412, 287, 6, rsinterface);
    		setBounds(17149, 23, 132, 7, rsinterface);
    		//setBounds(17018, 480, 18, 8, rsinterface);
    		//setBounds(17019, 480, 18, 9, rsinterface);
    		
    		setBounds(38117, 480, 18, 8, rsinterface);
    		setBounds(38118, 480, 18, 9, rsinterface);
    		
    		//setBounds(5, 480, 18, 10, rsinterface);
    
    		//Positions for  item on interface (items kept on death
    		int	child_index = 10;
    		int topPos = 26;
    		for(int top = 17108; top <= 17111; top++) {
    			setBounds(top, topPos, 72, child_index, rsinterface);
    			topPos += 44;
    			child_index++;
    		}
    		//setBounds(17000, 478, 14, child_index++, rsinterface);
    		itemsOnDeathDATA(tda);
    		setBounds(17315, 348, 64, child_index++, rsinterface);
    
    		topPos = 26;
    
    		//1st row
    		for(int top = 17112; top <= 17118; top++) {
    			setBounds(top, topPos, 133, child_index, rsinterface);
    			topPos += 44;
    			child_index++;
    		}
    		//2nd row
    		topPos = 26;
    		for(int top = 17119; top <= 17125; top++) {
    			setBounds(top, topPos, 168, child_index, rsinterface);
    			topPos += 44;
    			child_index++;
    		}
    		//3rd row
    		topPos = 26;
    		for(int top = 17126; top <= 17132; top++) {
    			setBounds(top, topPos, 203, child_index, rsinterface);
    			topPos += 44;
    			child_index++;
    		}
    		//4th row
    		topPos = 26;
    		for (int top = 17133; top <= 17139; top++) {
    			setBounds(top, topPos, 238, child_index, rsinterface);
    			topPos += 44;
    			child_index++;
    		}
    		//5th row
    		topPos = 26;
    		for (int top = 17140; top <= 17145; top++) {
    			setBounds(top, topPos, 273, child_index, rsinterface);
    			topPos += 44;
    			child_index++;
    		}
    
    		//6th row (4 items)
    		topPos = 26;
    		for(int top = 17146; top <= 17152; top++) {
    			setBounds(top, topPos, 311, child_index, rsinterface);
    			topPos += 44;
    			child_index++;
    		}
    	}
    The widget
    Reply With Quote  
     

Page 2 of 3 FirstFirst 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. elvarg.com domain for sale
    By Elvarg in forum Selling
    Replies: 19
    Last Post: 05-21-2013, 11:09 PM
  2. Elvarg - This is your story.
    By Streamy in forum Projects
    Replies: 8
    Last Post: 03-09-2013, 06:58 AM
  3. Elvarg RSPS
    By Slixr in forum Advertise
    Replies: 6
    Last Post: 01-20-2013, 07:08 AM
  4. Replies: 0
    Last Post: 07-14-2010, 06:35 PM
  5. Elvarg Gate
    By lemby pk in forum Help
    Replies: 1
    Last Post: 05-29-2009, 10:55 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
  •