Doku
Level 2 Apprentice

Online
 United States
Posts: 44
|
 |
« on: April 16, 2009, 02:43:31 AM » |
|
I know this has had to have been done dozens of times and I've seen the codes for races with this ability, but I don't want to copy and paste because most of the codes for this skill are confusing. And if I were to copy and paste the code, I most likely won't understand how it was coded and I aim to learn how to do these things. So my question is, how do I make a Regeneration ability that gives "x" amount of health every second?
Note: When I say I don't want to copy and paste, I mean I don't want people telling me to go copy and paste w.e race they say and not explaining how it was coded. Feel free to post a code or link me to a race with this ability but please try to explain it a little if you do.
|
|
|
|
« Last Edit: April 16, 2009, 02:54:34 AM by Doku »
|
Logged
|
A wise man once said that your neighbor's toilet is an excellent source of free water. This same man also tried to arrange Mn'Ms in alphabetical order.
|
|
|
|
|
Doku
Level 2 Apprentice

Online
 United States
Posts: 44
|
 |
« Reply #2 on: April 16, 2009, 04:09:42 PM » |
|
Alrighty then I suppose my next question is how do I make an ability block (I haven't been coding for that long)? 
|
|
|
|
|
Logged
|
A wise man once said that your neighbor's toilet is an excellent source of free water. This same man also tried to arrange Mn'Ms in alphabetical order.
|
|
|
Bob
Level 4 Intermediate
  
Offline
 United States
Posts: 89
|
 |
« Reply #3 on: April 16, 2009, 04:17:11 PM » |
|
I also have a question about that repeat how does that work not in a block?
|
|
|
|
|
Logged
|
|
|
|
Doku
Level 2 Apprentice

Online
 United States
Posts: 44
|
 |
« Reply #4 on: April 16, 2009, 04:33:36 PM » |
|
So yea I'm still confused. I don't see why this would need an ability block.
|
|
|
|
|
Logged
|
A wise man once said that your neighbor's toilet is an excellent source of free water. This same man also tried to arrange Mn'Ms in alphabetical order.
|
|
|
Bob
Level 4 Intermediate
  
Offline
 United States
Posts: 89
|
 |
« Reply #5 on: April 16, 2009, 04:38:32 PM » |
|
ok here is the code for the regeneration thing GeSHi (eventscripts): "skill7_setting" "es_xsetinfo wcs_hp 4;es_xsetinfo wcs_time 8;es_xsetinfo wcs_waves 14;es_xsetinfo wcs_radius 200|es_xsetinfo wcs_hp 5;es_xsetinfo wcs_time 7;es_xsetinfo wcs_waves 12;es_xsetinfo wcs_radius 220|es_xsetinfo wcs_hp 5;es_xsetinfo wcs_time 8;es_xsetinfo wcs_waves 12;es_xsetinfo wcs_radius 250" "skill7_cmd" "es es_xkeysetvalue WCSuserdata event_var(userid) regeneration 1;es es_xkeysetvalue WCSuserdata event_var(userid) regen_round server_var(wcs_roundcounter);es wcs_regeneration event_var(userid) server_var(wcs_hp) server_var(wcs_time) 150 server_var(wcs_waves) server_var(wcs_radius)" "skill7_sfx" "0"
"skill7_setting" "es_xsetinfo wcs_hp 4;es_xsetinfo wcs_time 8; es_xsetinfo wcs_waves 14; es_xsetinfo wcs_radius 200|es_xsetinfo wcs_hp 5;es_xsetinfo wcs_time 7;es_xsetinfo wcs_waves 12;es_xsetinfo wcs_radius 220|es_xsetinfo wcs_hp 5;es_xsetinfo wcs_time 8;es_xsetinfo wcs_waves 12;es_xsetinfo wcs_radius 250" "skill7_cmd" "es es_xkeysetvalue WCSuserdata event_var(userid) regeneration 1;es es_xkeysetvalue WCSuserdata event_var(userid) regen_round server_var(wcs_roundcounter);es wcs_regeneration event_var(userid) server_var(wcs_hp) server_var(wcs_time) 150 server_var(wcs_waves) server_var(wcs_radius)" "skill7_sfx" "0" Red = how much hp healed Yellow = how long untill the next wave Blue = how many waves Purple = Radius on who else will get healed on your team (you can set radius to 1 if you just want you to be healed) EDIT* i will be off for 2-3 hours so dont ask me stuff 
|
|
|
|
« Last Edit: April 16, 2009, 04:40:31 PM by Bob »
|
Logged
|
|
|
|
|
Koshy
|
 |
« Reply #6 on: April 16, 2009, 04:38:59 PM » |
|
I would agree with Repeat, but I am finding problem with it if the timer is high like 10 or so seconds between... it is hard to explain but sufficient to say it will stack the repeat rather then only one running 2-3 will run... IDK if this is just me but I plan to move AWAY from repeats soon.
|
|
|
|
|
Logged
|
|
|
|
Doku
Level 2 Apprentice

Online
 United States
Posts: 44
|
 |
« Reply #7 on: April 16, 2009, 05:04:22 PM » |
|
It's supposed to be every second you regenerate 2 hp indefinitely, but you stop regenerating once you hit 100 hp
|
|
|
|
« Last Edit: April 16, 2009, 05:06:35 PM by Doku »
|
Logged
|
A wise man once said that your neighbor's toilet is an excellent source of free water. This same man also tried to arrange Mn'Ms in alphabetical order.
|
|
|
|
Koshy
|
 |
« Reply #8 on: April 16, 2009, 05:04:42 PM » |
|
It's supposed to be every second you regenerate 2 hp
Then if it will always be like that use repeat.
|
|
|
|
|
Logged
|
|
|
|
Doku
Level 2 Apprentice

Online
 United States
Posts: 44
|
 |
« Reply #9 on: April 16, 2009, 05:10:32 PM » |
|
Lol dude sorry I edited in more details while you were posting  Read the post again
|
|
|
|
« Last Edit: April 16, 2009, 06:20:12 PM by Doku »
|
Logged
|
A wise man once said that your neighbor's toilet is an excellent source of free water. This same man also tried to arrange Mn'Ms in alphabetical order.
|
|
|
Doku
Level 2 Apprentice

Online
 United States
Posts: 44
|
 |
« Reply #10 on: April 16, 2009, 07:03:43 PM » |
|
I looked at some races that used regen and now I don't understand the whole es_xsetinfo wcs_count <#>;es_xsetinfo wcs_params <#>_<#>_<#>
|
|
|
|
« Last Edit: April 16, 2009, 07:11:02 PM by Doku »
|
Logged
|
A wise man once said that your neighbor's toilet is an excellent source of free water. This same man also tried to arrange Mn'Ms in alphabetical order.
|
|
|
Bob
Level 4 Intermediate
  
Offline
 United States
Posts: 89
|
 |
« Reply #11 on: April 16, 2009, 07:12:16 PM » |
|
well if you would use a repeat you would need to use est_isalive kind of thing
|
|
|
|
|
Logged
|
|
|
|
Doku
Level 2 Apprentice

Online
 United States
Posts: 44
|
 |
« Reply #12 on: April 16, 2009, 07:15:41 PM » |
|
I'm still confused 
|
|
|
|
|
Logged
|
A wise man once said that your neighbor's toilet is an excellent source of free water. This same man also tried to arrange Mn'Ms in alphabetical order.
|
|
|
Bob
Level 4 Intermediate
  
Offline
 United States
Posts: 89
|
 |
« Reply #13 on: April 16, 2009, 07:16:24 PM » |
|
I looked at some races that used regen and now I don't understand the whole es_xsetinfo wcs_count <#>;es_xsetinfo wcs_params <#>_<#>_<#> no thats for wards params are ummm.... Koshy i choose you!
|
|
|
|
|
Logged
|
|
|
|
Doku
Level 2 Apprentice

Online
 United States
Posts: 44
|
 |
« Reply #14 on: April 16, 2009, 07:26:41 PM » |
|
Lol yea I seriously need some help, I was looking at Stinky's Sacred Warrior for this. I use the code because I didn't understand it.
|
|
|
|
|
Logged
|
A wise man once said that your neighbor's toilet is an excellent source of free water. This same man also tried to arrange Mn'Ms in alphabetical order.
|
|
|
|