SRL Archive - General

Need help again lol


Miitchyy

2006-06-06 02:42:21

ok, I made a script for a game, its not for runescape and I dont want to say te game to encourage ppl to macro on it, im not really even gonna use this script but finishing it will help me with making other scripts, It doesnt work so i need some1 to help me fix it.
any help would be greatly appreciated.

[php]program MinerSmelterAndSmither;
var
skill: integer;
procedure SetUpVar;
begin
skill:= 3; //1 is for mining, 2 for smelting & 3 for smithing
end;
procedure Mine;
begin
if(skill<2) then
movemousesmooth(335,240);
clickmouse(335,240,false);
wait(100);
movemousesmooth(420,325);
clickmouse(420,325,true);
wait(100);
end;
procedure RepeatDaMine;
begin
if(skill<2) then
repeat
Mine
until(false);
end;
procedure Smelt;
begin
if(skill>1) then
movemousesmooth(335,150);
clickmouse(335,150,false);
wait(100);
movemousesmooth(425,225);
clickmouse(425,225,true);
wait(100);
end;
procedure RepeatDaSmelt;
begin
if(skill>1) then
repeat
Smelt
until(false);
end;
procedure Smith;
begin
if(skill>2) then
movemousesmooth(335,210);
clickmouse(335,210,false);
wait(100);
movemousesmooth(425,300);
clickmouse(425,300,true);
wait(100);
movemousesmooth(425,313);
clickmouse(425,313,true);
wait(100);
end;
procedure RepeatDaSmith;
begin
if(skill>2) then
repeat
Smith
until(false);
end;
begin
writeln('yay im finished');
end.[/php]

Jagex_Fagex

2006-06-06 06:43:50

ok, so,it will only write yay im finished because you have not called any of the procedures. where you have writeln, you need to have smith etc etc, tell me if i wasn't clear enough

QQu

2006-06-06 07:20:39

To start off with, please space out your Script so we can actually see what you have created..
AKA Standards.

Jagex_Fagex

2006-06-06 07:39:32

oh yer lol, i forgot i spaced it out myself when i was looking at it.

The Un-Named

2006-06-06 08:36:24

program MinerSmelterAndSmither;
var // here just have const skill = 3; insted of all the var stuff
skill: integer;

procedure SetUpVar;
begin
skill := 3; //1 is for mining, 2 for smelting & 3 for smithing
end;

procedure Mine;
begin
if (skill = 1) then
movemousesmooth(335, 240);
clickmouse(335, 240, false);
wait(100);
movemousesmooth(420, 325);
clickmouse(420, 325, true);
wait(100);
end;

procedure RepeatDaMine;
begin
if (skill = 1) then
repeat
Mine
until (false);
end;

procedure Smelt;
begin
if (skill = 2) then
movemousesmooth(335, 150);
clickmouse(335, 150, false);
wait(100);
movemousesmooth(425, 225);
clickmouse(425, 225, true);
wait(100);
end;

procedure RepeatDaSmelt;
begin
if (skill = 2) then
repeat
Smelt
until (false);
end;

procedure Smith;
begin
if (skill = 3) then
movemousesmooth(335, 210);
clickmouse(335, 210, false);
wait(100);
movemousesmooth(425, 300);
clickmouse(425, 300, true);
wait(100);
movemousesmooth(425, 313);
clickmouse(425, 313, true);
wait(100);
end;

procedure RepeatDaSmith;
begin
if (skill = 3) then
repeat
Smith
until (false);
end;

begin
RepeatDaMine;
RepeatDaSmelt;
RepeatDaSmith;
writeln('yay im finished');
end.

I've changed some stuff, like "if (skill > 1) then" because that means if skill is 2 or 3 then it will do somthing that could be wrong, so we want it "if (skill = 2 (you can have 2 or 3)) then".

For
var  // here just have const skill = 3; insted of all the var stuff
skill: integer;

procedure SetUpVar;
begin
skill := 3; //1 is for mining, 2 for smelting & 3 for smithing
end;
all you need is "const skill = 1; //1 is for mining, 2 for smelting & 3 for smithing".

Also, by chance is it for Atitd?

Miitchyy

2006-06-06 09:14:44

ummm i have no idea what atitd is but thx for ur help.
umm im not sure where to put that const stuff :confused: