Thread: Pest Control Spawn

Results 1 to 10 of 10
  1. #1 Pest Control Spawn 
    Registered Member Queer's Avatar
    Join Date
    Aug 2008
    Age
    31
    Posts
    781
    Thanks given
    210
    Thanks received
    33
    Rep Power
    33
    I need help making it so when you die in pest control you spawn at the dock and can continue playing. My server you die and it teleports you to home. Any help is appreciated.
    Reply With Quote  
     

  2. #2  
    Super Donator

    Batukka's Avatar
    Join Date
    Oct 2011
    Posts
    2,433
    Thanks given
    86
    Thanks received
    342
    Rep Power
    496
    show your givelife method in playerassist.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Enjoi's Avatar
    Join Date
    Sep 2008
    Posts
    2,451
    Thanks given
    566
    Thanks received
    282
    Rep Power
    1325
    I'll give you a general idea:

    Find a the method where you die. It includes where the wildnerness is

    Add in that if a player is in a certain area, then it teleports you to that dock. "else" teleport to home.
    Reply With Quote  
     

  4. #4  
    Registered Member Queer's Avatar
    Join Date
    Aug 2008
    Age
    31
    Posts
    781
    Thanks given
    210
    Thanks received
    33
    Rep Power
    33
    Quote Originally Posted by Biggie Smalls View Post
    show your givelife method in playerassist.
    Code:
    	public void giveLife() {
    		c.isDead = false;
    		c.faceUpdate(-1);
    		c.freezeTimer = 0;
    		if(c.duelStatus <= 4 && !c.getPA().inPitsWait() && !c.inPcGame()) { // if we are not in a duel we must be in wildy so remove items
    			if (!c.inPits && !c.inFightCaves()) {
    					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);
    					}
    
    					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.pkPoints += 1;
    			                o.sendMessage("You have received <col=255>1</col> Project Titanium Point 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  
     

  5. #5  
    Registered Member Queer's Avatar
    Join Date
    Aug 2008
    Age
    31
    Posts
    781
    Thanks given
    210
    Thanks received
    33
    Rep Power
    33
    bump
    Reply With Quote  
     

  6. #6  
    Donator

    Tringan's Avatar
    Join Date
    Feb 2011
    Age
    27
    Posts
    2,101
    Thanks given
    381
    Thanks received
    334
    Rep Power
    297
    Code:
    	public void giveLife() {
    		c.isDead = false;
    		c.faceUpdate(-1);
    		c.freezeTimer = 0;
    		if(c.duelStatus <= 4 && !c.getPA().inPitsWait() && !c.inPcGame()) { // if we are not in a duel we must be in wildy so remove items
    			if (!c.inPits && !c.inFightCaves()) {
    					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);
    					}
    
    					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.inPcGame()) {
                                                    movePlayer(BOATX, BOATY, BOATHEIGHT);
                                    } 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.pkPoints += 1;
    			                o.sendMessage("You have received <col=255>1</col> Project Titanium Point 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();
    	}

    i guess thats it
    Reply With Quote  
     

  7. #7  
    Registered Member Queer's Avatar
    Join Date
    Aug 2008
    Age
    31
    Posts
    781
    Thanks given
    210
    Thanks received
    33
    Rep Power
    33
    Quote Originally Posted by Tyson View Post
    Code:
    	public void giveLife() {
    		c.isDead = false;
    		c.faceUpdate(-1);
    		c.freezeTimer = 0;
    		if(c.duelStatus <= 4 && !c.getPA().inPitsWait() && !c.inPcGame()) { // if we are not in a duel we must be in wildy so remove items
    			if (!c.inPits && !c.inFightCaves()) {
    					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);
    					}
    
    					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.inPcGame()) {
                                                    movePlayer(BOATX, BOATY, BOATHEIGHT);
                                    } 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.pkPoints += 1;
    			                o.sendMessage("You have received <col=255>1</col> Project Titanium Point 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();
    	}

    i guess thats it
    Didn't work :/
    Reply With Quote  
     

  8. #8  
    Registered Member Queer's Avatar
    Join Date
    Aug 2008
    Age
    31
    Posts
    781
    Thanks given
    210
    Thanks received
    33
    Rep Power
    33
    Bump
    Reply With Quote  
     

  9. #9  
    Registered Member Queer's Avatar
    Join Date
    Aug 2008
    Age
    31
    Posts
    781
    Thanks given
    210
    Thanks received
    33
    Rep Power
    33
    Anyone?
    Reply With Quote  
     

  10. #10  
    Registered Member Queer's Avatar
    Join Date
    Aug 2008
    Age
    31
    Posts
    781
    Thanks given
    210
    Thanks received
    33
    Rep Power
    33
    bump
    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] pest control
    By RsTurm in forum Requests
    Replies: 4
    Last Post: 04-12-2012, 05:26 AM
  2. [PI] Pest Control Portal Re-Spawn Fix.
    By Rockstar Jax in forum Snippets
    Replies: 12
    Last Post: 11-03-2011, 09:04 PM
  3. [pi] pest control portal spawn 602 NPC
    By Rockstar Jax in forum Help
    Replies: 1
    Last Post: 07-29-2011, 06:30 AM
  4. Pest Control 1 time Spawn
    By Division in forum Help
    Replies: 6
    Last Post: 04-15-2010, 06:01 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
  •