SRL Archive - Help and Support

KK this is SERIOUSLY pissing me off


Sin

2012-02-12 16:29:19

procedure Smelt;
var
x,y,x2,y2,t:Integer;
begin
//if FindFurnace(x,y) then
if FindObjCustom(x,y,['Smelt'],[7372162,8030093], 2) then
begin
GetMousePos(x,y);
MouseItem(RandomRange(25,28),0);
ChooseOption('Use');
Mouse(x,y,1,1,False);
ChooseOption('Clay');
if DidRedClick then
begin
if WaitColor(56,164,15724794,2,8000) then
begin
wait(1000);
if WhatType = 'Gold' then
begin
if FindDTM(Obj,x2,y2,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x2,y2,1,1,False);
ChooseOption('All');
MarkTime(t);
repeat
wait(1000);
case random(300) of
0..10: HoverSkill(SKILL_CRAFTING,False);
20..30: BoredHuman;
60..65: RandomMovement;
end;
until(TimeFromMark(t) > 51000);
end;
end;
if WhatType = 'Ruby' then
begin
if Item = 'Ring' then
begin
if FindDTM(RRing,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,False);
ChooseOption('All');
repeat
wait(1000);
until(InvCount = 14);
end;
end;
if Item = 'Necklace' then
begin
if FindDTM(RNecklace,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,False);
ChooseOption('All');
repeat
wait(1000);
until(InvCount = 14);
end;
end;
if Item = 'Amulet' then
begin
if FindDTM(RAmmy,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,False);
ChooseOption('All');
repeat
wait(1000);
until(InvCount = 14);
end;
end;
if Item = 'Bracelet' then
begin
if FindDTM(RBracelet,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,False);
ChooseOption('All');
repeat
wait(1000);
until(InvCount = 14);
end;
end;
end;
if WhatType = 'Sapphire' then
begin
if Item = 'Ring' then
begin
if FindDTM(SRing,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,False);
ChooseOption('All');
repeat
wait(1000);
until(InvCount = 14);
end;
end;
if Item = 'Bracelet' then
begin
if FindDTM(SBracelet,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,False);
ChooseOption('All');
repeat
wait(1000);
until(InvCount = 14);
end;
end;
if Item = 'Necklace' then
begin
if FindDTM(SNecklace,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,False);
ChooseOption('All');
repeat
wait(1000);
until(InvCount = 14);
end;
end;
if Item = 'Bracelet' then
begin
if FindDTM(SBracelet,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,False);
ChooseOption('All');
repeat
wait(1000);
until(InvCount = 14);
end;
end;
end;
end;
end;
end;
GameTab(25);
SPS_WalkToPos(Point(1191, 1404));
writeln('banking');
end;

Part of my AIO Crafter, DTM's are all set and called, also freed at the end.
Don't mind about FindObj, just using it for now.
When I run it, it just waits at the screen ;(

PatDuffy

2012-02-12 16:35:37

Hmmm…so its not even moving the cursor like it does with FindObj?

Sin

2012-02-12 16:37:35

No, finding the Furnace works, it's only finding the DTM's.
I copied the DTM and pasted it into the DTMEditor, it found the DTM, but NOT while the script is running.

smurg

2012-02-12 19:49:22

From: Sin
No, finding the Furnace works, it's only finding the DTM's.
I copied the DTM and pasted it into the DTMEditor, it found the DTM, but NOT while the script is running.


What CTS do you use in the script?

Mat

2012-02-12 20:04:13

Try DTMRotated
edit
what DTM is Obj?

mormonman

2012-02-12 20:25:40

Throw some Writeln's in there to figure out exactly what is happening.

Sin

2012-02-12 20:37:10

Kk, ill try that.

Geo

2012-02-12 20:39:35

If I'm undersanding this correctly, you're trying to select what type of item to create so shouldn't

MSX1,MSY1,MSX2,MSY2 be MCX1,MCY1,MCX2,MCY2 which would be the chatscreen

P.S: I haven't smelted anything in ages, so I could of missed a new update or something…

Sin

2012-02-12 20:41:43

Nah, it's on the main screen.

kitchenrange

2012-02-13 02:15:45

If it doesn't do anything at all including the walking and everything in the end, the only answer could be a problem with findObjCustom…

make some else statements with writelns to see if anything is failing, succeeding, or getting stuck in an infinite loop.