Thread: [PI] PvP drop help [PI]

Results 1 to 2 of 2
  1. #1 [PI] PvP drop help [PI] 
    Registered Member pk3r john's Avatar
    Join Date
    Apr 2009
    Posts
    877
    Thanks given
    16
    Thanks received
    30
    Rep Power
    63
    I want to make it so that when a person dies, you not only get their items but may get a bonus item. I don't get an error but it glitches in-game. It drops every statuette, instead of only dropping one. Also the person who died stays dead, and can't move. He doesn't even get teleported back to where u get teleported when you die.

    Heres what I added, I know it the int should be in playerassistant.java but i'll add it there later. I just want to get this working first.

    In ItemAssistant.java:
    in the dropAllItems method,
    Code:
    Server.itemHandler.createGroundItem(o, c.pvpDrops[i], c.getX(), c.getY(), 1, c.killerId);
    in client.java:
    Code:
    public static int pvpDrops[] = {14876, 14877, 14878, 14879, 14880, 14881};
    In case you need it, here is my whole dropAllItems method:
    Code:
    	public void dropAllItems() {
    		Client o = (Client) Server.playerHandler.players[c.killerId];
    		
    		for(int i = 0; i < c.playerItems.length; i++) {
    			if(o != null) {
    				if (tradeable(c.playerItems[i] - 1)) {
    					Server.itemHandler.createGroundItem(o, c.playerItems[i] -1, c.getX(), c.getY(), c.playerItemsN[i], c.killerId);
    					Server.itemHandler.createGroundItem(o, c.pvpDrops[i], c.getX(), c.getY(), 1, c.killerId);
    				} else {
    					if (specialCase(c.playerItems[i] - 1))
    					Server.itemHandler.createGroundItem(o, 995, c.getX(), c.getY(), getUntradePrice(c.playerItems[i]-1), c.killerId);
    					Server.itemHandler.createGroundItem(c, c.playerItems[i] -1, c.getX(), c.getY(), c.playerItemsN[i], c.playerId);
    				}
    			} else {
    				Server.itemHandler.createGroundItem(c, c.playerItems[i] -1, c.getX(), c.getY(), c.playerItemsN[i], c.playerId);
    			}
    		} 
    		for(int e = 0; e < c.playerEquipment.length; e++) {
    			if(o != null) {
    				if (tradeable(c.playerEquipment[e])) {
    					Server.itemHandler.createGroundItem(o, c.playerEquipment[e], c.getX(), c.getY(), c.playerEquipmentN[e], c.killerId);
    				} else {
    					if (specialCase(c.playerEquipment[e]))
    						Server.itemHandler.createGroundItem(o, 995, c.getX(), c.getY(), getUntradePrice(c.playerEquipment[e]), c.killerId);
    					Server.itemHandler.createGroundItem(c, c.playerEquipment[e], c.getX(), c.getY(), c.playerEquipmentN[e], c.playerId);
    				}
    			} else {
    				Server.itemHandler.createGroundItem(c, c.playerEquipment[e], c.getX(), c.getY(), c.playerEquipmentN[e], c.playerId);
    			}
    		}
    		if(o != null) {	
    			Server.itemHandler.createGroundItem(o, 526, c.getX(), c.getY(), 1, c.killerId);
    		}	
    	}
    Please help.
    Reply With Quote  
     

  2. #2  
    Banned oblivion-rs's Avatar
    Join Date
    Dec 2008
    Age
    29
    Posts
    1,041
    Thanks given
    3
    Thanks received
    12
    Rep Power
    0
    need help with this aswell
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •