Thread: Pvp safe spot

Results 1 to 5 of 5
  1. #1 Pvp safe spot 
    Registered Member
    Join Date
    May 2008
    Posts
    59
    Thanks given
    0
    Thanks received
    1
    Rep Power
    5
    simply what i wanted to get help on is how does this code work, will show a picture and explain to me how it works?
    Code:
    	public boolean isInPvP(int coordX, int coordY, int Type) {
    			if (((coordY >= 3490) && (coordY <= 3493) && (coordX <= 2730) && (coordX >= 2721) || (coordY >= 3240) && (coordY <= 3246) && (coordX <= 3097) && (coordX >= 3088) || (coordY >= 3246) && (coordY <= 3256) && (coordX <= 3087) && (coordX >= 3075) || (coordY >= 3138) && (coordY <= 3176) && (coordX <= 2621) && (coordX >= 2579)|| (coordY >= 4674) && (coordY <= 4719) && (coordX <= 2295) && (coordX >= 2250) || (coordY >= 3138) && (coordY <= 3176) && (coordX <= 2621) && (coordX >= 2579)|| (coordY >= 9800) && (coordY <= 9870) && (coordX <= 3135) && (coordX >= 3085)|| (coordY >= 3482) && (coordY <= 3514) && (coordX <= 2774) && (coordX >= 2743) || (absX >= 2755 && absX <= 2760 && absY >= 3495 && absY <= 3501) || (absX >= 3089 && absX <= 3099 && absY >= 3488 && absY <= 3500) || (coordY >= 3472) && (coordY <= 3474) && (coordX <= 2776) && (coordX >= 2778))  {		
    				return true;
    			}
    		return false;
    	}
    now here is a quick shitty example, think of it as a square and then tell me exactly how this shit works..


    Reply With Quote  
     

  2. #2  
    Super Donator

    Sicc's Avatar
    Join Date
    Jun 2008
    Posts
    1,010
    Thanks given
    54
    Thanks received
    105
    Rep Power
    822
    It's saying if their in these co-ords, it should return true that this a PVP area/safe area.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2008
    Posts
    59
    Thanks given
    0
    Thanks received
    1
    Rep Power
    5
    hmm, then ill see what i can do.. thanks


    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    May 2008
    Posts
    59
    Thanks given
    0
    Thanks received
    1
    Rep Power
    5
    well ofcourse turning false to true removes the pvp zone but thats not what i want.. i simply want to add safe spots so you don't teleport and end up in pvp zone to be attacked..


    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    May 2008
    Posts
    59
    Thanks given
    0
    Thanks received
    1
    Rep Power
    5
    here are 2 public booleans, im not sure where to put my lumby castle cords,
    Code:
    	public boolean isInPvP(int coordX, int coordY, int Type) {
    			if ((coordY >= 3490) && (coordY <= 3493) && (coordX <= 2730) && (coordX >= 2721) || (coordY >= 3240) && (coordY <= 3246) && (coordX <= 3097) && (coordX >= 3088) || (coordY >= 3246) && (coordY <= 3256) && (coordX <= 3087) && (coordX >= 3075) || (coordY >= 3138) && (coordY <= 3176) && (coordX <= 2621) && (coordX >= 2579)|| (coordY >= 4674) && (coordY <= 4719) && (coordX <= 2295) && (coordX >= 2250) || (coordY >= 3138) && (coordY <= 3176) && (coordX <= 2621) && (coordX >= 2579)|| (coordY >= 9800) && (coordY <= 9870) && (coordX <= 3135) && (coordX >= 3085)|| (coordY >= 3482) && (coordY <= 3514) && (coordX <= 2774) && (coordX >= 2743) || (absX >= 2755 && absX <= 2760 && absY >= 3495 && absY <= 3501) || (absX >= 3089 && absX <= 3099 && absY >= 3488 && absY <= 3500) || (coordY >= 3472) && (coordY <= 3474) && (coordX <= 2776) && (coordX >= 2778))  {		
    				return true;
    			}
    		return false;
    	}
    	public boolean isInWilderness(int coordX, int coordY, int Type) {
    		if (Type == 1) {
    			if ((coordY >= 3838) && (coordY <= 3910) && (coordX <= 2630)
                              && (coordX >= 2584) || absX >= 2755 && absX <= 2760 && absY >= 3495 && absY <= 3501|| coordY >= 3472 && coordY <= 3474 && coordX <= 2776 && coordX >= 2778) {
    					
    				return true;
    			}
    		} else if (Type == 2) {
    			if ((coordY >= 2585) && (coordY <= 3901) && (coordX <= 2621)
    					&& (coordX >= 2942)) {
    				return true;
    			}
    		}
    		return false;
    	}


    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

Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •