All pastes #402714 Raw Edit

Miscellany

public java v1 · immutable
·published 2007-03-19 23:59 UTC
rendered paste body
import java.awt.Color;import impsoft.nexus.bots.color.methods.ColorScript;import impsoft.nexus.bots.color.scriptobjects.XY;import impsoft.nexus.bots.paint.PaintJob;public class tester2 extends ColorScript {	@Override	public boolean doStart(String cmd, String[] args)			throws InterruptedException {		// TODO Auto-generated method stub		return true;	}	@Override	public void script() throws InterruptedException {		while (true) {			//theBot.setupFields();			paintText(10, 40, "" + getLocation(), 2000, Color.RED);			sleep(2000);		}	}	public XY getLocation() {		return new XY(getY(), getX());	}	public int getY() {		try {			return theBot.WorldY.getInt(null)					+ (theBot.PlayerY.getInt(theBot.myPlayer) >> 7);		} catch (IllegalArgumentException e) {			exception(e);		} catch (IllegalAccessException e) {			exception(e);		}		return -1;	}	public int getX() {		try {			return theBot.WorldX.getInt(null)					+ (theBot.PlayerX.getInt(theBot.myPlayer) >> 7);		} catch (IllegalArgumentException e) {			exception(e);		} catch (IllegalAccessException e) {			exception(e);		}		return -1;	}}