Strength of a Potion - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Strength of a Potion (/Thread-Strength-of-a-Potion) |
Strength of a Potion - Hustensaft - 05-14-2013 08:30 PM Hi all, i'm currently setting up my Alchemysystem and i want to have Potions in different strengths. Like a Healing Potion, which heals 20 HP, a Potion of gerater Heling, which heals 40 HP, a Potion of superior Healing, which heals 60 HP and so on. Wiki tells me, that i can set the strength of a Potion with More2, but it doesn't seem to work. No matter what i put on More2, the Potions always heal like 9 HP. What am i doing wrong there? RE: Strength of a Potion - darksun84 - 05-14-2013 09:17 PM Potion Theory : While potion more2 is the strength of a potion, potion more1 is the spell that the item "use" when the player drink it. In the heal spell script block there is this field : EFFECT=5,20 When an healing potion is drinked, its more2 value just give more chance to heal a number of hitpoints more near to 20 than to 5. Anyway i don't know why you get always 9hp. But you should try to use this sort of template for you custom potion PHP Code: [SPELL 1000] Anyway i can't test it right so i don't know if it will work There are faster way to create custom various potion, but i consider this the more correct. RE: Strength of a Potion - Hustensaft - 05-15-2013 04:12 AM Hi, thx for the answer I tried this, but the new spell had no healing effect. So i added this to the spell: PHP Code: ON=@Effect The Spell works now as intented, it heals 20 HP or less, if the Player is less then 20 HP missing. I now edited the script of the potion to the new Spell and the intented strength of 20: PHP Code: ON=@Create but the Potion doesn't work at all, you just drink it, but without any effect, no sound, no magic sparkles, no healing. Just gulp and an emtpy bottle. Do you have any idea, what i missed? RE: Strength of a Potion - darksun84 - 05-15-2013 08:02 AM Actually i don't know, I think there is still something needed for activating the spell properly. Considering that both item and spell are custom, maybe it's possible that item potion need PHP Code: ON=@Dclick RE: Strength of a Potion - Hustensaft - 05-15-2013 08:35 AM This is very strange. I tested this, and it worked (with commas), but the effect was double. So i deleted the lines and tried it as it was before, and suddenly it worked exactly as intended. PHP Code: [SPELL 1000] and in the Potion script PHP Code: ON=@Create work perfectly. Maybe i forgot to restart the server after adding the ON=@EFFECT Stuff or something like that. A little strange, but it works Thanks a lot for the help RE: Strength of a Potion - darksun84 - 05-15-2013 08:38 AM Ahhh yes sorry, you have to restart everytime even if you have to modify some spell parts.. Maybe the console command load spherespells.scp can avoid the restart. RE: Strength of a Potion - Hustensaft - 05-15-2013 11:04 PM Ah, good to know, i'll better add that in my "Important Notes", maybe i'll have to deal with some other spells later |