Changing Life Mana Stam Regen *solved* - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Changing Life Mana Stam Regen *solved* (/Thread-Changing-Life-Mana-Stam-Regen-solved) Pages: 1 2 |
Changing Life Mana Stam Regen *solved* - AmpereJoule - 09-13-2013 06:34 AM Hello, I would like to change the life regen formula to: " Life_regen_value = str/100 " (min = 1) " Life_regen_time = 20 - healing/5 " (max = 1) I know that in sphere.ini there is: Code: // Time in seconds for hitpoint regeneration So, how can I change it like the formula I said above? Thank you. RE: Changing Life Regen - RanXerox - 09-13-2013 06:55 AM You can override the healing rate of an individual by putting TAG(s) on the player: TAG.OVERRIDE.REGEN_0 //Is the "rate" of hitpoint regeneration (default is defined by Regen0 in the Sphere.ini) TAG.OVERRIDE.REGENVAL_0 //Is the "amount" of hitpoint regeneration (default=1) To set the TAGs, you need a event on all the players and mosters that calls the @SkillChange trigger (to capture changes in Healing) and the @StatChange (to detect changes in STR.) RE: Changing Life Regen - AmpereJoule - 09-13-2013 10:04 AM I have a script that is a Stone which the player has to choose: Warrior <button here> Archer <button here> Mage <button here> these are some lines of it: Code: [DIALOG D_classes BUTTON] Can I put the TAGs here? and how can I get the ARGN? (I only know programming C and VBA, and there i would create a variable inside of a function) Here it looks like: Code: @SkillChange PS: I learn that from: http://wiki.sphere.torfo.org/index.php/@SkillChange and http://wiki.sphere.torfo.org/index.php/@StatChange PS 2: Is TAG.OVERRIDE.REGEN_1 and TAG.OVERRIDE.REGENVAL_1 the time and value of Stam Regen? Is TAG.OVERRIDE.REGEN_2 and TAG.OVERRIDE.REGENVAL_2 the time and value of Mana Regen? RE: Changing Life Regen - Extreme - 09-13-2013 12:41 PM PHP Code: [EVENTS E_REGEN] Stam: TAG.OVERRIDE.REGEN_2 and TAG.OVERRIDE.REGENVAL_2 RE: Changing Life Regen - AmpereJoule - 09-13-2013 01:07 PM (09-13-2013 12:41 PM)Extreme Wrote: it is only changing the value, right? The time between the heals is "100" seconds, right? To activate it only for players, Code: //Events related to all players PHP Code: [EVENTS E_REGEN] Is it Right? RE: Changing Life Regen - Extreme - 09-13-2013 01:24 PM (09-13-2013 01:07 PM)AmpereJoule Wrote: it is only changing the value, right? RE: Changing Life Regen - AmpereJoule - 09-13-2013 01:33 PM (09-13-2013 01:24 PM)Extreme Wrote:(09-13-2013 01:07 PM)AmpereJoule Wrote: it is only changing the value, right? I do not want to regen in 1 second. I want that it regenerates on 20 seconds - (healing of the player)/5, and then when the player gets healing 100.0 it will be 1 second I also want that the value that regenerates is 1 and then it grows as the str grows. and in your code it looks like it will always be 1 second to regen, and the healing will affect the value that will regenerate. (But thank you, you opened my mind \o\) RE: Changing Life Regen - AmpereJoule - 09-14-2013 04:41 AM Hello? Is my code right? I do not know how to use "IF" here, please someone help! RE: Changing Life Regen - Extreme - 09-14-2013 04:54 AM Ahh, now I understand you... You wrote this: Code: I would like to change the life regen formula to: Well, the TAG.OVERRIDE.REGEN_0 is not in seconds and I don't know how it works... I just know that setting to 1 it will not work on every second, and setting 100 you will get on every second. Then I don't know how to do what you want. You will need test again and again until you get what you need. PHP Code: [EVENTS E_REGEN] It will work as you want... just check the regen_0 timer thing... do tests!!!!!!!!!! RE: Changing Life Regen - AmpereJoule - 09-14-2013 05:58 AM (09-14-2013 04:54 AM)Extreme Wrote: Ahh, now I understand you... nice! But I want that 1 to be the min of REGENVAL_0, and the MAX i want to be str/100 About REGEN_0 I want that it initiates at 20 seconds and the max must be 1 second, but i want that it changes as the healing changes ( 20 - healing/5 ). Can you explain your code to me? (every single simbol, like "<" and "(" please?) pleeeease? |