Page 20 of 32 FirstFirst ... 10181920212230 ... LastLast
Results 476 to 500 of 792

Thread: [OSR]Reflection Include

  1. #476
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default


    :S That's just wrappers. You can easily leak those and it's worse due to the fact that you store ALL the objects upon every call and never delete them per call, but only at the end of the script.

    If the script terminates abnormally during execution, you're going to have a problem. If the user stops the script and instead presses terminate because it's taking too long to stop, again you don't have "AddOnTerminate" running and all the objects allocated throughout the entire script leaks. If the script crashes or terminates abnormally/unexpectedly for any reason at all, this would be worse off than handling them on a per call basis.


    You're better off freeing the object on a per call basis. This way, if the script terminates unexpectedly, you leak at most 1 function's worth of allocations (whichever function was called last).


    Though, I don't think leaks in reflection are too much of a big deal seeing as the objects allocated are roughly 4 bytes in size.. Allocating for 24 hours straight, every 100ms, you'd leak at most 3.4mb or 3456000 bytes.
    Last edited by Brandon; 07-26-2014 at 09:55 PM.
    I am Ggzz..
    Hackintosher

  2. #477
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    Though, I don't think leaks in reflection are too much of a big deal seeing as the objects allocated are roughly 4 bytes in size.. Allocating for 24 hours straight, every 100ms, you'd leak at most 3.4mb or 3456000 bytes.
    Lol, I always wondered how there have been all these leaks yet no one gets out of memory errors. :P

  3. #478
    Join Date
    Mar 2012
    Posts
    201
    Mentioned
    8 Post(s)
    Quoted
    74 Post(s)

    Default

    Quote Originally Posted by Haxz View Post
    I hope I could just run an updater to update all the hooks every Thursday since its "update day"

    Krazy seems to me is a busy guy and he's not paid to do all these, so can't be active 24/7. I understand that but maybe he can have more people to help on the dev team and updates.
    I did have mine running 24/7 checking every 20 minutes but something always goes horribly wrong :/ (I.e. server crashes, class identifier breaks as there were drastic changes, internet goes down and fudges everything up) Basically the idea of constantly updating only works if you do it properly and have a VPS rather than running it on a raspberry pi haha

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

    Default

    Quote Originally Posted by Brandon View Post
    :S That's just wrappers. You can easily leak those and it's worse due to the fact that you store ALL the objects upon every call and never delete them per call, but only at the end of the script.

    If the script terminates abnormally during execution, you're going to have a problem. If the user stops the script and instead presses terminate because it's taking too long to stop, again you don't have "AddOnTerminate" running and all the objects allocated throughout the entire script leaks. If the script crashes or terminates abnormally/unexpectedly for any reason at all, this would be worse off than handling them on a per call basis.


    You're better off freeing the object on a per call basis. This way, if the script terminates unexpectedly, you leak at most 1 function's worth of allocations (whichever function was called last).


    Though, I don't think leaks in reflection are too much of a big deal seeing as the objects allocated are roughly 4 bytes in size.. Allocating for 24 hours straight, every 100ms, you'd leak at most 3.4mb or 3456000 bytes.
    Of course you are supposed to free them when you are done with them. That is obvious. I'm talking about forcing it to be the scripter that handles some of the objects, because it forces them to actually comprehend what their function calls are doing. For example, I find an npc and keep the pointer in variable x(some kind of TNPC type). I can then call x.getLocation(), without the overhead of searching for the npc in the global npc array using the index/hash/name/id/etc. This will make scripting things like models actually do-able, in access time and manipulation time.

  5. #480
    Join Date
    Mar 2012
    Posts
    201
    Mentioned
    8 Post(s)
    Quoted
    74 Post(s)

    Default

    Quote Originally Posted by tls View Post
    Of course you are supposed to free them when you are done with them. That is obvious. I'm talking about forcing it to be the scripter that handles some of the objects, because it forces them to actually comprehend what their function calls are doing. For example, I find an npc and keep the pointer in variable x(some kind of TNPC type). I can then call x.getLocation(), without the overhead of searching for the npc in the global npc array using the index/hash/name/id/etc. This will make scripting things like models actually do-able, in access time and manipulation time.
    This would be a brilliant idea. I had this idea a while back but I thought I would be shot down if I mentioned it :-D This will make the api more efficient and open up more possibilities for the scripter :-)

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

    Default

    Quote Originally Posted by fish1328 View Post
    This would be a brilliant idea. I had this idea a while back but I thought I would be shot down if I mentioned it :-D This will make the api more efficient and open up more possibilities for the scripter :-)
    Check out my existing include from 3 months ago: https://github.com/tlsdude/OSR-REF
    It's ok but I didn't plan some things out correctly and decided to scrap all but the smart overloads.

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

    Default

    Hey, are there any plans on completing the anti-randoms in reflection?

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

    Default

    Quote Originally Posted by Unfold View Post
    Hey, are there any plans on completing the anti-randoms in reflection?
    Till the new updater is finished, no. Once it is, I would assume the F_AntiRandoms will be added and everyone will start to update it
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  9. #484
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    BAAAAMMMMM! @R0b0t1;
    I have been summoned. Who needs insulting?
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  10. #485
    Join Date
    Mar 2012
    Posts
    201
    Mentioned
    8 Post(s)
    Quoted
    74 Post(s)

    Default

    May I suggest that if we are to completely re-write this we do so using proper notation, put methods in the correct place (R_getPlane should be in client) and object oriented style. I.e. There should be a record for TActor, within both TNPC and TPlayer there should be a field corresponding to the TActor super class which holds all the methods that relate to both of these subclass records (I.e. the methods that use the actor hooks). What I'm trying to say is that it would make scripting far easier if the include was written with the same structural hierarchy as runescape itself

  11. #486
    Join Date
    Mar 2012
    Posts
    201
    Mentioned
    8 Post(s)
    Quoted
    74 Post(s)

    Default

    If you want my new hooks (Widget_getActionType and Widget_getType broke along with Client_DestinationX and Client_DestinationY). I will be re-writing my updater soon as it currently doesn't deob vigorously enough; will probably use my self learning class identifier that I have made for my new RS3 updater.

    Simba Code:
    { 248 Hooks Found By Cheddys Beautiful Updater }

    const
    ReflectionRevision = 56;


        {* Boundary - 9 Hooks *}
        Boundary = 'cn';
            Boundary_getAlternativeOrientation = 'x';
            Boundary_getAlternativeOrientation_Multiplier = -937040557;
            Boundary_getBackupRenderable = 'q';
            Boundary_getFlags = 'm';
            Boundary_getFlags_Multiplier = 484123147;
            Boundary_getID = 'l';
            Boundary_getID_Multiplier = 527163423;
            Boundary_getOrientation = 'g';
            Boundary_getOrientation_Multiplier = -252173309;
            Boundary_getPlane = 'e';
            Boundary_getPlane_Multiplier = -1690874541;
            Boundary_getRenderable = 'b';
            Boundary_getX = 'v';
            Boundary_getX_Multiplier = 775213857;
            Boundary_getY = 'i';
            Boundary_getY_Multiplier = 289649599;

        {* Cache - 3 Hooks *}
        Cache = 'fo';
            Cache_getCacheableNode = 'e';
            Cache_getHashTable = 'g';
            Cache_getQueue = 'x';

        {* CacheableNode - 2 Hooks *}
        CacheableNode = 'fa';
            CacheableNode_getNext = 'cf';
            CacheableNode_getPrevious = 'cb';

        {* Canvas - 1 Hooks *}
        Canvas = 'dt';
            Canvas_getComponent = 'e';

        {* Character - 18 Hooks *}
        Character = 'ap';
            Character_getAnimation = 'ab';
            Character_getAnimation_Multiplier = -664286735;
            Character_getCycle = 'az';
            Character_getCycle_Multiplier = -656228191;
            Character_getHealth = 'au';
            Character_getHealth_Multiplier = -1164683157;
            Character_getHitCycles = 'ar';
            Character_getHitDamages = 'at';
            Character_getHitTypes = 'aw';
            Character_getInteractingIndex = 'ad';
            Character_getInteractingIndex_Multiplier = -260494153;
            Character_getMaxHealth = 'ai';
            Character_getMaxHealth_Multiplier = -1084415617;
            Character_getOrientation = 'bm';
            Character_getOrientation_Multiplier = 2079985171;
            Character_getOverheadText = 'ah';
            Character_getPositionOffset = 'n';
            Character_getPositionOffset_Multiplier = 1540541504;
            Character_getQueueLength = 'ba';
            Character_getQueueLength_Multiplier = 1583408165;
            Character_getQueueTraversed = 'bt';
            Character_getQueueX = 'br';
            Character_getQueueY = 'bj';
            Character_getX = 'o';
            Character_getX_Multiplier = 1863804961;
            Character_getY = 'r';
            Character_getY_Multiplier = 598559599;
            Character_isInSequence = 'k';

        {* ClassData - 3 Hooks *}
        ClassData = 'gs';
            ClassData_getBytes = 'l';
            ClassData_getFields = 'x';
            ClassData_getMethods = 'q';

        {* Client - 55 Hooks *}
        Client = 'client';
            Client_getBaseX = 'client.ci';
            Client_getBaseX_Multiplier = 1926356683;
            Client_getBaseY = 'fj.cm';
            Client_getBaseY_Multiplier = -1886502923;
            Client_getCameraPitch = 'da.fn';
            Client_getCameraPitch_Multiplier = -1057472213;
            Client_getCameraX = 'co.fs';
            Client_getCameraX_Multiplier = 1664538849;
            Client_getCameraY = 'i.fd';
            Client_getCameraY_Multiplier = 1289362003;
            Client_getCameraYaw = 'x.fz';
            Client_getCameraYaw_Multiplier = 1999047161;
            Client_getCameraZ = 'u.fw';
            Client_getCameraZ_Multiplier = 210529351;
            Client_getClient = 'client.v';
            Client_getCollisionMaps = 'client.w';
            Client_getCurrentLevels = 'client.hu';
            Client_getCurrentPointsX = 'cz.ay';
            Client_getCurrentPointsY = 'cz.af';
            Client_getCurrentViewX = 'cz.aj';
            Client_getCurrentViewY = 'cz.aw';
            Client_getCurrentViewZ = 'cz.at';
            Client_getEnergy = 'client.je';
            Client_getEnergy_Multiplier = -1988956557;
            Client_getExperiences = 'client.hj';
            Client_getGameCycle = 'client.d';
            Client_getGameCycle_Multiplier = 1929541161;
            Client_getGameState = 'client.j';
            Client_getGameState_Multiplier = 998026257;
            Client_getGroundItems = 'client.hc';
            Client_getLocalNPCs = 'client.bj';
            Client_getLocalPlayer = 'f.hb';
            Client_getLocalPlayers = 'client.gz';
            Client_getLoginState = 'ao.ap';
            Client_getLoginState_Multiplier = 1404256151;
            Client_getLowestCameraPitch = 'client.fh';
            Client_getLowestCameraPitch_Multiplier = 772568593;
            Client_getMapAngle = 'client.fp';
            Client_getMapAngle_Multiplier = 874203131;
            Client_getMapOffset = 'client.de';
            Client_getMapOffset_Multiplier = -334762247;
            Client_getMapScale = 'client.dm';
            Client_getMapScale_Multiplier = -1281832857;
            Client_getMaxLevels = 'client.hm';
            Client_getMenuActions = 'client.ik';
            Client_getMenuCount = 'client.im';
            Client_getMenuCount_Multiplier = -1513516277;
            Client_getMenuHeight = 'd.iy';
            Client_getMenuHeight_Multiplier = 2132142411;
            Client_getMenuOptions = 'client.ip';
            Client_getMenuWidth = 'cd.if';
            Client_getMenuWidth_Multiplier = 726557981;
            Client_getMenuX = 'cv.hd';
            Client_getMenuX_Multiplier = 658216925;
            Client_getMenuY = 'ad.hl';
            Client_getMenuY_Multiplier = 815311505;
            Client_getMouseX = 'dq.g';
            Client_getMouseX_Multiplier = -1050677781;
            Client_getMouseY = 'dq.b';
            Client_getMouseY_Multiplier = 1333315363;
            Client_getNPCIndices = 'client.bu';
            Client_getPassword = 'ao.aq';
            Client_getPlane = 'eb.hf';
            Client_getPlane_Multiplier = -1018405511;
            Client_getPlayerSettings = 'en.v';
            Client_getRegion = 'g.df';
            Client_getTileHeights = 'b.e';
            Client_getTileSettings = 'b.v';
            Client_getUsername = 'ao.af';
            Client_getWeight = 'client.jx';
            Client_getWeight_Multiplier = -1141465513;
            Client_getWidgetHeights = 'client.lz';
            Client_getWidgetNodeTable = 'client.jz';
            Client_getWidgetPositionsX = 'client.lp';
            Client_getWidgetPositionsY = 'client.lg';
            Client_getWidgets = 'ex.e';
            Client_getWidgetSettings = 'en.i';
            Client_getWidgetWidths = 'client.ll';
            Client_isMenuOpen = 'client.hv';

        {* CollisionMap - 5 Hooks *}
        CollisionMap = 'gb';
            CollisionMap_getFlags = 'ac';
            CollisionMap_getHeight = 'av';
            CollisionMap_getHeight_Multiplier = 36001403;
            CollisionMap_getOffsetX = 'ao';
            CollisionMap_getOffsetX_Multiplier = -1196359135;
            CollisionMap_getOffsetY = 'am';
            CollisionMap_getOffsetY_Multiplier = 1900422479;
            CollisionMap_getWidth = 'z';
            CollisionMap_getWidth_Multiplier = 561162925;

        {* FloorDecoration - 6 Hooks *}
        FloorDecoration = 'ch';
            FloorDecoration_getFlags = 'b';
            FloorDecoration_getFlags_Multiplier = -1600600389;
            FloorDecoration_getID = 'x';
            FloorDecoration_getID_Multiplier = -951274947;
            FloorDecoration_getPlane = 'e';
            FloorDecoration_getPlane_Multiplier = -1391409611;
            FloorDecoration_getRenderable = 'g';
            FloorDecoration_getX = 'v';
            FloorDecoration_getX_Multiplier = -167860585;
            FloorDecoration_getY = 'i';
            FloorDecoration_getY_Multiplier = -849579211;

        {* HashTable - 5 Hooks *}
        HashTable = 'fx';
            HashTable_getCurrent = 'g';
            HashTable_getHead = 'i';
            HashTable_getIndex = 'x';
            HashTable_getIndex_Multiplier = 1;
            HashTable_getNodes = 'v';
            HashTable_getSize = 'e';
            HashTable_getSize_Multiplier = 1;

        {* Item - 2 Hooks *}
        Item = 'n';
            Item_getID = 'e';
            Item_getID_Multiplier = -1341638203;
            Item_getStackSize = 'v';
            Item_getStackSize_Multiplier = 238113971;

        {* ItemComposite - 9 Hooks *}
        ItemComposite = 'ai';
            ItemComposite_getGroundActions = 'k';
            ItemComposite_getModelColours = 's';
            ItemComposite_getModelSizeX = 'ar';
            ItemComposite_getModelSizeX_Multiplier = 725725615;
            ItemComposite_getModelSizeY = 'az';
            ItemComposite_getModelSizeY_Multiplier = -2135039455;
            ItemComposite_getModelSizeZ = 'au';
            ItemComposite_getModelSizeZ_Multiplier = 332877193;
            ItemComposite_getName = 'u';
            ItemComposite_getNewModelColours = 'f';
            ItemComposite_getWidgetActions = 'n';
            ItemComposite_isMembers = 't';

        {* ItemLayer - 8 Hooks *}
        ItemLayer = 'cs';
            ItemLayer_getBottomRenderable = 'g';
            ItemLayer_getHeight = 'l';
            ItemLayer_getHeight_Multiplier = -2104003827;
            ItemLayer_getID = 'q';
            ItemLayer_getID_Multiplier = -1822308849;
            ItemLayer_getMiddleRenderable = 'x';
            ItemLayer_getPlane = 'e';
            ItemLayer_getPlane_Multiplier = 628016659;
            ItemLayer_getTopRenderable = 'b';
            ItemLayer_getX = 'v';
            ItemLayer_getX_Multiplier = 252390051;
            ItemLayer_getY = 'i';
            ItemLayer_getY_Multiplier = 1590436751;

        {* LinkedList - 2 Hooks *}
        LinkedList = 'fc';
            LinkedList_getHead = 'e';
            LinkedList_getTail = 'v';

        {* Model - 14 Hooks *}
        Model = 'cz';
            Model_getIndicesLength = 'm';
            Model_getIndicesLength_Multiplier = 1;
            Model_getIndicesX = 'u';
            Model_getIndicesY = 's';
            Model_getIndicesZ = 'f';
            Model_getTexturedIndicesX = 'p';
            Model_getTexturedIndicesY = 'w';
            Model_getTexturedIndicesZ = 'y';
            Model_getTexturedVerticesX = 'r';
            Model_getTexturedVerticesY = 't';
            Model_getTexturedVerticesZ = 'k';
            Model_getVerticesLength = 'x';
            Model_getVerticesLength_Multiplier = 1;
            Model_getVerticesX = 'b';
            Model_getVerticesY = 'q';
            Model_getVerticesZ = 'l';

        {* Mouse - 0 Hooks *}
        Mouse = 'dq';

        {* Node - 3 Hooks *}
        Node = 'gc';
            Node_getNext = 'eh';
            Node_getPrevious = 'et';
            Node_getUID = 'de';

        {* NPC - 1 Hooks *}
        NPC = 'ac';
            NPC_getComposite = 'e';

        {* NPCComposite - 4 Hooks *}
        NPCComposite = 'an';
            NPCComposite_getActions = 'o';
            NPCComposite_getID = 'x';
            NPCComposite_getID_Multiplier = -698898793;
            NPCComposite_getLevel = 't';
            NPCComposite_getLevel_Multiplier = 546828601;
            NPCComposite_getName = 'b';

        {* ObjectComposite - 14 Hooks *}
        ObjectComposite = 'ay';
            ObjectComposite_getActions = 'am';
            ObjectComposite_getAnimation = 'n';
            ObjectComposite_getAnimation_Multiplier = 775807469;
            ObjectComposite_getID = 'm';
            ObjectComposite_getID_Multiplier = 162233577;
            ObjectComposite_getModelColours = 'h';
            ObjectComposite_getModelSizeX = 'ah';
            ObjectComposite_getModelSizeX_Multiplier = 1835626283;
            ObjectComposite_getModelSizeY = 'an';
            ObjectComposite_getModelSizeY_Multiplier = -759918767;
            ObjectComposite_getModelSizeZ = 'ay';
            ObjectComposite_getModelSizeZ_Multiplier = 2056296707;
            ObjectComposite_getModifiedModelColours = 'y';
            ObjectComposite_getName = 'f';
            ObjectComposite_getSizeX = 'j';
            ObjectComposite_getSizeX_Multiplier = -350214567;
            ObjectComposite_getSizeY = 'c';
            ObjectComposite_getSizeY_Multiplier = -1891926785;
            ObjectComposite_getTranslateX = 'ah';
            ObjectComposite_getTranslateX_Multiplier = 1835626283;
            ObjectComposite_getTranslateY = 'an';
            ObjectComposite_getTranslateY_Multiplier = -759918767;
            ObjectComposite_getTranslateZ = 'ay';
            ObjectComposite_getTranslateZ_Multiplier = 2056296707;

        {* Player - 3 Hooks *}
        Player = 'i';
            Player_getCombatLevel = 'x';
            Player_getCombatLevel_Multiplier = 1267881449;
            Player_getModel = 'p';
            Player_getName = 'e';

        {* Projectile - 17 Hooks *}
        Projectile = 'q';
            Projectile_getCycle = 'l';
            Projectile_getCycle_Multiplier = -201790113;
            Projectile_getHeight = 'x';
            Projectile_getHeight_Multiplier = 1442529535;
            Projectile_getHeightOffset = 'a';
            Projectile_getRotationX = 'o';
            Projectile_getRotationX_Multiplier = -1695650567;
            Projectile_getRotationY = 'r';
            Projectile_getRotationY_Multiplier = 58041145;
            Projectile_getScalar = 'c';
            Projectile_getSlope = 'm';
            Projectile_getSlope_Multiplier = -166938597;
            Projectile_getSpeedX = 'h';
            Projectile_getSpeedY = 'j';
            Projectile_getSpeedZ = 'd';
            Projectile_getStartX = 'i';
            Projectile_getStartX_Multiplier = 1684595455;
            Projectile_getStartY = 'g';
            Projectile_getStartY_Multiplier = 394443799;
            Projectile_getTargetDistance = 'u';
            Projectile_getTargetDistance_Multiplier = 2048319353;
            Projectile_getTargetID = 's';
            Projectile_getTargetID_Multiplier = 1164776619;
            Projectile_getX = 'p';
            Projectile_getY = 'w';
            Projectile_isMoving = 'f';

        {* Queue - 1 Hooks *}
        Queue = 'fi';
            Queue_getHead = 'e';

        {* Region - 2 Hooks *}
        Region = 'cj';
            Region_getGroundObjects = 'm';
            Region_getGroundTiles = 'b';

        {* Renderable - 1 Hooks *}
        Renderable = 'bu';
            Renderable_getHeight = 'cn';
            Renderable_getHeight_Multiplier = -1487602713;

        {* SceneObject - 12 Hooks *}
        SceneObject = 'cx';
            SceneObject_getFlags = 'w';
            SceneObject_getFlags_Multiplier = 370079205;
            SceneObject_getID = 'p';
            SceneObject_getID_Multiplier = -678823417;
            SceneObject_getOffsetX = 'l';
            SceneObject_getOffsetX_Multiplier = 1301598393;
            SceneObject_getOffsetY = 'u';
            SceneObject_getOffsetY_Multiplier = 627714753;
            SceneObject_getOrientation = 'b';
            SceneObject_getOrientation_Multiplier = 1223886039;
            SceneObject_getPlane = 'e';
            SceneObject_getPlane_Multiplier = 545832231;
            SceneObject_getRelativeX = 'q';
            SceneObject_getRelativeX_Multiplier = -663829119;
            SceneObject_getRelativeY = 'm';
            SceneObject_getRelativeY_Multiplier = 131709373;
            SceneObject_getRenderable = 'x';
            SceneObject_getX = 'i';
            SceneObject_getX_Multiplier = -691439605;
            SceneObject_getY = 'g';
            SceneObject_getY_Multiplier = 183837179;
            SceneObject_getZ = 'v';
            SceneObject_getZ_Multiplier = 2067512927;

        {* Stream - 2 Hooks *}
        Stream = 'dk';
            Stream_getOffset = 'v';
            Stream_getOffset_Multiplier = -1354992167;
            Stream_getPayload = 'e';

        {* StringStorage - 0 Hooks *}
        StringStorage = 'ep';

        {* Tile - 8 Hooks *}
        Tile = 'ca';
            Tile_getBoundary = 'q';
            Tile_getFloorDecoration = 'm';
            Tile_getItemLayer = 'u';
            Tile_getPlane = 'g';
            Tile_getPlane_Multiplier = 547928651;
            Tile_getRSObjects = 'f';
            Tile_getWall = 'l';
            Tile_getX = 'v';
            Tile_getX_Multiplier = 764314491;
            Tile_getY = 'i';
            Tile_getY_Multiplier = -1401052379;

        {* Wall - 11 Hooks *}
        Wall = 'ck';
            Wall_getBackupRenderable = 'm';
            Wall_getFlags = 's';
            Wall_getFlags_Multiplier = -506221315;
            Wall_getHeight = 'x';
            Wall_getHeight_Multiplier = 1338837553;
            Wall_getID = 'u';
            Wall_getID_Multiplier = -334757297;
            Wall_getOrientation = 'g';
            Wall_getOrientation_Multiplier = -847305749;
            Wall_getPlane = 'e';
            Wall_getPlane_Multiplier = 624801845;
            Wall_getRelativeX = 'b';
            Wall_getRelativeX_Multiplier = -1589564543;
            Wall_getRelativeY = 'q';
            Wall_getRelativeY_Multiplier = -1421118309;
            Wall_getRenderable = 'l';
            Wall_getX = 'v';
            Wall_getX_Multiplier = -1484786817;
            Wall_getY = 'i';
            Wall_getY_Multiplier = 2065878649;

        {* Widget - 26 Hooks *}
        Widget = 'ex';
            Widget_getActions = 'bi';
            Widget_getWidth = 'o';
            Widget_getWidth_Multiplier = 92871183;
            Widget_getBorderThickness = 'at';
            Widget_getBorderThickness_Multiplier = -2118347447;
            Widget_getBoundsIndex = 'dq';
            Widget_getBoundsIndex_Multiplier = 1496016673;
            Widget_getChildren = 'dp';
            Widget_getContentIDs = 'dh';
            Widget_getID = 'p';
            Widget_getID_Multiplier = 628348239;
            Widget_getIndex = 'w';
            Widget_getIndex_Multiplier = -1843358029;
            Widget_getItemID = 'db';
            Widget_getItemID_Multiplier = 1802203577;
            Widget_getItemStack = 'di';
            Widget_getItemStack_Multiplier = -82348753;
            Widget_getName = 'da';
            Widget_getOpcodes = 'dw';
            Widget_getParent = 'ba';
            Widget_getParentID = 't';
            Widget_getParentID_Multiplier = -2032118225;
            Widget_getRelativeX = 'y';
            Widget_getRelativeX_Multiplier = 432723653;
            Widget_getRelativeY = 'a';
            Widget_getRelativeY_Multiplier = 1728909731;
            Widget_getScrollX = 'n';
            Widget_getScrollX_Multiplier = -637248725;
            Widget_getScrollY = 'z';
            Widget_getScrollY_Multiplier = 1586549073;
            Widget_getSpritesX = 'bk';
            Widget_getSpritesY = 'bq';
            Widget_getStackSizes = 'df';
            Widget_getText = 'bd';
            Widget_getHeight = 'r';
            Widget_getHeight_Multiplier = 866589371;
            Widget_getX = 'd';
            Widget_getX_Multiplier = 598700569;
            Widget_getY = 'x';
            Widget_getY_Multiplier = -1267767979;
            Widget_isHidden = 'k';

        {* WidgetNode - 1 Hooks *}
        WidgetNode = 'g';
            WidgetNode_getID = 'e';
            WidgetNode_getID_Multiplier = 1490475817;

  12. #487
    Join Date
    Feb 2014
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    when the update is comming?

  13. #488
    Join Date
    Apr 2012
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Is there any update incoming? I'd love to test out a script.

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

    Default

    Frement's LAPE include has been on GitHub for ages now, I don't have enough arms to update this include, work on a new updater, maintain hooks and also re-write everything with documentation ok. Anyone impatient about a re-write is welcome to finish it.
    Last edited by Krazy_Meerkat; 08-02-2014 at 05:11 AM.

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

    Default

    I am not going to work on Frement's include.

  16. #491
    Join Date
    Apr 2012
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat View Post
    Frement's LAPE include has been on GitHub for ages now, I don't have enough arms to update this include, work on a new updater, maintain hooks and also re-write everything with documentation ok. Anyone impatient about a re-write is welcome to finish it.
    Great job Krazy! I didn't want to come over as a leacher that keeps begging for stuff.
    I'm trying to learn programming for Simba now, so who knows one day I can help..

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

    Default

    Soo, is anyone developing any of their own forks of reflection? I was thinking of making something of my own. (from looking off reflection-2's) Try and port all the code to a useable form for OSRS. Thanks to Cheddy's hooks, I will try make use of the all. idk if my fork will be as good as others, but I'll definitely try.

    It'll be good practice as I like learn new things.

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

    Default

    Quote Originally Posted by ineedbot View Post
    Soo, is anyone developing any of their own forks of reflection? I was thinking of making something of my own. (from looking off reflection-2's) Try and port all the code to a useable form for OSRS. Thanks to Cheddy's hooks, I will try make use of the all. idk if my fork will be as good as others, but I'll definitely try.

    It'll be good practice as I like learn new things.
    I am. Working on making it pretty from the bottom up.

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

    Default

    Quote Originally Posted by tls View Post
    I am. Working on making it pretty from the bottom up.
    Sweet, I cant wait to see it complete!

    So far I came up with this
    Simba Code:
    type TRSPlayer = record
      Name, OverheadText : String;
      Level, CurrentHP, MaxHP, Animation, Interacting, Orientation, Plane : Integer;
      InCombat : boolean;
      Tile, TileWalkQueue : TPoint;
    end;
    TRSPlayerArray = array of TRSPlayer;  

    function R_GetAllRSPlayers: TRSPlayerArray;
    var
      i, j, PlayerCount, Ref, PlayerName, Overhead, x, y, LoopCycle : Integer;
    begin
      PlayerCount := SmartGetFieldArraySize(SmartCurrentTarget, 0, Client_getLocalPlayers, 0);
      for i:=0 to PlayerCount-1 do begin
        Ref := SmartGetFieldArrayObject(SmartCurrentTarget, 0, Client_getLocalPlayers, i);

        if (Ref <= 0) then
          Continue;
        Inc(j);
        SetLength(Result, j);

        PlayerName := SmartGetFieldObject(SmartCurrentTarget, Ref, Player_getName);
        Overhead := SmartGetFieldObject(SmartCurrentTarget, Ref, Character_getOverheadText);
        x := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getBaseX)*Client_getBaseX_Multiplier;
        y := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getBaseY)*Client_getBaseY_Multiplier;
        LoopCycle := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getGameCycle)*Client_getGameCycle_Multiplier;
        with Result[j-1] do begin
          Level := SmartGetFieldInt(SmartCurrentTarget, Ref, Player_getCombatLevel)*Player_getCombatLevel_Multiplier;
          CurrentHP := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getHealth)*Character_getHealth_Multiplier;
          MaxHP := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getMaxHealth)*Character_getMaxHealth_Multiplier;
          Animation := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getAnimation)*Character_getAnimation_Multiplier;
          Interacting := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getInteractingIndex)*Character_getInteractingIndex_Multiplier;
          Orientation := Round(FixD(180 + (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getOrientation)*Character_getOrientation_Multiplier*45)/2048));
          Plane := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getPlane)*Client_getPlane_Multiplier; //uses client's plane it was found on...
          Name := R_GetJavaString(PlayerName, 512);
          OverheadText := R_GetJavaString(Overhead, 512);
          InCombat := (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getCycle) * Character_getCycle_Multiplier) > LoopCycle;
          Tile := Point(x + (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getX) * Character_getX_Multiplier) div 128, y + (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getY) * Character_getY_Multiplier) div 128);
          TileWalkQueue := Point(SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getQueueX), SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getQueueY));
        end;
        SmartFreeObject(SmartCurrentTarget, PlayerName);
        SmartFreeObject(SmartCurrentTarget, Ref);
        SmartFreeObject(SmartCurrentTarget, Overhead);
      end;
    end;

    All the hooks work and everything is accurate, however CurrentHP and MaxHP return 0 for some reason. Also I'm unsure if TileWalkQueue is doing anything. Only returning (-1, -1)...

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

    Default

    If its -1,-1 then they aren't walking anywhere. God we were so inefficient.

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

    Default

    Well I made some more progress...
    Simba Code:
    type TRSNPC = record
      Name, OverheadText : String;
      Actions : TStringArray;
      ID, Index, Level, CurrentHP, MaxHP, Animation, Interacting, Orientation, Plane : Integer;
      InCombat : boolean;
      Tile, TileWalkQueue : TRSTile;
    end;
    TRSNPCArray = array of TRSNPC;  

    function R_GetRSNPCActions(NPC_Comp:Integer):TStringArray;
    var i, j, actionCount, _string : integer;
    begin
      ActionCount := SmartGetFieldArraySize(SmartCurrentTarget, NPC_Comp, NPCComposite_getActions, 0);
      for i:=0 to ActionCount do begin
        _string := SmartGetFieldArrayObject(SmartCurrentTarget, NPC_Comp, NPCComposite_getActions, i);
        if(_string <= 0)then
          continue;
        inc(j);
        SetLength(Result, j);
        result[j-1] := trim(R_GetJavaString(_string, 512));
        SmartFreeObject(SmartCurrentTarget, _string);
      end;
    end;

    function R_GetAllRSNPCs: TRSNPCArray;
    var
      i, j, NPCCount, Ref, Def, NPCName, Overhead, x, y, LoopCycle : Integer;
    begin
      NPCCount := SmartGetFieldArraySize(SmartCurrentTarget, 0, Client_getLocalNPCs, 0);
      for i:=0 to NPCCount-1 do begin
        Ref := SmartGetFieldArrayObject(SmartCurrentTarget, 0, Client_getLocalNPCs, i);
        if (Ref <= 0) then
          Continue;
        Def := SmartGetFieldObject(SmartCurrentTarget, Ref, NPC_getComposite);

        Inc(j);
        SetLength(Result, j);

        NPCName := SmartGetFieldObject(SmartCurrentTarget, Def, NPCComposite_getName);
        Overhead := SmartGetFieldObject(SmartCurrentTarget, Ref, Character_getOverheadText);
        x := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getBaseX)*Client_getBaseX_Multiplier;
        y := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getBaseY)*Client_getBaseY_Multiplier;
        LoopCycle := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getGameCycle)*Client_getGameCycle_Multiplier;
        with Result[j-1] do begin
          Actions := R_GetRSNPCActions(Def);
          Plane := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getPlane)*Client_getPlane_Multiplier; //uses client's plane it was found on...
          Interacting := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getInteractingIndex)*Character_getInteractingIndex_Multiplier;
          Orientation := Round(FixD(180 + (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getOrientation)*Character_getOrientation_Multiplier*45)/2048));
          CurrentHP := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getHealth)*Character_getHealth_Multiplier;
          MaxHP := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getMaxHealth)*Character_getMaxHealth_Multiplier;
          Level := SmartGetFieldInt(SmartCurrentTarget, Def, NPCComposite_getLevel) * NPCComposite_getLevel_Multiplier;;
          InCombat := (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getCycle) * Character_getCycle_Multiplier) > LoopCycle;
          Tile := Point(x + (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getX) * Character_getX_Multiplier) div 128, y + (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getY) * Character_getY_Multiplier) div 128);
          TileWalkQueue := Point(SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getQueueX), SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getQueueY));
          Index := i;
          Name := trim(R_GetJavaString(NPCName, 512));
          OverheadText := trim(R_GetJavaString(Overhead, 512));
          Animation:= SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getAnimation)  * Character_getAnimation_Multiplier;
          ID := SmartGetFieldInt(SmartCurrentTarget, Def, NPCComposite_getID) * NPCComposite_getID_Multiplier;
        end;
        SmartFreeObject(SmartCurrentTarget, NPCName);
        SmartFreeObject(SmartCurrentTarget, Ref);
        SmartFreeObject(SmartCurrentTarget, Def);
        SmartFreeObject(SmartCurrentTarget, Overhead);
      end;
    end;

    EDIT:
    After banning like 10 mules I made in 10 seconds while using OSBot for its interface explorer. I finally got what widget and child IDs are for the equipment tab.

    Simba Code:
    function R_GetRSEquipItemAtSlot(_Slot:integer):TRSEquipItem;
    var
      _Equipment, _Inventory, _InventorySlot, _ItemID, _ItemQuantity, j{, _Name}: Integer;
      _items : TRSEquipItemArray;
    begin
      GameTab(tab_Equip);
      _Equipment := R_GetWidgetChildRef(387, _Slot);//_slot can be between 6 and 16
      for _InventorySlot := 0 to 2 do begin
        _Inventory := SmartGetFieldArrayObject(SmartCurrentTarget, _Equipment, Widget_getChildren, _InventorySlot);
        _ItemID := SmartGetFieldInt(SmartCurrentTarget, _Inventory, Widget_getItemID)*Widget_getItemID_Multiplier;
          inc(j);
          SetLength(_items, j);
          _ItemQuantity := SmartGetFieldInt(SmartCurrentTarget, _Inventory, Widget_getItemStack)*Widget_getItemStack_Multiplier;
          //_Name := SmartGetFieldArrayObject(SmartCurrentTarget, _Inventory, Widget_getName, _InventorySlot);
          with _items[j-1] do begin
            ID := _ItemID;
            StackSize := _ItemQuantity;
            Slot := _Slot;
            //Name := Trim(R_GetJavaString(_Name, 512));
            //Actions := R_GetRSInvItemActions(_Inventory, _InventorySlot);
          end;
        //SmartFreeObject(SmartCurrentTarget, _Name);
      end;
      SmartFreeObject(SmartCurrentTarget, _Inventory);
      result := Null_RSEquipItem;
      for j:=0 to high(_items) do begin
        if (_items[j].ID > 0)then begin
          result := _items[j];
        end;
      end;
    end;
    Code is really half-assed right now, but its a start.
    Couple problems, it only 'updates' the widget when the tab is current selected (known since Reflection-2), small problem but its ok...

    But one big problem is, it cannot detect null slots. Only if they were null'd to begin with. Say you start off with an axe in the weapon slot, then remove it from the slot, reflection will still say that the item is still in that slot until you equip a differ item in that slot...


    EDIT2:
    Thread/forum is really dead... Anyway, I'm completing my include... Everything is working just fine. All I have to do left is antirandoms. I have the majority of the antirandoms working, like molly and prison. However I need testing... If anyone can donate an account stuck in a random, shoot me a PM. I'll only use for antirandom development.


    Oh yeah, if any1 has the NPCComposite_getHeight hook and multiplier for this current osrs rev can you please send me it? I need it to check the strange plant's height for when its able to be 'picked'.

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

    Default

    If anyone else wants to post about their own includes they can do it elsewhere.

    I'm updating the hooks, as usual let me know if there are any issues..
    Last edited by Krazy_Meerkat; 08-16-2014 at 06:09 AM.

  23. #498
    Join Date
    Sep 2013
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    20 Post(s)

    Default

    Thanks for the update. I appreciate it.

  24. #499
    Join Date
    Mar 2012
    Posts
    201
    Mentioned
    8 Post(s)
    Quoted
    74 Post(s)

    Default

    Quote Originally Posted by ineedbot View Post
    Sweet, I cant wait to see it complete!

    So far I came up with this
    Simba Code:
    type TRSPlayer = record
      Name, OverheadText : String;
      Level, CurrentHP, MaxHP, Animation, Interacting, Orientation, Plane : Integer;
      InCombat : boolean;
      Tile, TileWalkQueue : TPoint;
    end;
    TRSPlayerArray = array of TRSPlayer;  

    function R_GetAllRSPlayers: TRSPlayerArray;
    var
      i, j, PlayerCount, Ref, PlayerName, Overhead, x, y, LoopCycle : Integer;
    begin
      PlayerCount := SmartGetFieldArraySize(SmartCurrentTarget, 0, Client_getLocalPlayers, 0);
      for i:=0 to PlayerCount-1 do begin
        Ref := SmartGetFieldArrayObject(SmartCurrentTarget, 0, Client_getLocalPlayers, i);

        if (Ref <= 0) then
          Continue;
        Inc(j);
        SetLength(Result, j);

        PlayerName := SmartGetFieldObject(SmartCurrentTarget, Ref, Player_getName);
        Overhead := SmartGetFieldObject(SmartCurrentTarget, Ref, Character_getOverheadText);
        x := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getBaseX)*Client_getBaseX_Multiplier;
        y := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getBaseY)*Client_getBaseY_Multiplier;
        LoopCycle := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getGameCycle)*Client_getGameCycle_Multiplier;
        with Result[j-1] do begin
          Level := SmartGetFieldInt(SmartCurrentTarget, Ref, Player_getCombatLevel)*Player_getCombatLevel_Multiplier;
          CurrentHP := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getHealth)*Character_getHealth_Multiplier;
          MaxHP := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getMaxHealth)*Character_getMaxHealth_Multiplier;
          Animation := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getAnimation)*Character_getAnimation_Multiplier;
          Interacting := SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getInteractingIndex)*Character_getInteractingIndex_Multiplier;
          Orientation := Round(FixD(180 + (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getOrientation)*Character_getOrientation_Multiplier*45)/2048));
          Plane := SmartGetFieldInt(SmartCurrentTarget, 0, Client_getPlane)*Client_getPlane_Multiplier; //uses client's plane it was found on...
          Name := R_GetJavaString(PlayerName, 512);
          OverheadText := R_GetJavaString(Overhead, 512);
          InCombat := (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getCycle) * Character_getCycle_Multiplier) > LoopCycle;
          Tile := Point(x + (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getX) * Character_getX_Multiplier) div 128, y + (SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getY) * Character_getY_Multiplier) div 128);
          TileWalkQueue := Point(SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getQueueX), SmartGetFieldInt(SmartCurrentTarget, Ref, Character_getQueueY));
        end;
        SmartFreeObject(SmartCurrentTarget, PlayerName);
        SmartFreeObject(SmartCurrentTarget, Ref);
        SmartFreeObject(SmartCurrentTarget, Overhead);
      end;
    end;

    All the hooks work and everything is accurate, however CurrentHP and MaxHP return 0 for some reason. Also I'm unsure if TileWalkQueue is doing anything. Only returning (-1, -1)...
    CurrentHp and MaxHp only provide data when you are in combat. Tile walk queue only holds data when you are walking. Personally the best way to tell if a character is walking is the following:
    Simba Code:
    function R_IsWalking(npc: TCharacter):boolean;
    begin
      Result := (SmartGetFieldInt(SmartCurrentTarget, npc.objectHash, Character_getQueueLength) * Character_getQueueLength_Multiplier) > 0;
    end;

  25. #500
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by lotery33 View Post
    I'm getting the
    Exception in Script: Operator expected at line 446, column 3 in file "C:\Simba\Includes\SRL-OSR\SRL\Reflection\Core\Tiles.simba"
    error, I downloaded the latest version
    Quote Originally Posted by Harrier View Post
    Read the instructions for setting up OSRS-SRL. You missed a step
    I'm sorry to ask, but I'm getting the exact same error and I just can't find what I've missed. Went over several guides multiple times. Could anyone possibly help me further? :\

    Edit; fixed. stupid me.
    Last edited by iEatApples; 08-19-2014 at 10:29 PM.

Page 20 of 32 FirstFirst ... 10181920212230 ... LastLast

Thread Information

Users Browsing this Thread

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