n3ss3s
2007-06-10 14:48:42
function ToBeSmith:string;
var i,l:integer;
Done,AnyOfThose1,AnyOfThose2:boolean;
begin
l:=GetSkillLevel('smithing');
for i:= 15 to 33 do
begin
if(l = i)then
begin
Result:=ItemList[i];
Done:=True;
AnyOfThose1:=True;
end;
end;
if(i = 33) and (not(Done))then
begin
if(L > 33)then
begin
Result:=ItemList[33];
Done:=True;
AnyOfThose2:=True;
end;
end;
if(not(AnyOfThose1)) and (not(AnyOfThose2))then
begin
Writeln('Teach n3ss3s to script plz,exitting procedure');
Exit;
end;
end;It should result an item from an array(itemlist) depending of the users smithing level, but when I use it with writeln it just writelns an empty line.