Log in

View Full Version : cool autodropper help



lardmaster
09-15-2006, 09:40 PM
this is pre-pre-pre-beta-beta, but when i reference to srl's text include, i get a fatal error! "[Runtime Error] : Exception: Access violation at address 0065478C in module 'scar.exe'. Read of address 00000000 in line 197 in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Text.scar" it seems pretty serious. ive attached my script so have a look at it and see if i'm referencing isuptextmuli wrongly or whatever. right now, its just supposed to right click on all the specified ores in your inventory. (input 'copper' in the debug window when prompted). put the picture in your scar folder.



{.include SRL\SRL\misc\arrayloader.scar}

{.include SRL\srl.scar}

type

intarray = ARRAY[0..1] of array[0..1] of integer;

var

xc,yc,copper, i :integer;

{-------------------------------------------------------------------------}

{-------------------------------------------------------------------------}

{-------------------------------------------------------------------------}

procedure loadbitmaps(itemname:string);

begin

itemname := 'C:\Program Files\SCAR 2.03\' + itemname + '.bmp';

copper := loadbitmap(itemname);



end;

{-------------------------------------------------------------------------}

{-------------------------------------------------------------------------}

{-------------------------------------------------------------------------}

function finditem(item:string; coordinates : intarray) : boolean;

begin

loadbitmaps(item);

Result := findbitmaptolerancein(copper,xc,yc,coordinates[0][0],coordinates[0][1],coordinates[1][0],coordinates[1][1],20);

end;

{-------------------------------------------------------------------------}

{-------------------------------------------------------------------------}

{-------------------------------------------------------------------------}

function coordsofslot(num : integer) : intarray;

var

x1,y1,x2,y2,x,y, j :integer;

begin

j := 1;

while(j<9)do

begin

if(num<(j*4)+1) and (((j-1)*4) <num) then

begin

x := (num - (4*(j-1)));

break;

end

y := j;

j := j + 1;

end





x1 := 526+(41*x);

y1 := 210+(36*y);

x2 := x1+41;

y2 := y1+35;

result[0][0] := x1;

result[0][1] := y1;

result[1][0] := x2;

result[1][1] := y2;

end;

{-------------------------------------------------------------------------}

{-------------------------------------------------------------------------}

{-------------------------------------------------------------------------}

var

coords: intarray;

todrop: array[1..28] of boolean;

item : string;

begin

item := readln('what item to drop?')



while(i<=28)

do

begin

coords := (coordsofslot(i));

todrop[i] := finditem(item, coords);

writeln(inttostr(i));

writeln(booltostr(todrop[i]));

i := i + 1

end



i := 1;



while(i <= 28)do

begin

if(todrop[i] = true)then

begin

coords := coordsofslot(i);

writeln('next is');

writeln(inttostr(coords[0][0]));

writeln(',');

writeln(inttostr(coords[0][1]));

movemousesmooth(random(coords[1][0]-coords[0][0])+ coords[0][0], random(coords[1][1]-coords[0][1])+ coords[0][1]);

wait(random(1000)+500);

while(isuptextmulti('use', 'use'+ item, item) = false)do

begin

movemousesmooth(random(coords[1][0]-coords[0][0])+ coords[0][0], random(coords[1][1]-coords[0][1])+ coords[0][1]);

wait(random(1000) + 500);

end

getmousepos(xc, yc);

clickmouse(yc,yc, false);

end

i := i + 1;

end



end.

plz help!, SRL IS MALFUNCTIONING!

Dspider0
09-16-2006, 02:30 AM
the assembler code for 65478c is: mov eax,[edx+eax*4]

Byte Of Arrays for 65478c: 8b 04 82

Value of 65478c: 1350698123

Opcodes that Access 65478c: None from simple running of script, only accessed otherwise

Debug Strings: none

Enumerated DLL or Symblol: No

Critical: Yes

t3h ub3r k1tten
09-16-2006, 09:45 PM
Umm, lol.

That doesnt have much use to scripters, only people who do really advanced delphi plugins
(You have to use ce even in scar lol :wink: )

Well, navigating your code...

Its real complex, I mean, no need for arrays, regular variables are just fine.
(whatever suits you)

Access violation, hmm, runtime errors are annoying.
Ill reply once ive figured it out.

lardmaster
09-29-2006, 09:32 PM
its not a problem with my script, its with gettoptext, and yes, this will be usefull!!!!!!!!!!!!!!!! :mad:
Umm, lol.

That doesnt have much use to scripters, only people who do really advanced delphi plugins
(You have to use ce even in scar lol :wink: )

Well, navigating your code...

Its real complex, I mean, no need for arrays, regular variables are just fine.
(whatever suits you)

Access violation, hmm, runtime errors are annoying.
Ill reply once ive figured it out.

lardmaster
10-09-2006, 03:33 AM
plz reply, you said you would, i keep getting that error on all the scripts i make!

I Pick Axes
10-09-2006, 02:20 PM
You get that for not setting up properly sometimes. Did you 1. set up SRL 2. set up skill-specific SRL parts 3. set up colors 4. make sure nothing is getting inappropriate input?

lardmaster
10-12-2006, 01:16 AM
thpppppt didnt setup srl... boohoo