Thread: WalkableInterface in safezone.

Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1 WalkableInterface in safezone. 
    Registered Member Psychoactive's Avatar
    Join Date
    Jun 2015
    Posts
    479
    Thanks given
    59
    Thanks received
    51
    Rep Power
    23
    Alright, Rune-server

    I recently add wildy everywhere.
    So I made banks a SafeZone by doing this in Player.java:
    Code:
    public boolean inWild() {
    		if (inSafeZone()) {
    			return false;
    		}
    		return true;
    	}
    Client.java(process)
    Code:
    if (this.inWild()) {
    			//final int modY = this.absY > 6400 ? this.absY - 6400 : this.absY;
    			//this.getPA().showOption(3, 0, "Attack", 1);
    			//this.wildLevel = (modY - 3520) / 8 + 1;
    				if (Config.SINGLE_AND_MULTI_ZONES) {
    					if (inMulti()) {
    						getPA().walkableInterface(197);
    						getPA().sendFrame126("@yel@Multi-PvP", 199);
    						this.getPA().showOption(3, 0, "Attack", 1);
    					} else if (inSafeZone()) {
    						getPA().walkableInterface(53000);
    					} else {
    						getPA().walkableInterface(197);
    						getPA().sendFrame126("@red@PvP", 199);
    						this.getPA().showOption(3, 0, "Attack", 1);
    					}
    				} else {
    					getPA().multiWay(-1);
    					getPA().walkableInterface(197);
    					getPA().sendFrame126("@red@PvP", 199);
    					this.getPA().showOption(3, 0, "Attack", 1);
    				}
    		} else if (this.isInBarrows()) {
    			this.getPA().sendFrame126("Kill Count: " + this.barrowsKillCount,
    					4536);
    			this.getPA().walkableInterface(4535);
    			this.getPA().showOption(3, 0, "null", 1);
    			this.getPA().showOption(2, 0, "null", 1);
     } else if (inSafeZone()) {
    getPA().walkableInterface(53000);
    		} else if (inPcBoat()) {
    			getPA().sendFrame126(
    					"Next Departure: " + PestControl.waitTimer + "", 21120);
    			getPA().sendFrame126(
    					"Players Ready: " + PestControl.playersInBoat() + "", 21121);
    			getPA().sendFrame126("(1-25 Players to Start)", 21122);
    			getPA().sendFrame126("Pest Points: " + pcPoints + "", 21123);
    			getPA().walkableInterface(21119);
    	} else if (inPcGame() && PestControl.gameTimer < 0) {
    		getPA().movePlayer(3086, 3493, 0);
    		sendMessage("Sorry for moving you, but you logged into a forbidden area.");
    	} else if (inPcGame()) {
    		for (j = 0; j < NPCHandler.npcs.length; j++) {
    			if (NPCHandler.npcs[j] != null) {
    				if (NPCHandler.npcs[j].npcType == 6142) {
    					if (NPCHandler.npcs[j].isDead) {
    						getPA().sendFrame126("Dead", 21111);
    					} else
    						getPA().sendFrame126(
    								"" + NPCHandler.npcs[j].HP + "", 21111);
    				}
    				if (NPCHandler.npcs[j].npcType == 6143) {
    					if (NPCHandler.npcs[j].isDead) {
    						getPA().sendFrame126("Dead", 21112);
    					} else
    						getPA().sendFrame126(
    								"" + NPCHandler.npcs[j].HP + "", 21112);
    				}
    				if (NPCHandler.npcs[j].npcType == 6144) {
    					if (NPCHandler.npcs[j].isDead) {
    						getPA().sendFrame126("Dead", 21113);
    					} else
    						getPA().sendFrame126(
    								"" + NPCHandler.npcs[j].HP + "", 21113);
    				}
    				if (NPCHandler.npcs[j].npcType == 6145) {
    					if (NPCHandler.npcs[j].isDead) {
    						getPA().sendFrame126("Dead", 21114);
    					} else
    						getPA().sendFrame126(
    								"" + NPCHandler.npcs[j].HP + "", 21114);
    				}
    			}
    		}
    		getPA().sendFrame126("0", 21115);
    		if (pcDamage < 15) {
    			getPA().sendFrame126("@red@" + pcDamage + "", 21116);
    		} else {
    			getPA().sendFrame126("@gre@" + pcDamage + "", 21116);
    		}
    		getPA().sendFrame126(
    				"Time remaining: " + PestControl.gameTimer + "", 21117);
    		getPA().walkableInterface(21100);
    		if (inCage()) {
    			getPA().sendFrame126(
    					"Next Departure: " + SheepShave.waitTimer + " Seconds", 21120);
    			getPA().sendFrame126(
    					"Players Ready: " + SheepShave.InSheepShaveWaitingCount() + "", 21121);
    			getPA().sendFrame126("(Need 1 player)", 21122);
    			getPA().sendFrame126("Wool: " + wlPoints + "", 21123);
    			getPA().walkableInterface(21119);
    		} else if (inSheepGame()) {
    			FixingXLog(this);
    			getPA().sendFrame126(
    					"Time remaining: " + SheepShave.gameTimer + " Seconds", 21120);
    			getPA().sendFrame126(
    					"Players In-Game: " + SheepShave.InSheepShaveGameCount() + "", 21121);
    			getPA().sendFrame126("(Need 1 player)", 21122);
    			getPA().sendFrame126("Wool Points: " + wlPoints + "", 21123);
    			getPA().walkableInterface(21119);
    		}
    		} else if (inDuelArena()) {
    			getPA().walkableInterface(201);
    			if (duelStatus == 5) {
    				getPA().showOption(3, 0, "Attack", 1);
    			} else {
    				getPA().showOption(3, 0, "Challenge", 1);
    			}
    		} else if (inCwGame || inPits) {
    			getPA().showOption(3, 0, "Attack", 1);
    		} else if (getPA().inPitsWait()) {
    			getPA().showOption(3, 0, "Null", 1);
    		} else if (!inCwWait) {
    			getPA().sendFrame99(0);
    			getPA().walkableInterface(-1);
    			getPA().showOption(3, 0, "Null", 1);
    		} else if (inPits) {
    			getPA().showOption(3, 0, "Attack", 1);
    		} else if (getPA().inPitsWait()) {
    			getPA().showOption(3, 0, "Null", 1);
    		}
    Now I want to add an interface when you are in the safe zone. But for some reason it will never give me the interface.
    Is it because "return false" is in "public Boolean inwildy"? If I delete the SafeZone from the boolean, it freezes my screen..

    How can I fix this? Thanks
    You are pure perfection living in a complete world
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Oct 2013
    Posts
    775
    Thanks given
    48
    Thanks received
    104
    Rep Power
    14
    Quote Originally Posted by Psychoactive View Post
    Alright, Rune-server

    I recently add wildy everywhere.
    So I made banks a SafeZone by doing this in Player.java:
    Code:
    public boolean inWild() {
    		if (inSafeZone()) {
    			return false;
    		}
    		return true;
    	}
    Now I want to add an interface when you are in the safe zone. But for some reason it will never give me the interface.
    Is it because "return false" is in "public Boolean inwildy"? If I delete the SafeZone from the boolean, it freezes my screen..

    How can I fix this? Thanks
    Where are you calling your walkable interface
    Reply With Quote  
     

  3. #3  
    Registered Member Psychoactive's Avatar
    Join Date
    Jun 2015
    Posts
    479
    Thanks given
    59
    Thanks received
    51
    Rep Power
    23
    Quote Originally Posted by Our Promise View Post
    Where are you calling your walkable interface
    Client.java under process:
    Code:
    if (this.inWild()) {
    			//final int modY = this.absY > 6400 ? this.absY - 6400 : this.absY;
    			//this.getPA().showOption(3, 0, "Attack", 1);
    			//this.wildLevel = (modY - 3520) / 8 + 1;
    				if (Config.SINGLE_AND_MULTI_ZONES) {
    					if (inMulti()) {
    						getPA().walkableInterface(197);
    						getPA().sendFrame126("@yel@Multi-PvP", 199);
    						this.getPA().showOption(3, 0, "Attack", 1);
    					} else if (inSafeZone()) {
    						getPA().walkableInterface(53000);
    					} else {
    						getPA().walkableInterface(197);
    						getPA().sendFrame126("@red@PvP", 199);
    						this.getPA().showOption(3, 0, "Attack", 1);
    					}
    				} else {
    					getPA().multiWay(-1);
    					getPA().walkableInterface(197);
    					getPA().sendFrame126("@red@PvP", 199);
    					this.getPA().showOption(3, 0, "Attack", 1);
    				}
    		} else if (this.isInBarrows()) {
    			this.getPA().sendFrame126("Kill Count: " + this.barrowsKillCount,
    					4536);
    			this.getPA().walkableInterface(4535);
    			this.getPA().showOption(3, 0, "null", 1);
    			this.getPA().showOption(2, 0, "null", 1);
    } else if (inSafeZone()) {
    getPA().walkableInterface(53000);
    		} else if (inPcBoat()) {
    			getPA().sendFrame126(
    					"Next Departure: " + PestControl.waitTimer + "", 21120);
    			getPA().sendFrame126(
    					"Players Ready: " + PestControl.playersInBoat() + "", 21121);
    			getPA().sendFrame126("(1-25 Players to Start)", 21122);
    			getPA().sendFrame126("Pest Points: " + pcPoints + "", 21123);
    			getPA().walkableInterface(21119);
    	} else if (inPcGame() && PestControl.gameTimer < 0) {
    		getPA().movePlayer(3086, 3493, 0);
    		sendMessage("Sorry for moving you, but you logged into a forbidden area.");
    	} else if (inPcGame()) {
    		for (j = 0; j < NPCHandler.npcs.length; j++) {
    			if (NPCHandler.npcs[j] != null) {
    				if (NPCHandler.npcs[j].npcType == 6142) {
    					if (NPCHandler.npcs[j].isDead) {
    						getPA().sendFrame126("Dead", 21111);
    					} else
    						getPA().sendFrame126(
    								"" + NPCHandler.npcs[j].HP + "", 21111);
    				}
    				if (NPCHandler.npcs[j].npcType == 6143) {
    					if (NPCHandler.npcs[j].isDead) {
    						getPA().sendFrame126("Dead", 21112);
    					} else
    						getPA().sendFrame126(
    								"" + NPCHandler.npcs[j].HP + "", 21112);
    				}
    				if (NPCHandler.npcs[j].npcType == 6144) {
    					if (NPCHandler.npcs[j].isDead) {
    						getPA().sendFrame126("Dead", 21113);
    					} else
    						getPA().sendFrame126(
    								"" + NPCHandler.npcs[j].HP + "", 21113);
    				}
    				if (NPCHandler.npcs[j].npcType == 6145) {
    					if (NPCHandler.npcs[j].isDead) {
    						getPA().sendFrame126("Dead", 21114);
    					} else
    						getPA().sendFrame126(
    								"" + NPCHandler.npcs[j].HP + "", 21114);
    				}
    			}
    		}
    		getPA().sendFrame126("0", 21115);
    		if (pcDamage < 15) {
    			getPA().sendFrame126("@red@" + pcDamage + "", 21116);
    		} else {
    			getPA().sendFrame126("@gre@" + pcDamage + "", 21116);
    		}
    		getPA().sendFrame126(
    				"Time remaining: " + PestControl.gameTimer + "", 21117);
    		getPA().walkableInterface(21100);
    		if (inCage()) {
    			getPA().sendFrame126(
    					"Next Departure: " + SheepShave.waitTimer + " Seconds", 21120);
    			getPA().sendFrame126(
    					"Players Ready: " + SheepShave.InSheepShaveWaitingCount() + "", 21121);
    			getPA().sendFrame126("(Need 1 player)", 21122);
    			getPA().sendFrame126("Wool: " + wlPoints + "", 21123);
    			getPA().walkableInterface(21119);
    		} else if (inSheepGame()) {
    			FixingXLog(this);
    			getPA().sendFrame126(
    					"Time remaining: " + SheepShave.gameTimer + " Seconds", 21120);
    			getPA().sendFrame126(
    					"Players In-Game: " + SheepShave.InSheepShaveGameCount() + "", 21121);
    			getPA().sendFrame126("(Need 1 player)", 21122);
    			getPA().sendFrame126("Wool Points: " + wlPoints + "", 21123);
    			getPA().walkableInterface(21119);
    		}
    		} else if (inDuelArena()) {
    			getPA().walkableInterface(201);
    			if (duelStatus == 5) {
    				getPA().showOption(3, 0, "Attack", 1);
    			} else {
    				getPA().showOption(3, 0, "Challenge", 1);
    			}
    		} else if (inCwGame || inPits) {
    			getPA().showOption(3, 0, "Attack", 1);
    		} else if (getPA().inPitsWait()) {
    			getPA().showOption(3, 0, "Null", 1);
    		} else if (!inCwWait) {
    			getPA().sendFrame99(0);
    			getPA().walkableInterface(-1);
    			getPA().showOption(3, 0, "Null", 1);
    		} else if (inPits) {
    			getPA().showOption(3, 0, "Attack", 1);
    		} else if (getPA().inPitsWait()) {
    			getPA().showOption(3, 0, "Null", 1);
    		}
    You are pure perfection living in a complete world
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    inSafeZone X and Y must be correct. otherwise it will not showup.

    Debug the inSafeZone method
    Reply With Quote  
     

  5. #5  
    Registered Member Psychoactive's Avatar
    Join Date
    Jun 2015
    Posts
    479
    Thanks given
    59
    Thanks received
    51
    Rep Power
    23
    Quote Originally Posted by ipkmills View Post
    inSafeZone X and Y must be correct. otherwise it will not showup.

    Debug the inSafeZone method
    I have the right coords. Sure of that.
    You are pure perfection living in a complete world
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    Quote Originally Posted by Psychoactive View Post
    I have the right coords. Sure of that.
    Debug everything its not rocket science. all you have to do is debug the code
    Reply With Quote  
     

  7. #7  
    Registered Member Psychoactive's Avatar
    Join Date
    Jun 2015
    Posts
    479
    Thanks given
    59
    Thanks received
    51
    Rep Power
    23
    Quote Originally Posted by ipkmills View Post
    Debug everything its not rocket science. all you have to do is debug the code
    You mean by debugging this?
    You are pure perfection living in a complete world
    Reply With Quote  
     

  8. #8  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    Quote Originally Posted by Psychoactive View Post
    You mean by debugging this?
    No put system out prints in all methods where you are working in and see if everything gets printed
    Reply With Quote  
     

  9. #9  
    Registered Member Psychoactive's Avatar
    Join Date
    Jun 2015
    Posts
    479
    Thanks given
    59
    Thanks received
    51
    Rep Power
    23
    Quote Originally Posted by ipkmills View Post
    No put system out prints in all methods where you are working in and see if everything gets printed
    Well, my java experiences are not good enough for doing that. No fucking idea how to start with that lol

    Well, thanks for trying to help tho
    You are pure perfection living in a complete world
    Reply With Quote  
     

  10. #10  
    Banned

    Join Date
    Jun 2013
    Posts
    499
    Thanks given
    119
    Thanks received
    70
    Rep Power
    0
    Quote Originally Posted by Psychoactive View Post
    Well, my java experiences are not good enough for doing that. No fucking idea how to start with that lol

    Well, thanks for trying to help tho
    So you can do that but you can't do System.out.println(); ? Lol..
    Reply With Quote  
     

Page 1 of 3 123 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. [PI] Opening bank in Safezone [PI]
    By MegatronIsBadAss in forum Help
    Replies: 6
    Last Post: 08-22-2012, 05:25 PM
  2. [PI] Shows Wilderness in safezone [PI]
    By Preedz in forum Help
    Replies: 16
    Last Post: 03-13-2011, 02:13 PM
  3. 614 npc attacking in safezone
    By Zᴀᴄʜ in forum Help
    Replies: 0
    Last Post: 11-01-2010, 02:10 PM
  4. Replies: 6
    Last Post: 10-13-2009, 02:33 AM
  5. [508] Safezone in wilderness [508]
    By shassan in forum Help
    Replies: 0
    Last Post: 05-01-2009, 07:03 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
  •