All pastes #1503785 Raw Edit

Stuff

public java v1 · immutable
#1503785 ·published 2009-07-22 23:57 UTC
rendered paste body
public void followPlayer(int playerID, boolean stealth) throws Exception{	BufferedOutputStream followStream = new BufferedOutputStream(client.getOutputStream());	DataInputStream  input = new DataInputStream(client.getInputStream());		input.read(data);	if(gotPacket)	{		followStream.write(playerLocation,0,playerLocation.length);		followStream.flush();	}		for(int i=0;i<data.length;)	{		if(data[i] == 0x08&&  data[i+1] == playerID)		{			playerLocation[0]=0x08;			playerLocation[1]=(byte)0xFF;			for(int bytePos=2;bytePos<10;bytePos++)			playerLocation[bytePos]=data[i+bytePos];			if(!stealth && (followTime++ % 50)==0)			sayServer(randomQuotes[randomNumber.nextInt(randomQuotes.length-1)]);			gotPacket=true;					}		break;	}}