All pastes #281013 Raw Edit

ThoroughDump

public text v1 · immutable
#281013 ·published 2006-12-16 12:08 UTC
rendered paste body
import com.ms.arga.sal.*;
import com.ms.arga.hooks.*;
import com.ms.arga.bot.*;
public class ThoroughDump extends SALScript{
	public String getName() { return "ThoroughDump"; }
	public int cycle(){
		int x = getMyPlayer().getCharX() >> 7;
		int y = getMyPlayer().getCharY() >> 7;
		log("N:");
		getObjectsAt(x + getBaseX(),y+1 + getBaseY());
		log("E:");
		getObjectsAt(x+1 + getBaseX(),y + getBaseY());
		log("W:");
		getObjectsAt(x-1 + getBaseX(),y + getBaseY());
		log("S:");
		getObjectsAt(x + getBaseX(),y-1 + getBaseY()); 
		return -1;
	}
	public void getObjectsAt(int x, int y){
		for (int i = 0; i < ARGA.myClient.getWorldClassInstance().getGroundArray().length; i++) {
			log("		"+i);
                        try {
                                Ground ground = ARGA.myClient.getWorldClassInstance().getGroundArray()[i] [x - getBaseX()][y - getBaseY()];
                                if (ground != null) {
                                        if (ground.getObject5Array() != null) {
                                                for (Thing obj : ground.getObject5Array())
                                                        if (obj != null && obj.getUID() != -1)
                                                                if (obj.getUID() != -1) log("5: "+obj.getUID());
                                        }
                                        if (ground.getObject4() != null && ground.getObject4().getUID() != -1)
                                                if (ground.getObject4().getUID() != -1) log("4: "+ground.getObject4().getUID());
                                        if (ground.getObject3() != null && ground.getObject3().getUID() != -1)
                                                if (ground.getObject3().getUID() != -1) log("3: "+ground.getObject3().getUID());
                                        if (ground.getObject2() != null && ground.getObject2().getUID() != -1)
                                                if (ground.getObject2().getUID() != -1) log("2: "+ground.getObject2().getUID());
                                        if (ground.getObject1() != null && ground.getObject1().getUID() != -1)
                                                if (ground.getObject1().getUID() != -1) log("1: "+ground.getObject1().getUID());
                                }
                        } catch (Exception e) { }
                }
	}
}