rjk1990
2012-04-14 21:04:42
Alright, so here goes. I'm throwing myself at the mercy of you guys here.
I didn't want to feel like a leecher so i attempted some tutorials on basic scripting, and although i feel like A LOT of it went over my head.. i managed to get the tree cutting script to work. I figured it'd be easy to apply that knowledge to a simple buying/banking script.
well it wasn't for me :P Really, even reading the tutorials i have no clue what i'm doing other then what i'm told, so this will probably look like a COMPLETE MESS to you guys. Just, tell me where i went wrong? xD
The idea was to have a simple script that finds the bank shop (at the lumbridge chest, I'm standing right next to it so no moving involved) buy "all" chocolate bars and bank them. I guess you can see what i had in mind but it doesnt quite translate :P
So yeah, It gets about as far as opening the shop (if im lucky before completely failing to do anything worthwhile xD)
I didn't want to feel like a leecher so i attempted some tutorials on basic scripting, and although i feel like A LOT of it went over my head.. i managed to get the tree cutting script to work. I figured it'd be easy to apply that knowledge to a simple buying/banking script.
well it wasn't for me :P Really, even reading the tutorials i have no clue what i'm doing other then what i'm told, so this will probably look like a COMPLETE MESS to you guys. Just, tell me where i went wrong? xD
The idea was to have a simple script that finds the bank shop (at the lumbridge chest, I'm standing right next to it so no moving involved) buy "all" chocolate bars and bank them. I guess you can see what i had in mind but it doesnt quite translate :P
program new;
{$DEFINE SMART}
{$i srl/srl.simba}
Procedure DeclarePlayers;
Begin
Howmanyplayers :=1;
Numberofplayers(howmanyplayers);
CurrentPlayer :=0;
Players[0].name :='';
Players[0].pass :='';
Players[0].nick :='';
Players[0].pin :='';
Players[0].Active:=True;
End;
Procedure Startup;
begin
MakeCompass('N');
SetAngle(0);
Writeln('Setting the compass');
GameTab(Tab_Inv);
end;
procedure FindShop;
Var x,y: integer;
begin
if findObj(x,y, 'hest', 5793906, 10)then
begin
mouse(x,y, 2,1, false);
chooseoption('ood');
end;
end;
Procedure BuyFood;
var x, y: integer;
begin
if findObj(x,y, 'hoco', 1452102, 5)then
begin
mouse(x, y, 2, 1, false);
chooseoption('all') ;
end;
end;
Procedure BankChest;
var x, y: integer;
begin
if findobj(x, y, 'hest', 5793906, 10)then
begin
mouse(x, y, 2, 1, true)
If PinScreen then
InPin(Players[CurrentPlayer].Pin);
if findobj(x, y, 'eposit', 1854330, 5)then
mouse(x, y, 2, 1, true)
end;
end;
begin
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
Startup;
FindShop;
BuyFood;
Bankchest;
end.
So yeah, It gets about as far as opening the shop (if im lucky before completely failing to do anything worthwhile xD)