Markus
2012-10-15 14:14:56
As title says, it is broken. Doesn't fill the array in.
2012-10-15 14:14:56
2012-10-15 14:16:40
2012-10-15 21:19:04
2012-10-16 02:18:29
2012-10-16 02:29:05
From: Markus
I did.
program new;
{$DEFINE SMART}
{$I SRL/SRL.simba}
begin
SetupSRL;
NumberOfPlayers(1);
GetAllLevels;
writeln(Players[CurrentPlayer].Level);
end. 2012-10-16 02:46:12
Procedure InitPlayer;
Begin
GetAllLevels; //Doesnt seem to work?
SetChat('on',1);
SetChat('friends',2);
SetChat('on',3);
SetAngle(SRL_ANGLE_HIGH);
FindNormalRandoms;
End;
It sets the angle correctly and switchtes to the right tab so I think we can assume the function gets called correctly.
WriteLn((IntToStr(I)) + ' : ' + Players[I].Nick + ' = ' +
Active + '; ' + Players[I].Loc + rand + '; B: ' + IntToStr(Players[I].Integers[0])
+ ' Essence;'+ ' M : ' + IntToStr(Players[I].Level[15])); //mining level doesnt seem accurate
2012-10-16 02:56:35
2012-10-16 03:01:08
From: riwu
If you are just getting one skill level call GetSkillLevel(SKILL_MINING) directly.
Like i said in previous post the description for GetAllLevels is wrong, SKILL_MINING = 14 (not 15), because the array starts from 0. Although it would return the skill level of herblore instead, not sure why it returns -1?
function GetSkillInfo(Skill: Variant; Amount : Boolean): Integer;
2012-10-16 03:15:23
From: Le Jingle
Default result in;
function GetSkillInfo(Skill: Variant; Amount : Boolean): Integer;
2012-10-16 03:21:59
From: riwu
Yeah but how did it fail grabbing the herblore level?
Result := StrToIntDef(GetNumbers(GetTextAtEx(Box.x1 - 2, Box.y1 -1, 100,
StatChars, False, True, 0, 3, 36095, 3, True, tr_Digits)), -1);
but I could indeed be very wrong. :/ Good to see, thought, you figured out how to get the array of skills back correctly :)