SRL Archive - OSR Help

Script wont walk


shiningwhite

2013-01-03 02:01:47

By my knowledge, this script should find all loot piles on minimap, then walk to the first one it lists, correct?

It logs in, catalogs all loot piles, then prints debug without walking anywhere.

EDIT: Fixed

Program BasicScriptTutorial;
{$DEFINE SMART8}
{$i srl/srl.simba}
{$i sps/sps.simba}

const
Debug= 'True';
SRLStats_Username = ''; // ***Leave blank if you don't have a stats account***
SRLStats_Password = '';
{==========Smart Setup==========}
World = 0; // Input the runescape world number right here for it to select. You may leave it as 0 if you would like it to select a random world.
MEMBERS = False; // Select False if you are not a member. Select True if you are a member.
SIGNED = True; // Select True if you are using single account. Select False if not.
{===============================}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //Your Runescape username goes right here.
Players[0].Pass := ''; //Your Runescape password goes right here.
Players[0].Active := True; //Set to True if you want to use this player. Set to False to disable this player.
Players[0].Pin := ''; //Put your Bank PIN here. Leave blank if you don't have a Bank PIN.
end;
procedure LootMap;
var
MyLoc:Tpoint;
PileLoc:TpointArray;
i:integer;
begin
SPS_Setup(RUNESCAPE_SURFACE,['11_9','10_9','12_9','11_10','11_11']);
PileLoc:= GetMiniMapDots('item');
for i:=0 to length(PileLoc)-1 do
begin
MyLoc:= SPS_GetMyPos();
PileLoc[i].x:=(MyLoc.x+PileLoc[i].x-MMCX);
PileLoc[i].y:=(MyLoc.y+PileLoc[i].y-MMCY);

end;
if Debug='True' then begin
Writeln(tostr(MyLoc));
Writeln(tostr(PileLoc));
SPS_WalktoPos(PileLoc[0]);
end;


end;

begin

{$IFDEF SIMBAMAJOR980}
SMART_SERVER := 10;
SMART_MEMBERS := TRUE;
SMART_SIGNED := TRUE;
SMART_SUPERDETAIL := FALSE;
{$ELSE}
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
{$ENDIF}

SetupSRL;
If (SRLStats_Username = '') Then
SetupSRLStats(944, 'Anonymous', 'anon1337')
Else
SetupSRLStats(944, SRLStats_Username, SRLStats_Password);

DeclarePlayers;
LoginPlayer;
LootMap;
end.