![]() |
Gold Loot - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Gold Loot (/Thread-Gold-Loot) |
Gold Loot - Van Glan Bloom - 03-09-2015 09:36 AM Hello, I wish you would give me a hand in a script. I'm trying to create a script for the player kills a mob, the money goes directly to the bag of the player. I have this : Code: [EVENTS e_money_collect] Code: [FUNCTION loot_corpse] RE: Gold Loot - azmanomer - 03-09-2015 09:39 AM on @kill if (<argo.isevent.e_exp>) || (<argo.baseid>==c_zombie_m) newgold 5000 endif RE: Gold Loot - Van Glan Bloom - 03-10-2015 12:59 AM Hello azmanomer, I know how to add the money after killing a mob, my goal is not that. The purpose of the script afther kill the mob the money go automatly for the bag of the player. Ex: If the mob have 100 gold in the corpse after the dead, this money go automaticly for the player, The player dont need open the corpse for loot the money RE: Gold Loot - azmanomer - 03-10-2015 01:29 AM oh sorry then this could be help; on @death IF (<ATTACKER>) FOR 0 <EVAL <ATTACKER>-1> IF (<ATTACKER.<dLOCAL._FOR>.DAM>) REF1=<ATTACKER.<dLOCAL._FOR>> IF (<REF1.FLAGS>&STATF_PET) REF1=<REF1.OWNER> ENDIF IF (<REF1.ISPLAYER>) forcont <findlayer.21> 255 if <baseid>==i_gold cont=<ref1.findlayer.21> endif endfor endif endif enfor endif This could be help i cant test it right now RE: Gold Loot - Van Glan Bloom - 03-10-2015 03:26 AM I go release all my script and maybe you can help. I dont understand what i make wrong. I fixed some bugs but, if i chance someting in the script the bugs come again =/ Code: //************* Pet Rabbit ************** Code: [dialog d_pet_configuration] Code: [EVENTS e_no_money_collect] // Add in player RE: Gold Loot - XuN - 03-17-2015 08:42 PM This should do it faster: Code: ON=@Kill RE: Gold Loot - Van Glan Bloom - 03-17-2015 11:51 PM You have Help me XuN, Thx =) but, now i have a new problem xD After i kill the mob, the gold is removed, but not going to bag the player, but to the bank = / The intention was that the money was to bag Code: [EVENTS e_money_collect] RE: Gold Loot - darksun84 - 03-18-2015 12:13 AM TRy with newgold PHP Code: ON=@Kill RE: Gold Loot - XuN - 03-18-2015 06:10 AM (03-18-2015 12:13 AM)darksun84 Wrote: TRy with newgold That will do it ![]() RE: Gold Loot - Van Glan Bloom - 03-18-2015 11:33 PM Thx Darksun84 you have decided my problem =) Now in the same script i have a little bug in shrink the pet. When unshrink the pet, it does not recognize the player as its owner. I creat this : Code: [FUNCTION petshrink] |