Results 1 to 11 of 11

Thread: Reflection needs a fix...

  1. #1
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default Reflection needs a fix...

    Now, I cannot seem to figure out how to fix these functions.

    Here is what I know.

    The CompassAngle hook now returns a Float.
    The MinimapOffsetAngle hook is same as before.

    Here is my code thus far:
    SCAR Code:
    writeln('f, MOA: ' + FloatToStr(SmartGetFieldFloat(0, MapOffsetAngle)));
        writeln('f, CA: ' + FloatToStr(SmartGetFieldFloat(0, CompassAngle)));
        writeln('i, CA: ' + IntToStr(SmartGetFieldInt(0, CompassAngle)));
        writeln('i, MOA: ' + IntToStr(SmartGetFieldInt(0, MapOffsetAngle)));
        I := (Round(SmartGetFieldFloat(0, CompassAngle)) + SmartGetFieldInt(0, MapOffsetAngle)) mod 2048;
        writeln(FloatToStr(I * 180 / 1024));

    Here is the old functions:
    SCAR Code:
    {*******************************************************************************
    function GetMinimapAngleDeg: extended;
    By: BenLand100
    Description: Returns the current Map angle in degrees
    *******************************************************************************}

    function GetMinimapAngleDeg: extended;
    var
      clientAngle: integer;
    begin
      clientAngle:= (SmartGetFieldInt(0,CompassAngle) + SmartGetFieldInt(0,MapOffsetAngle)) mod 2048;
      result:= clientAngle * 180 / 1024;
    end;

    {*******************************************************************************
    function GetMinimapAngleRad: extended;
    By: BenLand100
    Description: Returns the current map angle in radians
    *******************************************************************************}

    function GetMinimapAngleRad: extended;
    var
      clientAngle: integer;
    begin
      clientAngle:= (SmartGetFieldInt(0,CompassAngle) + SmartGetFieldInt(0,MapOffsetAngle)) mod 2048;
      result:= clientAngle * Pi / 1024;
    end;

    If you can fix them, much love will be given.

    Also, there are two new functions to work with:
    SCAR Code:
    SmartGetFieldFloat(Main: Integer; Path: String): Extended;
    SmartGetFieldDouble(Main: Integer; Path: String): Extended;

    Any questions, please feel free to ask me.

    Thank in advance.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  2. #2
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    What did the old CompassAngle hook return? 0 < Angle < 360?
    Last edited by lordsaturn; 04-02-2009 at 12:43 AM.

  3. #3
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    0. Always.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  4. #4
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    So thats why walking works only if compass is north?
    Quote Originally Posted by DeSnob View Post
    ETA's don't exist in SRL like they did in other communities. Want a faster update? Help out with updating, otherwise just gotta wait it out.

  5. #5
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    antti mies: Ofc.

    I give it a try later..

  6. #6
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Would just changing the variable clientAngle to a extended then changing your SmartGetFieldInt to SmartGetFieldDouble/Float make it work accordingly? You for sure can't have clientAngle be an integer anymore b/c floats and doubles in java/c++ are like our extended in SCAR.

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  7. #7
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Since when does walking work only compass north? It's not been many weeks since I walked just fine with reflection?

  8. #8
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    runescape updated today again, is it maybe just the hooks?

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  9. #9
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    This was two days ago, maybe the hooks are fixed. Idk. =/

    All I know is, reflection is currently broken, and I think its the compass angle.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  10. #10
    Join Date
    Feb 2009
    Location
    UK
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Reflection stopped working for me sometime on April the 1st.

  11. #11
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    I tried debugging, but I think the CompassAngle hook is wrong, because it's always returning -1..

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
  •