Thread: PI Applydead

Results 1 to 5 of 5
  1. #1 PI Applydead 
    Registered Member
    Join Date
    Jun 2013
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    hi i have similar problem to this everytime someone dies this is what it shows




    my apply dead is
    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);*/
    			}
    		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;
    		}
    	}
    	
    			public void dropitems() 
    	{
    	if(c.lastsummon > 0) {
    if(c.totalstored > 0) {
    c.firstslot();
    for(int i = 0; i < 29; i += 1)
    {
    Server.itemHandler.createGroundItem(c, c.storeditems[i], Server.npcHandler.npcs[c.summoningnpcid].absX, Server.npcHandler.npcs[c.summoningnpcid].absY, 1, c.playerId);
    c.storeditems[i] = -1;
    c.occupied[i] = false;
    }
    }
    c.lastsummon = -1;
    c.totalstored = 0;
    c.summoningnpcid = 0;
    c.summoningslot = 0;
    c.storing = false;
    c.sendMessage("Your BoB items have drop on the floor");
    }	
    	}
    	/**
    	* Location change for digging, levers etc
    	**/
    Reply With Quote  
     

  2. #2  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    25
    Posts
    4,432
    Thanks given
    892
    Thanks received
    1,525
    Rep Power
    3228
    Which line is line 1252?
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2013
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    i just went in the files and checked it like 5 times but line 1252 is the top break
    if(itemId == 995) {
    c.sendMessage("You can't alch coins.");
    break;
    }
    c.getItems().deleteItem(itemId, slot, 1);
    c.getItems().addItem(995, (int)(c.getShops().getItemShopValue(itemId)*.75));
    c.startAnimation(c.MAGIC_SPELLS[50][2]);
    c.gfx100(c.MAGIC_SPELLS[50][3]);
    c.alchDelay = System.currentTimeMillis();
    sendFrame106(6);
    addSkillXP(c.MAGIC_SPELLS[50][7] * Config.MAGIC_EXP_RATE, 6);
    refreshSkill(6);
    }
    break;
    case 8349:
    handleAlt(itemId);
    break;
    }
    }

    /**
    * Dieing
    **/

    public String getKM() {
    int kMCount = Misc.random(11);
    switch (kMCount) {
    case 0: return "With a crushing blow, you defeat "+ c.playerName+".";
    case 1: return "It's a humiliating defeat for "+ c.playerName+".";
    case 2: return c.playerName +" didn't stand a chance against you.";
    case 3: return "You've defeated "+ c.playerName+".";
    case 4: return c.playerName +" regrets the day they met you in combat.";
    case 5: return "It's all over for "+c.playerName+".";
    case 6: return c.playerName +" falls before you might.";
    case 7: return "Can anyone defeat you? Certainly not "+c.playerName+".";
    case 8: return c.playerName +" has fallen under your might.";
    case 9: return c.playerName +" crumbled under your power.";
    case 10: return "You have proven "+ c.playerName+" to be an unworthy opponent.";
    default: return "You were clearly a better fighter than "+c.playerName+".";
    }
    }


    public void applyDead() {
    Reply With Quote  
     

  4. #4  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    25
    Posts
    4,432
    Thanks given
    892
    Thanks received
    1,525
    Rep Power
    3228
    Quote Originally Posted by wantedrules View Post
    i just went in the files and checked it like 5 times but line 1252 is the top break
    What is before that break?
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jun 2013
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    if(itemId == 995) {
    c.sendMessage("You can't alch coins.");
    thats it
    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]applyDead Error, please help.
    By TheScape in forum Help
    Replies: 14
    Last Post: 12-18-2012, 12:02 AM
  2. Replies: 11
    Last Post: 12-25-2011, 02:04 AM
  3. [PI] Applydead error?
    By Neekage in forum Help
    Replies: 25
    Last Post: 08-25-2011, 09:01 PM
  4. [PI] applydead and givelife method correct?
    By Ninja assassin in forum Help
    Replies: 3
    Last Post: 04-10-2011, 09:53 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
  •