Simba Code:
Function Teleport(Where: String): Boolean; //LS //Yeah I know its an include but I added some stuff
Var
Loc: TStringArray;
Points: TPointArray;
i,cts: Integer;
Begin
If(Not(LoggedIn))Then Exit;
GameTab(tab_magic);
Result := GameTab(tab_magic);
If Result Then
Begin
FindHomeTeleport(x,y);
HumanMMouse(x,y, 0,0);
ClickMouse2(True);
Writeln('Clicked Home Teleprot');
Wait(1000 +Random(500));
If LodestoneScreen Then
Begin
Writeln('Found LodeStone Screen!');
Wait(3000 +Random(500));
End;
Begin
Loc := ['Catherby', 'Ardougne', 'Lumbridge'];
Points := [Point(223, 181), Point(167, 211), Point(327, 243)];
For i := 0 To 3 Do
If Capitalize(Where) = Loc[I] Then
Begin
MMouse(Points[I].X, Points[I].Y, 2, 2);
Writeln('Teleporting');
//Writeln('Teleporting to' +Loc':'+IntToStr(i+1)));
If (WaitUptextMulti(['Teleport', 'ele', 'ort', 'lepo', 'epor'], 400)) Then
Begin
Wait(1000+Random(500));
ClickMouse2(Mouse_Left);
Result := True;
If Result Then
Begin
Writeln('Teleporting');
Exit;
End Else
Writeln('Not teleporting');
End;
End;
ColorToleranceSpeed(CTS);
End;
End;
End;
Not sure why this gives me
New window: 1248828
Compiled successfully in 842 ms.
SRL Compiled in 0 msec
Found HomeTele
Clicked Home Teleprot
Found LodeStone Screen!
Teleporting
Error: Out Of Range at line 344
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]