Thread: [CASTLEWARS] limiting and counting castle wars team members. [BASIC]

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1 [CASTLEWARS] limiting and counting castle wars team members. [BASIC] 
    Registered Member
    Unique's Avatar
    Join Date
    May 2008
    Posts
    457
    Thanks given
    0
    Thanks received
    1
    Rep Power
    164
    Description: to count and limit castle wars players.

    Difficulty: 1.5/10

    Assumed Knowledge: copy & paste

    Tested Server: unID'eed

    Files/Classes Modified: client.java

    Procedure:
    ----------------------------------------------

    1. declare these ints in server.java:

    Code:
    public static int zammyPlayers = 0;
    public static int saraPlayers = 0;
    2.under packet (case) 132 add:, if you've already added the portals replace them with these!

    Code:
    if(objectID == #### && server.saraPlayers < 20) { // sara enter portal
    server.saraPlayers += 1;
    teleportToX = absX;
    teleportToY = absY;
    }
    if(objectID == ###) { // sara leave portal
    server.saraPlayers -= 1;
    teleportToX = absX;
    teleportToY = absY;
    }
    if(objectID == #### && server.zammyPlayers < 20) { // zammy enter portal
    server.zammyPlayers += 1;
    teleportToX = absX;
    teleportToY = absY;
    }
    if(objectID == ####) { // zammy leave portal
    server.zammyPlayers -= 1;
    teleportToX = absX;
    teleportToY = absY;
    }
    3. add this command:, replace absX with Xcoords and absY with Ycoords.

    Code:
    if(command.equalsIgnoreCase("checkteams")) {
    sendMessage("They're are "+server.saraPlayers+" saradomin team members.");
    sendMessage("They're are "+server.zammyPlayers+" zammorack team members.");
    }
    PLEASE POST.

    creds 100% me, post errors!
     

  2. #2  
    Banned

    Join Date
    Jan 2008
    Posts
    1,778
    Thanks given
    0
    Thanks received
    7
    Rep Power
    0
    Nice.. Are u working on full?
     

  3. #3  
    Registered Member
    Unique's Avatar
    Join Date
    May 2008
    Posts
    457
    Thanks given
    0
    Thanks received
    1
    Rep Power
    164
    yes, i'm currently working a 100% real version of castle wars. i will release as soon as its done.
     

  4. #4  
    'Ryin
    Guest
    This will still allow you to enter the portal, even if the team is full.

    And what about logging out? TYYYYYY
     

  5. #5  
    Registered Member
    Bulby Strife's Avatar
    Join Date
    Jan 2008
    Age
    29
    Posts
    833
    Thanks given
    1
    Thanks received
    1
    Rep Power
    267
    nice but its all wrong you twit....try server.java for the ints not client.java, cause they way you do it...you can log out and back in and the number goes back to 0 lol...

    ANd it only goes up when you enter...when some one else enters it stays at 1....but on their screen it goes from 0 up to 1...

    WRONG
    [Only registered and activated users can see links. ]
    ||||||||||||||||||||||||||||||

     

  6. #6  
    Registered Member
    Unique's Avatar
    Join Date
    May 2008
    Posts
    457
    Thanks given
    0
    Thanks received
    1
    Rep Power
    164
    dude... i said! this is not full cwars... and if you find bugs you can fix, well i suggest you fix it..
     

  7. #7  
    'Ryin
    Guest
    Quote Originally Posted by Slow Poke View Post
    dude... i said! this is not full cwars... and if you find bugs you can fix, well i suggest you fix it..
    No you don't understand... This doesn't serve any purpose whatsoever.
     

  8. #8  
    Registered Member
    Unique's Avatar
    Join Date
    May 2008
    Posts
    457
    Thanks given
    0
    Thanks received
    1
    Rep Power
    164
    kk, ty bulby i fixed it.
     

  9. #9  
    Registered Member
    Bulby Strife's Avatar
    Join Date
    Jan 2008
    Age
    29
    Posts
    833
    Thanks given
    1
    Thanks received
    1
    Rep Power
    267
    Quote Originally Posted by Slow Poke View Post
    dude... i said! this is not full cwars... and if you find bugs you can fix, well i suggest you fix it..
    i never said it wasn't full...im saying your method IS TOTALLY WRONG AND DOESNT WORK CAUSE YOU ARE STUPID AND DON'T KNOW THAT ANY THING THAT HAPPENS IN CLIENT.JAVA ONLY HAPPENS TO 1 PERSON. Server.java is connected to all players..change an int in that and it will change on all players screens even if they log out it will remain the same!.

    Gosh you're stupid.


    EDIT: he fixed it lol.
    [Only registered and activated users can see links. ]
    ||||||||||||||||||||||||||||||

     

  10. #10  
    Registered Member
    Unique's Avatar
    Join Date
    May 2008
    Posts
    457
    Thanks given
    0
    Thanks received
    1
    Rep Power
    164
    bulby, i was yelling at ryin not you...
     

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)


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
  •