View Full Version : GetSkillLevel
omgh4x0rz
02-20-2007, 08:51 PM
For some reason this is only working if my skilltab is already open. Otherwise it says my lvl is 0, since it can't find the skill. I looked at the SRL code though and I think it is supposed to open the skill tab automatically. Anyone know of any bugs with this, or why mine might not be opeing the skill tab?
bullzeye95
02-20-2007, 09:10 PM
Really? It works fine for me... maybe try putting a few waits in there (that probably won't help though...)
maybe you didn't write the code right? that works for me when I try it, so I don't know what would be your problem. only thing i can think of is you wrote it wrong. anyway, just try writing the code again, or you could post the part of script where it should go to gametab.
Jason2gs
02-20-2007, 09:39 PM
Yes, try posting the script. If all else fails... Try downloading SRL again.
omgh4x0rz
02-20-2007, 10:47 PM
Umm, no I'm not downloading SRL again. Everything else works fine.
I don't think I wrote the code wrong, but you can take a look at it.
I'm pretty sure it has something to do with not opening the skill tab because, well... It doesn't, and its supposed to. If the skill tab happens to be open already it responds with the correct lvl.
procedure Respond;//responds to certain phrases.
var
Skill: array [0..11] of String;
Lvl:String;
a:integer;
begin
skill[0] := 'attack';
skill[1] := 'defence';
skill[2] := 'strength';
skill[3] := 'hitpoints';
skill[4] := 'range';
skill[5] := 'magic';
skill[6] :='woodcutting';
skill[7] := 'mining';
skill[8] := 'fishing';
skill[9] := 'smithing';
skill[10] := 'crafting';
skill[11] := 'cooking';
{left out the other phrases to respond to since they are working find and don't affect the next part}
For a:=0 to 11 Do
if (GetChatMessage(skill[a])) then //responds to basic skill lvl questions
begin
if (GetChatMessage('level')) or
(GetChatMessage('lvl')) then
begin
if (Rlvl=true) then
begin
Lvl:=IntToStr(GetSkillLevel(skill[a]));
typesend(Lvl);
RLvl:=False;
end;
end;
end else
RLvl:=True;
end;
Jason2gs
02-21-2007, 12:25 AM
Change:
begin
Lvl:=IntToStr(GetSkillLevel(skill[a]));
typesend(Lvl);
RLvl:=False;
end;
To:
begin
Lvl:=GetSkillLevel(skill[a]));
typesend(IntToSTr(Lvl));
RLvl:=False;
end;
Umm... Yea, try that.
omgh4x0rz
02-21-2007, 01:22 AM
I'll try it. I don't think it will have any effect though, since all it is doing is changing when I use IntToStr.
whales
02-21-2007, 01:29 AM
Yea its basically the same thing just switching around when to use that but it may work... Make sure to change Lvl to and integer
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.