Troll
2010-11-27 12:26:48
So how could i get my level plus tell me when i level up.
Thanks
Thanks
2010-11-27 12:26:48
2010-11-27 12:30:06
// By: Cstrike
function GetTempLevel (SkillName : String) : Integer;
begin
Result := -1;
if not I_LoggedIn then Exit;
if I_OpenStatsTab then
begin
case lowercase(SkillName) of
'attack', 'att': Result := StrToInt(GetInterfaceComponentText(320, 196));
'defence', 'defense', 'def': Result := StrToInt(GetInterfaceComponentText(320, 24));
'strength': Result := StrToInt(GetInterfaceComponentText(320, 7));
'hitpoints', 'hp', 'constitution': Result := StrToInt(GetInterfaceComponentText(320, 189));
'range', 'ranged': Result := StrToInt(GetInterfaceComponentText(320, 48));
'mage', 'magic': Result := StrToInt(GetInterfaceComponentText(320, 89));
'prayer', 'pray': Result := StrToInt(GetInterfaceComponentText(320, 72));
'runecrafting', 'runecraft', 'rc': Result := StrToInt(GetInterfaceComponentText(320, 106));
'construction', 'cons', 'con': Result := StrToInt(GetInterfaceComponentText(320, 130));
'dung', 'dungeon', 'dungeoneering': Result := StrToInt(GetInterfaceComponentText(320, 154));
'agility', 'agil': Result := StrToInt(GetInterfaceComponentText(320, 15));
'herb', 'herblore', 'herblaw': Result := StrToInt(GetInterfaceComponentText(320, 32));
'thieving', 'thief': Result := StrToInt(GetInterfaceComponentText(320, 56));
'crafting', 'craft': Result := StrToInt(GetInterfaceComponentText(320, 80));
'fletching', 'fletch': Result := StrToInt(GetInterfaceComponentText(320, 97));
'slayer', 'slay', 'slaying': Result := StrToInt(GetInterfaceComponentText(320, 114));
'hunter', 'hunt': Result := StrToInt(GetInterfaceComponentText(320, 138));
'mining', 'mine': Result := StrToInt(GetInterfaceComponentText(320, 182));
'smithing', 'smith', 'smelt': Result := StrToInt(GetInterfaceComponentText(320, 175));
'fishing', 'fish': Result := StrToInt(GetInterfaceComponentText(320, 40));
'cooking', 'cook': Result := StrToInt(GetInterfaceComponentText(320, 64));
'firemaking', 'fm', 'fire': Result := StrToInt(GetInterfaceComponentText(320, 168));
'woodcutting', 'wc', 'wood', 'woodcut': Result := StrToInt(GetInterfaceComponentText(320, 161));
'farming', 'farm': Result := StrToInt(GetInterfaceComponentText(320, 122));
'summoning', 'summon': Result := StrToInt(GetInterfaceComponentText(320, 146));
end;
end;
end; function GetInterfaceComponentText (ParentI, ChildI: Integer): String;
begin
Result := GetInterfaceText (ParentI, ChildI);
end;
2010-11-27 12:32:07
2010-11-27 12:32:47
From: Troll Man
Thanks thats great :) is it in the inclued or do i need to put it in my script?
2010-11-27 12:37:37
function GetInterfaceComponentText (ParentI, ChildI: Integer): String;
begin
Result := GetInterfaceText (ParentI, ChildI);
end;
// By: Cstrike
function GetTempLevel (SkillName : String) : Integer;
begin
Result := -1;
if not I_LoggedIn then Exit;
if I_OpenStatsTab then
begin
case lowercase(SkillName) of
'attack', 'att': Result := StrToInt(GetInterfaceComponentText(320, 196));
'defence', 'defense', 'def': Result := StrToInt(GetInterfaceComponentText(320, 24));
'strength': Result := StrToInt(GetInterfaceComponentText(320, 7));
'hitpoints', 'hp', 'constitution': Result := StrToInt(GetInterfaceComponentText(320, 189));
'range', 'ranged': Result := StrToInt(GetInterfaceComponentText(320, 48));
'mage', 'magic': Result := StrToInt(GetInterfaceComponentText(320, 89));
'prayer', 'pray': Result := StrToInt(GetInterfaceComponentText(320, 72));
'runecrafting', 'runecraft', 'rc': Result := StrToInt(GetInterfaceComponentText(320, 106));
'construction', 'cons', 'con': Result := StrToInt(GetInterfaceComponentText(320, 130));
'dung', 'dungeon', 'dungeoneering': Result := StrToInt(GetInterfaceComponentText(320, 154));
'agility', 'agil': Result := StrToInt(GetInterfaceComponentText(320, 15));
'herb', 'herblore', 'herblaw': Result := StrToInt(GetInterfaceComponentText(320, 32));
'thieving', 'thief': Result := StrToInt(GetInterfaceComponentText(320, 56));
'crafting', 'craft': Result := StrToInt(GetInterfaceComponentText(320, 80));
'fletching', 'fletch': Result := StrToInt(GetInterfaceComponentText(320, 97));
'slayer', 'slay', 'slaying': Result := StrToInt(GetInterfaceComponentText(320, 114));
'hunter', 'hunt': Result := StrToInt(GetInterfaceComponentText(320, 138));
'mining', 'mine': Result := StrToInt(GetInterfaceComponentText(320, 182));
'smithing', 'smith', 'smelt': Result := StrToInt(GetInterfaceComponentText(320, 175));
'fishing', 'fish': Result := StrToInt(GetInterfaceComponentText(320, 40));
'cooking', 'cook': Result := StrToInt(GetInterfaceComponentText(320, 64));
'firemaking', 'fm', 'fire': Result := StrToInt(GetInterfaceComponentText(320, 168));
'woodcutting', 'wc', 'wood', 'woodcut': Result := StrToInt(GetInterfaceComponentText(320, 161));
'farming', 'farm': Result := StrToInt(GetInterfaceComponentText(320, 122));
'summoning', 'summon': Result := StrToInt(GetInterfaceComponentText(320, 146));
end;
end;
end;
Procedure Blah;
Begin
Blalh
AttLevel := GetTempLevel('Att')
Blah
End
2010-11-27 13:05:00
2010-11-27 13:18:50
From: Method
What's wrong with GetMe.Levels[idx]?
2010-11-27 14:49:20
From: cstrike
IIRC GetMe.Levels gets the bottom level, I could definitely be wrong though.