/* Plugin Template generated by Pawn Studio */ #include #include "W3SIncs/War3Source_Interface" public Plugin:myinfo = { name = "WCX - Vampire", author = "necavi, Anthony Iacono", description = "WCX - Vampire", version = "0.1", url = "http://necavi.com" } public OnPluginStart() { LoadTranslations("w3s.race.undead.phrases"); } public OnWar3EventPostHurt(victim,attacker,damage) { if(W3GetDamageIsBullet()&&ValidPlayer(victim)&&ValidPlayer(attacker,true)&&attacker!=victim) { new vteam=GetClientTeam(victim); new ateam=GetClientTeam(attacker); if(vteam!=ateam) { new Float:Vampire = 0.0; Vampire = W3GetBuffSumFloat(attacker, fVampirePercent); if(Vampire > 0.0) { if(!W3HasImmunity(victim,Immunity_Skills)&&!Hexed(attacker)) { new leechhealth=RoundToFloor(damage*Vampire); if(leechhealth>40) leechhealth=40; W3FlashScreen(attacker,RGBA_COLOR_GREEN); War3_HealToBuffHP(attacker,leechhealth); PrintToConsole(attacker,"%T","Leeched +{amount} HP",attacker,leechhealth); } } } } }