cubic_begin id = 1 level = 1 slot = 1 duration = 900 delay = 10 max_count = 30 use_up = 0 power = 282.0 target_type = target op_cond = {0;33%;1000} skill1 = {100%;[s_cubic_dd1];12%;1} skill2 = {} skill3 = {} cubic_end
package org.mmocore.gameserver.object.components.player.cubicdata.action;
import org.jts.dataparser.data.holder.cubicdata.DefaultCubicData.CubicDataOpCond;
import org.jts.dataparser.data.holder.cubicdata.DefaultCubicData.CubicDataSkill;
import org.mmocore.commons.utils.Rnd;
import org.mmocore.gameserver.object.Creature;
import org.mmocore.gameserver.object.Player;
import org.mmocore.gameserver.object.Servitor;
import org.mmocore.gameserver.object.components.player.cubicdata.CubicComponent;
import org.mmocore.gameserver.skills.SkillEntry;
import org.mmocore.gameserver.tables.SkillTable;
import java.util.Optional;
/**
* Create by Mangol on 22.09.2015.
*/
public class CTargetAction extends AbstractCAction<CubicComponent>
{
public CTargetAction(final CubicComponent component)
{
super(component);
}
@Override
public void useAction(final Player player)
{
if(isCond(player))
{
final Creature target = (Creature) player.getTarget();
final int otherChance = Rnd.get(100);
final Optional<CubicDataSkill> skill1 = Optional.ofNullable(getCubicTemplate().skill1);
final Optional<CubicDataSkill> skill2 = Optional.ofNullable(getCubicTemplate().skill2);
final Optional<CubicDataSkill> skill3 = Optional.ofNullable(getCubicTemplate().skill3);
final int skillChance1 = skill1.isPresent() ? skill1.get().skillChance : 0;
final int skillChance2 = skill2.isPresent() ? skill2.get().skillChance : 0;
final int skillChance3 = skill3.isPresent() ? skill3.get().skillChance : 0;
if(skill1.isPresent() && otherChance <= skillChance1)
{
final int chance1 = skill1.get().useChance;
if(Rnd.chance(chance1))
{
if(target.isDoor() && skill1.get().targetStaticObject == 0)
{
return;
}
final int skill_id_1 = getLinker().skillPchIdfindClearValue(getCubicTemplate().skill1.skill_name)[0];
final int skill_lvl_1 = getLinker().skillPchIdfindClearValue(getCubicTemplate().skill1.skill_name)[1];
final SkillEntry skill = SkillTable.getInstance().getSkillEntry(skill_id_1, skill_lvl_1);
getCubicComponent().useSkill(skill, target, false);
notifyNpcPower(target, player, (int) getCubicTemplate().power);
}
}
else if(skill2.isPresent() && otherChance <= skillChance1 + skillChance2)
{
final int chance2 = skill2.get().useChance;
if(Rnd.chance(chance2))
{
if(target.isDoor() && skill2.get().targetStaticObject == 0)
{
return;
}
final int skill_id_2 = getLinker().skillPchIdfindClearValue(getCubicTemplate().skill2.skill_name)[0];
final int skill_lvl_2 = getLinker().skillPchIdfindClearValue(getCubicTemplate().skill2.skill_name)[1];
final SkillEntry skill = SkillTable.getInstance().getSkillEntry(skill_id_2, skill_lvl_2);
getCubicComponent().useSkill(skill, target, false);
notifyNpcPower(target, player, (int) getCubicTemplate().power);
}
}
else if(skill3.isPresent() && otherChance <= skillChance1 + skillChance2 + skillChance3)
{
final int chance3 = skill3.get().useChance;
if(Rnd.chance(chance3))
{
if(target.isDoor() && skill3.get().targetStaticObject == 0)
{
return;
}
final int skill_id_3 = getLinker().skillPchIdfindClearValue(getCubicTemplate().skill3.skill_name)[0];
final int skill_lvl_3 = getLinker().skillPchIdfindClearValue(getCubicTemplate().skill3.skill_name)[1];
final SkillEntry skill = SkillTable.getInstance().getSkillEntry(skill_id_3, skill_lvl_3);
getCubicComponent().useSkill(skill, target, false);
notifyNpcPower(target, player, (int) getCubicTemplate().power);
}
}
}
}
@Override
protected boolean isCond(final Creature сreature, final Object... param)
{
final Creature target = (Creature) сreature.getTarget();
if(target == null)
{
return false;
}
final Optional<Servitor> servitor = Optional.ofNullable(сreature.getServitor());
final boolean noThisTargetServitor = !servitor.isPresent() || target != servitor.get();
if(сreature.isInCombat() && target != сreature && noThisTargetServitor)
{
final Optional<CubicDataOpCond> opCond = Optional.ofNullable(getCubicTemplate().op_cond);
if(opCond.isPresent())
{
final int hpPercent = opCond.get().cond[1];
final int hpCurrent = opCond.get().cond[2];
final boolean all = target.isInCombat() && target.getCurrentHpPercents() >= hpPercent && target.getCurrentHp() >= hpCurrent;
if(all)
{
return true;
}
}
else
{
return true;
}
}
return false;
}
}
Стоит сразу задуматься о реализации агатионов, т.к. они на прямую связаны с этой херней кубической.Кто разбирал кубики с птс скриптов? Подскажите пожалуйста, что значит power = 282.0 ?
Код:cubic_begin id = 1 level = 1 slot = 1 duration = 900 delay = 10 max_count = 30 use_up = 0 power = 282.0 target_type = target op_cond = {0;33%;1000} skill1 = {100%;[s_cubic_dd1];12%;1} skill2 = {} skill3 = {} cubic_end
И как считаются тогда подобные эффекты {cub_m_attack;436}?
з.ы. где тут спойлер?!
Да вот я как раз и взялся за агатионов и смотрю что у них есть такие по типу кубиков сделанныеСтоит сразу задуматься о реализации агатионов, т.к. они на прямую связаны с этой херней кубической.
agathion_begin npc_name = [br_aga_mercygod] id = 552 level = 1 slot = 1 duration = -1 delay = 13 max_count = 300 use_up = 0 power = 0 target_type = {heal;90%;60%;30%;0%} op_cond = {} skill1 = {[s_br_special_aga_mercygod];13%;0} skill2 = {[s_br_special_aga_mercygod];33%;0} skill3 = {[s_br_special_aga_mercygod];53%;0} agathion_end
agathion_begin npc_name = [br_aga_blue_pek_a] id = 553 level = 1 slot = 1 duration = -1 delay = 13 max_count = 300 use_up = 0 power = 0 target_type = {heal;90%;60%;30%;0%} op_cond = {} skill1 = {[s_br_special_aga_blue_pekingopera_a];13%;0} skill2 = {[s_br_special_aga_blue_pekingopera_a];33%;0} skill3 = {[s_br_special_aga_blue_pekingopera_a];53%;0} agathion_end
agathion_begin npc_name = [br_aga_red_pek] id = 554 level = 1 slot = 1 duration = -1 delay = 10 max_count = 300 use_up = 0 power = 82.0 target_type = target op_cond = {0;33%;1000} skill1 = {100%;[s_br_special_aga_red_pekingopera];12%;1} skill2 = {} skill3 = {} agathion_end
скорее 91, так как в декомпиле гфаdamage = 55 * power / mDef;
55 - это примерное число, зависит от power и mdef
v18 = *((double *)v10 + 2) * 91.0 / v14;
нужно смотреть что такое v10, по скольку это явно не просто power+skill_power, 55 - это подставное число, что бы получился как раз таки дамаг из ГФ.скорее 91, так как в декомпиле гфа
Я к сожалению, полностью не разбираюсь, поэтому и прошу помощи:=_=:Код:v18 = *((double *)v10 + 2) * 91.0 / v14;
На счет повера я оказался не прав, на самом деле он не участвует в расчете дамага.скорее 91, так как в декомпиле гфа
Я к сожалению, полностью не разбираюсь, поэтому и прошу помощи:=_=:Код:v18 = *((double *)v10 + 2) * 91.0 / v14;
Возможно это просто нотифи для атаки мобов, хейта.На счет повера я оказался не прав, на самом деле он не участвует в расчете дамага.
damage=skill_power*91/m_def
Не, я затестил прежде чем отписать в очередной разВозможно это просто нотифи для атаки мобов, хейта.
Как бы я и описал выше что это видимо обычный нотифи для агра моба, возможно потому-что кубики это псевдо суммоны, на них агрится нельзя, а только на хозяина.Не, я затестил прежде чем отписать в очередной раз
параметр повер 100% не используется и в итоге дамаг получаем +- несколько едениц как нужно, погрешность думаю из-за того что мДеф на ПТС double, а отображает только INT часть...
Тьфу, я подумал что ты говоришь о куске декомпила, мол то расчет аграКак бы я и описал выше что это видимо обычный нотифи для агра моба, возможно потому-что кубики это псевдо суммоны, на них агрится нельзя, а только на хозяина.
Да, Дениса - Диагода за птс хв5 забирай ретаил, мои можешь за бнс птску забиратьАхренеть! Дяденьки а исходники ваших мозгов продаются?
У Агатионов еще есть тип master, от этого типа пляшут скилы, которые показывают сколько времени осталось тебе до подарка.Да вот я как раз и взялся за агатионов и смотрю что у них есть такие по типу кубиков сделанные
Код:agathion_begin npc_name = [br_aga_mercygod] id = 552 level = 1 slot = 1 duration = -1 delay = 13 max_count = 300 use_up = 0 power = 0 target_type = {heal;90%;60%;30%;0%} op_cond = {} skill1 = {[s_br_special_aga_mercygod];13%;0} skill2 = {[s_br_special_aga_mercygod];33%;0} skill3 = {[s_br_special_aga_mercygod];53%;0} agathion_end agathion_begin npc_name = [br_aga_blue_pek_a] id = 553 level = 1 slot = 1 duration = -1 delay = 13 max_count = 300 use_up = 0 power = 0 target_type = {heal;90%;60%;30%;0%} op_cond = {} skill1 = {[s_br_special_aga_blue_pekingopera_a];13%;0} skill2 = {[s_br_special_aga_blue_pekingopera_a];33%;0} skill3 = {[s_br_special_aga_blue_pekingopera_a];53%;0} agathion_end agathion_begin npc_name = [br_aga_red_pek] id = 554 level = 1 slot = 1 duration = -1 delay = 10 max_count = 300 use_up = 0 power = 82.0 target_type = target op_cond = {0;33%;1000} skill1 = {100%;[s_br_special_aga_red_pekingopera];12%;1} skill2 = {} skill3 = {} agathion_end
package org.mmocore.gameserver.skills.effects;
import org.mmocore.gameserver.model.Effect;
import org.mmocore.gameserver.object.Creature;
import org.mmocore.gameserver.object.Player;
import org.mmocore.gameserver.object.components.player.cubicdata.AgathionComponent;
import org.mmocore.gameserver.skills.SkillEntry;
/**
* Create by Mangol on 26.09.2015.
*/
public class Effect_i_show_reuse_delay extends Effect
{
private final int _power;
public Effect_i_show_reuse_delay(Creature creature, Creature target, SkillEntry skill, EffectTemplate template)
{
super(creature, target, skill, template);
_power = template.getParam().getInteger("argument", 0);
}
@Override
public void onStart()
{
final Player player = (Player) getEffector();
final AgathionComponent comp = player.getAgathion();
if(comp != null)
{
comp.sendMessage(_power);
}
}
@Override
protected boolean onActionTime()
{
return false;
}
}
package org.mmocore.gameserver.skills.effects;
import org.mmocore.gameserver.model.Effect;
import org.mmocore.gameserver.object.Creature;
import org.mmocore.gameserver.object.Player;
import org.mmocore.gameserver.object.components.player.cubicdata.AgathionComponent;
import org.mmocore.gameserver.skills.SkillEntry;
/**
* Create by Mangol on 26.09.2015.
*/
public class Effect_i_event_agathion_reuse_delay extends Effect
{
public Effect_i_event_agathion_reuse_delay(Creature creature, Creature target, SkillEntry skill, EffectTemplate template)
{
super(creature, target, skill, template);
}
@Override
public void onStart()
{
final Player player = (Player) getEffector();
final AgathionComponent comp = player.getAgathion();
if(comp != null)
{
comp.sendMessage(0);
}
}
@Override
protected boolean onActionTime()
{
return false;
}
}
public void sendMessage(final int idMessage)
{
final Optional<CActionTask> task = getActionTask();
if(task.isPresent())
{
final Optional<ICActionCubic> action = getAction();
if(action.isPresent())
{
final Optional<CMasterAction> actionMaster = action.get().getMasterAction();
if(actionMaster.isPresent())
{
final Optional<ScheduledFuture<?>> time_skill1 = actionMaster.get().getTimeSkill1Task();
final Optional<ScheduledFuture<?>> time_skill2 = actionMaster.get().getTimeSkill2Task();
if(time_skill1.isPresent() && !time_skill1.get().isDone())
{
final long[] time = getTimeTask(time_skill1.get());
final Optional<TimeSkill1Message> message = TimeSkill1Message.valueOf(idMessage);
if(message.isPresent())
{
message.get().sendMessage(getPlayer().get(), time);
}
}
if(time_skill2.isPresent() && !time_skill2.get().isDone())
{
final long[] time = getTimeTask(time_skill2.get());
final Optional<TimeSkill2Message> message = TimeSkill2Message.valueOf(idMessage);
if(message.isPresent())
{
message.get().sendMessage(getPlayer().get(), time);
}
}
}
}
}
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?