BenLand100
2007-12-20 17:53:08
This one's got a cmd prompt that pops up whenever you use Scar, don't close it or it will close scar. ;) It will give lots of debug info (for startup mostly) and should linger after a crash so you can take a SS so I can tell what went wrong where. Wouldn't doubt that I missed some stuff, and I know I've changed some names, have fun finding them :p
Here's some stuff you might want… Post improvements, this is SMART ENHANCEMENT WEEK!
Here's some stuff you might want… Post improvements, this is SMART ENHANCEMENT WEEK!
const
SettingsArray = 'jb.k';
PlayerX = 'nf.j.db';
PlayerY = 'nf.j.nb';
BaseX = 'oa.a';
BaseY = 'dd.b';
//returns huge numbers if its invalid (ie, not logged in) ;)
procedure getPlayerPos(var x, y: Integer);
begin
x:= SmartGetFieldInt(BaseX) + SmartGetFieldInt(PlayerX) shr 7;
y:= SmartGetFieldInt(BaseY) + SmartGetFieldInt(PlayerY) shr 7;
end;
procedure dumpSettingArray;
var
i: Integer;
begin
for i:= 0 to 1999 do
Writeln(IntToStr(i)+': ' + inttostr(SmartGetFieldArrayInt(SettingsArray,i)));
end;
//-1 if box not open, 0-2 based on the correct answer
function BoxAnswer: integer;
var
boxIndex: Integer;
begin
boxIndex:= SmartGetFieldArrayInt(SettingsArray,312);
if boxIndex = 0 then
result:= -1
else
result:= (boxIndex shr 24) and $FF;
end;
var
x,y,b: Integer;
c: TCanvas;
begin
SmartSetup('at1',true,true);
b:= BitmapFromString(765,503,'');
c:= GetBitmapCanvas(b);
c.Handle:= SmartGetDebugDC;
c.Pen.Color:= $FF;
c.LineTo(100,100);
SmartSetDebug(true);}
dumpSettingArray;
Writeln(IntToStr(BoxAnswer));
getPlayerPos(x,y);
Writeln(IntToStr(x) + ', ' + IntToStr(y));
end. switch (index) {
case 0:
address = GetProcAddress(inst,"_setup@12");
strcpy(def, "procedure SmartSetup(server: String; hiDetail, signed: Boolean);");
return index;
case 1:
address = GetProcAddress(inst,"_getHDC@0");
strcpy(def, "function SmartGetDC: integer;");
return index;
case 2:
address = GetProcAddress(inst,"_isBlocking@0");
strcpy(def, "function SmartEnabled: boolean;");
return index;
case 3:
address = GetProcAddress(inst,"_getMousePos@8");
strcpy(def, "procedure SmartGetMousePos(var x, y: integer);");
return index;
case 4:
address = GetProcAddress(inst,"_holdMouse@12");
strcpy(def, "procedure SmartHoldMouse(x, y: integer; left: boolean);");
return index;
case 5:
address = GetProcAddress(inst,"_releaseMouse@12");
strcpy(def, "procedure SmartReleaseMouse(x, y: integer; left: boolean);");
return index;
case 6:
address = GetProcAddress(inst,"_moveMouse@8");
strcpy(def, "procedure SmartMoveMouse(x, y: Integer);");
return index;
case 7:
address = GetProcAddress(inst,"_windMouse@8");
strcpy(def, "procedure SmartWindMouse(x, y: Integer);");
return index;
case 8:
address = GetProcAddress(inst,"_dragMouse@8");
strcpy(def, "procedure SmartDragMouse(x, y: Integer);");
return index;
case 9:
address = GetProcAddress(inst,"_clickMouse@12");
strcpy(def, "procedure SmartClickMouse(x, y: Integer; left: Boolean);");
return index;
case 10:
address = GetProcAddress(inst,"_sendKeys@4");
strcpy(def, "procedure SmartSendKeys(Text: String);");
return index;
case 11:
address = GetProcAddress(inst,"_holdKey@4");
strcpy(def, "procedure SmartHoldKey(Code: Integer);");
return index;
case 12:
address = GetProcAddress(inst,"_releaseKey@4");
strcpy(def, "procedure SmartReleaseKey(Code: Integer);");
return index;
case 13:
address = GetProcAddress(inst,"_getColor@8");
strcpy(def, "function SmartGetColor(x, y: integer): integer;");
return index;
case 14:
address = GetProcAddress(inst,"_findColor@28");
strcpy(def, "function SmartFindColor(var x, y: integer; color, sx, sy, ex, ey: integer): boolean;");
return index;
case 15:
address = GetProcAddress(inst,"_findColorTol@32");
strcpy(def, "function SmartFindColorTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean;");
return index;
case 16:
address = GetProcAddress(inst,"_findColorSpiral@28");
strcpy(def, "function SmartFindColorSpiral(var x, y: integer; color, sx, sy, ex, ey: integer): boolean;");
return index;
case 17:
address = GetProcAddress(inst,"_findColorSpiralTol@32");
strcpy(def, "function SmartFindColorSpiralTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean;");
return index;
case 18:
address = GetProcAddress(inst,"_findBitmap@12");
strcpy(def, "function SmartFindBitmap(hdc: integer; var x, y: integer): boolean;");
return index;
case 19:
address = GetProcAddress(inst,"_findBitmapIn@28");
strcpy(def, "function SmartFindBitmapIn(hdc: integer; var x, y: integer; sx, sy, ex, ey: integer): boolean;");
return index;
case 20:
address = GetProcAddress(inst,"_findBitmapTolIn@32");
strcpy(def, "function SmartFindBitmapToleranceIn(hdc: integer; var x, y: integer; sx, sy, ex, ey, tol: integer): boolean;");
return index;
case 21:
address = GetProcAddress(inst,"_findColorsTol@28");
strcpy(def, "function SmartFindColorsTolerance(var pts: TPointArray; sx, sy, ex, ey, tol: integer): boolean;");
return index;
case 22:
address = GetProcAddress(inst,"_getFieldInt@4");
strcpy(def, "function SmartGetFieldInt(path: String): integer;");
return index;
case 23:
address = GetProcAddress(inst,"_setRefresh@4");
strcpy(def, "procedure SmartSetRefresh(x: integer);");
return index;
case 24:
address = GetProcAddress(inst,"_getRefresh@0");
strcpy(def, "function SmartGetRefresh: integer;");
return index;
case 25:
address = GetProcAddress(inst,"_getDebugHDC@0");
strcpy(def, "function SmartGetDebugDC: integer;");
return index;
case 26:
address = GetProcAddress(inst,"_setDebugColor@4");
strcpy(def, "procedure SmartSetTrasparentColor(color: integer);");
return index;
case 27:
address = GetProcAddress(inst,"_setDebug@4");
strcpy(def, "procedure SmartSetDebug(enabled: boolean);");
return index;
case 28:
address = GetProcAddress(inst,"_setGraphics@4");
strcpy(def, "procedure SmartSetGraphics(enabled: boolean);");
return index;
case 29:
address = GetProcAddress(inst,"_getFieldArrayInt@8");
strcpy(def, "function SmartGetFieldArrayInt(path: String; index: integer): integer;");
return index;
case 30:
address = GetProcAddress(inst,"_getFieldArraySize@4");
strcpy(def, "function SmartGetFieldArraySize(path: String): integer;");
return index;
}