SphereCommunity
ItemDamageChance set to 0, items still get damage - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: ItemDamageChance set to 0, items still get damage (/Thread-ItemDamageChance-set-to-0-items-still-get-damage)

Pages: 1 2


ItemDamageChance set to 0, items still get damage - Rizz - 06-11-2015 06:20 AM

ON=@GETHIT
LOCAL.ItemDamageChance=0

ON=@HIT
LOCAL.ItemDamageChance=0

Damages still going on with players (not with GM). what to do?
It happens with shields only.

Sphere build is 2266


RE: ItemDamageChance set to 0, items still get damage - XuN - 06-11-2015 08:19 AM

Here's a link for latest build, it's working fine for me: https://www.dropbox.com/s/k1aqepw37wytzn9/SphereSvr.exe?dl=0


RE: ItemDamageChance set to 0, items still get damage - Rizz - 06-16-2015 08:12 AM

Still the same problem:

armors don't take damage
weapons and shields take damage.


Code:
ON=@HIT

// I    The character doing the hitting.
// SRC    The character being hit.

IF (<ARGO>)
    IF (<src.region.defname> == a_macro_castle)
        LOCAL.ItemDamageChance=7
    ELIF (<src.isplayer>)
        LOCAL.ItemDamageChance=25
            if (<account.plevel> > 1)
            sysmessage danneggiamento
        endif
    ELSE
        LOCAL.ItemDamageChance=0
        if (<account.plevel> > 1)
            sysmessage non danneggia
        endif
    ENDIF
ELSE
    LOCAL.ItemDamageChance=0
ENDIF



ON=@GETHIT
// I    The character being damaged.
// SRC    The character responsible for the damage.

IF (<region.defname> == a_macro_castle)
    LOCAL.ItemDamageChance=7
ELIF (<src.isplayer>)
    LOCAL.ItemDamageChance=30
        if (<account.plevel> > 1)
        sysmessage danneggio armor
    endif
ELSE
    LOCAL.ItemDamageChance=0
    if (<account.plevel> > 1)
        sysmessage non danneggio armor
    endif
ENDIF

Did I something wrong?
Maybe should I put ItemDamageChance on NPC general event too?


RE: ItemDamageChance set to 0, items still get damage - Coruja - 06-16-2015 09:34 AM

probably it could be something related to parrying, since parrying can damage the shield or weapon (if the attack got parried by the weapon)


RE: ItemDamageChance set to 0, items still get damage - ForesteR - 06-16-2015 09:56 AM

[TYPEDEF T_EVENTS_ITEM_DURABILITY]
ON=@DAMAGE
RETURN 1


RE: ItemDamageChance set to 0, items still get damage - Rizz - 06-16-2015 10:22 PM

(06-16-2015 09:34 AM)Coruja Wrote:  probably it could be something related to parrying, since parrying can damage the shield or weapon (if the attack got parried by the weapon)

I left my parrying skills as default and I use my own code to parry a blow, how can I disable the sphere parrying function?


RE: ItemDamageChance set to 0, items still get damage - darksun84 - 06-16-2015 11:19 PM

By doing some tests, i can con confirm that is parrying, the problem is that parrying is fired even when the player is unarmed (it shouldn't i think or maybe it's correct ? )

When fighting, parrying is always used in fact @Usequick is always fired (even with flags SKF_SCRIPTED set, bug ?) .
Inserting return 1 in @Usequick will cause @gethit to not fire, because the hit is parried. So i think you can set argn3 to 0 or return 0 for forcing the parrying skill to fail.

The problem is:

SKF_SCRIPTED flag should disable this behaviour.


RE: ItemDamageChance set to 0, items still get damage - XuN - 06-16-2015 11:38 PM

Checks for this skill can be disabled via @SkillUseQuick in characters or @UseQuick in the skill.


RE: ItemDamageChance set to 0, items still get damage - Rizz - 06-17-2015 02:53 AM

(06-16-2015 11:38 PM)XuN Wrote:  Checks for this skill can be disabled via @SkillUseQuick in characters or @UseQuick in the skill.

How?
@usequick
ACTDIFF=10000


???


And if I force parrying to fail, @Damage will fire on a item?

I have some scripts under @damage in some special items and I would like to keep them work.


RE: ItemDamageChance set to 0, items still get damage - Shamino - 06-17-2015 03:36 AM

Put trigger under Parrying SKILL for force the skill to fail everytime.

@UseQuick
ARGN3=0
RETURN 0