Thread: Safe pvp drops

Results 1 to 3 of 3
  1. #1 Safe pvp drops 
    Banned
    Join Date
    Feb 2013
    Posts
    1,067
    Thanks given
    72
    Thanks received
    28
    Rep Power
    0
    Well i have safe pvp in my server but i wanna make it so it drops like pvp items and people dont lose stuff how would i do that?
    codes used for safepvp / fun pk
    client.java
    Code:
    		if(inWild() && !inFunPk() && !isInArd() && !isInFala()) {
    			int modY = absY > 6400 ?  absY - 6400 : absY;
    			wildLevel = (((modY - 3520) / 8) + 1);
    			getPA().walkableInterface(197);
    			if(Config.SINGLE_AND_MULTI_ZONES) {
    				if(inMulti()) {
    					getPA().sendFrame126("@yel@Level: "+wildLevel, 199);
    				} else {
    					getPA().sendFrame126("@yel@Level: "+wildLevel, 199);
    				}
    			} else {
    				getPA().multiWay(-1);
    				getPA().sendFrame126("@yel@Level: "+wildLevel, 199);
    			}
    			getPA().showOption(3, 0, "Attack", 1);
    		} else if (inDuelArena()) {
    			getPA().walkableInterface(201);
    			if(duelStatus == 5) {
    				getPA().showOption(3, 0, "Attack", 1);
    		}
    		} else if(inBarrows()){
    			getPA().sendFrame99(2);
    			getPA().sendFrame126("Kill Count: "+barrowsKillCount, 4536);
    			getPA().walkableInterface(4535);
    			
    		} else if(safeZone()){
    			getPA().walkableInterface(197);
    			getPA().sendFrame126("@gre@Safe", 199);
    			getPA().showOption(3, 0, "Attack", 1);
    			if(Config.SINGLE_AND_MULTI_ZONES) {
    				if(inMulti()) {
    					getPA().sendFrame126("@gre@Safe", 199);
    				} else {
    					getPA().sendFrame126("@gre@Safe", 199);
    				}
    			} else {
    				getPA().multiWay(-1);
    					getPA().sendFrame126("@gre@Safe", 199);
    						}
    						
    		} else if(isInArd()){
    			int modY = absY > 6400 ?  absY - 6400 : absY;
    			wildLevel = 12;
    				headIconPk = 0;
    			getPA().walkableInterface(197);
    			getPA().showOption(3, 0, "Attack", 1);
    			if(Config.SINGLE_AND_MULTI_ZONES) {
    				if(inMulti()) {
    				HighAndLow();
    					} else {
    					HighAndLow();
    				}					
    			
    		} else if(inFunPk()) {
    			getPA().walkableInterface(197);
    			getPA().sendFrame126("@yel@FunPk", 199);
    			getPA().showOption(3, 0, "Attack", 1);
    			wildLevel = 12;
    givelife method
    Code:
    	public void giveLife() {
    		c.isDead = false;
    		c.faceUpdate(-1);
    		c.freezeTimer = 0;
    		if(c.duelStatus <= 4 && !c.getPA().inPitsWait()) { // if we are not in a duel we must be in wildy so remove items
    			if (!c.inPits && !c.inFightCaves() && !c.inFunPk() && c.playerRights != 3) {
    					c.getItems().resetKeepItems();
    				if((c.playerRights == 2 && Config.ADMIN_DROP_ITEMS) || c.playerRights != 2) {
    					if(!c.isSkulled && !c.isInFala() && !c.isInArd()) {	// what items to keep
    						c.getItems().keepItem(0, true);
    						c.getItems().keepItem(1, true);	
    						c.getItems().keepItem(2, true);
    					}	
    					if(c.prayerActive[10] || c.isInArd() && System.currentTimeMillis() - c.lastProtItem > 700) {
    						c.getItems().keepItem(3, true);
    					}
    
    if(c.isInArd() || c.isInFala()) { // 
    c.getItems().dropAllItems(); // drop all items
    c.getItems().deleteAllItems(); // delete all items
    }else{
    c.getItems().dropAllItems(); // drop all items
    c.getItems().deleteAllItems(); // delete all items
    }
    
    					
    					if(!c.isSkulled && !c.isInFala() && !c.isInArd()) { // add the kept items once we finish deleting and dropping them	
    						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();
    			} else if (c.inPits) {
    				Server.fightPits.removePlayerFromPits(c.playerId);
    				c.pitsStatus = 1;
    			}
    		}
    		c.getCombat().resetPrayers();
    		for (int i = 0; i < 20; i++) {
    			c.playerLevel[i] = getLevelForXP(c.playerXP[i]);
    			c.getPA().refreshSkill(i);
    		}
    		if (c.pitsStatus == 1) {
    			movePlayer(2399, 5173, 0);
    		} else if(c.duelStatus <= 4) { // 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.inFightCaves()) {
    			c.getPA().resetTzhaar();
    		} else { // we are in a duel, respawn outside of arena
    			Client o = (Client) Server.playerHandler.players[c.duelingWith];
    			if(o != null) {
    				o.getPA().createPlayerHints(10, -1);
    				if(o.duelStatus == 6) {
    					o.getTradeAndDuel().duelVictory();
    					o.pcPoints += 1;
    					o.sendMessage("You have gained 1 Rage Points for winning a duel");
    				}
    			}
    			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();
    			}
    		}
    		//PlayerSaving.getSingleton().requestSave(c.playerId);
    		PlayerSave.saveGame(c);
    		c.getCombat().resetPlayerAttack();
    		resetAnimation();
    		c.startAnimation(65535);
    		frame1();
    		resetTb();
    		c.isSkulled = false;
    		c.attackedPlayers.clear();
    		c.headIconPk = -1;
    		c.skullTimer = -1;
    		c.damageTaken = new int[Config.MAX_PLAYERS];
    		c.getPA().requestUpdates();
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Dec 2012
    Posts
    2,999
    Thanks given
    894
    Thanks received
    921
    Rep Power
    2555
    Change the givelife method, lol.
    Attached image
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Feb 2013
    Posts
    1,067
    Thanks given
    72
    Thanks received
    28
    Rep Power
    0
    Quote Originally Posted by Kaleem View Post
    Change the givelife method, lol.
    what in the givelife?
    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. Replies: 5
    Last Post: 07-29-2013, 07:39 AM
  2. 718 Safe zone pvp drops don't work.
    By pking legends in forum Help
    Replies: 1
    Last Post: 01-31-2013, 01:51 AM
  3. Replies: 36
    Last Post: 05-31-2012, 06:42 PM
  4. [508] PvP Drops
    By Ben121 in forum Tutorials
    Replies: 73
    Last Post: 09-18-2010, 02:38 AM
  5. [508] Re-Edited - Custom PvP Drops
    By xX Chris Xx in forum Tutorials
    Replies: 10
    Last Post: 02-17-2009, 02:24 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
  •