Page 14 of 32 FirstFirst ... 4121314151624 ... LastLast
Results 326 to 350 of 792

Thread: [OSR]Reflection Include

  1. #326
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    <3 ineedbot
    Thanks for that test script I usually just do some writeln edits to an existing script and test a few functions but it's becoming very monotonous to keep doing that, it was on my list to make something like this and I'm very grateful for saving me that trouble.

    @Cheddy I checked your updater and it was broken.. Your pastebin also had old hooks..

    Edit: There was another update about 10 mins ago, meaning I need to run the updater again.. I'll take another look in a couple of hours just in case they update anything else.
    Last edited by Krazy_Meerkat; 06-23-2014 at 05:13 PM.

  2. #327
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    How does one get the updated hooks after each Game Update ?

  3. #328
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    It's been mentioned a few times in this thread Dervish.

    New Hooks, few extra updates:
    Converted MakeCompass to R_MakeCompass using reflection.
    R_PerfectPath random support re-added, function moved to AntiRandoms.Simba to avoid conflicts.
    R_InteractTile modified, works instantly like R_MouseTile now.
    R_InteractTileWait added to support timers.

    Uploading now, please give it about 5 mins for the GC to update itself.
    Edit: As usual, report anything that isn't working.. I did do some extra testing this time so everything should be in order.

  4. #329
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    Great work on updating. Don't think it doesn't go unrecognised and unappreciated.
    Solar from RiD.

  5. #330
    Join Date
    Jun 2014
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Thank you so much Krazy_Meerkat! You're the greatest

  6. #331
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    Think R_ChooseOption might need checking. elfyyy's PC script right clicks but then doesn't select an option.
    Solar from RiD.

  7. #332
    Join Date
    Jun 2014
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Solar View Post
    Think R_ChooseOption might need checking. elfyyy's PC script right clicks but then doesn't select an option.
    It did this as well with the VarrockEastMinerBanker script, would right click the bank then bug out.

  8. #333
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    Sorry if this has been answered, is there a way to manually update the reflection when a OSR update occurs?

  9. #334
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by Haxz View Post
    Sorry if this has been answered, is there a way to manually update the reflection when a OSR update occurs?
    Not without making a updater. If you are interested in making one look on javahacking.
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  10. #335
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by arm2 View Post
    Not without making a updater. If you are interested in making one look on javahacking.
    I've really been thinking about doing this. The lack of useful hooks makes reflection really frustrating
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  11. #336
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by Awkwardsaw View Post
    I've really been thinking about doing this. The lack of useful hooks makes reflection really frustrating
    The problem with writing an hook updater though is the time it takes to create and update it. Is it worth the time?
    Working on: Tithe Farmer

  12. #337
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    MasterBB is wise.. Mostly people will just write a java bot if they write an updater, because it's easier and more logical to use the same language/resources as the updater. They can also try to make a profit by selling subscriptions

    Sorry about the R_Chooseoption problem, I thought this was already resolved.. Let me see what I can find.

  13. #338
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    The problem with writing an hook updater though is the time it takes to create and update it. Is it worth the time?
    I'm not sure to be honest. However it gives me a chance to learn/ contribute
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  14. #339
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    New hooks are out, we're at rev 52 now. I really hope they leave the client alone for a few weeks now :/
    Known bugs: Npc level multi is wrong (npc level hook isn't used for anything other than storing in the record). NpcIndex hook is missing, localindex array method will be used by default.

    Tested:
    R_Chooseoption
    R_IsUpText
    R_InteractTile
    R_OpenDoor
    R_GetAllNpcs

    Report any broken hooks and I'll fix when I can.

  15. #340
    Join Date
    Sep 2006
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    R_GetAllNPCs returns a length 0 array time to time. From what it looks like, the first time it is called it works, but the second time it doesn't, and then the third works. It looks like it flips like that.

    I assume it's because of the switch to LocalIndex? I don't have the reflection technical know-how to fix, but I'm currently dabbling; I might be able to help.

    EDIT:

    Looks like for the first call, a -1 gets into the result for R_GetIndices() for this part of the code:

    Simba Code:
    for i:=0 to 99 do
      begin
        Result[i] := SmartGetFieldArrayint(SmartCurrentTarget, 0, client_npcIndices, i);
      end;
      Result:= RemoveDeadTIA(Result);

    Resulting in LocalIndex not being used until the second call, when the -1 doesn't appear anymore. I guess catching the -1 would be a good call? I don't know if that ever appears when NPCIndex is working properly, so it would be a quick bugfix.

    Replacing the above with this fixes the issue.
    Simba Code:
    for i:=0 to 99 do
      begin
        Result[i] := SmartGetFieldArrayint(SmartCurrentTarget, 0, client_npcIndices, i);
        if result[ i ] = -1 then // Hack-fix for 6/26/14 OSRS update.
          result[ i ] := 0; // To be caught under RemoveDeadTIA.
      end;
      Result:= RemoveDeadTIA(Result);
    Last edited by Tonekray; 06-27-2014 at 05:46 AM.

  16. #341
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Quote Originally Posted by Tonekray View Post
    R_GetAllNPCs returns a length 0 array time to time. From what it looks like, the first time it is called it works, but the second time it doesn't, and then the third works. It looks like it flips like that.

    I assume it's because of the switch to LocalIndex? I don't have the reflection technical know-how to fix, but I'm currently dabbling; I might be able to help.

    EDIT:

    Looks like for the first call, a -1 gets into the result for R_GetIndices() for this part of the code:

    Simba Code:
    for i:=0 to 99 do
      begin
        Result[i] := SmartGetFieldArrayint(SmartCurrentTarget, 0, client_npcIndices, i);
      end;
      Result:= RemoveDeadTIA(Result);

    Resulting in LocalIndex not being used until the second call, when the -1 doesn't appear anymore. I guess catching the -1 would be a good call? I don't know if that ever appears when NPCIndex is working properly, so it would be a quick bugfix.

    Replacing the above with this fixes the issue.
    Simba Code:
    for i:=0 to 99 do
      begin
        Result[i] := SmartGetFieldArrayint(SmartCurrentTarget, 0, client_npcIndices, i);
        if result[ i ] = -1 then // Hack-fix for 6/26/14 OSRS update.
          result[ i ] := 0; // To be caught under RemoveDeadTIA.
      end;
      Result:= RemoveDeadTIA(Result);
    The LocalIndex array is supposed to have that functionality.. This is the line of code is where the LocalIndex will be used when the result's length is 0:
    Simba Code:
    for i:=0 to 99 do
      begin
        Result[i] := SmartGetFieldArrayint(SmartCurrentTarget, 0, client_npcIndices, i);
      end;
      Result:= RemoveDeadTIA(Result);
      if (length(Result) < 1) then
      begin //NpcIndex hook is broken, use LocalIndex method
    I'm having a look at it now to see why it returns an empty array every 2nd use..
    Edit: Ok it seems to be RemoveDeadTIA which wasn't removing values less than 1, it was only removing 0's.. I'm committing the fix now.

    Thanks very much, Tonekray for pointing this issue out and providing a fix for others
    Last edited by Krazy_Meerkat; 06-27-2014 at 11:13 AM.

  17. #342
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    @Krazy_Meerkat; Not sure if it helps or not, but I am getting fields not found: ch, e, and j. Think the ch one is nothing to worry about, but the other two might need checking.
    Solar from RiD.

  18. #343
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Thanks solar, but it's not uncommon to have SMART complaining about fields not found Just let me know if a function isn't working correctly..
    Latest Commit:
    LocalIndex array fixed, was returning an empty array every 2nd call.
    Added Widgets.simba to store a few functions by Frement (just something to use for now)
    Added ID_Display.simba (by ineedbot) to tools.

    I could've added more from F_Randoms, but I'm not sure how much longer we'll be using PascalScript and I didn't want to add too much b/c some of it uses hardcoded hooks which aren't in my updater or on JH..
    Note: If you also use F_Randoms, you will get a duplicate identifier error with some of the functions, just open up Widgets.simba and take all of those functions out of F_Randoms.simba

  19. #344
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    Still seems to be some issues and unfortunately I don't know which hooks are broken. I'm sorry about that.
    Just using the PC script to see if it runs ok and going from that.

    When I get to a portal, the script thinks I am "attacking monsters". Other times, I will be "running to first portal" and trying to click off the island on the minimap.
    Solar from RiD.

  20. #345
    Join Date
    Aug 2013
    Posts
    230
    Mentioned
    1 Post(s)
    Quoted
    114 Post(s)

    Default

    R_GetObjectsDistance isn't work :/

  21. #346
    Join Date
    Mar 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    I'm having trouble with a lot of the functions beginning with the one, "R_GetWidget," and multiple ones under that. The full error is "[Error] C:\Simba\Includes\F_AntiRandoms.simba(120:10): Duplicate identifier 'R_GETWIDGET' at line 120"

    Next after that is "R_GetWidgetText," full error being "[Error] C:\Simba\Includes\F_AntiRandoms.simba(130:10): Duplicate identifier 'R_GETWIDGETTEXT' at line 130"

    I'll list one more - "TInventoryItem," full error being "[Error] C:\Simba\Includes\F_AntiRandoms.simba(855:3): Duplicate identifier 'TInventoryItem' at line 855"

    Basically, all the errors I'm having deal with duplicate identifiers.

  22. #347
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by corangerx111 View Post
    I'm having trouble with a lot of the functions beginning with the one, "R_GetWidget," and multiple ones under that. The full error is "[Error] C:\Simba\Includes\F_AntiRandoms.simba(120:10): Duplicate identifier 'R_GETWIDGET' at line 120"

    Next after that is "R_GetWidgetText," full error being "[Error] C:\Simba\Includes\F_AntiRandoms.simba(130:10): Duplicate identifier 'R_GETWIDGETTEXT' at line 130"

    I'll list one more - "TInventoryItem," full error being "[Error] C:\Simba\Includes\F_AntiRandoms.simba(855:3): Duplicate identifier 'TInventoryItem' at line 855"

    Basically, all the errors I'm having deal with duplicate identifiers.
    Quote Originally Posted by Krazy_Meerkat View Post
    Note: If you also use F_Randoms, you will get a duplicate identifier error with some of the functions, just open up Widgets.simba and take all of those functions out of F_Randoms.simba
    If you would have read a bit above, you would have seen the instructions.
    There used to be something meaningful here.

  23. #348
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Well R_GetObjectsDistance was working for game-objects, but I've fixed the other object hooks (mistake with the hook naming for wall/floor/boundary)..

    Latest update:
    Replaced BoundaryObject/Wall/Floor Main class hooks with the Tile_Boundary/Wall/Floor Hooks (Array of Boundary/Wall/Floor)
    Fixed NpcLevelDef Multiplier.
    All Object Functions should be working again.

  24. #349
    Join Date
    Mar 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    [Error] C:\Users\Mike\Downloads\F_AntiRandoms.simba(120:10 ): Duplicate identifier 'R_GETWIDGET' at line 120

    Note: If you also use F_Randoms, you will get a duplicate identifier error with some of the functions, just open up Widgets.simba and take all of those functions out of F_Randoms.simba

    Instructions unclear, burnt house down.

    No seriously, I took the duplicate functions from widgets out of F antirandoms, but I must have taken other vital functions with it, because while have got my script running (Instead of giving me an error) it seems to miss random events that it used to clear flawlessly. I would appreciate it if somebody shed more light onto what it is that I'm supposed to change in these two scripts, because I must not have done a good job.
    Last edited by Stick1234; 06-28-2014 at 07:20 PM.

  25. #350
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat View Post
    Well R_GetObjectsDistance was working for game-objects, but I've fixed the other object hooks (mistake with the hook naming for wall/floor/boundary)..

    Latest update:
    Replaced BoundaryObject/Wall/Floor Main class hooks with the Tile_Boundary/Wall/Floor Hooks (Array of Boundary/Wall/Floor)
    Fixed NpcLevelDef Multiplier.
    All Object Functions should be working again.
    Thanks for all the work
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

Page 14 of 32 FirstFirst ... 4121314151624 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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
  •