Thread: Invisible doors valius base

Results 1 to 6 of 6
  1. #1 Invisible doors valius base 
    Registered Member Bubz's Avatar
    Join Date
    Oct 2008
    Posts
    189
    Thanks given
    7
    Thanks received
    10
    Rep Power
    26
    im having an issue where some building have invisible doors. anyone know how to fix this?


    this is my door.java

    Code:
    package com.mayhem.core.cache.map;
    
    import com.mayhem.core.util.GameDefinitionLoader;
    
    public class Door {
    
    	private int id;
    
    	private int id2;
    
    	private int currentId;
    
    	private short x;
    
    	private short y;
    
    	private byte xMod = 0;
    
    	private byte yMod = 0;
    
    	private byte z;
    
    	private byte currentFace;
    
    	private byte type;
    
    	private byte face;
    
    	private byte face2;
    
    	private byte append = 0;
    
    	public Door(int id, int x, int y, int z, int type, int face) {
    		this.currentId = id;
    		this.id = currentId;
    		this.x = (short) x;
    		this.y = (short) y;
    		this.z = (byte) z;
    		this.currentFace = (byte) face;
    		this.type = (byte) type;
    		this.face = (byte) face;
    
    		boolean flag = !MapConstants.isOpen(id);
    		this.id2 = GameDefinitionLoader.getAlternate(id);
    
    		if (id2 <= 0) {
    			id2 = id;
    		}
    
    		if (type == 9) {// diagonal doors
    			if (!flag) {// open
    				switch (face) {
    				case 0:
    					face2 = 1;
    					xMod = 1;
    					break;
    				case 1:
    					face2 = 0;
    					yMod = -1;
    					break;
    				case 2:
    					face2 = 1;
    					xMod = -1;
    					break;
    				}
    			} else {// closed
    				switch (face) {
    				case 0:
    					face2 = 3;
    					xMod = 1;
    					break;
    				case 1:
    					face2 = 0;
    					yMod = -1;
    					break;
    				case 2:
    					face2 = 3;
    					yMod = -1;
    					break;
    				case 3:
    					face2 = 0;
    					xMod = -1;
    					break;
    				}
    			}
    
    			return;
    		}
    
    		if (!flag) {// open
    			switch (face) {
    			case 0:
    				face2 = 3;
    				yMod = 1;
    				break;
    			case 1:
    				face2 = 0;
    				xMod = 1;
    				break;
    			case 2:
    				face2 = 1;
    				yMod = -1;
    				break;
    			case 3:
    				face2 = 2;
    				xMod = -1;
    				break;
    			}
    		} else {// closed
    			switch (face) {
    			case 0:
    				face2 = 1;
    				xMod = -1;
    				break;
    			case 1:
    				face2 = 2;
    				yMod = 1;
    				break;
    			case 2:
    				face2 = -1;
    				xMod = 1;
    				break;
    			case 3:
    				face2 = 0;
    				yMod = -1;
    				break;
    			}
    		}
    	}
    
    	public boolean equals(Door door) {
    		return door.id == id && door.x == x && door.y == y && door.z == z;
    	}
    
    	public void append() {
    		if (currentId == id) {
    			currentId = id2;
    		} else if (currentId == id2) {
    			currentId = id;
    		}
    
    		if (currentFace == face) {
    			currentFace = face2;
    			x += xMod;
    			y += yMod;
    			append = (byte) 1;
    		} else if (currentFace == face2) {
    			currentFace = face;
    			x -= xMod;
    			y -= yMod;
    			append = (byte) 0;
    		}
    
    		// System.out.println("to: " + x + " " + y);
    	}
    
    	public int getFace() {
    		return face;
    	}
    
    	public int getFace2() {
    		return face2;
    	}
    
    	public int getCurrentFace() {
    		return currentFace;
    	}
    
    	public void setCurrentFace(int currentFace) {
    		this.currentFace = (byte) currentFace;
    	}
    
    	public int getType() {
    		return type;
    	}
    
    	public int getId() {
    		return id;
    	}
    
    	public int getId2() {
    		return id2;
    	}
    
    	public int getCurrentId() {
    		return currentId;
    	}
    
    	public int getX() {
    		return x;
    	}
    
    	public int getY() {
    		return y;
    	}
    
    	public int getZ() {
    		return z;
    	}
    
    	public boolean original() {
    		return append == (byte) 0;
    	}
    }

    and here is the doors.java

    Code:
    package com.mayhem.core.cache.map;
    
    
    import com.mayhem.Constants;
    import com.mayhem.core.task.TaskQueue;
    import com.mayhem.core.task.impl.TickDoorTask;
    import com.mayhem.rs2.entity.object.GameObject;
    import com.mayhem.rs2.entity.object.ObjectManager;
    import com.mayhem.rs2.entity.player.Player;
    import com.mayhem.rs2.entity.player.net.out.impl.SendSound;
    
    public class Doors {
    
    	public static final int[][] JAMMED_DOORS = { { 1852, 5212, 0 }, { 1832, 5224, 0 }, { 1832, 5225, 0 } };
    
    	public static boolean clickDoor(int object, int x, int y, int z) {
    		for (int i = 0; i < Constants.BLOCKED_DOORS.length; i++) {
    			if (object == Constants.BLOCKED_DOORS[i]) {
    				return false;
    			}
    		}
    		if (Region.isDoor(x, y, z)) {
    			Door door = Region.getDoor(x, y, z);
    
    			if (door == null) {
    				return false;
    			}
    
    			if (door.getId() == 733 || door.getId() == 734) {
    				return false;
    			}
    
    			if (door.getX() == 2998 && door.getY() == 3931 || door.getX() == 2997 && door.getY() == 3931
    					|| door.getX() == 2998 && door.getY() == 3917 || door.getX() == 3044 && door.getY() == 3956
    					|| door.getX() == 3041 && door.getY() == 3959 || door.getX() == 3038 && door.getY() == 3956
    					|| door.getX() == 3190 && door.getY() == 3957 || door.getX() == 3191 && door.getY() == 3963) {
    				return false;
    			}
    
    			if (z > 3) {
    				z %= 4;
    			}
    
    			boolean original = door.original();
    
    			if (original) {
    				ObjectManager.registerObject(new GameObject(2376, x, y, z, door.getType(), door.getCurrentFace(), true));
    			} else {
    				ObjectManager.remove(
    						new GameObject(door.getCurrentId(), x, y, z, door.getType(), door.getCurrentFace(), true));
    			}
    
    			Region.getRegion(x, y).appendDoor(door.getCurrentId(), x, y, z);
    
    			if (door.original()) {
    				ObjectManager.removeActive(
    						new GameObject(2376, door.getX(), door.getY(), z, door.getType(), door.getCurrentFace(), true));
    				ObjectManager.registerObject(new GameObject(door.getCurrentId(), door.getX(), door.getY(), z, door.getType(),
    						door.getCurrentFace(), true));
    			} else {
    				ObjectManager.registerObject(new GameObject(door.getCurrentId(), door.getX(), door.getY(), z, door.getType(),
    						door.getCurrentFace(), true));
    
    				TaskQueue.queue(new TickDoorTask(door));
    			}
    
    			return true;
    		}
    
    		if (Region.isDoubleDoor(x, y, z)) {
    			DoubleDoor door = Region.getDoubleDoor(x, y, z);
    
    			if (door == null) {
    				return false;
    			}
    
    			if (door.getX1() == 2328 && door.getY1() == 3805 || door.getX1() == 2328 && door.getY1() == 3805) {
    				return false;
    			}
    
    			if (door.getX1() == 2998 && door.getY1() == 3931 || door.getX1() == 2997 && door.getY1() == 3931) {
    				return false;
    			}
    
    			if (z > 3) {
    				z %= 4;
    			}
    
    			ObjectManager.removeActive(new GameObject(door.getCurrentId1(), door.getX1(), door.getY1(), z,
    					door.getType(), door.getCurrentFace1(), true));
    			ObjectManager.registerObject(
    					new GameObject(2376, door.getX1(), door.getY1(), z, door.getType(), door.getCurrentFace1(), true));
    
    			ObjectManager.removeActive(new GameObject(door.getCurrentId2(), door.getX2(), door.getY2(), z,
    					door.getType(), door.getCurrentFace2(), true));
    			ObjectManager.registerObject(
    					new GameObject(2376, door.getX2(), door.getY2(), z, door.getType(), door.getCurrentFace2(), true));
    
    			Region.getRegion(x, y).appendDoubleDoor(door.getCurrentId1(), door.getX1(), door.getY1(), z);
    
    			ObjectManager.removeActive(
    					new GameObject(2376, door.getX1(), door.getY1(), z, door.getType(), door.getCurrentFace1(), true));
    			ObjectManager.removeActive(
    					new GameObject(2376, door.getX2(), door.getY2(), z, door.getType(), door.getCurrentFace2(), true));
    
    			ObjectManager.registerObject(new GameObject(door.getCurrentId1(), door.getX1(), door.getY1(), z, door.getType(),
    					door.getCurrentFace1(), true));
    			ObjectManager.registerObject(new GameObject(door.getCurrentId2(), door.getX2(), door.getY2(), z, door.getType(),
    					door.getCurrentFace2(), true));
    
    			return true;
    		}
    
    		return false;
    	}
    
    	public static boolean clickDoor(Player player, int object, int x, int y, int z) {
    
    		if (clickDoor(object, x, y, z)) {
    			player.getClient().queueOutgoingPacket(new SendSound(326, 0, 0));
    			return true;
    		}
    		return false;
    	}
    
    	public static boolean isDoorJammed(Player player, int x, int y, int z) {
    		for (int[] i : JAMMED_DOORS) {
    			if ((x == i[0]) && (y == i[1]) && (z == i[2])) {
    				return true;
    			}
    		}
    		return false;
    	}
    }
    Reply With Quote  
     

  2. #2  
    Donator

    StanDev's Avatar
    Join Date
    Apr 2014
    Posts
    657
    Thanks given
    70
    Thanks received
    236
    Discord
    StanDev#0990
    Rep Power
    526
    If u mean by invisible that they do not appear in the map (and thus are also non-interactable), then u probably have them removed client-side.
    Check your object definition class client sided, see if any door object IDs or objects named door/gate w/e are removed.
    If this isn't the case then my next best bet is that you're removing them server sided, u could check if this is the case by debugging the remove object packet.

    Edit: if u can interact with them, it means the models are missing. But I doubt this is the case.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member Bubz's Avatar
    Join Date
    Oct 2008
    Posts
    189
    Thanks given
    7
    Thanks received
    10
    Rep Power
    26
    no i can not interact with them. i simply cant pass throw a doorway. there is an "invisible door" in the way but you can't click anything.
    Reply With Quote  
     

  4. #4  
    Donator

    StanDev's Avatar
    Join Date
    Apr 2014
    Posts
    657
    Thanks given
    70
    Thanks received
    236
    Discord
    StanDev#0990
    Rep Power
    526
    Quote Originally Posted by Bubz View Post
    no i can not interact with them. i simply cant pass throw a doorway. there is an "invisible door" in the way but you can't click anything.
    Okay, I attempted to provide advice in either case. How did that work out for you?
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    TeraPS Founder

    OneTrueGodTet's Avatar
    Join Date
    Jan 2012
    Posts
    113
    Thanks given
    42
    Thanks received
    19
    Discord
    OneTrueGodTet#0068
    Rep Power
    146
    If i remember correctly if you go into Objectmanager.java or something on those lines and scroll down a little it'll have a long list of no clip zones with coordinates most of them are not labeled so just copy and paste one and replace the coordinates with the door you want to no clip.

    This is baring in mind a temporary fix and the door wont be usable but you can still walk through.


    Also a quick tip with is a few places/buildings that have similar issues one of them i know for certain is in :dz and i think theres some invisible barriers in the hunting area also.
    [Only registered and activated users can see links. ]

    Rip.
    Spoiler for vouches:
    http://smokin-elite.forumotion.com/t81285-kid-gildarts-vouches-19#1123917


    Reply With Quote  
     

  6. #6  
    Registered Member Bubz's Avatar
    Join Date
    Oct 2008
    Posts
    189
    Thanks given
    7
    Thanks received
    10
    Rep Power
    26
    Quote Originally Posted by OneTrueGodTet View Post
    If i remember correctly if you go into Objectmanager.java or something on those lines and scroll down a little it'll have a long list of no clip zones with coordinates most of them are not labeled so just copy and paste one and replace the coordinates with the door you want to no clip.

    This is baring in mind a temporary fix and the door wont be usable but you can still walk through.


    Also a quick tip with is a few places/buildings that have similar issues one of them i know for certain is in :dz and i think theres some invisible barriers in the hunting area also.
    thank you
    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. Fixing invisible doors from osrspk client
    By VenomRS in forum Snippets
    Replies: 8
    Last Post: 07-18-2017, 06:06 PM
  2. Invisible doors and parts of the map?
    By Crusty Rob in forum Help
    Replies: 0
    Last Post: 01-25-2017, 07:04 PM
  3. [Matrix] Door Closing Base.
    By Sam' in forum Snippets
    Replies: 14
    Last Post: 12-21-2013, 02:42 PM
  4. Invisible door....
    By Ophion in forum Help
    Replies: 1
    Last Post: 04-16-2011, 04:02 PM
  5. Need help with doors (RiotScape Base)
    By Konceal in forum Help
    Replies: 3
    Last Post: 05-09-2010, 07:38 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •