fixed your standards and hopefully it will work better
Procedure TradingBob;
Begin
try wait(50);
MarkTime(LoopBegin);
TalkBob := DTMFromString('mwQAAAHic42RgYDABYjMgtgNiNyD2gtIgMQcg1gJiLiDmBWIeKA3CHEDMBsT8UPH//xmoAhiJwHAAAJYUBJU=');
TradeBob := DTMFromString('maQEAAHicE2RgYNAGYlYo5gRiISA2AWIbIHaA0qZArAPFykAsDcQyQMwDlWcDYmYg5gBibjQMMpMFqoYJyofJMUHF2YH4/3+GQQEYqYAxAABg4AUM');
Repeat
//Login check
If(LoggedOut = True) then
Begin
Login;
End;
//Trading Bob
BobShop;
MMouse(x, y, 0, 0);
GetMousePos(x, y);
Wait(50);
Mouse(x, y, 0, 0, False);
Wait(50);
//Getting Bob interface
Begin
Repeat
Wait(50);
Until FindDTM(TalkBob, x, y, MSX1, MSY1, MSX2, MSY2) or
(TimeFromMark(LoopBegin) >= 15000)
End;
//Found Talk-Bob
MMouse(x, y, 0, 0);
Wait(50);
Mouse(x, y, 0, 0, True);
//Waiting till Bob shop is open.
Begin
Repeat
Wait(50);
Until FindColorTolerance(x, y, DragonLeather1, 226, 132, 247, 149, 2) or
FindColorTolerance(x, y, DragonLeather2, 226, 132, 247, 149, 2) or
(TimeFromMark(LoopBegin) >= 30000);
End;
//Making sure we're going in the Shop!
If(InBobShop = False) then
Begin
//Trading Bob
ExtraBobShop;
MMouse(x, y, 0, 0);
GetMousePos(x, y);
Wait(50);
Mouse(x, y, 0, 0, False);
Wait(50);
//Getting Bob interface
Begin
Repeat
Wait(50);
Until FindDTM(TradeBob, x, y, MSX1, MSY1, MSX2, MSY2) or
(TimeFromMark(LoopBegin) >= 15000)
End;
//Found Talk-Bob
MMouse(x, y, 0, 0);
Wait(50);
Mouse(x, y, 0, 0, True);
Wait(2000);
//Waiting till Bob shop is open.
Begin
Repeat
Wait(50);
Until FindColorTolerance(x, y, DragonLeather1, 226, 132, 247, 149, 2) or
FindColorTolerance(x, y, DragonLeather2, 226, 132, 247, 149, 2) or
(TimeFromMark(LoopBegin) >= 30000);
End;
End;
//End of
If FindColorTolerance(x, y, DragonLeather1, 226, 132, 247, 149, 2) or
FindColorTolerance(x, y, DragonLeather2, 226, 132, 247, 149, 2) then
//Buying Dragon Leather
MMouse(234, 141, 0, 0);
Wait(50);
Mouse(235, 141, 0, 0, False);
Wait(50);
//Buying X Amount
MMouse(235, 141+89, 0, 0);
GetMousePos(x, y);
Wait(50);
Mouse(x, y, 0, 0, True);
//Waiting till chat opens
Begin
Repeat
Wait(50);
Until FindColorTolerance(x, y, 8388608, 259, 412, 259, 412, 2) or
(TimeFromMark(LoopBegin) >= 30000);
End;
//We can enter X Amount
Wait(300);
TypeSend('26');
Wait(100);
KeyDown(13);
KeyUp(13);
Wait(20);
Begin
Repeat
Wait(50);
Until FindColorTolerance(x, y, DragonLeather1, 658, 222, 670, 238, 2) or
FindColorTolerance(x, y, DragonLeather2, 658, 222, 670, 238, 2) or
(TimeFromMark(LoopBegin) >= 30000)
End;
//Bought DragonLeather closing shop
MMouse(483,33, 0, 0);
Wait(50);
Mouse(483, 33, 0, 0, True);
Wait(100);
Until FindColorTolerance(x, y, DragonLeather1, 647, 211, 682, 243, 2) or FindColorTolerance(x, y, DragonLeather2, 647, 211, 682, 243, 2)
Finally
FreeDTM(TalkBob);
FreeDTM(TradeBob);
end;
End;
Procedure Selling;
Begin
try Wait(50);
MarkTime(LoopBegin);
TalkTo := DTMFromString('mKgEAAHic42NgYPAFYhYo5gRiCSDWAuJaIK4D4jAg9gfiOCA2B2I3IM6FqmUGYi4gZgdiHiDmQOIzQcV4oOpANB8Q///PgBdoq8vgV0AiYCQTowIAvykGig==');
Repeat
//Login check
If(LoggedOut = True) then
Begin
Login;
End;
SellingShop;
MMouse(x, y+10, 0, 0);
GetMousePos(x, y);
Wait(50);
Mouse(x, y, 0, 0, False);
Begin
Repeat
Wait(50);
Until FindDTM(TalkTo, x, y, MSX1, MSY1, MSX2, MSY2) or (TimeFromMark(LoopBegin) >= 15000)
End;
MMouse(x, y, 0, 0);
Wait(50);
Mouse(x, y, 0, 0, True);
//Waiting till shop is open
Begin
Repeat
Wait(50);
Until FindColorTolerance(x, y, 7243684, 50, 137, 50, 137, 2) or
FindColorTolerance(x, y, 4085101, 48, 139, 48, 139, 2) or
(TimeFromMark(LoopBegin) >= 30000)
End;
//Selling items
MMouse(663, 229, 0, 0);
Wait(50);
Mouse(663, 229, 0, 0, False);
Wait(50);
MMouse(663, 229+90, 0, 0);
GetMousePos(x, y);
Wait(50);
Mouse(x, y, 0, 0, True);
Wait(50);
MMouse(483,33, 0, 0);
Wait(50);
Mouse(483, 33, 0, 0, True);
Wait(100);
Until FindColorTolerance(x, y, 3292228, 662, 233, 662, 233, 2)
finally
FreeDTM(TalkTo);
end;
End;