Gu3st...
2008-11-12 12:31:37
procedure SayCurrentLevels(which: string);
var
I: Integer;
begin
case LowerCase(Which) of
'attack': I := 1;
'strength': I := 2;
'defence': I := 3;
'range': I := 4;
'prayer': I := 5;
'magic': I := 6;
'runecrafting': I := 7;
'hitpoints': I := 8;
'agility': I := 9;
'herblore': I := 10;
'thieving': I := 11;
'crafting': I := 12;
'fletching': I := 13;
'slayer': I := 14;
'mining': I := 15;
'smithing': I := 16;
'fishing': I := 17;
'cooking': I := 18;
'firemaking': I := 19;
'woodcutting': I := 20;
'farming': I := 21;
end;
Players[CurrentPlayer].Level[i] := GetSkillInfo(which,False);
TypeSend(IntToStr(Players[CurrentPlayer].Level[i]));
end;Maybe better like this:procedure SayCurrentLevels(which: string);
var
I: Integer;
begin
case LowerCase(Which) of
'attack': I := 1;
'strength': I := 2;
'defence': I := 3;
'range': I := 4;
'prayer': I := 5;
'magic': I := 6;
'runecrafting': I := 7;
'hitpoints': I := 8;
'agility': I := 9;
'herblore': I := 10;
'thieving': I := 11;
'crafting': I := 12;
'fletching': I := 13;
'slayer': I := 14;
'mining': I := 15;
'smithing': I := 16;
'fishing': I := 17;
'cooking': I := 18;
'firemaking': I := 19;
'woodcutting': I := 20;
'farming': I := 21;
else
srl_Warn('SayCurrentLevels', ' Not a valid level.', -1);
end;
Players[CurrentPlayer].Level[i] := GetSkillInfo(which,False);
TypeSend(IntToStr(Players[CurrentPlayer].Level[i]));
end;