Jump to content
  • 0
Sign in to follow this  
bahamutskingdom

Handler working but not.....help?

Question

I have created a handler for objects, to make more room in the client. And I got it to compile successfully. When I clicked on the object I placed into it, it kind of glitched a second like it was going to work but then nothing happened. So it is 50/50 working, and I am wondering where the error is, since there is no error. This is what I made for the handler: This also has the one code I have put into it.

[HTML]public class objectclicking {

public void objectclicking(int ID,int objectID,int absX,int absY) {
client c = (client) server.playerHandler.players[ID];
//begin objects

if(objectID == 4499){
c.toX = 2807;
c.toY = 10001;
c.heightLevel = 0;
}

//end object
}//end void
}//end handler[/HTML]

Then in the server.java it was placed under


[HTML]public static ArrayList<Object> objects = new ArrayList<Object>();[/HTML] as well as
[HTML]itemHandler = new ItemHandler();[/HTML]

In the client it was placed in case: 132 shown here.


[HTML]int xDiff = Math.abs(absX - objectX);
int yDiff = Math.abs(absY - objectY);
boolean found = false;
resetAction(false);
TurnPlayerTo(objectX, objectY);
updateRequired = true;
appearanceUpdateRequired = true;
long time2 = System.currentTimeMillis();
if (time2 - globalCooldown[0] <= 50) {
sM("Action throttled... please wait longer before acting!");
server.objectclicking.objectclicking(playerId,objectID,absX,absY); <----(here)[/HTML]

Kind of happy that I made something that has no errors, but unhappy that it doesn't work. I know it is something very small, but just cannot get it to work. If anyone can lend advise or direct me to a tutorial on creating handlers, I would be happy as all git. There is a object handler one in Runelocus, but it does not work in my client. Too many errors.

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Sign in to follow this  

×