![]() |
Loot help - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Loot help (/Thread-Loot-help) Pages: 1 2 |
Loot help - pushim - 02-10-2015 11:33 PM I wonder if there is some way that when an NPC is killed, when the SRC have a tag, leave an item in the body of the NPC... or another way to achieve RE: Loot help - Coruja - 02-11-2015 12:31 AM you can add the item using ON=@Create ITEM=i_item or ON=@Death NEWLOOT i_item or ON=@DeathCorpse ARGO.NEWLOOT i_item //here ARGO = corpse RE: Loot help - pushim - 02-11-2015 12:38 AM the point is that the item is obtained only if there is an active tag RE: Loot help - Extreme - 02-11-2015 01:24 AM Who is SRC? RE: Loot help - pushim - 02-11-2015 06:45 AM SRC is the player If a player has a tag, for killing a npc will leave an object in the body of the monster RE: Loot help - Jim - 02-11-2015 05:42 PM maybe you can use "ON=@DeathCorpse" as Coruja said. (attach this trigger to the Monster) and make some judgement in this trigger. e.g. if the attacker.max (or .last) is the player who has the tag. then "ARGO.NEWLOOT i_item //here ARGO = corpse", if not then do nothing RE: Loot help - Artyk - 02-11-2015 10:45 PM i would suggest to use @GetHit on the monster to check if someone with that tag active is attacking him and place another tag on the monster, then use @DeathCorpse checking the monster tag RE: Loot help - pushim - 02-12-2015 12:23 AM ON=@DEATHCORPSE IF (<TAG0.LOOT1>) ARGO.NEWLOOT i_katana ENDIF i can't :/ something is wrong RE: Loot help - XuN - 02-12-2015 02:19 AM You are using (<tag0.loot1>) to check, if you use no reference there ... you'll be checking on the character itself, so first you have to tell Sphere who is the 'killer' there: Code: ON=@DeathCorpse RE: Loot help - Artyk - 02-12-2015 10:53 PM Perhaps I haven't explained well, what i meant is: Code: ON=@GetHit Xun's solution work as well, but you get the loot only if the tag is active on the last attacker, with this one you get the loot if any of the attackers have the tag active |