Page 1 of 2 12 LastLast
Results 1 to 25 of 33

Thread: GetSkill Functions

  1. #1
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default GetSkill Functions

    When will these be updated? Are they being worked on? If so, what problems are there?

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    What needs to be updated? Just hunting?

  3. #3
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh hmm doesn't seem to want to work for me.

  4. #4
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Did you call setupsrl; ? Show me what isn't working.

  5. #5
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OMFG I feel like such an idiot...

    I had been testing it on a separate script and forgot to add that...

  6. #6
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Yea anything that uses text needs it.

  7. #7
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    function CurrentSkillXp(Skill: String): Integer;

    This isn't being able to retrieve the current xp for me.

  8. #8
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    It's monday, and today a so far flawless script has been dangerously buggy. Maybe an unannounced update. I'll take a look.

  9. #9
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I thought as much but I don't know enough of SRL and Delphi/SCAR to be able to fix some functions I was using.

  10. #10
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Yea it doesn't work for me either. I think the coords of something has changed. I'll try to see what.

  11. #11
    Join Date
    Oct 2006
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Since they added hunting the boxes with the skills have all changed in size. Atleast it looks different? So i figure thats it.

  12. #12
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Edit: Ok I'm working on a temporary fix.

    Edit2: Ok I think I got a temporary patch until SRL3.6.

  13. #13
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    In your version I get returns of 0 for most of them and then other errors similar to,

    [Runtime Error] : Exception: '48 00' is not a valid integer value in line 59 in script

  14. #14
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Yea I'm still working on it.

    Edit:
    This works better for me. Gets everything except woodcutting. I don't know why. Please test as I have a hunch that my method may get screwed up when a skill has a long name, but shot exp, or something like that. Please tell me what skill screws up, the result, and the expected result.

  15. #15
    Join Date
    Oct 2006
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Do HighScore Charts run exactly off what your level is in the game? Like has it changed from how it was in RSC, where it was only updated every month or so?

  16. #16
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    begin
    ActivateClient;
    SetupSRL;
    ClearDebug;
    skillz[0] := 'attack';
    skillz[1] := 'hitpoints';
    skillz[2] := 'mining';
    skillz[3] := 'strength';
    skillz[4] := 'agility';
    skillz[5] := 'smithing';
    skillz[6] := 'defence';
    skillz[7] := 'herblore';
    skillz[8] := 'fishing';
    skillz[9] := 'ranged';
    skillz[10] := 'thieving';
    skillz[11] := 'cooking';
    skillz[12] := 'prayer';
    skillz[13] := 'crafting';
    skillz[14] := 'firemaking';
    skillz[15] := 'magic';
    skillz[16] := 'fletching';
    skillz[17] := 'woodcutting';
    skillz[18] := 'runecrafting';
    skillz[19] := 'slayer';
    skillz[20] := 'farming';
    
    for i:= 0 to 20 do
    begin
      writeln(skillz[i] + ' Experience: ' + IntToStr(CurrentSkillXp2(skillz[i])));
    end;
    end.
    Returns:

    attack Experience: 48
    hitpoints Experience: 992
    mining Experience: 0
    strength Experience: 616
    agility Experience: 0
    smithing Experience: 10192
    defence Experience: 0
    herblore Experience: 0
    fishing Experience: 180
    ranged Experience: 20
    thieving Experience: 20
    cooking Experience: 80
    prayer Experience: 54
    crafting Experience: 0
    firemaking Experience: 200
    magic Experience: 21009
    fletching Experience: 0
    woodcutting Experience: 0
    runecrafting Experience: 0
    slayer Experience: 0
    farming Experience: 0
    My actual experiences are:

    attack Experience: 48
    hitpoints Experience: 5992
    mining Experience: 22630
    strength Experience: 616
    agility Experience: 0
    smithing Experience: 10192
    defence Experience: 3083
    herblore Experience: 0
    fishing Experience: 180
    ranged Experience: 20
    thieving Experience: 0
    cooking Experience: 180
    prayer Experience: 54
    crafting Experience: 0
    firemaking Experience: 200
    magic Experience: 21009
    fletching Experience: 14041
    woodcutting Experience: 37632
    runecrafting Experience: 0
    slayer Experience: 0
    farming Experience: 0
    I suspect in the case of mining and such it reads to far over. Maybe to get the correct distance to the start of the experience you could have it call up the bitmaps of the text for skills and have it count the width of each letter in the skill name plus the string ' XP: '.

    Maybe have a separate function have a case statement for letters or something that has the width, or hell find a function that counts the bmp but I think the first would be better and easier.

  17. #17
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    It's not up to the minute. Doesn't matter tho because it only works if you are on the high score list.

  18. #18
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ya the high scores are updated every time you log out and you have high enough experience to be on them.

  19. #19
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by TOB View Post
    Code:
    begin
    ActivateClient;
    SetupSRL;
    ClearDebug;
    skillz[0] := 'attack';
    skillz[1] := 'hitpoints';
    skillz[2] := 'mining';
    skillz[3] := 'strength';
    skillz[4] := 'agility';
    skillz[5] := 'smithing';
    skillz[6] := 'defence';
    skillz[7] := 'herblore';
    skillz[8] := 'fishing';
    skillz[9] := 'ranged';
    skillz[10] := 'thieving';
    skillz[11] := 'cooking';
    skillz[12] := 'prayer';
    skillz[13] := 'crafting';
    skillz[14] := 'firemaking';
    skillz[15] := 'magic';
    skillz[16] := 'fletching';
    skillz[17] := 'woodcutting';
    skillz[18] := 'runecrafting';
    skillz[19] := 'slayer';
    skillz[20] := 'farming';
    
    for i:= 0 to 20 do
    begin
      writeln(skillz[i] + ' Experience: ' + IntToStr(CurrentSkillXp2(skillz[i])));
    end;
    end.
    Returns:



    My actual experiences are:



    I suspect in the case of mining and such it reads to far over. Maybe to get the correct distance to the start of the experience you could have it call up the bitmaps of the text for skills and have it count the width of each letter in the skill name plus the string ' XP: '.

    Maybe have a separate function have a case statement for letters or something that has the width, or hell find a function that counts the bmp but I think the first would be better and easier.
    Right now it finds dtms of P: and the right edge of the box, subtracts and divides to get the length, and uses the dtm of P: for where to start. Maybe this isn't working. I think the characters are all the same, I'll check though.

    Everything is fine for me except woodcutting, I'll tackle that later. I will post another version to try to take of the ones that are missing the first digit. That may fix the ones that are giving 0 when they shouldn't, but I think that will be another problem. Thanks for posting your results. I need more people to do that because it works for me lol.


    Edit: the bitmaps for the chars aren't the same width! I will try making a modified charset with uniform widths.

    Edit: havent done the char thing yet, but changed the starting point in this attachment

  20. #20
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    K I didn't do anything with the charset. I adjusted the starting and ending points, and that fixed most of it except woodcutting. It turns out the dtm I used for P: was not as unique as I thought, and it got it somewhere in the middle of the 2 lines. So I made a new dtm, and now everything works perfectly (for me). Please test people.

    I think I got it, so I'm going to bed. I'll check in the morning.

  21. #21
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Arg, not everything is working for me still. I know you're using a DTM but I was thinking maybe it messes up due to level of skill

    This time I get:

    attack Experience: 48
    hitpoints Experience: 48
    mining Experience: 2630
    strength Experience: 616
    agility Experience: 0
    smithing Experience: 10192
    defence Experience: 3083
    herblore Experience: 0
    fishing Experience: 0
    ranged Experience: 20
    thieving Experience: 0
    cooking Experience: 180
    prayer Experience: 54
    crafting Experience: 0
    firemaking Experience: 200
    magic Experience: 21009
    fletching Experience: 14041
    woodcutting Experience: 37632
    runecrafting Experience: 0
    slayer Experience: 0
    farming Experience: 0
    Look at other post for the ones they should be.

    Looks like only fishing, mining, and hitpoints are messed up still.

  22. #22
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Gah. I just tried it on another acct with slayer, and it got 5000 0 as the string, and then runtime error with string to int. I'm working on that now. I'll take another crack at it tomorrow, but I'm about to give up.

    Edit: ok now this works for me. It takes removes the ' 0' off the end in the slayer. I'm not sure what is giving us different results, but I'll take another shot tomorrow.

  23. #23
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Only one I seem to be having a problem with now is mining where it cuts off the first number of experience, but keep in mind I've only tested this out on one account.

  24. #24
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    I think I got the concept figured out. It just needs tweaking so that it works for everyone. I'm stumped on how to do that. I wonder how the devs are fixing it for 3.6.

  25. #25
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What if JageX went and made it randomly change a few pixels for every account...

    Now thinking about it that would be easiest to ruin scripts, by doing small changes to different accounts...

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Functions
    By lordsaturn in forum OSR Help
    Replies: 1
    Last Post: 08-13-2007, 10:12 PM
  2. All of my functions (7 so far)
    By nght spud in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 08-04-2007, 01:59 AM
  3. Help with some functions
    By Pinqvin in forum OSR Help
    Replies: 6
    Last Post: 03-06-2007, 01:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •