And then we just make a fail safe..
if ReflectionVarsAreRight then
SolveWithReflection
else SolveWithColors;
Or just let reflection scripts be reflection scripts, with possibly a few color failsafes.
You know what? I've been saying that client.class hasn't got CurrentX and CurrentY, even Qauters' updater has them, but well well, that's for other people than RSBot users! They use BaseX, BaseY and the minimap ints -
[php]
public static Point worldToMinimap(double x, double y) {
x -= Bot.getClient().getBaseX();
y -= Bot.getClient().getBaseY();
int calculatedX = ((int)(x * 4 + 2)) - Bot.getClient().getMyPlayer().getX() / 32;
int calculatedY = ((int)(y * 4 + 2)) - Bot.getClient().getMyPlayer().getY() / 32;
Interface mm = Bot.getClient().getInterfaceCache()[548][58];
int angle = 0x7ff & Bot.getClient().getMinimapInt2() + Bot.getClient().getMinimapInt1();
int actDistSq = calculatedX * calculatedX + calculatedY * calculatedY;
int mmDist = Math.max(mm.getHeight() / 2, mm.getWidth() / 2) + 10;
if (mmDist * mmDist >= actDistSq) {
int cs = CURVESIN[angle];
int fact = 256 + Bot.getClient().getMinimapInt3();
cs = 256 * cs / fact;
int cc = CURVECOS[angle];
cc = 256 * cc / fact;
int i_25_ = -(calculatedX * cs) + calculatedY * cc >> 16;
int i_26_ = calculatedX * cc + calculatedY * cs >> 16;
int screenx = (mm.getX() + mm.getMasterX()) + mm.getWidth() / 2 + i_26_;
int screeny = -i_25_ + mm.getHeight() / 2 + (mm.getY() + mm.getMasterY());
return new Point(screenx, screeny);
}
return new Point(-1, -1);//not on minimap
}
[/php]
I see that the character class has getX and getY, but I can't find their source anywhere, and client.class hasn't got a getX or getY :(