Results 1 to 5 of 5

Thread: All AnyReflectArray.Sort will ommit recurring tile renderables

  1. #1
    Join Date
    Aug 2007
    Posts
    527
    Mentioned
    20 Post(s)
    Quoted
    262 Post(s)

    Default All AnyReflectArray.Sort will ommit recurring tile renderables

    It seems that .Sort will bug up if there are multiple entities on the same tile. This is especially on ground items and NPCs. Basically the sorted array will only return the top NPCs/objects/items of that tile, and nothing more.

    Also, TReflectObject.GetAt will Reflect.Mem.FreeObjects(ckGroundList, False); before the function is even returning the array to the user, so when the user .GetID, it will crash SMART.

    TReflectionGametab.Current does not work when Minigame, Zeah, Achievement Diaries, and worldswitcher is selected.

    TReflectLocalPlayer.Logout does not work when the worldswitcher is selected.

    TReflectionText.GetUpText may give simba an error when worlds switching or logging out as Result := Options[0] and Options[0] doesn't exist.

    TReflectionSmart.GetWorld doesn't get the recommended world as the between() returns '', and the Result := IntToStr(RandomRange(1, 78)); may return a non existent world.

    TReflectionChat.NpcChooseOption still doesn't work properly as it isn't checking all possible widgets for possible options.

    There is no TReflectLocalPlayer.GetName.

    TReflectLocalPlayer.FFlag can hang the entire script because of 'Timeout: Integer = -1' and 'Distance(Self.GetTile.X, Self.GetTile.Y, Self.GetDestination.X,
    Self.GetDestination.Y) > TileDist' always return true in some cases making the map walking procedures possibly haulting the entire script.

    There is no findJava() for TReflectionSmart.Create if 'java.exe' or 'javaw.exe' fails.

    Reflect.Login.LoginPlayer doesn't handle incorrect username and/or password as it was updated.

    There is no way for user input for a user agent for SMART.

    And finally, there is no child widget IDs in Globals.smart as they are found in where ever they are used. For example; LogoutWidget.GetWidget(Widget_Logout_Container, 6); is found at TReflectLocalPlayer.Logout;


    Most of these I have already semi-fixed in my functions but they should really be in the include for everyone.
    @Kyle; If I were to implement these fixes and changes, would you consider merging the changes?
    Please only contact me through SRL-Forums and through no other medium as that may not be me.

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

    Default

    Quote Originally Posted by ineedbot View Post
    ...
    OK cool, good reports. Yeah if you want to submit a pull request for them I will merge it. Just make sure the standards match the includes standards. If not, after I get done with exams in a week or so I'll take a look at 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

  3. #3
    Join Date
    Aug 2007
    Posts
    527
    Mentioned
    20 Post(s)
    Quoted
    262 Post(s)

    Default

    Quote Originally Posted by Kyle View Post
    OK cool, good reports. Yeah if you want to submit a pull request for them I will merge it. Just make sure the standards match the includes standards. If not, after I get done with exams in a week or so I'll take a look at them
    @Kyle;

    I finally did something: https://github.com/KyleHunter/OSR-Reflection/pull/105

    This is what I did (I think everything I did is documented here...)
    Code:
    [Reflection Update # 26]
    [Adds]
    Adds TReflectionInterface
    Adds TReflectionShop
    Adds TReflectionText.OptionExistsMulti and ChooseOptionMulti
    Adds TReflectInvItem.Interact
    Adds SmartUserAgent
    Adds Reflect.Antiban.HoverSkill
    Adds Reflect.Smart.getJavaPath
    Adds Reflect.Chat.doConversation
    Adds some depositbox functions and procedures to Bank.Simba and improvements
    Adds TReflectLocalPlayer.GetName
    Adds TReflectionGametab.ClickNorth
    Adds TReflectionInventory.CountQuantities
    Adds extra optional arguments to TReflectObjectArray.GetAll, TReflectInvItemArray.GetAll and TReflectionTiles.inPolygon
    
    [Fixes]
    Fixes TReflectLocalPlayer.SetRun to work when orbs is disabled
    Fixes Reflect.Text.GetUpText possible access violation
    Fixes Reflect.Smart.GetWorld to get a better world
    Fixes Reflect.Chat.NpcChooseOption to choose an option
    Fixes TReflectLocalPlayer.FFlag where it might hault entire script
    Fixes TReflectObject.GetAt where cache would be free'd before exiting the proc
    Fixes TReflectGameTab.Current to work with all tabs
    Fixes TReflectLocalPlayer.Logout to work when world switcher is selected
    
    [Changes]
    Changes all .Find and .Get and .Count functions to work with variant arrays
    Changes World to SmartWorld
    Changes TReflectWornEquipment to be more consitant with other item types
    Various house keeping with Globals.Simba and GetIndex, GetSlot
    
    [ToDo]
    Fix TReflectAnyArray.Sort ommitting recurring tile renderables
    Fix TReflectionTiles.inPolygon not including end tiles
    Update all definitions
    Fix TReflectionChat.GetChatIndices
    Add TReflectionBank deposit box functions to deposit items
    Add activate special attack
    Possibly add break handler and randoms handler
    [End]
    I kept to the include's standards and tried to make my code blend as much as possible.
    Please only contact me through SRL-Forums and through no other medium as that may not be me.

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

    Default

    Quote Originally Posted by ineedbot View Post
    @Kyle;

    I finally did something: https://github.com/KyleHunter/OSR-Reflection/pull/105

    This is what I did (I think everything I did is documented here...)
    Code:
    [Reflection Update # 26]
    [Adds]
    Adds TReflectionInterface
    Adds TReflectionShop
    Adds TReflectionText.OptionExistsMulti and ChooseOptionMulti
    Adds TReflectInvItem.Interact
    Adds SmartUserAgent
    Adds Reflect.Antiban.HoverSkill
    Adds Reflect.Smart.getJavaPath
    Adds Reflect.Chat.doConversation
    Adds some depositbox functions and procedures to Bank.Simba and improvements
    Adds TReflectLocalPlayer.GetName
    Adds TReflectionGametab.ClickNorth
    Adds TReflectionInventory.CountQuantities
    Adds extra optional arguments to TReflectObjectArray.GetAll, TReflectInvItemArray.GetAll and TReflectionTiles.inPolygon
    
    [Fixes]
    Fixes TReflectLocalPlayer.SetRun to work when orbs is disabled
    Fixes Reflect.Text.GetUpText possible access violation
    Fixes Reflect.Smart.GetWorld to get a better world
    Fixes Reflect.Chat.NpcChooseOption to choose an option
    Fixes TReflectLocalPlayer.FFlag where it might hault entire script
    Fixes TReflectObject.GetAt where cache would be free'd before exiting the proc
    Fixes TReflectGameTab.Current to work with all tabs
    Fixes TReflectLocalPlayer.Logout to work when world switcher is selected
    
    [Changes]
    Changes all .Find and .Get and .Count functions to work with variant arrays
    Changes World to SmartWorld
    Changes TReflectWornEquipment to be more consitant with other item types
    Various house keeping with Globals.Simba and GetIndex, GetSlot
    
    [ToDo]
    Fix TReflectAnyArray.Sort ommitting recurring tile renderables
    Fix TReflectionTiles.inPolygon not including end tiles
    Update all definitions
    Fix TReflectionChat.GetChatIndices
    Add TReflectionBank deposit box functions to deposit items
    Add activate special attack
    Possibly add break handler and randoms handler
    [End]
    I kept to the include's standards and tried to make my code blend as much as possible.
    Some of the funcs are camelCase not PascalCase
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

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

    Default

    Quote Originally Posted by ineedbot View Post
    @Kyle;

    I finally did something: https://github.com/KyleHunter/OSR-Reflection/pull/105

    This is what I did (I think everything I did is documented here...)
    Code:
    [Reflection Update # 26]
    [Adds]
    Adds TReflectionInterface
    Adds TReflectionShop
    Adds TReflectionText.OptionExistsMulti and ChooseOptionMulti
    Adds TReflectInvItem.Interact
    Adds SmartUserAgent
    Adds Reflect.Antiban.HoverSkill
    Adds Reflect.Smart.getJavaPath
    Adds Reflect.Chat.doConversation
    Adds some depositbox functions and procedures to Bank.Simba and improvements
    Adds TReflectLocalPlayer.GetName
    Adds TReflectionGametab.ClickNorth
    Adds TReflectionInventory.CountQuantities
    Adds extra optional arguments to TReflectObjectArray.GetAll, TReflectInvItemArray.GetAll and TReflectionTiles.inPolygon
    
    [Fixes]
    Fixes TReflectLocalPlayer.SetRun to work when orbs is disabled
    Fixes Reflect.Text.GetUpText possible access violation
    Fixes Reflect.Smart.GetWorld to get a better world
    Fixes Reflect.Chat.NpcChooseOption to choose an option
    Fixes TReflectLocalPlayer.FFlag where it might hault entire script
    Fixes TReflectObject.GetAt where cache would be free'd before exiting the proc
    Fixes TReflectGameTab.Current to work with all tabs
    Fixes TReflectLocalPlayer.Logout to work when world switcher is selected
    
    [Changes]
    Changes all .Find and .Get and .Count functions to work with variant arrays
    Changes World to SmartWorld
    Changes TReflectWornEquipment to be more consitant with other item types
    Various house keeping with Globals.Simba and GetIndex, GetSlot
    
    [ToDo]
    Fix TReflectAnyArray.Sort ommitting recurring tile renderables
    Fix TReflectionTiles.inPolygon not including end tiles
    Update all definitions
    Fix TReflectionChat.GetChatIndices
    Add TReflectionBank deposit box functions to deposit items
    Add activate special attack
    Possibly add break handler and randoms handler
    [End]
    I kept to the include's standards and tried to make my code blend as much as possible.
    Wow man, you really outdid yourself! Some changes are things I always wanted to do but never got around to. Just from looking on my phone, here's some things I would like you to change. If you can, I would really really like you to have each fix as a separate commit, and one pull total. It makes it much more documented on the include and easier to revert changes, especially with such a massive change. I like how you added the ".Get"s take a variant, but it will break current scripts. Make a second function just take a name/id to keep compatibility. Also, don't name the param "V", make it something the scriptwriter knows what it is. On the objects get/find you moved the order of the parameters around, that will also break scripts.

    From a quick look, that's what stuck out to me. Definitely try to remove the pull, and redo it will separate commits and I'll go through and comment on anything I see. But definitely nice work, some really good stuff in the!
    Oh and to Harriers point, there is a couple lines of camelCase, but overall with a change this big, it looks good to me.
    “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
  •