Civic EJ9
2013-03-23 20:27:36
Can anyone help me with this:
Function StartMine: Boolean;
Var
X, Y, PlusOne, MineCounter: Integer;
Begin;
PlusOne:= P07_InvCount +1;
If P07_FindObjCustom(X, Y, ['ine', 'ocks'], [4814242, 4747935, 4681884, 4681625, 5011363, 5142695, 4747419, 5143209, 4681625, 4615317], 5) Then
Begin
writeln('Found Copper Ore');
GetMousePos(x, y);
Case Random(1) Of
0: Begin
HumanMove;
P07_IsUpTextMultiCustom(['ine', 'ock']);
ClickMouse2(mouse_Left);
1: Begin <----- This line highlights with error.
HumanMove;
P07_WaitOptionMulti(['ine', 'ock'],RandomRange(50,150));
end;
Repeat
MarkTime(MineCounter);
Antiban;
Wait(100);
Until P07_InvCount = PlusOne Or TimeFromMark(7000)
End;
End;
End;
End;
Says identifier expected at line 53 (highlighted) Any help.
iraqownz
2013-03-23 20:39:01
hmmm try:
instead of
If P07_FindObjCustom(X, Y, ['Mine', 'Rocks'], [4814242, 4747935, 4681884], 5) Then
Begin
Writeln('Whoopie! We found some Copper!');
GetMousePos(X, Y);
Case Random(1) Of
0: Mouse(X, Y, 5, 5, True);
1: Begin
Mouse(X, Y, 5, 5, False);
P07_WaitOptionMulti(['Mine'],RandomRange (350,500));
try this:
If P07_FindObjCustom(X, Y, ['Mine', 'Rocks'], [4814242, 4747935, 4681884], 5) Then
Begin
Writeln('Whoopie! We found some Copper!');
MMouse(RandomRange(X - 4, X + 4), RandomRange(y - 4, y + 4), 0, 0);
ClickMouse2(Mouse_Left);
Civic EJ9
2013-03-23 20:46:47
No, that doesn't seem to work for me.
If you've got any other suggestions, I'd be glad to try them out, for now I'll keep searching around.
Civic EJ9
2013-03-23 23:27:53
Ok, I got the script working. It will now mine 1 ore, and then stop mining. I think it's got something to do with:
Wait(100);
Until P07_InvCount=+1
Again, any help will be hugely appreciated. Thanks.
Civic EJ9
2013-03-25 15:50:36
Any help guys, I've tried adding, removing and moving around "End;" but it doesn't work. This is only one function/procedure, if you need the whole code, just say and I'll edit this.
Function StartMine: Boolean;
Var
X, Y, PlusOne, MineCounter: Integer;
Begin;
PlusOne:= P07_InvCount +1;
If P07_FindObjCustom(X, Y, ['ine', 'ocks'], [4814242, 4747935, 4681884, 4681625, 5011363, 5142695, 4747419, 5143209, 4681625, 4615317], 5) Then
Begin
writeln('Found Copper Ore');
GetMousePos(x, y);
Case Random(1) Of
0: Begin
HumanMove;
P07_IsUpTextMultiCustom(['ine', 'ock']);
ClickMouse2(mouse_Left);
1: Begin
HumanMove;
P07_WaitOptionMulti(['ine', 'ock'],RandomRange(50,150));
end;
Repeat
MarkTime(MineCounter);
Antiban;
Wait(100);
Until P07_InvCount = PlusOne Or TimeFromMark(7000)
End;
End;
End;
End;
Civic EJ9
2013-03-26 14:07:33
Bump, once I get this problem ironed out, I can start working on the Proggy! In need of help!
From: Civic EJ9
Bump, once I get this problem ironed out, I can start working on the Proggy! In need of help!
Function StartMine: Boolean;
Var
X, Y, PlusOne, MineCounter: Integer;
Begin;
PlusOne:= P07_InvCount +1;
If P07_FindObjCustom(X, Y, ['ine', 'ocks'], [4814242, 4747935, 4681884, 4681625, 5011363, 5142695, 4747419, 5143209, 4681625, 4615317], 5) Then
Begin
writeln('Found Copper Ore');
GetMousePos(x, y);
Case Random(2) Of // 2 cases not 1
0: Begin
HumanMove;
P07_IsUpTextMultiCustom(['ine', 'ock']);
ClickMouse2(mouse_Left);
end; // u forgot this end;
1: Begin
HumanMove;
P07_WaitOptionMulti(['ine', 'ock'],RandomRange(50,150));
end;
end; // case needs an end
Repeat
MarkTime(MineCounter);
Antiban;
Wait(100);
Until P07_InvCount = PlusOne Or TimeFromMark(7000)
End; //remove this
End; // remove this
End;
End;
U missplaced some ends, and case of needs an end;
Civic EJ9
2013-03-26 14:24:23
You sir, are a saviour! :)