Jump to content

Stolao's Non-Abuse Healer [v1.05]


Stolao

Recommended Posts


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

< Stolao's Non-Abuse Healer>



Features:

  • A Simple Time Delays healer, that cancels if player moves

Todo:

  • 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:

Edited by Stolao
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  181
  • Reputation:   53
  • Joined:  04/07/13
  • Last Seen:  

Well, isn't that part an infinite loop:

	while(1){
		progressbar "0x11CC99",2;
		percentheal rand(5),rand(5);
	}
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

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 by Stolao
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

instead of for perhap you might wanna try this ?

	while( HP < MaxHP ){
		progressbar "0x11CC99",2;
		percentheal rand(2,5),rand(2,5);
	}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

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 by Stolao
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  181
  • Reputation:   53
  • Joined:  04/07/13
  • Last Seen:  

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 :P

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

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 :P

 

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 &&

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  181
  • Reputation:   53
  • Joined:  04/07/13
  • Last Seen:  

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.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

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 :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   3
  • Joined:  02/07/12
  • Last Seen:  

Good script.

How to add buff to this script?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

*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?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Update 1.03 -> 1.05

v1.04 Added Config
v1.05 Added Buffer per requests
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...