Spotify
2014-07-11 02:41:05
Hey guys, so I'm trying to combine some of my code into smaller procedure(and fewer) so it doesn't look so messy and unprofessional. I'm currently using things like this and it's repetitive and incredibly messy. If it helps, I'm using an input query to to determine whether a guard or hero is going to be thieved. Is there a way to combine these two procedures?
Procedure PickPocketGuard;
var
x, y:Integer;
Begin
Mouse(615, 21, 3, 3, true);
KeyDown(38);
Wait(1500);
KeyUp(38);
repeat
repeat
KeyDown(37);
until(FindColorTolerance(X, y, 2248736, msx1, msy1, msx2, msy2, 5));
Begin
KeyUp(37);
if FindObjEx(X, y, ['1IIac4'], [2248736], 5, 50, 155, 126, 546, 350) then
Begin
MoveMouse(X, y);
Wait(50);
ClickMouse(X, y, 0);
Wait(100);
ClickPickPocket;
Wait(100);
Stunned;
Status := 'stealin geepee';
ProggyGuard;
Wait(1000);
End;
End;
until(Iskeydown(113));
End;
Procedure PickPocketHero;
var
x, y:Integer;
Begin
Mouse(615, 21, 3, 3, true);
KeyDown(38);
Wait(1500);
KeyUp(38);
repeat
repeat
KeyDown(37);
until(FindColorTolerance(X, y, 12293239, msx1, msy1, msx2, msy2, 5));
Begin
KeyUp(37);
if FindObjEx(X, y, ['1IIac4'], [12293239], 5, 50, 155, 126, 546, 350) then
Begin
MoveMouse(X, y);
Wait(50);
ClickMouse(X, y, 0);
Wait(100);
ClickPickPocket;
Wait(100);
Stunned;
Status := 'Stealin Stuff';
ProggyHero;
Wait(1000);
End;
End;
until(Iskeydown(113));
End;