SRL Archive - First Scripts

My first Firemaking script, please help with this!


TUPEZ

2013-03-26 20:09:11

Hey guys! I started to "script" today, so here is my first script. It sucks, like really. Start at Varrock East bank facing south and have Willow Logs on your second bank slot. Then it loops 720 degrees? Don't know why and then it runs somewhere and burns 5 logs and runs back to bank. I can't make loop. Hope you can help me with this and tell me what parts really need fixing. Thanks! I really love scripting and I'd love to get some feedback!

Please notice that it is my first time scripting and I started today :)

program Furtive_FireMaker_Lite;
{$I SRL-OSR/SRL.Simba}
{$I P07Include.Simba}
{$I SPS/p07sps.simba}

var
x, y: Integer;

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 Banking;
var
seX, seY: integer;
Begin
if FindObjCustom (seX, seY, ['Bank', 'Booth'], [533291], 10) then
Begin
ClickMouse(x, y, mouse_Left);
Wait (2000);
FindObjCustom (seX, seY, ['Willow', 'Logs'], [1853778], 10)
ClickMouse(x, y, mouse_Right);
Wait (1000);
MMouse(123, 115, 2, 2);
ClickMouse(x, y, mouse_Left);
MMouse (486, 40, 2, 2);
ClickMouse(x, y, mouse_Left);
End;

end;

Procedure CameraAngle;
var
y, x: integer;
angle: extended;
begin
P07_MakeCompassSouth;
P07_MakeCameraAngleHigh;
end;

Procedure WalkingToSpot;
var
x, y: integer;
Begin
MMouse(677, 49, 2, 2);
ClickMouse(x, y, mouse_Left);
Wait (5000);
end;


Procedure BurnLogs;
var
y, x: integer;
Begin
MMouse (584, 231, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait(1000+random(250));
MMouse (622, 231, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait (1500+random(250));

MMouse (584, 231, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait(1000+random(250));
MMouse (661, 232, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait (1500+random(250));

MMouse (584, 231, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait(1000+random(250));
MMouse (704, 232, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait (1500+random(250));

MMouse (584, 231, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait(1000+random(250));
MMouse (578, 266, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait (1500+random(250));

MMouse (584, 231, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait(1000+random(250));
MMouse (622, 264, 6, 2);
ClickMouse(x, y, mouse_Left);
Wait (1500+random(250));


End;

Procedure BackToBank;
var
x, y: Integer;
Begin
MMouse(614, 116, 2, 2);
ClickMouse(x, y, mouse_Left);
end;

begin
SetUpSRL;
MouseSpeed := 10;
ActivateClient;
DeclarePlayers;
Banking;
CameraAngle;
WalkingToSpot;
BurnLogs;
BackToBank;
repeat
end.

Sjoe

2013-03-26 20:11:25

Gratz on your first script :)

U can use SIMBA tags instead of code tags (the one with the lion head)

Makes it easier for us to read.

TUPEZ

2013-03-26 20:12:40

From: Sjoekeloe
Gratz on your first script :)

U can use SIMBA tags instead of code tags (the one with the lion head)

Makes it easier for us to read.


Okay, I'll do it next time! :)

StickToTheScript

2013-03-26 20:14:59

Well, first off, i would recommend using either SPS or DTMs for walking. Not just click and go. Those are pretty simple to use. You can find info on them here: http://villavu.com/forum/showthread.php?t=99716&highlight=tutorial

Its worth it!

TUPEZ

2013-03-26 20:17:03

I tried those, I got it compiled, but when script tried to use SPS it crashed :s

StickToTheScript

2013-03-26 20:19:19

From: TUPEZ
I tried those, I got it compiled, but when script tried to use SPS it crashed :s


That is very strange. It shouldn't do that. Do you mean "crashes" as in the program force closes, or it just doesn't compile?

TUPEZ

2013-03-26 20:22:27

From: StickToTheScript
That is very strange. It shouldn't do that. Do you mean "crashes" as in the program force closes, or it just doesn't compile?

It compiles and I can run the script until it tries to use SPS.

StickToTheScript

2013-03-26 20:24:01

From: TUPEZ
It compiles and I can run the script until it tries to use SPS.


So the script just sits there? There is nothing that shows up in the debug box?

TUPEZ

2013-03-26 20:33:47

From: StickToTheScript
So the script just sits there? There is nothing that shows up in the debug box?

Come strange text, but I don't have that version of script anymore :D

StickToTheScript

2013-03-26 20:35:25

So, is the problem solved?

TUPEZ

2013-03-26 20:46:02

From: StickToTheScript
So, is the problem solved?

Some*

And no it's not. But I'm begginer and that is advanced / intermeditate stuff I think :)