SphereCommunity
parry on=@usequick. how to get attacker? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: parry on=@usequick. how to get attacker? (/Thread-parry-on-usequick-how-to-get-attacker)



parry on=@usequick. how to get attacker? - bmanny - 05-12-2017 03:48 AM

I want to get the attacker that I parried.

ex:

ON=@UseQuick
IF (<ARGN3>)

ATTACKER.say was parried

ENDIF


RE: parry on=@usequick. how to get attacker? - darksun84 - 05-12-2017 04:10 AM

Do you know that i have the same issue Big Grin ?

I don't know a good way to solve that, i tried by using both <attacker.last> and saving the attacker's UID inside a tag.
The main problem is when there more than one attacker, sometimes it happens that you get the wrong attacker by using the methods above.


RE: parry on=@usequick. how to get attacker? - bmanny - 05-12-2017 04:13 AM

say <src.ATTACKER.LAST> attacker

Gives me the serial of the mob hitting me. How do I use the serial to get the name, str, ect from the mob?

My other idea... can I disable ON=@UseQuick and simply call the parry in my combat math?


RE: parry on=@usequick. how to get attacker? - darksun84 - 05-12-2017 04:35 AM

Attacker.last return the uid, so you can use:
Code:
ref1 = <attacker.last>
say <ref1.name>
OR
Code:
say <uid.<attacker.last>.name>

You can disable the ON=@UseQuick for parrying by adding FLAGS=SKF_SCRIPTED in the parryking skill block (then resync,restart server)