SphereCommunity
Instant next attack - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Instant next attack (/Thread-Instant-next-attack)



Instant next attack - Tyxn - 10-13-2017 01:36 AM

after first attack how can i do my second attack instant with i_dagger.
tag.override.hitspeed = 0 it doesnt work ? i use 56d last build


RE: Instant next attack - darksun84 - 10-13-2017 04:38 AM

tag.override.hitspeed doesn't exist, you have to use argn1 in @HitTry for overriding the swing speed. Take note that the mininum speed reachable is 0.5 seconds.


RE: Instant next attack - Tyxn - 10-13-2017 05:24 AM

there is no way to make an instant second hit ?


RE: Instant next attack - darksun84 - 10-13-2017 05:30 AM

you can simulate a 2nd attack by using a thing like this in @hittrigger

Code:
ON=@Hit
if (<skillusequick <weapon.skill>,<actdiff>>) && (<weapon.baseid> == i_dagger)
    src.damage <argn1>,<argn2>,<uid>,<damphysical>,<damfire>,<damcold>,<damenergy>,<dampoison>
    anim blabla
endif



RE: Instant next attack - Tyxn - 10-13-2017 05:41 AM

Yes ! its what im looking for but attacker need a chance to miss in the second attack.


RE: Instant next attack - darksun84 - 10-13-2017 05:47 AM

that's what skillusequick does


RE: Instant next attack - Tyxn - 10-13-2017 05:50 AM

i do it like this
ACTDIFF = <eval RAND(-10,-9)>
if (<skillusequick <weapon.skill>,<actdiff>>) && (<weapon.baseid> == i_katana)
src.damage <argn1>,<argn2>,<uid>,<damphysical>,<damfire>,<damcold>,<damenergy>,<dampoison>
src.say vurdu
endif

thanks for help darksun84


RE: Instant next attack - darksun84 - 10-13-2017 06:02 AM

The calculation used by UseQuick is different from the one used for combat, it's actually the calculation used by all the other skills!
This a quick summary how the skill chance is calculated:
The ACTDIFF value (ARGN2 in @SkillUseQuick/@UseQuick) is subtracted from the adjusted skill value (skill + stat bonuses), then the chance of success follow this sort of pattern:
Code:
Every 10% step of difference, the increment/decrement chance is halved in the following way:
At -50% difference the chance is around 1.5% (a decrement of 1.5625%)
At -40% difference the chance is around 3.1% (a decrement of 3.125%)
At -30% difference the chance is around 6.2% (a decrement of 6.25%)
At -20% difference the chance is 12.5% (a decrement of 12.5%)
At -10% difference the chance is 25% (a decrement of 25%)
At 0 difference chance is: 50%
At +10% difference the chance is 75% (an increment of 25%)
At +20% difference the chance is 87.5% (an increment of 12.5%)
At +30% difference the chance is  around 93.7% (an increment of 6.25%)
At +40% difference the chance is around  96.8%(an increment of 3.125%)
At +50% difference the chance is around 98.3% (an increment of 1.5625%)
You can overwrite the behaviour by using @UseQuick (in the fencing skill) or @SkillUseQuick (in a player event).

So if you want that your second attack strikes around a 50% chance, just use
skillusequick <weapon.skill>,<<weapon.skill>>

See:
https://wiki.spherecommunity.net/index.php?title=@SkillUseQuick
https://wiki.spherecommunity.net/index.php?title=@UseQuick


RE: Instant next attack - Tyxn - 10-13-2017 06:07 AM

I got it ^^ thanks