Yardım epf koruması

cacana45

Bir Kömür Göründü Kaptanım!
Katılım
20 Kasım 2023
Mesajlar
114
Elmaslar
8
Puan
2.145
Yaş
16
Konum
Türkiye
Minecraft
cacana45

Discord:

cacana45

minecraftda açtığım sunucuda oyuncuya koruma 10 set veriyoruz ilk set keskinlik 45 ile vuruyoruz 2 canı gidiyor sonra koruma 60 set veriyoruz aynı kılıça vuruyoruz gene 2 kalp hasar vuruyor bunu araştırdığım zaman minecraftın epf koruması gibi bir koruması varmış ama ne yapsam yapayım çözemedim setler çok dengesiz oluyor
itemedit kullanıyorum 1.16.5 java 16 sunucum
 
ilk defa duydum böyle birşeyi bilenler vardır illa
 
minecraftda açtığım sunucuda oyuncuya koruma 10 set veriyoruz ilk set keskinlik 45 ile vuruyoruz 2 canı gidiyor sonra koruma 60 set veriyoruz aynı kılıça vuruyoruz gene 2 kalp hasar vuruyor bunu araştırdığım zaman minecraftın epf koruması gibi bir koruması varmış ama ne yapsam yapayım çözemedim setler çok dengesiz oluyor
itemedit kullanıyorum 1.16.5 java 16 sunucum
Zamanında Boxpvp sunucum için yapmış olduğum bir skript. Kendim kullandığımda gayet iyi çalışıyordu. AI ile eklentiye çevirirsen daha optimize çalışır.

Kod:
on damage of player:
    set {_baseDamage} to damage
    set {_sharpnessBonus} to 0
    set {_critMultiplier} to 1
    set {_strengthMultiplier} to 1
    set {_resistanceMultiplier} to 1
    set {_healthBoostBuffer} to 0
    set {_totalArmorReduction} to 0
    set {_protectionEPF} to 0

    set {_tool} to tool of attacker
    if {_tool} is netherite sword:
        set {_baseDamage} to 8
    else if {_tool} is diamond sword:
        set {_baseDamage} to 7
    else if {_tool} is iron sword:
        set {_baseDamage} to 6
    else if {_tool} is stone sword:
        set {_baseDamage} to 5
    else if {_tool} is wooden sword:
        set {_baseDamage} to 4

    set {_sharp} to level of sharpness on {_tool}
    if {_sharp} > 0:
        set {_sharpnessBonus} to 1 + ({_sharp} * 0.45)

    if attacker has strength:
        set {_strengthLevel} to level of strength on attacker
        if {_strengthLevel} >= 2:
            set {_strengthMultiplier} to 1.15

    if attacker is sprinting:
        set {_critMultiplier} to 1.5

    set {_armorPieces::*} to helmet of victim, chestplate of victim, leggings of victim, boots of victim
    loop {_armorPieces::*}:
        set {_armorPiece} to loop-value
        if {_armorPiece} is not air:
            if {_armorPiece} is netherite helmet or netherite chestplate or netherite leggings or netherite boots:
                add 5 to {_totalArmorReduction}
            else if {_armorPiece} is diamond helmet or diamond chestplate or diamond leggings or diamond boots:
                add 4 to {_totalArmorReduction}
            else if {_armorPiece} is iron helmet or iron chestplate or iron leggings or iron boots:
                add 3 to {_totalArmorReduction}
            else if {_armorPiece} is leather helmet or leather chestplate or leather leggings or leather boots:
                add 1 to {_totalArmorReduction}

    loop {_armorPieces::*}:
        set {_piece} to loop-value
        if {_piece} is not air:
            set {_raw} to level of protection on {_piece}
            add {_raw} / 4 to {_protectionEPF}

    if {_protectionEPF} > 60:
        set {_protectionEPF} to 60

    loop {_protectionEPF} times:
        if loop-number <= 20:
            add 2 to {_totalArmorReduction}
        else if loop-number <= 40:
            add 1.2 to {_totalArmorReduction}
        else:
            add 0.5 to {_totalArmorReduction}

    if {_totalArmorReduction} > 80:
        set {_totalArmorReduction} to 80

    if victim has resistance:
        set {_resistanceLevel} to level of resistance on victim
        if {_resistanceLevel} >= 1:
            set {_resistanceMultiplier} to 0.8

    if victim has health boost:
        set {_healthBoostBuffer} to 4

    set {_afterSharp} to ({_baseDamage} + {_sharpnessBonus}) * {_strengthMultiplier} * {_critMultiplier}
    set {_afterArmor} to {_afterSharp} * (1 - {_totalArmorReduction} / 100)
    set {_afterResist} to {_afterArmor} * {_resistanceMultiplier}
    set {_finalDamage} to {_afterResist} - {_healthBoostBuffer}
    if {_finalDamage} < 0:
        set {_finalDamage} to 0

    set damage to {_finalDamage}

    send "&8[&aPvP&8] Base: %{_baseDamage}% | Sharp: +%{_sharpnessBonus}% | Crit: ×%{_critMultiplier}% | Str: ×%{_strengthMultiplier}%" to attacker
    send "&8[&aPvP&8] ArmorRed: %{_totalArmorReduction}% | Resist: ×%{_resistanceMultiplier}% | HP Buffer: %{_healthBoostBuffer}%" to attacker
    send "&8[&aPvP&8] Final Hasar: %{_finalDamage}%" to attacker
 
Zamanında Boxpvp sunucum için yapmış olduğum bir skript. Kendim kullandığımda gayet iyi çalışıyordu. AI ile eklentiye çevirirsen daha optimize çalışır.

Kod:
on damage of player:
    set {_baseDamage} to damage
    set {_sharpnessBonus} to 0
    set {_critMultiplier} to 1
    set {_strengthMultiplier} to 1
    set {_resistanceMultiplier} to 1
    set {_healthBoostBuffer} to 0
    set {_totalArmorReduction} to 0
    set {_protectionEPF} to 0

    set {_tool} to tool of attacker
    if {_tool} is netherite sword:
        set {_baseDamage} to 8
    else if {_tool} is diamond sword:
        set {_baseDamage} to 7
    else if {_tool} is iron sword:
        set {_baseDamage} to 6
    else if {_tool} is stone sword:
        set {_baseDamage} to 5
    else if {_tool} is wooden sword:
        set {_baseDamage} to 4

    set {_sharp} to level of sharpness on {_tool}
    if {_sharp} > 0:
        set {_sharpnessBonus} to 1 + ({_sharp} * 0.45)

    if attacker has strength:
        set {_strengthLevel} to level of strength on attacker
        if {_strengthLevel} >= 2:
            set {_strengthMultiplier} to 1.15

    if attacker is sprinting:
        set {_critMultiplier} to 1.5

    set {_armorPieces::*} to helmet of victim, chestplate of victim, leggings of victim, boots of victim
    loop {_armorPieces::*}:
        set {_armorPiece} to loop-value
        if {_armorPiece} is not air:
            if {_armorPiece} is netherite helmet or netherite chestplate or netherite leggings or netherite boots:
                add 5 to {_totalArmorReduction}
            else if {_armorPiece} is diamond helmet or diamond chestplate or diamond leggings or diamond boots:
                add 4 to {_totalArmorReduction}
            else if {_armorPiece} is iron helmet or iron chestplate or iron leggings or iron boots:
                add 3 to {_totalArmorReduction}
            else if {_armorPiece} is leather helmet or leather chestplate or leather leggings or leather boots:
                add 1 to {_totalArmorReduction}

    loop {_armorPieces::*}:
        set {_piece} to loop-value
        if {_piece} is not air:
            set {_raw} to level of protection on {_piece}
            add {_raw} / 4 to {_protectionEPF}

    if {_protectionEPF} > 60:
        set {_protectionEPF} to 60

    loop {_protectionEPF} times:
        if loop-number <= 20:
            add 2 to {_totalArmorReduction}
        else if loop-number <= 40:
            add 1.2 to {_totalArmorReduction}
        else:
            add 0.5 to {_totalArmorReduction}

    if {_totalArmorReduction} > 80:
        set {_totalArmorReduction} to 80

    if victim has resistance:
        set {_resistanceLevel} to level of resistance on victim
        if {_resistanceLevel} >= 1:
            set {_resistanceMultiplier} to 0.8

    if victim has health boost:
        set {_healthBoostBuffer} to 4

    set {_afterSharp} to ({_baseDamage} + {_sharpnessBonus}) * {_strengthMultiplier} * {_critMultiplier}
    set {_afterArmor} to {_afterSharp} * (1 - {_totalArmorReduction} / 100)
    set {_afterResist} to {_afterArmor} * {_resistanceMultiplier}
    set {_finalDamage} to {_afterResist} - {_healthBoostBuffer}
    if {_finalDamage} < 0:
        set {_finalDamage} to 0

    set damage to {_finalDamage}

    send "&8[&aPvP&8] Base: %{_baseDamage}% | Sharp: +%{_sharpnessBonus}% | Crit: ×%{_critMultiplier}% | Str: ×%{_strengthMultiplier}%" to attacker
    send "&8[&aPvP&8] ArmorRed: %{_totalArmorReduction}% | Resist: ×%{_resistanceMultiplier}% | HP Buffer: %{_healthBoostBuffer}%" to attacker
    send "&8[&aPvP&8] Final Hasar: %{_finalDamage}%" to attacker
deneyeceğim
birazdan
 

Hala Discord sunucumuza katılmadın mı?

Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!

Şimdi Katıl
Üst