ger 0 Posted June 16, 2016 is there a way I can get a macro for the ratio of totlal_hp/totalhp_at_the_beginning ? If no it would be nice to implement it, maybe in py macros Quote Share this post Link to post Short link Share on other sites
night_dragon_on 5,601 #333224 Posted June 16, 2016 (edited) Example: 'py_macro' ##################################################################### # imports import xvm_battle.python.fragCorrelationPanel as panel import BigWorld ##################################################################### # constants max_hp_team = [0, 0] @xvm.export('current_hp', deterministic=False) def current_hp(current_team): return panel.teams_totalhp[current_team] @xvm.export('percent_hp', deterministic=False) def percent_hp(current_team): global actual_arenaUniqueID, max_hp_team arenaUniqueID = BigWorld.player().arenaUniqueID if actual_arenaUniqueID != arenaUniqueID: actual_arenaUniqueID = arenaUniqueID max_hp_team[0] = panel.teams_totalhp[0] max_hp_team[1] = panel.teams_totalhp[1] return round((100. * current_hp(current_team)) / max_hp_team[current_team], 0) {{py:current_hp(0)}} - current hp ally team {{py:current_hp(1)}} - current hp enemy team Calculate the percentage of the current value of points of strength relative to the starting value {{py:percent_hp(0)}} - current hp ally team, % {{py:percent_hp(1)}} - current hp enemy team, % More examples for understanding the principle of operation of the macro: account panel / панель счета Edited June 16, 2016 by night_dragon_on Quote Share this post Link to post Short link Share on other sites