Thread: [Matrix 718] Send Items on Death Problems

Results 1 to 4 of 4
  1. #1 [Matrix 718] Send Items on Death Problems 
    Registered Member pistolpete332's Avatar
    Join Date
    Jun 2010
    Posts
    261
    Thanks given
    40
    Thanks received
    7
    Rep Power
    4
    The problem is that sometimes more expensive stuff gets dropped over less expensive stuff.

    Here's my shit code in sendItemsOnDeath method.. I started trying random shit so it's pretty fucked up

    anyone have code for custom item values so that they protect properly? Problem I think is that it reads other values from the cache. not sure doe

    Code:
    Item lastItem = new Item(1, 1);
    		for (int i = 0; i < keptAmount; i++) {
    			for (Item item : containedItems) {
    			int price = item.getDefinitions().getValue();		
    			for (int d : pvpItems)
    			if((item.getId()) != (d)){
    			price = 0;
    			}
    		switch(item.getId()) {
    		case 11724:
    		case 11726:
                 price = 11500000;
                break; 	
    			
    
    		case 13740:
    		price = 20000000;
    		break; 
    			
    
    		case 18359:
                price = 22500000;
                break; 
    		
    		case 22494:
                price = 24000000;
            break; 
    		
    		case 19784:
    		case 11694:
                price = 25000000;
    		break;      
    				
    		case 14484:
                price = 27500000;
            break;   
    		
    		case 20151:
    		case 20155:
                price = 35000000;
            break;
        }
    			for (int d : pvpItems)
    				if ((lastItem.getId() != d) && (price >= lastItem.getDefinitions().getValue()) ) {
    					lastItem = item;
    				}
    			}
    			keptItems.add(lastItem);
    			containedItems.remove(lastItem);
    			lastItem = new Item(1, 1);
    		}
    		inventory.rese
    Reply With Quote  
     

  2. #2  
    Registered Member pistolpete332's Avatar
    Join Date
    Jun 2010
    Posts
    261
    Thanks given
    40
    Thanks received
    7
    Rep Power
    4
    Bump
    Reply With Quote  
     

  3. #3  
    Return of the Gods
    Zeus's Avatar
    Join Date
    Jul 2012
    Posts
    251
    Thanks given
    10
    Thanks received
    42
    Discord
    View profile
    Rep Power
    74
    bump
    Reply With Quote  
     

  4. #4  
    Registered Member
    Ynneh's Avatar
    Join Date
    Mar 2010
    Posts
    2,204
    Thanks given
    146
    Thanks received
    254
    Discord
    View profile
    Rep Power
    241
    All i did was make a itemlist with price in data/items and link it to server and set the price and that choose what protected over what. lol
    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. [Matrix] Sending items on death
    By k0ed ur mom in forum Help
    Replies: 3
    Last Post: 03-30-2013, 02:37 AM
  2. 718 Lose item on death
    By L3git in forum Help
    Replies: 1
    Last Post: 12-23-2012, 04:51 AM
  3. [PI] Items on death problem
    By Kurdz in forum Help
    Replies: 1
    Last Post: 08-08-2011, 07:49 PM
  4. Items on death problems
    By karbon v2 in forum Help
    Replies: 0
    Last Post: 02-21-2010, 08:49 PM
  5. wtf...items on death problem
    By 2pro in forum Help
    Replies: 5
    Last Post: 09-17-2009, 10:09 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
  •