SRL Archive - First Scripts

First script [very noob]. Need help!


Falmar

2013-02-26 09:30:58

program Fish;
{$I SRL\SRL.Simba}
{$I P07Include.Simba}
var x, y: integer;

procedure FindFish;
begin
repeat
If P07_FindObjCustom(x, y, ['spot', 'Fishing'], [14597535, 14597268, 15123625, 14398100, 15058085], 5) Then
ClickMouse2(mouse_left)
Wait(RandomRange(8000,10000));
until(P07_InvFull)
end;

procedure DropFish;
begin
If P07_InvFull Then
P07_DropAllExcept([1,2])
Wait(200 + Random(100))
end;

begin
SetupP07Include
repeat
FindFish;
DropFish;
until(false);
end.

It doesnt compile ;(
[Error] (12:1): Semicolon (';') expected at line 11
Compiling failed.

Jake

2013-02-26 09:45:56

http://villavu.com/forum/showthread.php?t=6413
:)

Falmar

2013-02-26 09:48:59

But i have semicolon there

Wait(RandomRange(8000,10000));


nvm solved it.
Next thing is…
It moves mouse to fish spot but doesnt click it. P07Include poping up showing this error :
Error: Exception: Font [P07UpChars] not found. at line 108
The following DTMs were not freed: [0, 1]

This is line 108:
WhiteT:=GetTextAtExWrap(8, 8, 80, 21, 0, 5, 1, 14541281, 55, 'P07UpChars');

Ian

2013-02-26 11:26:55

Did you follow the instructions for setting up the include? You need to put the fonts where it says.

Falmar

2013-02-26 11:38:13

Didnt extracted fonts.
Checking now.

extracted fonts to simba fonts
copied include to simba includes

still getting error when i try to run script (it moves mouse to fishing spot then 07include pops up)

Error: Exception: Font [P07UpChars] not found. at line 108
The following DTMs were not freed: [0, 1]


line 108

WhiteT:=GetTextAtExWrap(8, 8, 80, 21, 0, 5, 1, 14541281, 55, 'P07UpChars');