Results 1 to 18 of 18

Thread: Checking level

  1. #1
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

    Default Checking level

    Well, i'd like to add something that checks the level started, and the current level.


    Is there already a method to get the level?

  2. #2
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Brid Mayhem View Post
    Well, i'd like to add something that checks the level started, and the current level.


    Is there already a method to get the level?
    EOC or 07Scape? I think there are both, GetLevel(); and P07_GetLevel();

  3. #3
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

    Default

    Quote Originally Posted by SRLKing View Post
    EOC or 07Scape? I think there are both, GetLevel(); and P07_GetLevel();
    It's for 07, sorry. That didn't work

  4. #4
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

  5. #5
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Brid Mayhem View Post
    Bump
    Pretty sure it's GetSkillLevel('mining'); not sure for '07 as I don't play. Maybe P07_GetSkillLevel('mining')?

  6. #6
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    I'd recommend using SRL-OSR includes for up to date skills-related calls.

    For example, calling
    Simba Code:
    Writeln(GetSkillLevel('hunt'));

    works correctly when I just now tested it.
    Thus, You can expand this idea by calling this and storing the result to a variable. Then later on in your script, call the same function again, to compare/update/etc.

    'd

  7. #7
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

    Default

    Quote Originally Posted by Le Jingle View Post
    I'd recommend using SRL-OSR includes for up to date skills-related calls.

    For example, calling
    Simba Code:
    Writeln(GetSkillLevel('hunt'));

    works correctly when I just now tested it.
    Thus, You can expand this idea by calling this and storing the result to a variable. Then later on in your script, call the same function again, to compare/update/etc.

    'd

    Exactly what I needed! <333

  8. #8
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by SRLKing View Post
    EOC or 07Scape? I think there are both, GetLevel(); and P07_GetLevel();
    Quote Originally Posted by The Mayor View Post
    Pretty sure it's GetSkillLevel('mining'); not sure for '07 as I don't play. Maybe P07_GetSkillLevel('mining')?
    I never added it to my personal Include sorry , as it's low priority progress releated stuff, but ironically the one in SRL-OSR was written by me (at least at the time of this post) :/ that one works as far as I know (and Le Jingle confirms this above?)


    Quote Originally Posted by Le Jingle View Post
    For example, calling
    Simba Code:
    Writeln(GetSkillLevel('hunt'));

    works correctly when I just now tested it.
    Lies! That returns an integer so you'd need

    Simba Code:
    WriteLn(IntToStr(GetSkillLevel('mining')));

    Unless I missed something
    Last edited by DannyRS; 03-10-2013 at 03:00 AM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  9. #9
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    I never added it to my personal Include sorry , as it's low priority progress releated stuff, but ironically the one in SRL-OSR was written by me (at least at the time of this post) :/ that one works as far as I know (and Le Jingle confirms this above?)




    Lies! That returns an integer so you'd need

    Simba Code:
    WriteLn(IntToStr(GetSkillLevel('mining')));

    Unless I missed something
    Edit: Uhm, I couldn't find where the id's are. Like What you type in.
    i.e. hunt = hunter
    Last edited by Brid Mayhem; 03-10-2013 at 03:53 AM.

  10. #10
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Brid Mayhem View Post
    Edit: Uhm, I couldn't find where the id's are. Like What you type in.
    i.e. hunt = hunter
    Should work for the global integer constants such as skill_mining or as any full skill string name such as 'mining'


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  11. #11
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Should work for the global integer constants such as skill_mining or as any full skill string name such as 'mining'
    All it posts is my level as -1 D:

    I tried 'str', 'Strength' and 'strength'

    i'll try Skill_Strength, ect and i'll post back in a few minutes.

  12. #12
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Should work for the global integer constants such as skill_mining or as any full skill string name such as 'mining'
    Tried all of those, nothing seems to be working.

    Here's what i've tried:
    writeln('Current level: ' +IntToStr(GetSkillLevel('SKILL_PRAYER'))+'!');
    writeln('Current level: ' +IntToStr(GetSkillLevel('Prayer'))+'!');
    writeln('Current level: ' +IntToStr(GetSkillLevel('pray'))+'!');

  13. #13
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Brid Mayhem View Post
    Tried all of those, nothing seems to be working.

    Here's what i've tried:
    writeln('Current level: ' +IntToStr(GetSkillLevel('SKILL_PRAYER'))+'!');
    writeln('Current level: ' +IntToStr(GetSkillLevel('Prayer'))+'!');
    writeln('Current level: ' +IntToStr(GetSkillLevel('pray'))+'!');
    Hmm weird, is this with the Oldschool Include installed and do you have the fonts? Or are you using the main SRL one?


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  14. #14
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Hmm weird, is this with the Oldschool Include installed and do you have the fonts? Or are you using the main SRL one?
    I have your 07Include installed, I have it setup correctly, i've done 2 scripts so far. This is the only kunundrum I've hit.

  15. #15
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Brid Mayhem View Post
    I have your 07Include installed, I have it setup correctly, i've done 2 scripts so far. This is the only kunundrum I've hit.
    Ah, it's not my include you need for this, it's the alpha development release of SRL-OSR: https://github.com/SRL/SRL-OSR

    Tho it's not easy to setup atm and the font's are not posted publicly I don't think yet, I'd upload for you but I'm on my phone atm


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  16. #16
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Ah, it's not my include you need for this, it's the alpha development release of SRL-OSR: https://github.com/SRL/SRL-OSR

    Tho it's not easy to setup atm and the font's are not posted publicly I don't think yet, I'd upload for you but I'm on my phone atm
    I also have that O.o. But wouldn't it say it can't recognize it instead of it saying -1?

  17. #17
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Brid Mayhem View Post
    I also have that O.o. But wouldn't it say it can't recognize it instead of it saying -1?
    That is it's way of saying it can't recognise

    Did you include the OSR by doing something like {$I SRL-OSR/SRL.Simba}


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  18. #18
    Join Date
    Mar 2013
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    127 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    That is it's way of saying it can't recognise

    Did you include the OSR by doing something like {$I SRL-OSR/SRL.Simba}
    Tried that at got an error in a random class

Thread Information

Users Browsing this Thread

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

Posting Permissions

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