Thread: [PI] How to delete walls!

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31
  1. #1 [PI] How to delete walls! 
    Registered Member Neruzycra's Avatar
    Join Date
    Nov 2010
    Posts
    185
    Thanks given
    4
    Thanks received
    5
    Rep Power
    1
    Haven't seen a tutorial on this so, here it goes

    1. In objectmanager.java search for
    Code:
    public void removeObject(int x, int y) {
    c.getPA().object(158, 3097, 3493, 0, 10); 
            for (int j = 0; j < Server.playerHandler.players.length; j++) {
                if (Server.playerHandler.players[j] != null) {
                    Client c = (Client)Server.playerHandler.players[j];
                    c.getPA().object(-1, x, y, 0, 10);            
                }    
            }    
        }
    (yours might be a bit different..) replace the method with this one
    Code:
        public void removeObject(int x, int y) {
            for (int j = 0; j < Server.playerHandler.players.length; j++) {
                if (Server.playerHandler.players[j] != null) {
                    Client c = (Client)Server.playerHandler.players[j];
                    c.getPA().object(-1, x, y, 0, 10);            
                                                                               c.getPA().object(158, 3097, 3493, 0, 10);
                }    
            }    
        }
    2. In changeregions.java under
    Code:
    public void processPacket(Client c, int packetType, int packetSize) {
    add this
    Code:
    c.getPA().removeObjects();
    3. Now add this
    Code:
    public void Deletewalls(Client c) {
        c.getPA().checkObjectSpawn(-1, xxxx, yyyy, -1, 0);
    }
    in objectmanager.java under loadCustomSpawns method.
    And add this
    Code:
    Deletewalls(c);
    under this
    Code:
    loadCustomSpawns(c);
    Just change the coords and it will delete the wall
    This might help ya understand how it works, thanks Martin btw
    This works for doors too

    Quote Originally Posted by Martin View Post
    mabey you should give more info on how the method works:

    c.getPA().object(-1, x, y, 0, 10);

    the -1, indicates the new object id, and since your deleting, you want nothing to appear there.
    the x, and y is self explantory,
    the 0 is the face of the object, illrevent in destroying objects.
    and the 10 the most important variable indicates the object type.

    In case you want to have multiple objects on a tile you must use different object types for example:

    type 0-3 are all walls (sometimes doors) some tiles have 4 walls so 4 different type ids are needed incase type 0 is take it uses 1, then 2 and so fourth.

    type 10 are large objects most commonly used they usally take up a minimum of 1x1 squares besides in the case of doors. 90%+ of interactable objects are type 10, its rare to find one that isnt, again its usally doors.

    type 5-8? are diagonal walls, and some strange stuff usally just diagonal walls and doors, but again I never bothered refactoring this type of object much for worldmaps Usally just easyer to take them as 1x1 tile size.

    type 9 and 22, wall and floor decoration, all wall decorations can be ignored as the wall already counts in the case of worldmaps, but some type 22 objects arent walkable while 99% are. Examples of non walkables are, bank table in edgeville, the wall on that strange house outside bank in edge. Non walkables are details on ground such as very small rocks (if decoration has an option its non walkable)

    Although I kinda went off point above on worldmaps, its usefull to also know how to decorate areas if you want to for example having a rug on the ground aswell as having a bank booth etc on top of it, or spinning wheel, but again what you posted is pretty obious since its in most sources you should explain what the variables are

    Prepare to lose it...
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member
    Ninja assassin's Avatar
    Join Date
    Oct 2008
    Posts
    1,967
    Thanks given
    217
    Thanks received
    109
    Rep Power
    77
    Its been released I have seen it somewhere I think... but still goodjob
    Spoiler for Alert:
    www.facebook.com/profile.php?=73322363 <-- this person is very dangerous, if you see him in public approach with caution and alert the local authorities
    Reply With Quote  
     

  4. #3  
    Registered Member Neruzycra's Avatar
    Join Date
    Nov 2010
    Posts
    185
    Thanks given
    4
    Thanks received
    5
    Rep Power
    1
    Quote Originally Posted by Ninja assassin View Post
    Its been released I have seen it somewhere I think... but still goodjob
    Thank you it might've been released after I was searching for it

    Prepare to lose it...
    Reply With Quote  
     

  5. #4  
    Registered Member Neruzycra's Avatar
    Join Date
    Nov 2010
    Posts
    185
    Thanks given
    4
    Thanks received
    5
    Rep Power
    1
    Please reply and tell what you think

    Prepare to lose it...
    Reply With Quote  
     

  6. #5  
    Registered Member
    Join Date
    Jul 2010
    Posts
    63
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    No matter where I add "
    public void Deletewalls(Client c) {
    c.getPA().checkObjectSpawn(-1, 4624, 4524, -1, 0);
    }" It gives an error.

    I get this error:
    src\server\model\players\packets\ChangeRegion.java :15: illegal start of expressi
    on
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :15: illegal start of expressi
    on
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :15: ';' expected
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :15: ';' expected
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :17: reached end of file while
    parsing
    }→
    ^
    5 errors
    This is the same for Regions and Region.
    Reply With Quote  
     

  7. #6  
    I IZ MEMBOR
    Brony's Avatar
    Join Date
    May 2010
    Age
    5
    Posts
    478
    Thanks given
    17
    Thanks received
    22
    Rep Power
    19
    Easy,but usefull.
    Reply With Quote  
     

  8. #7  
    Registered Member

    Join Date
    Sep 2007
    Age
    22
    Posts
    2,364
    Thanks given
    4
    Thanks received
    421
    Rep Power
    860
    mabey you should give more info on how the method works:

    c.getPA().object(-1, x, y, 0, 10);

    the -1, indicates the new object id, and since your deleting, you want nothing to appear there.
    the x, and y is self explantory,
    the 0 is the face of the object, illrevent in destroying objects.
    and the 10 the most important variable indicates the object type.

    In case you want to have multiple objects on a tile you must use different object types for example:

    type 0-3 are all walls (sometimes doors) some tiles have 4 walls so 4 different type ids are needed incase type 0 is take it uses 1, then 2 and so fourth.

    type 10 are large objects most commonly used they usally take up a minimum of 1x1 squares besides in the case of doors. 90%+ of interactable objects are type 10, its rare to find one that isnt, again its usally doors.

    type 5-8? are diagonal walls, and some strange stuff usally just diagonal walls and doors, but again I never bothered refactoring this type of object much for worldmaps Usally just easyer to take them as 1x1 tile size.

    type 9 and 22, wall and floor decoration, all wall decorations can be ignored as the wall already counts in the case of worldmaps, but some type 22 objects arent walkable while 99% are. Examples of non walkables are, bank table in edgeville, the wall on that strange house outside bank in edge. Non walkables are details on ground such as very small rocks (if decoration has an option its non walkable)

    Although I kinda went off point above on worldmaps, its usefull to also know how to decorate areas if you want to for example having a rug on the ground aswell as having a bank booth etc on top of it, or spinning wheel, but again what you posted is pretty obious since its in most sources you should explain what the variables are
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  9. #8  
    Registered Member Neruzycra's Avatar
    Join Date
    Nov 2010
    Posts
    185
    Thanks given
    4
    Thanks received
    5
    Rep Power
    1
    Quote Originally Posted by Martin View Post
    mabey you should give more info on how the method works:

    c.getPA().object(-1, x, y, 0, 10);

    the -1, indicates the new object id, and since your deleting, you want nothing to appear there.
    the x, and y is self explantory,
    the 0 is the face of the object, illrevent in destroying objects.
    and the 10 the most important variable indicates the object type.

    In case you want to have multiple objects on a tile you must use different object types for example:

    type 0-3 are all walls (sometimes doors) some tiles have 4 walls so 4 different type ids are needed incase type 0 is take it uses 1, then 2 and so fourth.

    type 10 are large objects most commonly used they usally take up a minimum of 1x1 squares besides in the case of doors. 90%+ of interactable objects are type 10, its rare to find one that isnt, again its usally doors.

    type 5-8? are diagonal walls, and some strange stuff usally just diagonal walls and doors, but again I never bothered refactoring this type of object much for worldmaps Usally just easyer to take them as 1x1 tile size.

    type 9 and 22, wall and floor decoration, all wall decorations can be ignored as the wall already counts in the case of worldmaps, but some type 22 objects arent walkable while 99% are. Examples of non walkables are, bank table in edgeville, the wall on that strange house outside bank in edge. Non walkables are details on ground such as very small rocks (if decoration has an option its non walkable)

    Although I kinda went off point above on worldmaps, its usefull to also know how to decorate areas if you want to for example having a rug on the ground aswell as having a bank booth etc on top of it, or spinning wheel, but again what you posted is pretty obious since its in most sources you should explain what the variables are
    Yea, but I decided to leave that cuz this is just a snippet
    I'll add that to the thread tho

    Prepare to lose it...
    Reply With Quote  
     

  10. #9  
    Registered Member Neruzycra's Avatar
    Join Date
    Nov 2010
    Posts
    185
    Thanks given
    4
    Thanks received
    5
    Rep Power
    1
    Quote Originally Posted by flyfot View Post
    No matter where I add "
    public void Deletewalls(Client c) {
    c.getPA().checkObjectSpawn(-1, 4624, 4524, -1, 0);
    }" It gives an error.

    I get this error:

    Code:
    src\server\model\players\packets\ChangeRegion.java :15: illegal start of expressi
    on
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :15: illegal start of expressi
    on
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :15: ';' expected
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :15: ';' expected
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :17: reached end of file while
    parsing
    }→
    ^
    5 errors
    This is the same for Regions and Region.
    Read the thread properly, your suppose to add
    Code:
    public void Deletewalls(Client c) {
        c.getPA().checkObjectSpawn(-1, xxxx, yyyy, -1, 0);
    }
    in objectmanager.java NOT changeregions.java

    Prepare to lose it...
    Reply With Quote  
     

  11. #10  
    Registered Member
    Join Date
    Aug 2011
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    No matter where I add "
    public void Deletewalls(Client c) {
    c.getPA().checkObjectSpawn(-1, 4624, 4524, -1, 0);
    }" It gives an error.

    I get this error:
    Quote:
    src\server\model\players\packets\ChangeRegion.java :15: illegal start of expressi
    on
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :15: illegal start of expressi
    on
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :15: ';' expected
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :15: ';' expected
    public void Deletewalls(Client c) {
    ^
    src\server\model\players\packets\ChangeRegion.java :17: reached end of file while
    parsing
    }→
    ^
    5 errors
    This is the same for Regions and Region.
    Ok so i registered on these forums just to help you out with this xD
    ok so you wan to add the
    Code:
    	public void Deletewalls(Client c) {
    	}
    In the OBJECTMANAGER.JAVA
    Under all of your custom spawns
    Example:
    Code:
    	 if (c.heightLevel == 0) {
    			c.getPA().checkObjectSpawn(2492, 2911, 3614, 1, 10);
    		 }else{
    			c.getPA().checkObjectSpawn(-1, 2911, 3614, 1, 10);
    	}
    	}
    	public void Deletewalls(Client c) {
    	}
    Yours might be different, Hope I helped (:
    Reply With Quote  
     

Page 1 of 4 123 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [PI] How do I delete walls?
    By Neruzycra in forum Help
    Replies: 18
    Last Post: 02-03-2011, 11:56 AM
  2. [PI] Walls
    By savior I in forum Help
    Replies: 1
    Last Post: 08-26-2010, 11:48 PM
  3. Replies: 2
    Last Post: 01-26-2010, 09:15 PM
  4. How Do I Delete The Walls Lol
    By Akrisae in forum Help
    Replies: 0
    Last Post: 09-02-2009, 02: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
  •