Вывод в тайтл -%hp в рельном времени для npc, моба

Fantik

Пляшущий с бубном
Участник
Сообщения
27
Розыгрыши
0
Репутация
38
Реакции
96
Баллы
278
Хроники
  1. Chaotic Throne: High Five
Исходники
Присутствуют
Сборка
other
Всем привет. Суть вопроса в заголовке. Не могу вывести формулу никак. HP 100% - макс. При ударах соответственно уменьшается.

Java:
writeS(title + " - HP " + new DecimalFormat("#.##").format((ТУТ ФОРМУЛА) + "%"); // visible title

Вот некоторые переменные

double hp_reduced = target.getMaxHp() - target.getCurrentHp();
double hp_reduced = actor.getMaxHp() - actor.getCurrentHp();
double hp_precent = actor.getCurrentHpPercents();
double target_hp_precent = target.getCurrentHpPercents();
double actor_hp_precent = actor.getCurrentHpPercents();

При установке _npc.getCurrentHpPercents() показывает значение 100% начальное, но при дамаге оно неизменно
 
Да, вроде как . Но там надо дописывать пакет по видимому еще. Так не работает
Вот нашел формулу вроде как, но это не точно
Java:
double limit = calcStat(Stats.p_limit_hp, null, null) * getMaxHp() / 100;
 
You need to broadcast the change in order for it to update in the client. Else, it might be getting updated in the database, but players won't see it change. What I would do is either add a condition: onHPChange - update title of monster ID X-Y-Z. Don't know if its the best way to do it, but I'm certain it would work.
 
Назад
Сверху Снизу