Stolao Posted July 11, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 25 Share Posted July 11, 2013 (edited) < Stolao's Non-Abuse Healer> Features: A Simple Time Delays healer, that cancels if player movesTodo: Suggestions? Optimize? Changelog: v1.00 Release v1.01 Changed while() -> for v1.02 Changed for -> while(hp/sp) v1.03 Fixed logic bug v1.04 Added Config v1.05 Added Buffer per requests Links: v1.05 - Non-Abuse_Healer.txt v1.03Non-Abuse_Healer.txt v1.00Non-Abuse_Healer.txt Edited July 19, 2013 by Stolao 1 Quote Link to comment Share on other sites More sharing options...
DeadlySilence Posted July 11, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 181 Reputation: 53 Joined: 04/07/13 Last Seen: August 23, 2014 Share Posted July 11, 2013 Well, isn't that part an infinite loop: while(1){ progressbar "0x11CC99",2; percentheal rand(5),rand(5); } Quote Link to comment Share on other sites More sharing options...
Stolao Posted July 11, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 25 Author Share Posted July 11, 2013 (edited) yes however once a player moves progress bar is disables and script ends~ Well, isn't that part an infinite loop: while(1){ progressbar "0x11CC99",2; percentheal rand(5),rand(5); } Edit: Update 1.00 -> 1.01 v1.01 Replaced while() with for Edited July 11, 2013 by Stolao Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 12, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: Saturday at 07:13 PM Share Posted July 12, 2013 instead of for perhap you might wanna try this ? while( HP < MaxHP ){ progressbar "0x11CC99",2; percentheal rand(2,5),rand(2,5); } 1 Quote Link to comment Share on other sites More sharing options...
Stolao Posted July 12, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 25 Author Share Posted July 12, 2013 (edited) Ill for that with an SP check as well, ty for suggestion. I really should wake up before scripting lol never think things through in morning instead of for perhap you might wanna try this ? while( HP < MaxHP ){ progressbar "0x11CC99",2; percentheal rand(2,5),rand(2,5); } Edit: Update 1.01 -> 1.02 v1.02 Changed for -> while(hp/sp) Edited July 12, 2013 by Stolao Quote Link to comment Share on other sites More sharing options...
DeadlySilence Posted July 12, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 181 Reputation: 53 Joined: 04/07/13 Last Seen: August 23, 2014 Share Posted July 12, 2013 You might want to change while( HP < MaxHP && SP < Max SP){ to while( HP < MaxHP || SP < Max SP){ because HP and SP aren't always at 100% at the same time 1 Quote Link to comment Share on other sites More sharing options...
Stolao Posted July 12, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 25 Author Share Posted July 12, 2013 You might want to change while( HP < MaxHP && SP < Max SP){ to while( HP < MaxHP || SP < Max SP){ because HP and SP aren't always at 100% at the same time lol then it only heals till hp or sp is full XD, thats kinda funny actually, but no ill have to to heal both hp and sp all the way using && Quote Link to comment Share on other sites More sharing options...
DeadlySilence Posted July 12, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 181 Reputation: 53 Joined: 04/07/13 Last Seen: August 23, 2014 Share Posted July 12, 2013 If you have 50% HP and 20% SP, you probably won't get full SP. Let's assume you always get 5% for HP and SP. You'll end up with this: (100% < 100%) && (70% < 100%) which results in "false" You will end up with 70% SP because it stops once either HP or SP are fully healed. 1 Quote Link to comment Share on other sites More sharing options...
Stolao Posted July 12, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 25 Author Share Posted July 12, 2013 If you have 50% HP and 20% SP, you probably won't get full SP. Let's assume you always get 5% for HP and SP. You'll end up with this: (100% < 100%) && (70% < 100%) which results in "false" You will end up with 70% SP because it stops once either HP or SP are fully healed. your right i go to my corner now Quote Link to comment Share on other sites More sharing options...
casteryee Posted July 13, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 80 Reputation: 3 Joined: 02/07/12 Last Seen: January 18, 2016 Share Posted July 13, 2013 Good script. How to add buff to this script? Quote Link to comment Share on other sites More sharing options...
Stolao Posted July 13, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 25 Author Share Posted July 13, 2013 *sc_start <effect type>,<ticks>,<extra argument>{,<GID>}; *sc_start2 <effect type>,<ticks>,<extra argument>,<percent chance>{,<GID>}; *sc_start4 <effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<GID>}; *sc_end <effect type>{,<GID>}; These command bestow a status effect on the invoking character. This command is used a lot in the item scripts. // This would poison them for 10 min sc_start SC_Poison,600000,0; Effect type is a number of effect, 'db/const.txt' lists the common (mostly negative) status effect types as constants, starting with 'SC_'. You can also use this to give someone an effect of a player-cast spell: // This will bless someone as if with Bless 10: sc_start 10,240000,10; Extra arguments meaning differs depending on the effect type, for most effects caused by a player skill the extra argument means the level of the skill that would have been used to create that effect, for others it might have no meaning whatsoever. You can actually bless someone with a 0 bless spell level this way, which is fun, but weird. The GID, if given, will cause the status effect to appear on a specified character, instead of the one attached to the running script. This has not been properly tested. 'sc_start2' is perfectly equivalent, but unlike 'sc_start', a status change effect will only occur with a specified percentage chance. 10000 given as the chance is equivalent to a 100% chance, 0 is a zero. 'sc_start4' is just like sc_start, however it takes four parameters for the status change instead of one. What these values are depends on the status change in question. For example, elemental armor defense takes the following four values: - val1 is the first element, val2 is the resistance to the element val1. - val3 is the second element, val4 is the resistance to said element. eg: sc_start4 SC_DefEle,60000,Ele_Fire,20,Ele_Water,-15; 'sc_end' will remove a specified status effect. If SC_All is used (-1), it will do a complete removal of all statuses (although permanent ones will re-apply). You can see the full list of status effects caused by skills in 'src/map/status.h' - they are currently not fully documented, but most of that should be rather obvious. A full list of all SC_ can be found in your /db/const.txt Or did you want a special way of buffing like a % chance on each heal? Quote Link to comment Share on other sites More sharing options...
Stolao Posted July 19, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 25 Author Share Posted July 19, 2013 Update 1.03 -> 1.05 v1.04 Added Config v1.05 Added Buffer per requests Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.