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 ;(