Thread: [PI] No items dropped on death, duel arena doesn't always teleport....

Results 1 to 2 of 2
  1. #1 [PI] No items dropped on death, duel arena doesn't always teleport.... 
    Registered Member
    Join Date
    Sep 2011
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Hi, I'm having a few problems on the ErasedPkz source where items aren't dropped on death, you're not always teleported away from the duel arena, sometimes you get teleported to the tzhaar caves.

    If you're in a duel and the opponent logs out when they log back in they're in the arena on their own but can teleport away. And sometimes when you win a duel and the opponent logs out you get spam teleported and the victory window keeps appearing.

    Just wondering if anyone has managed to find a fix for this, here's the code I've got in PlayerAssistant.java for applying dead, if you need any more let me know.

    Code:
       public void applyDead() {    
    		c.respawnTimer = 15;
    		c.isDead = false;
    		Client o = (Client) Server.playerHandler.players[c.killerId];
    		if(c.duelStatus != 6) {
    			c.killerId = findKiller();
    			if(o != null) {
    				c.playerKilled = c.playerId;
    				if(o.duelStatus == 5) {
    					o.duelStatus++;
    				}
    				if (Server.playerHandler.players[c.playerId].connectedFrom != o.lastKilled && c.duelStatus == 0) {
    					o.pkPoints = (o.pkPoints + 4);
    					o.sendMessage("You recieved 4 pkPoints");
    					o.lastKilled = Server.playerHandler.players[c.playerId].connectedFrom;
    				} else {
    					o.sendMessage("You do not recieve pk points because you have killed " +c.playerName+ " twice in a row.");
    				}
    			}
    		}
    		c.faceUpdate(0);
    		c.npcIndex = 0;
    		c.playerIndex = 0;
    		c.stopMovement();
    					if (c.duelStatus <= 4) {
    				c.sendMessage("Oh dear you are dead!");
    			} else if(c.duelStatus != 6 || !c.inArena()) {
    				c.sendMessage("You have lost the duel!");
    				o.getPA().movePlayer(Config.DUELING_RESPAWN_X + (Misc.random(Config.RANDOM_DUELING_RESPAWN)),Config.DUELING_RESPAWN_Y + (Misc.random(Config.RANDOM_DUELING_RESPAWN)), 0);
    				c.getPA().movePlayer(Config.DUELING_RESPAWN_X + (Misc.random(Config.RANDOM_DUELING_RESPAWN)),Config.DUELING_RESPAWN_Y + (Misc.random(Config.RANDOM_DUELING_RESPAWN)), 0);
    			}
    		resetDamageDone();
    		c.DC++;
    		o.KC++;	
    		c.specAmount = 10;
    		c.getItems().addSpecialBar(c.playerEquipment[c.playerWeapon]);
    		c.lastVeng = 0;
    		c.vengOn = false;
    		resetFollowers();
    		c.attackTimer = 10;
    		if (Server.playerHandler.players[c.killerId].connectedFrom.equals(Server.playerHandler.players[c.playerKilled].connectedFrom)) {
    					o.sendMessage("You Don't Recieve PK Points for killing yourself!");
    		c.faceUpdate(0);
    		c.npcIndex = 0;
    		c.playerIndex = 0;
    		c.stopMovement();
    		if(c.duelStatus <= 4) {
    			c.sendMessage("Oh dear you are dead!");
    		} else if(c.duelStatus != 6) {
    			c.sendMessage("You have lost the duel!");
    		}
    		resetDamageDone();
    		c.lastVeng = 0;
    		c.vengOn = false;
    		resetFollowers();
    		c.attackTimer = 10;
    		removeAllWindows();
    		c.tradeResetNeeded = true;
    		return;
    		}
    	}
    Thanks.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Sep 2011
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Nevermind, seems to be working now :/
    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] Duel Arena Death??!!
    By Peach in forum Help
    Replies: 3
    Last Post: 02-21-2011, 02:33 PM
  2. Items dropped on death[508]
    By Hotyute in forum Tutorials
    Replies: 277
    Last Post: 12-05-2009, 03:27 AM
  3. when death items dropped
    By nobiwa in forum Requests
    Replies: 1
    Last Post: 08-27-2009, 02:48 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
  •