Blow question - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Blow question (/Thread-Blow-question) Pages: 1 2 |
Blow question - daedelus - 10-26-2012 01:43 AM 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 RE: Blow question - darksun84 - 10-26-2012 02:42 AM By default, you can't know the precise location where your hit landed :\ RE: Blow question - daedelus - 10-26-2012 03:02 AM (10-26-2012 02:42 AM)darksun84 Wrote: By default, you can't know the precise location where your hit landed :\ . thanks for your repply. RE: Blow question - RanXerox - 10-26-2012 05:46 AM 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. RE: Blow question - daedelus - 10-26-2012 06:03 AM (10-26-2012 05:46 AM)RanXerox Wrote: It's not exactly what you were looking for, but it's close... greeaaattt i need this because i need find where blow hit. i mean the part of body hit. Thanks RE: Blow question - Rizz - 10-26-2012 11:28 PM If you wanna know where the characaters hit, you need to rewrite the combat hitting using that TAG. Code: ON=@HIT In that way you always know what you hitted. RE: Blow question - daedelus - 10-26-2012 11:38 PM (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. TAG.HITPREFERENCE_CHANCE=1000 it's a normal chance?, i mean like hardcored? This check is valid? Code: ON=@GetHit 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 RE: Blow question - Rizz - 10-27-2012 07:01 AM 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 RE: Blow question - daedelus - 10-27-2012 11:22 AM Thanks Rizz!. Another question the argn1 is 0 all time I dont find the error... Code: [EVENTS E_SIS] RE: Blow question - Rizz - 10-27-2012 08:14 PM I think the problem is here: Code: LOCAL.BONUS.LUMBER = <EVAL (((<SRC.LUMBERJACKING>*2)/1000)/10)> //20.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. |