Results 1 to 6 of 6

Thread: Few questions about SCAR

  1. #1
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Few questions about SCAR

    Please note I'm quite new to SCAR, but I'm not new to programming.
    I'm used to programming in Java / PHP, so if you could somehow relate some of your answers to those two, it would help me understand scar better.

    Also, please be patient. I've been reading tutorials, but these are the things I can't quite figure out even after reading many tutorials.

    I understand the basics of scar. The main thing I'm having trouble with is using RuneScape variables and values in scar.

    For example, how do I get the current level from my character?
    Also, am I able to do a do { } while(); loop in scar, or something similar (obviously it's not going to be the exact same thing).
    Also, are there any tutorials on how to use basic RuneScape related functions in scar? I know stuff like SetAngle and SetRun, but that's only because of looking over scripts, not because of any tutorials.

    Thanks .

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ckeck SRL includes to see the functions, if you want to get the level you could use:
    SCAR Code:
    function GetCombatLevel : Integer;

    SCAR Code:
    While (Something true) do
    Thats what you are asking for?


  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Gone Fishing View Post
    For example, how do I get the current level from my character?
    Also, am I able to do a do { } while(); loop in scar, or something similar (obviously it's not going to be the exact same thing).
    Also, are there any tutorials on how to use basic RuneScape related functions in scar? I know stuff like SetAngle and SetRun, but that's only because of looking over scripts, not because of any tutorials.

    Thanks .
    SCAR Code:
    // do while:
    repeat
      wait(100);
    until (false);

    // while do:
    while true do
      wait(100);

    All runescape related functions are in SRL, not in SCAR.
    Check out the SRL Manual (.chm) for all functions.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  4. #4
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Cazax View Post
    Ckeck SRL includes to see the functions, if you want to get the level you could use:
    SCAR Code:
    function GetCombatLevel : Integer;

    SCAR Code:
    While (Something true) do
    Thats what you are asking for?
    @1 Heh, my bad I should have specified, I mean like a skill level.
    I was poking around in some of the core includes and found that like level 20 = woodcutting, but I don't know what to do with that 20. Some people in scripts did like level[20] but I can't figure out where they initialized that or how they access that.

    @2 Well, the point of a do while loop is it does the condition once regardless if the conditions are met. For example, if I wanted to do a login script, I want to do a do while loop so I can make it try to log in once, and if it does login, it breaks out of the do while. If it doesn't then it will go back through rather than doing like:
    (this isn't correct, but it's a rough idea)
    Login;
    while (not LoggedIn)
    begin
    Login;
    end;

    That's a bad example, but it would have some practical uses.

  5. #5
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    FUnction GetSkillInfo(Skill : String; Amount : True): Integer;
    Check the includes


  6. #6
    Join Date
    Mar 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Cazax View Post
    SCAR Code:
    FUnction GetSkillInfo(Skill : String; Amount : True): Integer;
    Check the includes
    Yea, I read the Manual and figured it out.
    SCAR Code:
    IntToStr(GetSkillInfo('Strength', True))
    is what I was looking for .

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. A Few Questions
    By Rich in forum OSR Help
    Replies: 5
    Last Post: 12-06-2008, 06:26 PM
  2. Some more questions
    By Zeta in forum OSR Help
    Replies: 4
    Last Post: 10-18-2007, 12:03 AM

Posting Permissions

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