Thread: 562 Doors

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 562 Doors 
    Banned
    Join Date
    Jun 2009
    Posts
    855
    Thanks given
    208
    Thanks received
    64
    Rep Power
    0
    Removed.
     

  2. #2  
    Registered Member

    Join Date
    Jul 2008
    Posts
    539
    Thanks given
    4
    Thanks received
    8
    Rep Power
    89
    Quote Originally Posted by Elmo's World View Post
    Hey guys, uhm, I tried making some doors open for my new home on my 562, and at my new home, theres like 6 buildings of the same type of door. So I tried doing one, it worked fine, then I made the rest, compile, and it says it's duplicated 6 times. Is there any way to instead of copying and pasting the case 6 times and just change the coords, just make it in 1 case and make it change all the coords? Thanks.
    Yea there is just read object in the region and using ObjectDef to work out if the object is a door or not and based on info from where the door is to work out new door
    Be smart, but never show it.



    List of scammers - `Luke, nym0, tim xxx.
     

  3. #3  
    Banned
    Join Date
    Jun 2009
    Posts
    855
    Thanks given
    208
    Thanks received
    64
    Rep Power
    0
    Quote Originally Posted by X-Logic View Post
    Yea there is just read object in the region and using ObjectDef to work out if the object is a door or not and based on info from where the door is to work out new door
    No, it works, it just wont let the other ones work because it's "duplicated".
     

  4. #4  
    Banned
    Join Date
    Jun 2009
    Posts
    855
    Thanks given
    208
    Thanks received
    64
    Rep Power
    0
    This is the error:
    Code:
    src\com\rs2hd\packethandler\Object1PacketHandler.java:40: duplicate case label
                                    case 15204:
                                    ^
    src\com\rs2hd\packethandler\Object1PacketHandler.java:43: duplicate case label
                                    case 15204:
                                    ^
    src\com\rs2hd\packethandler\Object1PacketHandler.java:46: duplicate case label
                                    case 15204:
                                    ^
    src\com\rs2hd\packethandler\Object1PacketHandler.java:49: duplicate case label
                                    case 15204:
                                    ^
    src\com\rs2hd\packethandler\Object1PacketHandler.java:52: duplicate case label
                                    case 15204:
                                    ^
    src\com\rs2hd\packethandler\Object1PacketHandler.java:55: duplicate case label
                                    case 15204:
                                    ^
     

  5. #5  
    Registered Member

    Join Date
    Jun 2007
    Age
    35
    Posts
    770
    Thanks given
    0
    Thanks received
    17
    Rep Power
    156
    It's because you duplicated the case 6 times lol... you only need to make one case statement for that object id and put inside of that case statement if statements that check for the objects x and y coordinated =)

    I.E

    Code:
    case 1337:
     
    if(objectX == x coord here && objectY == y coord here) {
    your method here;
    }
    if(objectX == second x coord here && objectY == second y coord here) {
    your method here;
    }
    break;
    and so on and so forth and your welcome...



     

  6. #6  
    Banned
    Join Date
    Jun 2009
    Posts
    855
    Thanks given
    208
    Thanks received
    64
    Rep Power
    0
    Quote Originally Posted by Pikker View Post
    It's because you duplicated the case 6 times lol... you only need to make one case statement for that object id and put inside of that case statement if statements that check for the objects x and y coordinated =)

    I.E

    Code:
    case 1337:
     
    if(objectX == x coord here && objectY == y coord here) {
    your method here;
    }
    if(objectX == second x coord here && objectY == second y coord here) {
    your method here;
    }
    break;
    and so on and so forth and your welcome...
    Yeah, I understood, but I don't know how to combine them, lol.

    This is how mine looks like:

    Code:
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
     

  7. #7  
    Registered Member
    bracket's Avatar
    Join Date
    Aug 2009
    Posts
    5,278
    Thanks given
    1,059
    Thanks received
    1,465
    Rep Power
    5000
    Quote Originally Posted by Elmo's World View Post
    Yeah, I understood, but I don't know how to combine them, lol.

    This is how mine looks like:

    Code:
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    				break;
    				case 15204:
    					player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    lmfaoo.. multiple cases use multiple sendcreateobject instead of duplicate cases..

    or use something like if (p.absX == w/e && p.absY == coordslol) {
     

  8. #8  
    Banned
    Join Date
    Jun 2009
    Posts
    855
    Thanks given
    208
    Thanks received
    64
    Rep Power
    0
    I'm too lazzzzzy to do that atm. xD Just woke upppp, do it for me you noob.
     

  9. #9  
    Registered Member

    Join Date
    Jun 2007
    Age
    35
    Posts
    770
    Thanks given
    0
    Thanks received
    17
    Rep Power
    156
    Quote Originally Posted by Elmo's World View Post
    Yeah, I understood, but I don't know how to combine them, lol.

    This is how mine looks like:

    Code:
                    break;
                    case 15204:
                        player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
                    break;
                    case 15204:
                        player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
                    break;
                    case 15204:
                        player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
                    break;
                    case 15204:
                        player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
                    break;
                    case 15204:
                        player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
                    break;
                    case 15204:
                        player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
                    break;
                    case 15204:
                        player.getActionSender().sendCreateObject(15205, 0, X, Y, 4, 0);
    i just gave you the EXACT way to do it lol all you need to do is print out the object's x and y coords when you click on it, so at the bottom of your object option 1 class you need to make sure under DEFAULT that there is a method that prints out the x and y coords of the object... Once you get the x and y coords plug them into my code and boom all set... put all of the objects into 1 case by using if statements...



     

  10. #10  
    Banned
    Join Date
    Jun 2009
    Posts
    855
    Thanks given
    208
    Thanks received
    64
    Rep Power
    0
    Quote Originally Posted by Pikker View Post
    i just gave you the EXACT way to do it lol all you need to do is print out the object's x and y coords when you click on it, so at the bottom of your object option 1 class you need to make sure under DEFAULT that there is a method that prints out the x and y coords of the object... Once you get the x and y coords plug them into my code and boom all set... put all of the objects into 1 case by using if statements...
    I'll try it later, isn't there a short one?
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

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