Thread: Sweet and simple way to make a handler

Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1 Sweet and simple way to make a handler 
    Registered Member
    Harvey's Avatar
    Join Date
    Mar 2007
    Posts
    965
    Thanks given
    0
    Thanks received
    55
    Rep Power
    296
    You would make something a bit like this

    Code:
    import java.io.*;
    import java.util.StringTokenizer;
    
    public class CLASS NAME { //this is the class name when you compile it
    
    public CLASS NAME() {
    }
    
    public void VOIDNAME(client c) { // The client c makes it so you call client.java
    //add stuff here just like you would in client.java voids with c. in front 
    }
    }
    you would save as your class name .java
    if compiles successfully you need to add some stuff to server.java to make the server work it.

    if i made this:

    Code:
    import java.io.*; //something to call other files i think
    import java.util.StringTokenizer; //something to call other files i think
    
    public class frameHandler { //this is the class name when you compile it
    
    public frameHandler() {
    }
    
    public void frames(client c) { // The client c makes it so you call client.java
    //add stuff here just like you would in client.java voids with c. in front 
    
    }
    }
    i would save as frameHandler.java
    Thanks,

    Harvey
     

  2. #2  
    mstier s
    Guest
    Whats the point of this? this is not going to help anybody, at all.
     

  3. #3  
    Registered Member
    Harvey's Avatar
    Join Date
    Mar 2007
    Posts
    965
    Thanks given
    0
    Thanks received
    55
    Rep Power
    296
    lol it will i was talking to someone and i told them this and they got a handler working in no time. It makes your client clear space. stfu
    Thanks,

    Harvey
     

  4. #4  
    Banned

    Join Date
    May 2007
    Posts
    2,690
    Thanks given
    115
    Thanks received
    45
    Rep Power
    0
    you could explain it a bit more right?
     

  5. #5  
    Registered Member
    Harvey's Avatar
    Join Date
    Mar 2007
    Posts
    965
    Thanks given
    0
    Thanks received
    55
    Rep Power
    296
    yh i could but i cant be bothered...
    Thanks,

    Harvey
     

  6. #6  
    Fallen Azn SinZ
    Guest
    hey harvey, you might want to explain the use of the private and the static statements too. I do agree with A N G E L, it could be a bit more explained, but nevertheless, its still good.
     

  7. #7  
    Registered Member
    AlexMason's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    1,199
    Thanks given
    17
    Thanks received
    27
    Rep Power
    98
    if i wanted to make a command would it be

    Code:
    c.if (command.equalsIgnoreCase("alexscape") {
    teleportToX = XXXX;
    teleportToY = XXXX;
    sendMessage("wooooooooo");
    }
    or

    Code:
    c.if (command.equalsIgnoreCase("alexscape") {
    c.teleportToX = XXXX;
    c.teleportToY = XXXX;
    c.sendMessage("wooooooooo");
    c.}

     

  8. #8  
    Registered Member
    AlexMason's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    1,199
    Thanks given
    17
    Thanks received
    27
    Rep Power
    98
    Anyone Help?

     

  9. #9  
    project-rs owner
    Join Date
    Sep 2006
    Age
    29
    Posts
    914
    Thanks given
    4
    Thanks received
    4
    Rep Power
    49
    if (command.equalsIgnoreCase("alexscape") {
    c.teleportToX = XXXX;
    c.teleportToY = XXXX;
    c.sendMessage("wooooooooo");
    }

    You must put c. if it gets called from client
     

  10. #10  
    Registered Member
    AlexMason's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    1,199
    Thanks given
    17
    Thanks received
    27
    Rep Power
    98
    Quote Originally Posted by laurens View Post
    if (command.equalsIgnoreCase("alexscape") {
    c.teleportToX = XXXX;
    c.teleportToY = XXXX;
    c.sendMessage("wooooooooo");
    }

    You must put c. if it gets called from client
    kk well i guess im gonna start on my command handler

     

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

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