Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Rekomendowane odpowiedzi

Opublikowano

Witam, czy moglibyście mi polecić jakiś skrypt do bola dla adc na last hittowanie? szukam cały dzień i nie moge go znaleźć *_* dzięki za wszelką pomoc!

Opublikowano
 

-- Draw minion HP by Kev v1.1


local smiteDamage = 0

 

function OnLoad()

 

    Menu = scriptConfig("MinionBars", "MinionBars")

    Menu:addSubMenu("Drawing", "Drawing")

    Menu.Drawing:addParam("drawBars", "Draw Bars", SCRIPT_PARAM_ONOFF, true)

    Menu.Drawing:addParam("drawMinions", "Draw on minions", SCRIPT_PARAM_ONOFF, true)

    Menu.Drawing:addParam("drawJungle", "Draw on jungle", SCRIPT_PARAM_ONOFF, true)

    Menu.Drawing:addParam("drawLarge", "Draw Health on Dragon/Baron", SCRIPT_PARAM_ONOFF, true)

    Menu.Drawing:addParam("drawKill", "Draw killable amount", SCRIPT_PARAM_ONOFF, true)

    Menu.Drawing:addParam("drawKillOutline", "Draw killable outline", SCRIPT_PARAM_ONOFF, true)

    Menu.Drawing:addParam("drawSmite", "Draw Smite", SCRIPT_PARAM_ONOFF, true)

    Menu.Drawing:addParam("drawSmiteOutline", "Draw Smite outline", SCRIPT_PARAM_ONOFF, true)

 

 

    Menu:addSubMenu("Color", "Color")

    Menu.Color:addParam("lineColor", "Line Color", SCRIPT_PARAM_COLOR, {255, 0, 0, 0})

    Menu.Color:addParam("killColor", "Kill Color", SCRIPT_PARAM_COLOR, {255, 0, 255, 0})

    Menu.Color:addParam("smiteColor", "Smite Color", SCRIPT_PARAM_COLOR, {255, 0, 252, 255})

 

    Menu:addSubMenu("Masteries", "Masteries")

    Menu.Masteries:addParam("butcherMastery", "Butcher", SCRIPT_PARAM_ONOFF, false)

    Menu.Masteries:addParam("doubleEdgedSwordMastery", "Double-Edged Sword", SCRIPT_PARAM_ONOFF, false)

    Menu.Masteries:addParam("arcaneBladeMastery", "Arcane Blade", SCRIPT_PARAM_ONOFF, false)

    --Menu.Masteries:addParam("devastatingStrikesMastery", "Devastating Strikes", SCRIPT_PARAM_SLICE, 0, 0, 3)

    -- Can't figure out how to factor in the armor/magic pen using CalcDamage.

    PrintChat("<font color='#FF3333'>MinionBars by Kev v1.1</font>")

end

 

function DrawRectangleAL(x, y, w, h, color) -- thanks to honda7's protracker script for this

    local Points = {}

    Points[1] = D3DXVECTOR2(math.floor(x), math.floor(y))

    Points[2] = D3DXVECTOR2(math.floor(x + w), math.floor(y))

    DrawLines2(Points, math.floor(h), color)

end

 

function OutLineBar(x, y, color)

    --y = y - 3

    DrawRectangleAL(x, y - 3, 64, 1, color) -- Top

    DrawRectangleAL(x, y + 2, 64, 1, color) -- Bottom

 

    DrawRectangleAL(x, y, 1, 5, color) -- Left

    DrawRectangleAL(x + 63, y, 1, 5, color) -- Right

end

 

function OutLineBarLarge(x, y, color)

    --y = y - 3

    DrawRectangleAL(x, y - 3, 125, 1, color) -- Top

    DrawRectangleAL(x, y + 2, 125, 1, color) -- Bottom

 

    DrawRectangleAL(x, y, 1, 5, color) -- Left

    DrawRectangleAL(x + 124, y, 1, 5, color) -- Right

end

 

function drawDetails(minion, lineColor, killColor, smiteColor, isJungle)

    if minion.charName == "TestCubeRender" or minion.charName == "TT_Buffplat_R" or minion.charName == "TT_Buffplat_L" then return end

    local barPos = GetUnitHPBarPos(minion)

    barPos.y = barPos.y - 3

    local myDamageToMinion = 0

 

    -- Calculate the damage we deal to a minion

    local myPhysicalDamage = myHero.addDamage + myHero.damage

    local myMagicDamage = 0

    if Menu.Masteries.arcaneBladeMastery == true then

        myMagicDamage = myHero.ap * 0.05

    end

    if Menu.Masteries.doubleEdgedSwordMastery == true then -- Does this apply to Arcane Blade damage?

        if myHero.range < 400 then

            myPhyscialDamage = myPhysicalDamage * 1.02

        else

            myPhyscialDamage = myPhysicalDamage * 1.015

        end

    end

    --if Menu.Masteries.devastatingStrikesMastery > 0 then

        --myHero.armorPenPercent = 0.06

        --minion.armor = minion.armor * (1.00 - (Menu.Masteries.devastatingStrikesMastery * 0.02))

        --minion.magicArmor = minion.magicArmor * (1.00 - (Menu.Masteries.devastatingStrikesMastery * 0.02))

    --end

    myDamageToMinion = myHero:CalcDamage(minion, myPhysicalDamage) + myHero:CalcMagicDamage(minion, myMagicDamage)

    if Menu.Masteries.butcherMastery == true then

        myDamageToMinion = myDamageToMinion + 2

    end

    -- Calculate some vars for drawing

    local hitsToKill = math.ceil(minion.maxHealth / myDamageToMinion)

    local barsToDraw = math.floor(minion.maxHealth / 100.0)

    local barDistance = 100.0 / (minion.maxHealth / 62.0)

    local myDamageDistance = myDamageToMinion / (minion.maxHealth / 62.0)

    local barsDrawn = 0

    local heightOffset = 3

    local barSize = 4

    local barWidth = 1

    barPos.x = barPos.x - 32

    barPos.y = barPos.y + heightOffset

    --DrawRectangleAL(barPos.x, barPos.y, barWidth, barSize, lineColor) -- Left

    --DrawRectangleAL(barPos.x + 62, barPos.y, barWidth, barSize, lineColor) -- Right

    local text = false

    -- Minions to ignore smite on = LesserWraith, YoungLizard, SmallGolem, Wolf

    --PrintChat(minion.charName)

    -- Draw the required bars at 100 hp per

    if isJungle == true and (minion.charName == "Dragon" or minion.charName == "Worm" or minion.charName == "TT_Spiderboss") then -- Dragon and baron have different sized hp bars.

        local healthDraw = 500.0

        if minion.charName == "Dragon" then

            barPos.x = barPos.x - 31

            barPos.y = barPos.y - 7

        elseif minion.charName == "Worm" then

            barPos.x = barPos.x - 31

            healthDraw = 1000.0

        elseif minion.charName == "TT_Spiderboss" then

            barPos.x = barPos.x - 31

        end

        barsToDraw = math.floor(minion.maxHealth / healthDraw)

        barDistance = healthDraw / (minion.maxHealth / 124.0)

        local mySmiteDistance = smiteDamage / (minion.maxHealth / 124.0)

        --PrintChat("Dragon/Baron")

        --DrawRectangleAL(barPos.x, barPos.y, barWidth, barSize, ARGB(255,252,252,252)) -- Left

        --DrawRectangleAL(barPos.x + 124, barPos.y, barWidth, barSize, ARGB(255,252,252,252)) -- Left

 

        -- Draw some crap for my own testing

        if text == true then

            DrawText(tostring(mySmiteDistance), 12, barPos.x + 60, barPos.y - 45, ARGB(255, 255, 0, 0))

            DrawText(tostring(myDamageDistance), 12, barPos.x + 60, barPos.y - 30, ARGB(255, 255, 0, 0))

            DrawText(tostring(barDistance), 12, barPos.x + 60, barPos.y - 15, ARGB(255, 255, 0, 0))

            DrawText(tostring(math.ceil(smiteDamage)), 12, barPos.x + 25, barPos.y - 45, ARGB(255, 255, 100, 100))

            DrawText(tostring(math.ceil(myDamageToMinion)), 12, barPos.x + 25, barPos.y - 30, ARGB(255, 255, 0, 255))

            DrawText(tostring(math.floor(minion.health)), 12, barPos.x + 25, barPos.y - 15, ARGB(255, 255, 255, 255))

            DrawText(tostring(hitsToKill), 12, barPos.x, barPos.y - 30, ARGB(255, 0, 255, 255))

            DrawText(tostring(barsToDraw), 12, barPos.x, barPos.y - 15, ARGB(255, 0, 255, 255))

        end

        local drawDistance = 0

        -- Draw the bars for jungle creeps.

        while barsDrawn ~= barsToDraw and barsToDraw ~= 0 and barsToDraw < 200 and Menu.Drawing.drawBars == true do -- If there are 32 bars, there reall is no reason to draw this, perhaps make a method for it

            drawDistance = drawDistance + barDistance

            if barsDrawn % 2 == 1 then

                DrawRectangleAL(barPos.x + drawDistance, barPos.y, barWidth + 1, barSize, lineColor)

                if minion.charName == "Worm" then

                    DrawText(tostring(math.ceil(barsDrawn + 1)).."k", 10, barPos.x + drawDistance - 2, barPos.y + 2, ARGB(252,252,252,252))

                elseif minion.charName == "Dragon" or minion.charName == "TT_Spiderboss" then

                    DrawText(tostring(math.ceil(barsDrawn / 2.0)).."k", 10, barPos.x + drawDistance - 2, barPos.y + 2, ARGB(252,252,252,252))

 

                end

            else

                DrawRectangleAL(barPos.x + drawDistance, barPos.y, barWidth, barSize, lineColor)

            end

            barsDrawn = barsDrawn + 1

        end

        if Menu.Drawing.drawSmite == true then

            DrawRectangleAL(barPos.x + mySmiteDistance, barPos.y, barWidth, barSize, smiteColor)

            -- Draw a backdrop and the damage the smite will do

            DrawRectangleAL(barPos.x + mySmiteDistance - 5, barPos.y - 8, barWidth + 19, barSize + 6, ARGB(255,0,0,0))

            DrawText(tostring(smiteDamage), 11, barPos.x + mySmiteDistance - 3, barPos.y - 13, smiteColor)

            if Menu.Drawing.drawSmiteOutline == true and smiteDamage >= minion.health then

                OutLineBarLarge(barPos.x, barPos.y, smiteColor)

            end

        end

        if Menu.Drawing.drawLarge == true then

            DrawRectangleAL(barPos.x + 57, barPos.y - 8, 35, 10, ARGB(255, 0, 0, 0))

            DrawText(tostring(math.floor(minion.health)), 12, barPos.x + 60, barPos.y - 14, ARGB(255, 255, 255, 255))

        end

    else

        -- Draw some crap for my own testing

        if text == true then

            DrawText(tostring(barDistance), 12, barPos.x + 40, barPos.y - 15, ARGB(255, 0, 255, 255))

            DrawText(tostring(myDamageDistance), 12, barPos.x + 40, barPos.y - 30, ARGB(255, 255, 0, 0))

            DrawText(tostring(math.ceil(myDamageToMinion)), 12, barPos.x + 20, barPos.y - 30, ARGB(255, 255, 0, 255))

            DrawText(tostring(math.floor(minion.health)), 12, barPos.x + 20, barPos.y - 15, ARGB(255, 255, 255, 255))

            DrawText(tostring(hitsToKill), 12, barPos.x, barPos.y - 30, ARGB(255, 0, 255, 255))

            DrawText(tostring(barsToDraw), 12, barPos.x, barPos.y - 15, ARGB(255, 0, 255, 255))

        end

        --=================================================

        local drawDistance = 0

        while barsDrawn ~= barsToDraw and barsToDraw ~= 0 and barsToDraw < 50 and Menu.Drawing.drawBars == true do -- If there are 32 bars, there reall is no reason to draw this, perhaps make a method for it

            drawDistance = drawDistance + barDistance

            if barsToDraw > 20 then -- If the minion HP is higher than 2000, draw lines at 500 and 1000

                if barsDrawn % 5 == 4 then

                    if barsDrawn % 10 == 9 then

                        DrawRectangleAL(barPos.x + drawDistance, barPos.y, barWidth + 1, barSize, lineColor)

                    else

                        DrawRectangleAL(barPos.x + drawDistance, barPos.y, barWidth, barSize, lineColor)

                    end

                end

            else

                DrawRectangleAL(barPos.x + drawDistance, barPos.y, barWidth, barSize, lineColor)

            end

            barsDrawn = barsDrawn + 1

        end

        -- Draw smite here so the outline of kill damage overlays smite overlay if on.

        -- LesserWraith, YoungLizard, SmallGolem, Wolf

        if isJungle == true and Menu.Drawing.drawSmite == true and (minion.charName ~= "LesserWraith" and minion.charName ~= "YoungLizard" and minion.charName ~= "SmallGolem" and minion.charName ~= "Wolf" and minion.charName ~= "TT_NWraith2" and minion.charName ~= "TT_NWolf2" and minion.charName ~= "TT_NGolem2")then

            local mySmiteDistance = smiteDamage / (minion.maxHealth / 62.0)

            DrawRectangleAL(barPos.x + mySmiteDistance, barPos.y, barWidth, barSize, smiteColor)

            DrawRectangleAL(barPos.x + mySmiteDistance - 5, barPos.y - 8, barWidth + 19, barSize + 6, ARGB(255,0,0,0))

            DrawText(tostring(smiteDamage), 11, barPos.x + mySmiteDistance - 3, barPos.y - 13, smiteColor)

            if Menu.Drawing.drawSmiteOutline == true and smiteDamage >= minion.health then

                OutLineBar(barPos.x, barPos.y, smiteColor)

            end

        end

        -- Finish by drawing hero damage

        if Menu.Drawing.drawKill == true then

            DrawRectangleAL(barPos.x + myDamageDistance, barPos.y, barWidth, barSize, killColor)

            if myDamageToMinion > minion.health and Menu.Drawing.drawKillOutline == true then

                OutLineBar(barPos.x, barPos.y, killColor)

            end

        end

    end

end

 

 

function OnDraw()

    local color = ARGB(Menu.Color.lineColor[1], Menu.Color.lineColor[2],Menu.Color.lineColor[3],Menu.Color.lineColor[4])

    local colorKill = ARGB(Menu.Color.killColor[1], Menu.Color.killColor[2],Menu.Color.killColor[3],Menu.Color.killColor[4])

    local colorSmite = ARGB(Menu.Color.smiteColor[1], Menu.Color.smiteColor[2],Menu.Color.smiteColor[3],Menu.Color.smiteColor[4])

    if Menu.Drawing.drawMinions == true then

        local enemyMinions = minionManager(MINION_ENEMY, 4000, myHero, MINION_SORT_HEALTH_ASC).objects

        for i,minion in pairs(enemyMinions) do

            drawDetails(minion, color, colorKill, colorSmite, false)

        end

    end

    if Menu.Drawing.drawJungle == true then

        if Menu.Drawing.drawSmite == true then

            smiteDamage = math.max(20 * myHero.level + 370, 30 * myHero.level + 330, 40 * myHero.level + 240, 50 * myHero.level + 100)

        end

        local jungleMinions = minionManager(MINION_JUNGLE, 10000, myHero, MINION_SORT_HEALTH_ASC).objects

        for i,creep in pairs(jungleMinions) do

            drawDetails(creep, color, colorKill, colorSmite, true)

        end

    end

end


Kocham mpcforum.pl!!!

18706.png

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...