StrifeRekt - Orbwalker etc

06/30/2015 21:59 Gotoxy#1
There are two sorts of the api, the basic one, like geometry, what is global for all games, and the game specific.

Global API, that can be used in Strife:


Strife specific API:


Callbacks (functions that get triggered automatically, when certain events occur)
Code:
Tick                   -- gets triggered regularly (for recurring checks an operations)
Draw                   -- gets triggered whenever your screen is redrawn
CustomGameStart        -- gets triggered when you start the game
AllocateEntity(uid)    -- gets triggered when a new ingame object gets created
DeleteEntity(uid)      -- gets triggered when an ingame object gets removed
SendPacket(packet)     -- get triggered when a packet is send
RecvPacket(packet)     -- get triggered when a packet is recved
Globally Available Objects (class based API)

objManager (generic interface for accessing ingame objects)
Code:
sh.entities
sh.players
Player Members
Code:
.team
.name
.uid
.type
.isAlive
.valid
.hero
Hero Members
Code:
IHeroEntity class :
    functions :
        GetItem(slot)
        GetAbility(slot)
        GetAbilities()
        GetState()

    attributes :
        isClientState
        cliffwalking
        isEntityItem
        isDisarmed
        isHeroEntity
        isGameInfo
        isShopEntity
        isFamiliarEntity
        evasionMelee
        isSilenced
        isMoving
        isBitEntityInfo
        adjustedAttackActionTime
        isCreepEntity
        isAttackNotReady
        deniable
        y
        isCasting
        attackTime
        isAttacking
        z
        physRes
        lifeSteal
        power
        stashAccess
        isGameEntity
        isEntityEffect
        isAffectorInfo
        team
        isGadgetEntity
        uid
        isEntityChest
        type
        name
        isProjectileEntity
        level
        mana
        evasionRanged
        isGameStats
        health
        unitwalking
        isEntityAbilityAttribute
        isPlayerView
        healthRegen
        isTeamInfo
        attackSpeed
        isStunned
        isPowerupEntity
        attackDamageMin
        isHero
        isEntityState
        sightRange
        isEntityProxyAbility
        isAlive
        isBuildingEntity
        isBuilding
        magicRes
        valid
        isNeutralEntity
        isPerplexed
        pos
        isEntityCamera
        isEntityAbility
        x
        isOrderEntity
        isSlaveEntity
        isShopInfo
        isSpawnerEntity
        baseDamage
        isLinearAffector
        maxHealth
        isCreep
        healthPercent
        armor
        boundsRadius
        isNeutralBossEntity
        isEntityTool
        treewalking
        criticalChance
        adjustedAttackCooldown
        moveSpeed
        criticalMult
        maxMana
        canCanAttack
        isUnitEntity
        adjustedAttackDuration
        magicArmor
        attackDamageMax
        manaRegen
        attackRange
        isHeroPetEntity
        isVisualEntity
        isLightEntity
        isPropEntity
        isEntityStateNetAccum
        isShopItemInfo
        isCritterEntity
        isPlayer
        isWaypointEntity
Ability Member
Code:
CEntityAbility class:
    attributes :
        areaCastRange
        lineCastMaxRange
        castTime
        channelTime
        maxLevel
        isEntityProxyAbility
        slot
        castActionTime
        type
        name
        activeChannelTime
        manaCost
        remainingCd
        canActivate
        targetRadius
        coneCastRange
        cdDuration
        range
        level
        lineCastWidth
        lineCastRange
        coneCastWidth
Game Functions
Code:
Game.GetLocalPlayer()
Game.MoveTo(x, y)
Game.GetTickCount()
Game.GetCursor()
Game.DrawCircle(Vector3, number)  -- Rendered
Game.SendPacket(packet)
hero:GetAbility(index)
Game.CastSpell(SpellIindex, X, Y)
Game.CastSpell(SpellIindex, Unit)
Game.CastSpell(SpellIindex)
Game.Chat.Send(String)
Game.Courier.Start()
Game.Courier.Stop()
Game.SellItem(Slot)
Game.BuyItem(ItemID)
Game.LvlSpell(SpellID)
Game.Ping(Ptype,x,y)
Game.Move(x,y)
Game.AttackMove(x,y)
Game.Attack(unit)
Game.CastItem(id) 
Game.CastItem(id,x,y)
Game.CastItem(id,unit)
Allclass - EntityManager
Code:
    EntityManager Class :
    Functions :
    Game.EntityManager:GetLowest(range, vec3, team, lowerthen)
        Game.EntityManager:GetEntitys(range, vec3, team)

    Members:
        range        -- Number or it takes the basic range of your hero
        vec3         -- Vector3 from where the minions are centered or it takes your current position
        team         -- Game.EntityManager_ALLY, Game.EntityManager_ENEMY, Game.EntityManager_ALL or if not set it set Game.EntityManager_ENEMY
        lowerthen    -- only return if the minion health are lower then this value [optional]
        
    Usage ex:
        Callback.Bind("Render", function()
            local myEntitys = Game.EntityManager:GetEntitys(2000, Game.GetLocalPlayer().hero.pos, Game.EntityManager_ENEMY)
            for i, e in pairs(myEntitys) do                
                Game.DrawCircle(e.pos, 200)                
            end        
        end)
Allclass - Prediction
Code:
    Prediction Class :
    Functions :
        Vector3        --    Allclass.Prediction:GetPosition(Target, Range, Speed, Delay, Width, VeloMode)
        Vector3        --    Allclass.Prediction:PosInTime(Target, Delay)
        Number        --    Allclass.Prediction:GetVeloHC(Target)
        
    Members:
        Target        --    has to be a valid .hero object
        Range        --    Number [optional]
        Speed        --    Number [optional]
        Delay        --    Number [optional]
        Width        --    Number [optional]
        VeloMode    --    Boolean[optional]

        
    Usage ex:
        local Range = math.huge
        local Speed = math.huge
        local Delay = 1
        local Width = 100
        local VeloMode = true
        Callback.Bind("Draw", function()
            for i, p in ipairs(sh.players) do
                local hero = p.hero
                if hero and hero.valid and hero.health > 0 then
                    local tpp = Allclass.Prediction:GetPosition(hero, Range, Speed, Delay, Width, VeloMode)
                    if tpp ~= nil then
                        Allclass.Draw3D.Circle(tpp.x, tpp.y, tpp.z, 100)
                        Allclass.Draw3D.Line(hero.pos, tpp)
                    end            
                end
            end    
        end)
Allclass - Collision
Code:
    Collision Class :
    Functions :
        Boolean, table    --    Allclass.Collision:GetHeroCollision(PointA, PointB, Delay, Speed, Width)
        Boolean, table    --    Allclass.Collision:GetEntityCollision(PointA, PointB, Width)
        
    Members:
        PointA        --    Vector3
        PointB        --    Vector3
        Delay        --    Number [optional]
        Speed        --    Number [optional]
        Width        --    Number [optional]
        VeloMode      --    Boolean[optional]

        
    Usage ex:
        local Width = 50
        Callback.Bind("Draw", function()
            local isCollision, collE = Allclass.Collision:GetEntityCollision(Game.GetLocalPlayer().hero.pos, Game.GetCursor(), Width)
            Allclass.Draw3D.Line(Game.GetLocalPlayer().hero.pos, Game.GetCursor(), Width, isCollision and Graphics.RGBA(255,0,0,255) or Graphics.RGBA(0,255,0,255))
            for i, e in pairs(collE) do
                Allclass.Draw3D.Circle(e.pos.x, e.pos.y, e.pos.z, (Width + 10 + (e.boundsRadius*2)))
            end
        end)
Allclass - Draw3D
Code:
    Draw3D Class :
    Functions :
        Allclass.Draw3D.Line(PointA, PointB, width, color)
        Allclass.Draw3D.Circle(x, y, z, radius, width, color, chordlength)
        Allclass.Draw3D.Lines(points, width, color)
        Allclass.Draw3D.DrawText(text, x, y, z, size, color)
        
    Members:
        PointA        --    Game-Vector3
        PointB        --    Game-Vector3
        x/y/z        --    GamePosition-Number
        points        --    table with ScreenPos-Vector2
        text        --    string
        size        --    Number [optional]
        radius        --    Number [optional]
        width        --    Number [optional]
        color        --    Color Object [optional]
        chordlength    --    Number [optional]
Allclass - Unsorted
Code:
    Functions :
        Number        --     Allclass.FPS.GetExactFPS()
        Number        --     Allclass.FPS.GetFPS()
                                       Allclass.DelayAction(func, delay, args)
                Number          --     Allclass.Utility:ComputeAASpeed(unit)
                Number          --     Allclass.Utility:GetVirtualHP(unit)
DamageLib
Code:
--Calc physical damage taking care of armor
    Allclass.DamageLib:CalcDamage(unit,Damage)
--Calc magic damage taking care of magicarmor  
    Allclass.DamageLib:CalcMagicDamage(unit,Damage)
--Calc aa damage
    Allclass.DamageLib:ComputeAADmg(unit,Target)
Strife Network:
Members
Code:
Packet.header    -- Return network headers
Packet.pos       -- Return the current pos in the dump
Packet.size      -- Return the size of the dump
Functions
Code:
Packet.Decode1()          -- Return 1 byte  and increases the read pos by 1
Packet.Decode2()          -- Return a word  and increases the read pos by 2
Packet.Decode4()          -- Return a long  and increases the read pos by 4
Packet.DecodeF()          -- Return a float and increases the read pos by 4
Packet.Encode1(eByte)     -- Encode a byte
Packet.Encode2(eWord)     -- Encode a word
Packet.Encode4(eLong)     -- Encode a long
Packet.EncodeF(eFloat)    -- Encode a float
Packet.EncodeStr(eStr)    -- Encode a string
Packet.getRemaining()
Packet.skip()
Download: