SRL Archive - OSR Help

Having few troubles with script


randy marsh

2013-04-29 14:20:53

I have read various tutorial's and studied various scripts,

But I having a few issues trying to write my (item buying script) so bear with me!



a) Heres what my script dos walks to shop
b) Finds npc, >clicks>trade> move mouse to item then clicks ( shop only has ten of item but it restocks)
c) Waits till restock> buys>waits> buys
d)When invo full > walk bank >bank
e) repeat a



1) What would be best procedure to find a non static npc (moves around in a rough 10 cm by 10 cm box?

2) For finding the item to buy, what would best:

dtm

or

search for the item text i.e ore?


3) Best walking method for osrs?


I have been searching through all the help pages but some are outdated or not for osrs :9

randy marsh

2013-04-29 17:48:11

So far my script finds npc clicks him > finds iron ore> (which Is what I want to buy) gos to the iron ore but dosnt right click it grrrrr
Even tho I told it to

  Mouse(x,y,2,2,false);   


procedure FindIron;
var
Iron, x, y: Integer;





begin

SetupSRL;

Iron:= DTMFromString('mbQAAAHicY2VgYNgPxOuBeBcQnwbiw0AcAsTBQJwEpT2A2FdfGUgyomFMgK4CrgoAEdkGCA==');
if FindDTM(Iron, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Found Iron!');
MMouse(x,y,2,2);
If IsUpText('iron') then
wait(100 );
MMouse(x,y,2,2,);
end;

FreeDTM(Iron);
end;











begin

DeclarePlayers;
SetupSRL;
ActivateClient;
FindNPC;
findIron;

End.