Results 1 to 16 of 16

Thread: [Reflection]Update 11/15/2015

  1. #1
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default [Reflection]Update 11/15/2015

    Reflection Include Update 11/15/2015



    Added TReflectPlayer.GetCombatLevel

    Changed TileToMM to a proper method which takes Map Scale and Offset into account, so it should be 100% accurate now.

    Nearly finished on the new updater, just need to finish up on the in game objects and a couple other classes and it will be done!

    EDIT: Updater is finished

    Code:
    Gamepack already downloaded..
    
    230 Classes Found 
    
    %% Identifying Classes..
        (Identified 25 out of 25 Classes)
    
    %% Identifying Fields..
        (Identified 141 out of 141 Fields)
    
     # Node: gx, 0 duplicates
         ~> Prev : gx.eo
         ~> Next : gx.ed
     **Identified (2 / 2) Fields**
    
     # Cacheable: gt, 0 duplicates
    
     # Renderable: ci, 0 duplicates
         ~> ModelHeight : ci.ch * -1368624703
     **Identified (1 / 1) Fields**
    
     # Animable: f, 0 duplicates
    
     # Model: dg, 0 duplicates
    
     # AnimationSequence: am, 0 duplicates
    
     # NpcDefinition: az, 0 duplicates
         ~> Actions : az.j
         ~> Name : az.c
         ~> ID : az.e * -764559607
         ~> CombatLevel : az.l * 2024496629
     **Identified (4 / 4) Fields**
    
     # linkedList: ge, 0 duplicates
         ~> Head : ge.y
         ~> Current : ge.d
     **Identified (2 / 2) Fields**
    
     # Actor: aq, 0 duplicates
         ~> WorldX : aq.i * -1453400901
         ~> WorldY : aq.ah * -1718522929
         ~> QueueX : aq.cr
         ~> QueueY : aq.cm
         ~> QueueLength : aq.cc * 1658125385
         ~> Animation : aq.bh * -464776311
         ~> SpokenText : aq.ak
         ~> CombatCycle : aq.ad * -466433893
         ~> Health : aq.ag * 861750411
         ~> MaxHealth : aq.ax * 1971263299
         ~> InteractingIndex : aq.at * -143123477
     **Identified (11 / 11) Fields**
    
     # Npc: ay, 0 duplicates
         ~> NpcDefinition : ay.y
     **Identified (1 / 1) Fields**
    
     # ObjectDefinition: ar, 0 duplicates
         ~> Actions : ar.ao
         ~> Name : ar.o
     **Identified (2 / 2) Fields**
    
     # Buffer: dd, 0 duplicates
    
     # Widget: ft, 0 duplicates
         ~> Children : ft.ey
         ~> ItemID : ft.eq * -1943558679
         ~> ItemAmount : ft.ec * 1129297969
         ~> WidgetID : ft.f * 1765684495
         ~> Name : ft.cn
         ~> Text : ft.bb
         ~> IsHidden : ft.aw
         ~> AbsoluteY : ft.ah * -717818255
         ~> AbsoluteX : ft.i * -561950361
         ~> RelativeY : ft.ay * -1795295429
         ~> RelativeX : ft.aj * -496780419
         ~> Width : ft.aa * -1516900699
         ~> Height : ft.ao * -1655377487
         ~> ParentID : ft.ae * -515905099
         ~> ScrollY : ft.ay * -1795295429
         ~> ScrollX : ft.aj * -496780419
         ~> InvIDs : ft.di
         ~> BoundsIndex : ft.ep * -995796815
     **Identified (18 / 18) Fields**
    
     # WidgetNode: w, 0 duplicates
         ~> Id : w.y * -2062122387
     **Identified (1 / 1) Fields**
    
     # HashTable: ga, 0 duplicates
         ~> Buckets : ga.d
         ~> Size : ga.y
         ~> Index : ga.e
     **Identified (3 / 3) Fields**
    
     # GameShell: ek, 0 duplicates
    
     # Player: g, 0 duplicates
         ~> Name : g.y
         ~> Definition : g.d
         ~> CombatLevel : g.e * -603916511
     **Identified (3 / 3) Fields**
    
     # Client: client, 0 duplicates
         ~> LoopCycle : client.v * -283067683
         ~> IsMenuOpen : client.hz
         ~> MenuX : client.hq
         ~> MenuY : client.hl
         ~> MenuHeight : client.hx
         ~> MenuCount : client.hp * -1766000855
         ~> MenuWidth : client.hu
         ~> MenuActions : client.el
         ~> MenuOptions : client.qg
         ~> LocalPlayers : client.gz
         ~> Region : client.dd
         ~> Plane : client.gc
         ~> DestinationY : client.mn * -1777281284
         ~> DestinationX : client.mz * 194806227
         ~> LocalPlayer : client.hb
         ~> BaseX : client.cs
         ~> BaseY : client.dg
         ~> Widgets : client.y
         ~> GameSettings : client.g
         ~> CurrentLevels : client.hg
         ~> RealLevels : client.hw
         ~> Experiences : client.hi
         ~> Weight : client.jr * 863624177
         ~> Energy : client.jl * 1610409125
         ~> CurrentWorld : client.ai * 70905969
         ~> WidgetNodeCache : client.id
         ~> TileSettings : client.d
         ~> TileHeights : client.y
         ~> LocalNpcs : client.cy
         ~> NpcIndices : client.cr
         ~> CrossHairColor : client.gy * -1780486051
         ~> MapAngle : client.ec * 1103008437
         ~> MapOffset : client.fl * -1594117381
         ~> MapScale : client.er * -710890433
         ~> CameraPitch : client.fg
         ~> SinTable : client.ab
         ~> CosineTable : client.ae
         ~> CameraYaw : client.fh
         ~> CameraX : client.fe
         ~> CameraZ : client.fj
         ~> CameraY : client.fi
         ~> GroundItems : client.ha
         ~> LoginState : client.h * -165588365
         ~> PlayerIndex : client.gj * 684162663
         ~> WidgetPositionX : client.lz
         ~> WidgetPositionY : client.li
         ~> WidgetWidths : client.lw
         ~> WidgetHeights : client.lr
     **Identified (48 / 48) Fields**
    
     # Region: ch, 0 duplicates
         ~> SceneTile : ch.c
     **Identified (1 / 1) Fields**
    
     # BoundaryObject: co, 0 duplicates
         ~> ID : co.q * 261667377
         ~> Flags : co.m * 1062183679
         ~> LocalX : co.d * 1521799393
         ~> LocalY : co.g * -1457163673
         ~> Plane : co.y * 1589241317
         ~> Render : co.c
         ~> Render2 : co.a
         ~> Orientation : co.w * 1647363309
         ~> Height : co.e * -554350701
     **Identified (9 / 9) Fields**
    
     # GameObject: cw, 0 duplicates
         ~> ID : cw.f * 1620440753
         ~> Flags : cw.s * 600649161
         ~> Plane : cw.y * -2023557819
         ~> WorldX : cw.g * -2143802331
         ~> WorldY : cw.w * -1941929461
         ~> Height : cw.d * 1192534769
         ~> Render : cw.e
         ~> Orientation : cw.c * 869880755
         ~> LocalX : cw.a * -1863972483
         ~> LocalY : cw.m * 368603933
         ~> OffsetX : cw.q * 1754949423
         ~> OffsetY : cw.n * -1490576413
     **Identified (12 / 12) Fields**
    
     # FloorDecoration: cq, 0 duplicates
         ~> Render : cq.w
         ~> LocalX : cq.d * 289091945
         ~> LocalY : cq.g * -1640843047
         ~> Plane : cq.y * 616502115
         ~> ID : cq.e * -1671216197
         ~> Flags : cq.c * 413244299
     **Identified (6 / 6) Fields**
    
     # WallDecoration: cv, 0 duplicates
         ~> ID : cv.n * -388767517
         ~> Flags : cv.k * -1966469397
         ~> LocalX : cv.d * -25540141
         ~> LocalY : cv.g * 1912292449
         ~> Plane : cv.y * -1182013317
         ~> Renderable : cv.q
         ~> Renderable2 : cv.m
         ~> Orientation : cv.w * -1838788401
         ~> Height : cv.e * -1608069577
         ~> RelativeX : cv.c * -55801949
         ~> RelativeY : cv.a * -1213256663
     **Identified (11 / 11) Fields**
    
     # SceneTile: cg, 0 duplicates
         ~> GameObject : cg.o
         ~> BoundaryObject : cg.a
         ~> WallDecoration : cg.q
         ~> FloorDecoration : cg.m
     **Identified (4 / 4) Fields**
    
     # Item: ao, 0 duplicates
         ~> ID : ao.y * 1993932629
         ~> StackSizes : ao.d * 85853107
     **Identified (2 / 2) Fields**
    
    
    Runtime was 3263ms
    
    Process finished with exit code 0
    Make sure to let me know of anything that you would like to see changed/added!
    Last edited by Kyle; 11-16-2015 at 03:24 PM.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  2. #2
    Join Date
    Jun 2008
    Posts
    56
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    Awesome work as always!
    “Programming is like sex. One mistake and you have to support it for the rest of your life.”
    - Michael Sinz

  3. #3
    Join Date
    May 2013
    Posts
    75
    Mentioned
    3 Post(s)
    Quoted
    48 Post(s)

    Default

    Has anyone tested TileToMM yet? It seems to be broken to me. WalkToTileMM no longer works properly and constantly messes up by: 1. trying to walk to the square player is currently standing on or 2. walking somewhere completely random.

    I am playing on default window size and default zoom if that might be the issue.

    Thank you!

  4. #4
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by MariusK View Post
    Has anyone tested TileToMM yet? It seems to be broken to me. WalkToTileMM no longer works properly and constantly messes up by: 1. trying to walk to the square player is currently standing on or 2. walking somewhere completely random.

    I am playing on default window size and default zoom if that might be the issue.

    Thank you!
    Really? I just tested it and it is working fine for me, also @ineedbot; ran it overnight on a script without issue.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  5. #5
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Plus it's almost directly ripped from the client's transformation....

  6. #6
    Join Date
    Aug 2007
    Posts
    539
    Mentioned
    20 Post(s)
    Quoted
    266 Post(s)

    Default

    Well I finally was able to recreate the issue, it seems the TileToMM function seems to bug out completely then the compass' angle is near north, maybe within +- 5 degrees of 355 degrees(only seems to happen if the angle is closing in at the end of the arc).

    Simba Code:
    repeat
          myP := Reflect.Tiles.GetGlobalTile;
          myP := Reflect.Tiles.TileToMM(point(myp.x, myp.y+10));
          OS_Smart.__Graphics.Clear;
          if(pointInBox(myP, intToBox(MMX1, MMy1, MMx2, MMy2))) then
            OS_SMART.__Graphics.DrawCircle(myp, 2, clRed, true)
          else
            writeln(myp, ' ', (360 - Reflect.Compass.AngleDeg));
    until(false);

    Various outputs are
    Code:
    {X = 2697, Y = 84} 347.51953125
    {X = 2947, Y = 87} 353.49609375
    {X = 4577, Y = 89} 356.1328125
    {X = 4553, Y = 89} 356.66015625

  7. #7
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by ineedbot View Post
    Well I finally was able to recreate the issue, it seems the TileToMM function seems to bug out completely then the compass' angle is near north, maybe within +- 5 degrees of 355 degrees(only seems to happen if the angle is closing in at the end of the arc).

    Simba Code:
    repeat
          myP := Reflect.Tiles.GetGlobalTile;
          myP := Reflect.Tiles.TileToMM(point(myp.x, myp.y+10));
          OS_Smart.__Graphics.Clear;
          if(pointInBox(myP, intToBox(MMX1, MMy1, MMx2, MMy2))) then
            OS_SMART.__Graphics.DrawCircle(myp, 2, clRed, true)
          else
            writeln(myp, ' ', (360 - Reflect.Compass.AngleDeg));
    until(false);

    Various outputs are
    Code:
    {X = 2697, Y = 84} 347.51953125
    {X = 2947, Y = 87} 353.49609375
    {X = 4577, Y = 89} 356.1328125
    {X = 4553, Y = 89} 356.66015625
    OK great, I tested some things and it seems like there was some inconsistencies with manually calculating the values for the Sin/Cos tables, probably having to do with rounding.. So now we will just use the client's values for them, I just tested it and pushed this fix, let me know how that does. Also, these values were used for TileToMS as well, so I changed it on that function also, it should be much more accurate now
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  8. #8
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    OK great, I tested some things and it seems like there was some inconsistencies with manually calculating the values for the Sin/Cos tables, probably having to do with rounding.. So now we will just use the client's values for them, I just tested it and pushed this fix, let me know how that does. Also, these values were used for TileToMS as well, so I changed it on that function also, it should be much more accurate now
    https://github.com/smithtrenton/OSR-...view.simba#L44

    This one should work.

  9. #9
    Join Date
    Aug 2007
    Posts
    539
    Mentioned
    20 Post(s)
    Quoted
    266 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    OK great, I tested some things and it seems like there was some inconsistencies with manually calculating the values for the Sin/Cos tables, probably having to do with rounding.. So now we will just use the client's values for them, I just tested it and pushed this fix, let me know how that does. Also, these values were used for TileToMS as well, so I changed it on that function also, it should be much more accurate now
    Great, that problem no longer persists, but now whenever it closes in on the end of the arc, it goes to the center point of the MM:, it did this before you uploaded the fix as well but with combination of the error before (which is now fixed).

  10. #10
    Join Date
    Sep 2015
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Sup guys! Great work on the reflection include! I'm using it with my script which I just finished... and reflection won't find RS ([Reflection] [Fatal] Failed to detect or load OSRS.) and I'm wondering if that's because the include is being updated or is it some kind of a bug? It's no script problem as it doesn't work on a simple reflection script template like this:

    Code:
    program Template;
    {$DEFINE SMART}
    {$i Reflection/Reflection.simba}
    
    var
      MyPlayer : TReflectLocalPlayer;
      bmp : TMufasaBitmap;
    
    procedure SetupPlayer;
    begin
      MyPlayer.Username := 'user';
      MyPlayer.Password := 'pass';
      MyPlayer.Pin := '1468';
      MyPlayer.Active := True;
    end;
    
    
    begin
      Reflect.Setup;
      SetupPlayer;
      MyPlayer.Login;
    end.
    ERROR:
    Code:
    [Reflection] [Fatal] Failed to detect or load OSRS.

  11. #11
    Join Date
    May 2013
    Posts
    75
    Mentioned
    3 Post(s)
    Quoted
    48 Post(s)

    Default

    Quote Originally Posted by ineedbot View Post
    Great, that problem no longer persists, but now whenever it closes in on the end of the arc, it goes to the center point of the MM:, it did this before you uploaded the fix as well but with combination of the error before (which is now fixed).
    I wanted to test this out, but it seems that current hooks are outdated. That is strange, since there were no RuneScape updates since yesterday and after yesterdays update elfyyy already provided the new hooks, which were working, AFAIK.

    @elfyyy, maybe theres a bug in your new updater or did I miss an update?

  12. #12
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by MariusK View Post
    I wanted to test this out, but it seems that current hooks are outdated. That is strange, since there were no RuneScape updates since yesterday and after yesterdays update elfyyy already provided the new hooks, which were working, AFAIK.

    @elfyyy, maybe theres a bug in your new updater or did I miss an update?
    It updated for everyone else it seems, not sure what happened for you. Just re-download the hooks from github or just drop the Rev of the hook rev so it will re-download them
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  13. #13
    Join Date
    May 2013
    Posts
    75
    Mentioned
    3 Post(s)
    Quoted
    48 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    It updated for everyone else it seems, not sure what happened for you. Just re-download the hooks from github or just drop the Rev of the hook rev so it will re-download them
    Yeah, it worked. Dunno what happened, because it was still working yesterday. Thanks, man.

  14. #14
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by ineedbot View Post
    Great, that problem no longer persists, but now whenever it closes in on the end of the arc, it goes to the center point of the MM:, it did this before you uploaded the fix as well but with combination of the error before (which is now fixed).
    Pushed the fix for this as well as a small bug with WalkToTileMs. Mainscreen and Minimap clicking should be perfect now..

    Also, something was brought to my attention by @Joopi;. Apparently in one of the updates there is now a option to zoom your screen in or out. You need to make sure that you are at the default setting for any of the mainscreen clicking to work. You can right click the slider and choose revert to default if you have already changed it.
    Last edited by Kyle; 11-21-2015 at 12:04 AM.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  15. #15
    Join Date
    Sep 2015
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    Pushed the fix for this as well as a small bug with WalkToTileMs. Mainscreen and Minimap clicking should be perfect now..

    Also, something was brought to my attention by @Joopi;. Apparently in one of the updates there is now a option to zoom your screen in or out. You need to make sure that you are at the default setting for any of the mainscreen clicking to work. You can right click the slider and choose revert to default if you have already changed it.
    I'm currently running my script which requires using next code:

    Code:
    program something;
    {$DEFINE SMART}
    {$i Reflection/Reflection.simba}
    
    var
      MyPlayer : TReflectLocalPlayer;
    
    procedure example;
    var
      lectern : TReflectObject;
    begin
      if lectern.Find(objGame, 'Lectern', 15) then
        Reflect.Mouse.Move(Reflect.Tiles.TileToMM(lectern.GetTile), 0, 0);  
    end;
    
    begin
      Reflect.Setup;
      SetupPlayer;
      MyPlayer.Login;
    
      example;
    end;
    So the thing is I'm finding object 'Lectern' in house (POH, which I think is known for changing coords) which is always found but sometime it still messes. When I first started the script after updating reflection today it got stuck again with some TileToMM bug. As I recall it was clicking on exact opposite side as it should and this pic represents it:

    tiletomm.png

    I'll be testing my script and looking for any TileToMM problem and will update you later today how it all worked. Hope I helped somehow

    UPDATE: just when I posted this TileToMM started going to MMCX, MMCY and when it clicked it moved one tile so maybe it was like MMCX+1, MMCY+1

    When i loop the function it will sometimes keep doing this until I move camera.
    Last edited by kakadudl; 11-21-2015 at 01:35 PM.

  16. #16
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by kakadudl View Post
    I'm currently running my script which requires using next code:

    Code:
    program something;
    {$DEFINE SMART}
    {$i Reflection/Reflection.simba}
    
    var
      MyPlayer : TReflectLocalPlayer;
    
    procedure example;
    var
      lectern : TReflectObject;
    begin
      if lectern.Find(objGame, 'Lectern', 15) then
        Reflect.Mouse.Move(Reflect.Tiles.TileToMM(lectern.GetTile), 0, 0);  
    end;
    
    begin
      Reflect.Setup;
      SetupPlayer;
      MyPlayer.Login;
    
      example;
    end;
    So the thing is I'm finding object 'Lectern' in house (POH, which I think is known for changing coords) which is always found but sometime it still messes. When I first started the script after updating reflection today it got stuck again with some TileToMM bug. As I recall it was clicking on exact opposite side as it should and this pic represents it:

    tiletomm.png

    I'll be testing my script and looking for any TileToMM problem and will update you later today how it all worked. Hope I helped somehow

    UPDATE: just when I posted this TileToMM started going to MMCX, MMCY and when it clicked it moved one tile so maybe it was like MMCX+1, MMCY+1

    When i loop the function it will sometimes keep doing this until I move camera.
    Just pushed a fix. It really should be fixed this time -.-
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

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
  •