Raised This Month: $ Target: $400
 0% 

Team healing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
egbertjan
Senior Member
Join Date: Mar 2007
Location: The Netherlands
Old 07-26-2011 , 16:41   Re: Team healing
Reply With Quote #1

I figured out another way to use this and after some time I also found out how to use this for purpose, thanks for helping me out though!

For the other interested people:

Code:
public monk_heal(id)
{
    new MaxHealth = race_heal[player_class[id]]+player_strength[id]*2
    new healRadius=get_cvar_num("diablo_monk_distance")
    new specialHeal=get_cvar_num("diablo_monk_heal")
    new location[3], allyOrigin[3], distanceBetween
    
    if (is_user_alive(id)) {        
        get_user_origin(id, location)  // Find out where Medic is
        for(new i = 0; i < 33; i++) {
            if ( (is_user_alive(i) && get_user_team(id)==get_user_team(i)) )  {
                get_user_origin(i, allyOrigin)
                // Check to see if any ally are within radius
                distanceBetween=get_distance(location, allyOrigin)
                if ( distanceBetween < healRadius && get_user_health(id) <= MaxHealth ) {
                    set_user_health(i, get_user_health(i)+specialHeal )
                    
                }
            }
        }
    }
}
egbertjan is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode