The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ItemDamageChance set to 0, items still get damage
Author Message
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #1
ItemDamageChance set to 0, items still get damage
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
(This post was last modified: 06-11-2015 06:28 AM by Rizz.)
06-11-2015 06:20 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: ItemDamageChance set to 0, items still get damage
Here's a link for latest build, it's working fine for me: https://www.dropbox.com/s/k1aqepw37wytzn...r.exe?dl=0
06-11-2015 08:19 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #3
RE: ItemDamageChance set to 0, items still get damage
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?
(This post was last modified: 06-16-2015 08:13 AM by Rizz.)
06-16-2015 08:12 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: ItemDamageChance set to 0, items still get damage
probably it could be something related to parrying, since parrying can damage the shield or weapon (if the attack got parried by the weapon)
06-16-2015 09:34 AM
Find all posts by this user Like Post Quote this message in a reply
ForesteR
Apprentice
*

Posts: 45
Likes Given: 1
Likes Received: 0 in 0 posts
Joined: May 2015
Reputation: 0



Post: #5
RE: ItemDamageChance set to 0, items still get damage
[TYPEDEF T_EVENTS_ITEM_DURABILITY]
ON=@DAMAGE
RETURN 1
06-16-2015 09:56 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #6
RE: ItemDamageChance set to 0, items still get damage
(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?
(This post was last modified: 06-16-2015 10:22 PM by Rizz.)
06-16-2015 10:22 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #7
RE: ItemDamageChance set to 0, items still get damage
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.
(This post was last modified: 06-16-2015 11:45 PM by darksun84.)
06-16-2015 11:19 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes darksun84's post
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #8
RE: ItemDamageChance set to 0, items still get damage
Checks for this skill can be disabled via @SkillUseQuick in characters or @UseQuick in the skill.
06-16-2015 11:38 PM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #9
RE: ItemDamageChance set to 0, items still get damage
(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.
(This post was last modified: 06-17-2015 02:59 AM by Rizz.)
06-17-2015 02:53 AM
Find all posts by this user Like Post Quote this message in a reply
Shamino
Noob Scripter
*

Posts: 57
Likes Given: 5
Likes Received: 15 in 11 posts
Joined: Mar 2012
Reputation: 0

Exilio UO

Post: #10
RE: ItemDamageChance set to 0, items still get damage
Put trigger under Parrying SKILL for force the skill to fail everytime.

@UseQuick
ARGN3=0
RETURN 0

"My world is hell for the infidels. My blood pleasure of the immortals"
[Image: 2ec003662b15c61da117767a59bb99bao.jpg]
06-17-2015 03:36 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)