IronTeapot
10-14-2006, 03:20 PM
This is part of my code so far, it compiles but everytime it doesn't run for a full for loop.
program designCharacter;
{.include srl/srl.scar}
var i,a,iMax: Integer;
yc: Integer;
var lookMax: array [0..11] of Integer;
procedure setlookMax;
begin
lookMax[0]:=8
lookMax[1]:=7
lookMax[2]:=7
lookMax[3]:=5
lookMax[4]:=2
lookMax[5]:=4
lookMax[6]:=2
lookMax[7]:=11
lookMax[8]:=15
lookMax[9]:=15
lookMax[10]:=5
lookMax[11]:=8
end;
procedure makeCharacter;
begin
setlookMax;
yc:=90
for a:=0 to 6 do //Only runs 4 times
begin
iMax:=Random(lookMax[a])
for i:= 0 to iMax do
begin
Mouse(165,yc,2,2,true)
Wait (50 + Random (250));
end;
a:=a+1
yc:=yc+35
Wait (25 + Random (50));
end;
Wait (50 + Random (250));
end;
procedure colorCharacter;
begin
setlookMax;
yc:=95
for a:=7 to 11 do //Only runs 3 times
begin
iMax:=Random(lookMax[a])
for i:= 0 to iMax do
begin
Mouse(467,yc,2,2,true)
Wait (50 + Random (250));
end;
a:=a+1
yc:=yc+35
end;
Wait (50 + Random (250));
end;
procedure designCharacter;
begin
makeCharacter;
colorCharacter;
//Mouse(260,280,5,5,true) clicks accept
//Wait(1000+Random(500))
end;
begin
designCharacter
End.
Your welccome to run it on a new account. It randomly generates your character's looks as part of my upcomming 'create your army' script.
with the character design screen up, locate the rs window, and click play.
program designCharacter;
{.include srl/srl.scar}
var i,a,iMax: Integer;
yc: Integer;
var lookMax: array [0..11] of Integer;
procedure setlookMax;
begin
lookMax[0]:=8
lookMax[1]:=7
lookMax[2]:=7
lookMax[3]:=5
lookMax[4]:=2
lookMax[5]:=4
lookMax[6]:=2
lookMax[7]:=11
lookMax[8]:=15
lookMax[9]:=15
lookMax[10]:=5
lookMax[11]:=8
end;
procedure makeCharacter;
begin
setlookMax;
yc:=90
for a:=0 to 6 do //Only runs 4 times
begin
iMax:=Random(lookMax[a])
for i:= 0 to iMax do
begin
Mouse(165,yc,2,2,true)
Wait (50 + Random (250));
end;
a:=a+1
yc:=yc+35
Wait (25 + Random (50));
end;
Wait (50 + Random (250));
end;
procedure colorCharacter;
begin
setlookMax;
yc:=95
for a:=7 to 11 do //Only runs 3 times
begin
iMax:=Random(lookMax[a])
for i:= 0 to iMax do
begin
Mouse(467,yc,2,2,true)
Wait (50 + Random (250));
end;
a:=a+1
yc:=yc+35
end;
Wait (50 + Random (250));
end;
procedure designCharacter;
begin
makeCharacter;
colorCharacter;
//Mouse(260,280,5,5,true) clicks accept
//Wait(1000+Random(500))
end;
begin
designCharacter
End.
Your welccome to run it on a new account. It randomly generates your character's looks as part of my upcomming 'create your army' script.
with the character design screen up, locate the rs window, and click play.