what do you want it to do..? login?
|
|
how do i make a ClientHandler
i know there is a tutorial but the one that made it dident explain what to do
can someone help me make a ClientHandler
or just post the whole ClientHandler Code

what do you want it to do..? login?
i need it to hold deletethatobject makenewobject deletethatwall and all the armour sets

well um....
open server.java
add this,
under where theres more like that.Code:objectHandler = new objectHandler();
find something like,
and next to the rest like it, putCode:while(!shutdownserver)
next make a file..Code:objectHandler.process();
objectHandler.java
put this in it,
now open client.java,Code:import java.io.*; public class objectHandler { public int spawnTimer; public static void spawnObjects { /* PUT THE STUFF TO SPAWN THE OBJECTS HERE! LIKE MAKEGLOBALOBJECT. IF THE VOIDS TO MAKE THEM ARE IN CLIENT.JAVA, THEN YOU WILL HAVE TO PUT EITHER A "c." OR A "client." BEFORE EACH SPAWN. LIKE "c.makeglobalobject" or "client.makeglobalobject" */ } }
search
make sure to erase anything inside case210:.Code:case 210:
it should look like this,
now add the void. it should look like this when your done.Code:case 210: break;
Code:case 210: objectHandler.spawnObjects(); break;
i get this error how can i fix it
Code:objectHandler.java:7: '(' expected public static void spawnObjects { ^

oops i mean
Code:public static void spawnObjects() {
Thanks it realy helped
Edited: Reputation + Given for help
:lock:

thanks. while making the handler, i realized the potential for something realy good, becaue on my custon source, the objects dont always load. so you could put like at the end of the spawning objects in the handler, like after the last makeglobalobject, a
c.spawned = true;
and in the mapdata case, but something like
thats not all there is to it, but it would make sure the objects spawned without stacking them on top of eachother.Code:case 210: objectHandler.spawnObjects(); if(objectHandler.spawned = false) { objectHandler.spawnObjects(); }
thanks it works very good
| « free play mysql help | RuneScape ancients? » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |