![]() |
@DeathCorpse - ATTACKER problem - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: @DeathCorpse - ATTACKER problem (/Thread-DeathCorpse-ATTACKER-problem) Pages: 1 2 |
@DeathCorpse - ATTACKER problem - xwerswoodx - 01-31-2017 04:06 PM I am trying to do experience system but there is a problem because ATTACKER doesn't work under @DeathCorpse, but I search little and some developers gives feedback that it works under deathcorpse so where I am doing wrong? Code: [Events e_npc_level] Code: [Function GIVEXP] <ATTACKER> - RETURN 0 <ATTACKER.LAST> - RETURN 0 Errors: It says eval doesn't divide by 0 (which is equals to <ATTACKER>) Code: 06:01:ERROR:(sphere_events_uommo.scp,126)Exp_GetVal: Divide by 0 RE: @DeathCorpse - ATTACKER problem - darksun84 - 01-31-2017 08:14 PM Argo is actually an item (the corpse item), and items doesn't have the attacker property. RE: @DeathCorpse - ATTACKER problem - xwerswoodx - 02-01-2017 01:42 AM Yeah, I just tried it but the problem is, <UID> (which is npc) doesn't attacker either. On=@Death, I can see attackers, but on=@Deathcorpse, Attacker returns 0 for NPC, I change my code that to save attackers (maybe someone need it); Code: [Events e_npc_level] RE: @DeathCorpse - ATTACKER problem - Catalan_mistral - 02-01-2017 02:16 AM Sorry if i'm talking crap, can you not make use of the MORE2 on the corpse, as that holds the serial of the person who did the killing blow? RE: @DeathCorpse - ATTACKER problem - xwerswoodx - 02-01-2017 02:19 AM Yes I think we can but under @DeathCorpse I and SRC is equals to <MORE2>, I ckeched it ![]() RE: @DeathCorpse - ATTACKER problem - Coruja - 02-01-2017 02:31 AM I can't remember correctly, but I think when an char kills another char, sphere will call triggers using this sequence: 1) @Kill 2) @Death 3) @DeathCorpse and the ATTACKER list is cleared on @Kill or @Death, so there's no way to get it on @DeathCorpse anyway, if you don't want to do nothing with the corpse, maybe it's better change your event to only use @Death instead @DeathCorpse RE: @DeathCorpse - ATTACKER problem - xwerswoodx - 02-01-2017 02:46 AM I remember @Death before than @Kill but this is not important (just for information if someone need it), because I needed to check attacker (list) on deathcorpse and it's possible to get corpse uid only on @Deathcorpse, I thought we can use ATTACKER under @Deathcorpse because I found this topic which has a post from XUN (Developer) with ATTACKER under @Deathcorpse, https://forum.spherecommunity.net/Thread-Loot-help?page=2 Because I tried to add EXP command which makes you clear corpses near you and get experience, but I try to add block that you don't get if you don't have any damage on it. So I tried to check attackers on from corpse but it's 0 so I tried to add attackers under DeathCorpse but it's cleared like you said. But in the link Xun send a post with attacker under deathcorpse and I thought I did something wrong. Also I don't wanna post new topic for that, is there any Trigger or Setting to block items get damage? I tried @Damage but it's not working, and I didn't find any settings under Sphere.ini RE: @DeathCorpse - ATTACKER problem - darksun84 - 02-01-2017 04:00 AM I tried <attacker> inside @deathcorpse and it actually works for me ![]() RE: @DeathCorpse - ATTACKER problem - xwerswoodx - 02-01-2017 02:22 PM (02-01-2017 04:00 AM)darksun84 Wrote: I tried <attacker> inside @deathcorpse and it actually works for me Which version are you using? I am using 0.56c, maybe older versions has it. RE: @DeathCorpse - ATTACKER problem - darksun84 - 02-01-2017 07:00 PM Ah i am using 56d, however from the revision: 27-11-2006, Vjaka - Added: ATTACKER keyword to access last attackers of a character. Usage: <attacker> returns amount of attackers <attacker.x> returns UID of the attacker (or 0 if there is no attacker) <attacker.x.dam> returns total damage done by the attacker The list is being cleared upon death after @DeathCorpse trigger. |