attacker - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: attacker (/Thread-attacker) Pages: 1 2 |
attacker - Art - 08-17-2012 07:59 AM Greetings! How i can remove data of attackers group on character (attacker.last, etc.) without waiting? RE: attacker - Mordaunt - 08-17-2012 08:16 AM <ACT> is the attacker under a trigger such a @GETHIT ACT= Would clear that I don't know how or when you are wanting to remove the attacker though, so there could be another way, depending on what you are wanting to do. RE: attacker - Art - 08-17-2012 09:00 AM I want to renew (remove previous if it's exist) attacker info right before combat. RE: attacker - Art - 08-18-2012 03:53 PM So how to do it with script? Like: [FUNCTION removeAttacker] ... I don't think ACT= going there. RE: attacker - Shaklaban - 08-18-2012 04:17 PM you can try attacket.clear, but it seems to be broken. maybe it works for you. http://tracker.sphere.torfo.org/bugs/view.php?id=2084 alternatively you can write your own attacker thing with @gethit and mysql. RE: attacker - Art - 08-19-2012 01:30 PM I need to calculate damage. If player did attack with 50 for example, but enemy have armor and he got only 25 damage, how i can calculate it was 25 damage? Because ON=@GetHit shows full amount of attackers hit, but not shows really received damage after armor calculation. I can put memory with timer and calculate new amount of hits with previous amount.. but that timer have delay 1 second. Somebody can drink heal potion instantly after hit in same second, and then memory will count received damage incorrect. RE: attacker - Extreme - 08-19-2012 01:40 PM You can clear all attackers using attacker.clear in on=@gethit You can find all 'attacker' functions in revisions.txt inside your server folder, just find for 'attacker'. RE: attacker - Art - 08-19-2012 06:03 PM I have Sphere build of 2009 year. I tried use attacker.clear and it said wrong command. Or it works only in gethit? I need remove attackers only once, before fight. So i should call before fight gethit with attacker.clear ? Previous question about gethit and getting amount of real damage i asked because of 'write own thing'. RE: attacker - Shaklaban - 08-19-2012 09:08 PM attacker.clear not exist on the 2009 build. you maybe you can try to combine @gethit with @userstats. @userstats triggered when players stats, hp, gold etc. changed and new status packet needs to be sended to client. example: Code: on=@gethit also you can try to use timerd (which can have 0.1 seconds minimum but in 0.1 second player still can get hit etc.) RE: attacker - Art - 08-19-2012 11:31 PM I'm already using timerd item on the ground for calculation received damage, but it's not always correct. Because character can receive few damages at same 0.1 second. But thank you for advice about on=@userstats, didn't knew about it. I will try it. Hm just tested ON=@UserStats serv.log TEST And this works only when i press 'Status' button. It doesn't works when character fights and his stats changing |