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
Blow question
Author Message
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #1
Blow question
How I can know where the character has struck the blow?.
My intention is if I hit on the head, make a random block to all damage or receive more damage.

Thanks
10-26-2012 01:43 AM
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: #2
RE: Blow question
By default, you can't know the precise location where your hit landed :\
10-26-2012 02:42 AM
Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #3
RE: Blow question
(10-26-2012 02:42 AM)darksun84 Wrote:  By default, you can't know the precise location where your hit landed :\

Sad. thanks for your repply.
10-26-2012 03:02 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #4
RE: Blow question
It's not exactly what you were looking for, but it's close...

21-05-2008, Nazghul
- Added: Combat flags to Sphere.ini to allow stacking armor and aimed hits. Example of usage
is in scripts/AddOns.
Aimed hits are controlled by tags on the "hitter": TAG.HITPREFERENCE holds the targetted
zone: 1=head, 2=neck/throat, 3=back, 4=chest, 5=arms, 6=hands, 7=legs, 8=feet (if the value
is out of this range it will be changed by %9; "0" means: no preference set);
TAG.HITPREFERENCE_CHANCE (0..1000) is the chance to really hit the desired area;
TAG.HITPREFERENCE.BONUS is the percent the damage is raised when hit where desired,
TAG.HITPREFERENCE.PENALTY is the percent the damage is lowered if the area was missed.
The last two values are defaulting to "30".
The system is perhaps useful to script a system where a player can look for weak armored
bodyparts of his opponent and try to hit him there; could be essential if armor stacking
is used.
(This post was last modified: 10-26-2012 05:47 AM by RanXerox.)
10-26-2012 05:46 AM
Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #5
RE: Blow question
(10-26-2012 05:46 AM)RanXerox Wrote:  It's not exactly what you were looking for, but it's close...

21-05-2008, Nazghul
- Added: Combat flags to Sphere.ini to allow stacking armor and aimed hits. Example of usage
is in scripts/AddOns.
Aimed hits are controlled by tags on the "hitter": TAG.HITPREFERENCE holds the targetted
zone: 1=head, 2=neck/throat, 3=back, 4=chest, 5=arms, 6=hands, 7=legs, 8=feet (if the value
is out of this range it will be changed by %9; "0" means: no preference set);
TAG.HITPREFERENCE_CHANCE (0..1000) is the chance to really hit the desired area;
TAG.HITPREFERENCE.BONUS is the percent the damage is raised when hit where desired,
TAG.HITPREFERENCE.PENALTY is the percent the damage is lowered if the area was missed.
The last two values are defaulting to "30".
The system is perhaps useful to script a system where a player can look for weak armored
bodyparts of his opponent and try to hit him there; could be essential if armor stacking
is used.

Shock greeaaattt i need this because i need find where blow hit. i mean the part of body hit.

Thanks
10-26-2012 06:03 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: Blow question
If you wanna know where the characaters hit, you need to rewrite the combat hitting using that TAG.

Code:
ON=@HIT
TAG.HITPREFERENCE_CHANCE=1000
DORAND 8
TAG.HITPREFERENCE=1
TAG.HITPREFERENCE=2
TAG.HITPREFERENCE=3
TAG.HITPREFERENCE=4
TAG.HITPREFERENCE=5
TAG.HITPREFERENCE=6
TAG.HITPREFERENCE=7
TAG.HITPREFERENCE=8
ENDDO

In that way you always know what you hitted.
(This post was last modified: 10-26-2012 11:28 PM by Rizz.)
10-26-2012 11:28 PM
Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #7
RE: Blow question
(10-26-2012 11:28 PM)Rizz Wrote:  If you wanna know where the characaters hit, you need to rewrite the combat hitting using that TAG.

Code:
ON=@HIT
TAG.HITPREFERENCE_CHANCE=1000
DORAND 8
TAG.HITPREFERENCE=1
TAG.HITPREFERENCE=2
TAG.HITPREFERENCE=3
TAG.HITPREFERENCE=4
TAG.HITPREFERENCE=5
TAG.HITPREFERENCE=6
TAG.HITPREFERENCE=7
TAG.HITPREFERENCE=8
ENDDO

In that way you always know what you hitted.

TAG.HITPREFERENCE_CHANCE=1000 it's a normal chance?, i mean like hardcored?

This check is valid?

Code:
ON=@GetHit
            IF <ISWEAPON>
     IF (<TAG.HITPREFERENCE> ==1)
     ARGN1 -= <EVAL ((<ARGN1>)-(<FLOAT.ABSORVE.DAMAGE.AR.HELM>))>
    
     IF (<TAG.HITPREFERENCE> == 2)
     ARGN1 -= <EVAL ((<ARGN1>)-(<FLOAT.ABSORVE.DAMAGE.AR.NECK>))>
    
     IF (<TAG.HITPREFERENCE> == 3)
     ARGN1 -= <EVAL ((<ARGN1>)-(<FLOAT.ABSORVE.DAMAGE.AR.BACK>))>
    
     IF (<TAG.HITPREFERENCE> == 4)
     ARGN1 -= <EVAL ((<ARGN1>)-(<FLOAT.ABSORVE.DAMAGE.AR.CHEST>))>
    
     IF (<TAG.HITPREFERENCE> == 5)
     ARGN1 -= <EVAL ((<ARGN1>)-(<FLOAT.ABSORVE.DAMAGE.AR.ARMS>))>
    
     IF (<TAG.HITPREFERENCE> == 6)
     ARGN1 -= <EVAL ((<ARGN1>)-(<FLOAT.ABSORVE.DAMAGE.AR.HANDS>))>
    
     IF (<TAG.HITPREFERENCE> == 7)
     ARGN1 -= <EVAL ((<ARGN1>)-(<FLOAT.ABSORVE.DAMAGE.AR.LEGS>))>
    
     IF (<TAG.HITPREFERENCE> == 8)
     ARGN1 -= <EVAL ((<ARGN1>)-(<FLOAT.ABSORVE.DAMAGE.AR.FEET>))>
        ENDIF
      ENDIF
     ENDIF
    ENDIF
   ENDIF
  ENDIF
ENDIF
ENDIF

and another question, How can i make a random of parrying skill?. greater skill greater chance of success. (more skill more chances to block blow)

Thanks
(This post was last modified: 10-27-2012 04:31 AM by daedelus.)
10-26-2012 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: #8
RE: Blow question
No, TAG.HITPREFERENCE_CHANCE=1000 means that you will hit the selected location 100% of times.

Ex:

TAG.HITPREFERENCE_CHANCE=1000
TAG.HITPREFERENCE=1

You always hit the location 1.

Yes you can check the location by checking the tag under @gethit
(This post was last modified: 10-27-2012 07:02 AM by Rizz.)
10-27-2012 07:01 AM
Find all posts by this user Like Post Quote this message in a reply
daedelus
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 2 in 1 posts
Joined: Aug 2012
Reputation: 0



Post: #9
RE: Blow question
Thanks Rizz!. Another question the argn1 is 0 all time Confused I dont find the error...

Code:
[EVENTS E_SIS]
/////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////BONUS//////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
LOCAL.BONUS.LUMBER = <EVAL (((<SRC.LUMBERJACKING>*2)/1000)/10)> //20.0
LOCAL.BONUS.TACT = <EVAL (((<SRC.TACTICS>*3)/1000)/10)> //30.0
LOCAL.BONUS.ANAT = <EVAL (((<SRC.ANATOMY>*4)/1000)/10)> //40.0

ON=@HIT
    TAG.HITPREFERENCE_CHANCE=1000
    DORAND 8
    TAG.HITPREFERENCE=1
    TAG.HITPREFERENCE=2
    TAG.HITPREFERENCE=3
    TAG.HITPREFERENCE=4
    TAG.HITPREFERENCE=5
    TAG.HITPREFERENCE=6
    TAG.HITPREFERENCE=7
    TAG.HITPREFERENCE=8
    ENDDO

    IF <SRC.FINDLAYER.LAYER_HAND1.ISWEAPON> || <SRC.FINDLAYER.LAYER_HAND2.ISWEAPON>
     ARGN1 = <EVAL (<ARGN1> * (<LOCAL.BONUS.LUMBER> + <LOCAL.BONUS.TACT> + <LOCAL.BONUS.ANAT>))>
say <argn1>
    ENDIF
10-27-2012 11:22 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: #10
RE: Blow question
I think the problem is here:
Code:
LOCAL.BONUS.LUMBER = <EVAL (((<SRC.LUMBERJACKING>*2)/1000)/10)> //20.0
LOCAL.BONUS.TACT = <EVAL (((<SRC.TACTICS>*3)/1000)/10)> //30.0
LOCAL.BONUS.ANAT = <EVAL (((<SRC.ANATOMY>*4)/1000)/10)> //40.0

LOCAL.BONUS.LUMBER = <EVAL (((<SRC.LUMBERJACKING>*2)/1000)/10)>

LOCAL.BONUS.LUMBER = (((1000*2)/1000)/10) = 0.2 = 0

These local are 0 bcuz you use eval instead of floatval, so every float local going to be 0.
10-27-2012 08:14 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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