Thread: [PI] Safe Zones

Results 1 to 8 of 8
  1. #1 [PI] Safe Zones 
    Registered Member
    iHybrid's Avatar
    Join Date
    Sep 2010
    Posts
    2,095
    Thanks given
    636
    Thanks received
    352
    Rep Power
    81
    I made an entire area dangerous pvp with the inWild boolean and I need to know how I can make the banks safe. I tried using the inWild boolean to make it safe but the dangerous PvP overlapped the safe zone

    My current code:
    Code:
    public boolean inWild() {
    		if(absX > 2941 && absX < 3392 && absY > 3518 && absY < 3966 ||
    			absX > 2941 && absX < 3392 && absY > 9918 && absY < 10366) {
    		
    		} else if(absX > 3174 && absX < 3225 && absY > 3399 && absY < 3471) { //custom pvp
    		
    		
    			
    		
    			return true;
    		}
    		if(absX > 3180 && absX < 3186 && absY > 3432 && absY < 3447) { //bank area
    
    	return false;
    }
    		return false;
    	}
    MSN: [email protected]

    I will rep/thank for help.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Mar 2010
    Age
    29
    Posts
    686
    Thanks given
    35
    Thanks received
    92
    Rep Power
    157
    Try this;
    Code:
    public boolean inWild() {
    	if(absX > 2941 && absX < 3392 && absY > 3518 && absY < 3966 ||
    		absX > 2941 && absX < 3392 && absY > 9918 && absY < 10366 ||
    		absX > 3174 && absX < 3225 && absY > 3399 && absY < 3471) {
    			return true;
    	} else if (absX > 3180 && absX < 3186 && absY > 3432 && absY < 3447) {
    		return false;
    	}
    	return false;
    }
    Reply With Quote  
     

  3. #3  
    Registered Member
    iHybrid's Avatar
    Join Date
    Sep 2010
    Posts
    2,095
    Thanks given
    636
    Thanks received
    352
    Rep Power
    81
    Quote Originally Posted by I Vain I View Post
    Try this;
    Code:
    public boolean inWild() {
    	if(absX > 2941 && absX < 3392 && absY > 3518 && absY < 3966 ||
    		absX > 2941 && absX < 3392 && absY > 9918 && absY < 10366 ||
    		absX > 3174 && absX < 3225 && absY > 3399 && absY < 3471) {
    			return true;
    	} else if (absX > 3180 && absX < 3186 && absY > 3432 && absY < 3447) {
    		return false;
    	}
    	return false;
    }
    Didn't work The bank falls within the return true's coords so idk what to do.
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Mar 2010
    Age
    29
    Posts
    686
    Thanks given
    35
    Thanks received
    92
    Rep Power
    157
    Code:
    public boolean inWild() {
    	if(absX > 2941 && absX < 3392 && absY > 3518 && absY < 3966 || absX > 2941 && absX < 3392 && absY > 9918 && absY < 10366 || absX > 3174 && absX < 3225 && absY > 3399 && absY < 3471) {
    		if (!inBank())
    			return true;
    		else
    			return false;
    	}
    }
    
    public boolean inBank() {
    	if (absX > 3180 && absX < 3186 && absY > 3432 && absY < 3447) {
    		return true;
    	} else {
    		return false;
    	}
    }
    Try that.
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Registered Member
    iHybrid's Avatar
    Join Date
    Sep 2010
    Posts
    2,095
    Thanks given
    636
    Thanks received
    352
    Rep Power
    81
    Missing return statement.

    Btw repped/thanked for attempting to help Hopefully you will still try to fix it though.
    Reply With Quote  
     

  7. #6  
    Registered Member

    Join Date
    Mar 2010
    Age
    29
    Posts
    686
    Thanks given
    35
    Thanks received
    92
    Rep Power
    157
    Quote Originally Posted by iHybrid View Post
    Missing return statement.

    Btw repped/thanked for attempting to help Hopefully you will still try to fix it though.
    Oops, forgot about those.
    Code:
    public boolean inWild() {
    	if(absX > 2941 && absX < 3392 && absY > 3518 && absY < 3966 || absX > 2941 && absX < 3392 && absY > 9918 && absY < 10366 || absX > 3174 && absX < 3225 && absY > 3399 && absY < 3471) {
    		if (!inBank())
    			return true;
    	}
    	return false;
    }
    
    public boolean inBank() {
    	if (absX > 3180 && absX < 3186 && absY > 3432 && absY < 3447) {
    		return true;
    	} else {
    		return false;
    	}
    	return false;
    }
    Reply With Quote  
     

  8. #7  
    Registered Member
    iHybrid's Avatar
    Join Date
    Sep 2010
    Posts
    2,095
    Thanks given
    636
    Thanks received
    352
    Rep Power
    81
    return false; - unreachable statement

    edit: fixed it, i'll check if it works

    woot! works thanks so much man!
    Reply With Quote  
     

  9. #8  
    Registered Member
    Join Date
    Aug 2010
    Posts
    54
    Thanks given
    6
    Thanks received
    0
    Rep Power
    1
    can you post your fix to 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. need pvp world safe zones & multi zones
    By runescapedds in forum Help
    Replies: 3
    Last Post: 10-24-2011, 02:43 AM
  2. [562]Safe-Zones[562]
    By SlipKn0t in forum Tutorials
    Replies: 2
    Last Post: 06-03-2010, 09:07 PM
  3. Safe Zones
    By Bloodyfire in forum Help
    Replies: 0
    Last Post: 01-30-2009, 11:33 PM
  4. much better safe zones tut
    By Aggi in forum Tutorials
    Replies: 8
    Last Post: 11-23-2007, 04:41 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
  •