Thread: not dieing just moving

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 not dieing just moving 
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    So basically whenever a player "dies" they just move. And they dont lose their items no matter the situation. Whether its in the wilderness or dieing from an npc.
    They dont actually die and drop their items.........

    theres no animation.. just c.moveplayer basically


    How do I fix this?
    Reply With Quote  
     

  2. #2  
    Ex-Staff

    Koy's Avatar
    Join Date
    Oct 2010
    Posts
    1,871
    Thanks given
    1,299
    Thanks received
    910
    Rep Power
    5000
    How are we supposed to help if you don't show us any of the code?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    Quote Originally Posted by Koy View Post
    How are we supposed to help if you don't show us any of the code?
    How am I supposed to show the code when i dont know what code to show you? lol
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    update: I fixed the moving but now the player DOES NOT DIE- the player just sits there and keeps going back to full HP once it hits 0
    Reply With Quote  
     

  5. #5  
    Donator

    Join Date
    Feb 2013
    Posts
    1,670
    Thanks given
    477
    Thanks received
    244
    Rep Power
    29
    Quote Originally Posted by Balaney View Post
    update: I fixed the moving but now the player DOES NOT DIE- the player just sits there and keeps going back to full HP once it hits 0
    Is this Project Isanity(PI)? If it is give us the applyDeath method or whatever that shits called.
    Reply With Quote  
     

  6. #6  
    Server developer


    Join Date
    Jul 2010
    Posts
    881
    Thanks given
    265
    Thanks received
    55
    Rep Power
    94
    Applydead & givelife method ples?


    I am the one who knocks
    - - - - -

    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    Quote Originally Posted by Aviles View Post
    Is this Project Isanity(PI)? If it is give us the applyDeath method or whatever that shits called.
    Apply Dead
    Code:
    public void applyDead() {
    		if(c.inClanWars()) {
    			c.getClanWars().handleKill(c, o);
    		}
    		c.getTradeAndDuel().stakedItems.clear();
    		Client o = (Client) PlayerHandler.players[c.killerId];
    		if (c.prayerActive[21] || c.curseActive[17] && !c.inDuelArena()) {
    			if (o != null) {
    				if(!(c.npcIndex > 0) && c.inPits == false){
    				}
    				applyWrath();
    			}
    		}
    Give Life
    Code:
    public void giveLife() {
    		c.isDead = false;
    		resetDamageDone();
    		c.faceUpdate(-1);
    		c.freezeTimer = 0;
    		if (c.inClanWars()) {
    			c.getClanWars().handleDeath(c);
    		}
    		if(ClanWarHandler.clanWars[c.clanWarId].clan1Players.contains(c)) {
    			movePlayer(ClanWarConstants.DEATH_CLAN1X, ClanWarConstants.DEATH_CLAN1Y, ClanWarHandler.clanWars[c.clanWarId].getHeight());
    		} else {
    			movePlayer(ClanWarConstants.DEATH_CLAN2X, ClanWarConstants.DEATH_CLAN2Y, ClanWarHandler.clanWars[c.clanWarId].getHeight());
    		}
    		if(ClanWarHandler.clanWars[c.clanWarId].clan2Players.contains(c)) {
    			if(ClanWarHandler.clanWars[c.clanWarId].getClan1Kills() >= ClanWarConstants.MAX_KILLS) {
    				c.sendMessage("called");
    				c.getClanWars().handleWin("clan1", ClanWarHandler.clanWars[c.clanWarId]);
    			}
    		} else if (ClanWarHandler.clanWars[c.clanWarId].clan1Players.contains(c)) {
    			if(ClanWarHandler.clanWars[c.clanWarId].getClan2Kills() >= ClanWarConstants.MAX_KILLS) {
    				c.sendMessage("called");
    				c.getClanWars().handleWin("clan2", ClanWarHandler.clanWars[c.clanWarId]);
    			}
    		}


    If I didnt give you all of the method then my bad, just let me know
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    Quote Originally Posted by klaasvaakjes View Post
    Applydead & givelife method ples?
    Apply Dead
    Code:
    public void applyDead() {
    		if(c.inClanWars()) {
    			c.getClanWars().handleKill(c, o);
    		}
    		c.getTradeAndDuel().stakedItems.clear();
    		Client o = (Client) PlayerHandler.players[c.killerId];
    		if (c.prayerActive[21] || c.curseActive[17] && !c.inDuelArena()) {
    			if (o != null) {
    				if(!(c.npcIndex > 0) && c.inPits == false){
    				}
    				applyWrath();
    			}
    		}
    Give Life
    Code:
    public void giveLife() {
    		c.isDead = false;
    		resetDamageDone();
    		c.faceUpdate(-1);
    		c.freezeTimer = 0;
    		if (c.inClanWars()) {
    			c.getClanWars().handleDeath(c);
    		}
    		if(ClanWarHandler.clanWars[c.clanWarId].clan1Players.contains(c)) {
    			movePlayer(ClanWarConstants.DEATH_CLAN1X, ClanWarConstants.DEATH_CLAN1Y, ClanWarHandler.clanWars[c.clanWarId].getHeight());
    		} else {
    			movePlayer(ClanWarConstants.DEATH_CLAN2X, ClanWarConstants.DEATH_CLAN2Y, ClanWarHandler.clanWars[c.clanWarId].getHeight());
    		}
    		if(ClanWarHandler.clanWars[c.clanWarId].clan2Players.contains(c)) {
    			if(ClanWarHandler.clanWars[c.clanWarId].getClan1Kills() >= ClanWarConstants.MAX_KILLS) {
    				c.sendMessage("called");
    				c.getClanWars().handleWin("clan1", ClanWarHandler.clanWars[c.clanWarId]);
    			}
    		} else if (ClanWarHandler.clanWars[c.clanWarId].clan1Players.contains(c)) {
    			if(ClanWarHandler.clanWars[c.clanWarId].getClan2Kills() >= ClanWarConstants.MAX_KILLS) {
    				c.sendMessage("called");
    				c.getClanWars().handleWin("clan2", ClanWarHandler.clanWars[c.clanWarId]);
    			}
    		}


    If I didnt give you all of the method then my bad, just let me know
    Reply With Quote  
     

  9. #9  
    Donator

    Join Date
    Feb 2013
    Posts
    1,670
    Thanks given
    477
    Thanks received
    244
    Rep Power
    29
    LOL WHAT!?

    On the givelife method it sets the boolean isdead to false, the later on the code if the player dies in clan wars it handles the death, while the applydead does that too?

    I need more than this though, like the whole method.
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jun 2014
    Posts
    144
    Thanks given
    3
    Thanks received
    8
    Rep Power
    3
    Quote Originally Posted by Aviles View Post
    LOL WHAT!?

    On the givelife method it sets the boolean isdead to false, the later on the code if the player dies in clan wars it handles the death, while the applydead does that too?

    I need more than this though, like the whole method.

    APPLY DEAD

    Code:
    public void applyDead() {
    		if(c.inClanWars()) {
    			c.getClanWars().handleKill(c, o);
    		}
    		c.getTradeAndDuel().stakedItems.clear();
    		Client o = (Client) PlayerHandler.players[c.killerId];
    		if (c.prayerActive[21] || c.curseActive[17] && !c.inDuelArena()) {
    			if (o != null) {
    				if(!(c.npcIndex > 0) && c.inPits == false){
    				}
    				applyWrath();
    			}
    		}
    		c.respawnTimer = 12;
    		c.isDead = false;
    		if (c.duelStatus != 6) {
    			c.killerId = findKiller();
    			if (o != null) {
    				o.hasGivenKS = false;
    				c.hasGivenKS = false;
    				o.hasSentDeathMessage = false;
    				c.hasSentDeathMessage = false;
    				GabbesAchievements.writeAchievementTab(c);
    				GabbesAchievements.writeAchievementTab(o);
    				if (c.inCwGame == false && o.inCwGame == false) {
    					if (c.killerId != c.playerId) {
    						o.getPkRewardSystem().add(c);
    						o.playerKilled = c.playerId;
    						if (o.duelStatus == 5) {
    							o.duelStatus++;
    						}
    					}
    				}
    			}
    
    			c.faceUpdate(0);
    			CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
    				@Override
    				public void execute(CycleEventContainer container) {
    					if (c != null) {
    						c.npcIndex = 0;
    						c.playerIndex = 0;
    					}
    					container.stop();
    
    				}
    
    				@Override
    				public void stop() {
    
    				}
    			}, 5);
    			c.stopMovement();
    			if (c.inCw()) {
    				c.cwDeaths += 1;
    				Client o1 = (Client) PlayerHandler.players[c.killerId];
    				o1.cwKills += 1;
    				if(c.duelStatus <= 4) {
    					c.getTradeAndDuel().stakedItems.clear();
    					c.sendMessage("Oh dear you are dead!");
    				} else if(c.duelStatus != 6) {
    					c.getTradeAndDuel().stakedItems.clear();
    					c.sendMessage("You have lost the duel!!!");
    				}
    			}
    			resetDamageDone();
    			c.specAmount = 10;
    			c.getItems().addSpecialBar(c.playerEquipment[Player.playerWeapon]);
    			c.lastVeng = 0;
    			c.vengOn = false;
    			resetFollowers();
    			c.attackTimer = 10;
    		}
    	}

    GIVE LIFE




    Code:
    public void giveLife() {
    		c.isDead = false;
    		resetDamageDone();
    		c.faceUpdate(-1);
    		c.freezeTimer = 0;
    		if (c.inClanWars()) {
    			c.getClanWars().handleDeath(c);
    		}
    		if(ClanWarHandler.clanWars[c.clanWarId].clan1Players.contains(c)) {
    			movePlayer(ClanWarConstants.DEATH_CLAN1X, ClanWarConstants.DEATH_CLAN1Y, ClanWarHandler.clanWars[c.clanWarId].getHeight());
    		} else {
    			movePlayer(ClanWarConstants.DEATH_CLAN2X, ClanWarConstants.DEATH_CLAN2Y, ClanWarHandler.clanWars[c.clanWarId].getHeight());
    		}
    		if(ClanWarHandler.clanWars[c.clanWarId].clan2Players.contains(c)) {
    			if(ClanWarHandler.clanWars[c.clanWarId].getClan1Kills() >= ClanWarConstants.MAX_KILLS) {
    				c.sendMessage("called");
    				c.getClanWars().handleWin("clan1", ClanWarHandler.clanWars[c.clanWarId]);
    			}
    		} else if (ClanWarHandler.clanWars[c.clanWarId].clan1Players.contains(c)) {
    			if(ClanWarHandler.clanWars[c.clanWarId].getClan2Kills() >= ClanWarConstants.MAX_KILLS) {
    				c.sendMessage("called");
    				c.getClanWars().handleWin("clan2", ClanWarHandler.clanWars[c.clanWarId]);
    			}
    		}
    		 if (!CastleWars.isInCw(c) && !(c.duelStatus != 5) && !c.lostDuel && FightPits.getState(c) == null && !c.inFightCaves() && !c.inPcGame() && !c.inFunPk()) {
    			if (c.playerRights < 6) {
    				if (!c.isSkulled && !c.isInArd()) {
    					c.getItems().keepItem(0, true);
    					c.getItems().keepItem(1, true);
    					c.getItems().keepItem(2, true);
    				}
    				if (c.prayerActive[10] || c.curseActive[0]
    						&& System.currentTimeMillis() - c.lastProtItem > 700) {
    					c.getItems().keepItem(3, true);
    				}
    				c.getItems().dropAllItems();
    				c.getItems().deleteAllItems();
    				// GRAVE STONE
    				/*
    				 * if(!c.inWild()) { c.playerDeathX = c.absX; c.playerDeathY =
    				 * c.absY; c.theDeadGuy = c.playerName; c.GSTimer = 120;
    				 * c.startGSEvent(); }
    				 */
    				if (!c.isSkulled && !c.isInArd()) {
    					for (int i1 = 0; i1 < 3; i1++) {
    						if (c.itemKeptId[i1] > 0) {
    							c.getItems().addItem(c.itemKeptId[i1], 1);
    						}
    					}
    				}
    				if (c.prayerActive[10] || c.isInArd()) { // if we have
    					// protect items
    					if (c.itemKeptId[3] > 0) {
    						c.getItems().addItem(c.itemKeptId[3], 1);
    					}
    				}
    			}
    			c.getItems().resetKeepItems();
    		}
    		c.getCombat().resetPrayers();
    		for (int i = 0; i < 25; i++) {
    			c.playerLevel[i] = getLevelForXP(c.playerXP[i]);
    			c.getPA().refreshSkill(i);
    		}
    		if (!c.inPits && !c.inFightCaves()) {
    			c.getItems().resetKeepItems();
    		}
    		if (c.inBarbDef) {
    			Server.barbDefence.endGame(c, false);
    		} else if (FightPits.getState(c) != null) {
    			FightPits.handleDeath(c);
    		} else if (c.fightPitsArea()) {
    			c.getPA().movePlayer(2399, 5178, 0);
    		} else if (c.inConquer()) {
    			c.getPA().resetConquer();
    		} else if (c.inCw()) {
    			if (CastleWars.getTeamNumber(c) == 1) {
    				c.getPlayerAssistant().movePlayer(2426 + Misc.random(3),
    						3076 - Misc.random(3), 1);
    			} else {
    				c.getPlayerAssistant().movePlayer(2373 + Misc.random(3),
    						3131 - Misc.random(3), 1);
    			}
    		} else if (c.inFightCaves()) {
    			c.getPA().resetTzhaar();
    		} else if (c.duelStatus != 5 && !c.lostDuel) { // if we are not in a
    														// duel repawn to wildy
    			movePlayer(Config.RESPAWN_X, Config.RESPAWN_Y, 0);
    			c.isSkulled = false;
    			c.skullTimer = 0;
    			c.attackedPlayers.clear();
    		} else if (c.duelStatus == 5 || c.lostDuel) { // we are in a duel,
    														// respawn outside of
    														// arena
    			Client o = (Client) PlayerHandler.players[c.duelingWith];
    			if (o != null) {
    				o.getPA().createPlayerHints(10, -1);
    				if (o.duelStatus == 6 && c.duelStatus == 5) {
    					o.getTradeAndDuel().duelVictory();
    				}
    			}
    			c.getPA().movePlayer(
    					Config.DUELING_RESPAWN_X
    							+ (Misc.random(Config.RANDOM_DUELING_RESPAWN)),
    					Config.DUELING_RESPAWN_Y
    							+ (Misc.random(Config.RANDOM_DUELING_RESPAWN)), 0);
    			assert o != null;
    			if (o != null) {
    				o.getPA().movePlayer(
    						Config.DUELING_RESPAWN_X
    								+ (Misc.random(Config.RANDOM_DUELING_RESPAWN)),
    						Config.DUELING_RESPAWN_Y
    								+ (Misc.random(Config.RANDOM_DUELING_RESPAWN)),
    						0);
    			}
    			if (c.duelStatus != 6) { // if we have won but have died, don't
    										// reset the duel status.
    				c.getTradeAndDuel().resetDuel();
    			}
    			c.lostDuel = false;
    		}
    		PlayerSave.saveGame(c);
    		c.getCombat().resetPlayerAttack();
    		resetAnimation();
    		c.startAnimation(-1);
    		frame1();
    		resetTb();
    		c.isSkulled = false;
    		c.attackedPlayers.clear();
    		c.headIconPk = -1;
    		c.skullTimer = -1;
    		c.damageTaken = new int[Config.MAX_PLAYERS];
    		c.getPA().requestUpdates();
    		removeAllWindows();
    		c.getTradeAndDuel().resetTrade();
    		c.isFullHelm = Item
    				.isFullHelm(c.playerEquipment[Player.playerHat]);
    		c.isFullMask = Item
    				.isFullMask(c.playerEquipment[Player.playerHat]);
    		c.isFullBody = Item
    				.isFullBody(c.playerEquipment[Player.playerChest]);
    
    	}

    This time I may have given you more than you needed oh well! thanks for helping me out here
    Reply With Quote  
     

Page 1 of 2 12 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. Player not dying [508]
    By Fo-Sho in forum Help
    Replies: 5
    Last Post: 04-09-2010, 08:35 PM
  2. Replies: 13
    Last Post: 01-24-2010, 07:46 AM
  3. Replies: 6
    Last Post: 02-17-2009, 06:22 PM
  4. Replies: 3
    Last Post: 10-02-2008, 03:05 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
  •