![]() |
|
|
#25 |
|
Архивный участник
Join Date: Jan 2006
Posts: 277
|
It's very easy to write these AI for this code. For example for npc_ai={[archangel];{[DDMagic]=@s_spear_pound_the_ground}}:
Code:
class archangel : toi_aggressive {
handler:
EventHandler ATTACKED(attacker, damage, myself) {
if ((attacker.is_pc != 0) || IsInCategory(9, attacker.npc_class_id)) {
AddAttackDesire(attacker, 1, (((damage/myself.sm.max_hp)/0.050000)*100));
}
if ((DistFromMe(attacker) < 50) && if (Rand(100) < 10)) {
if ((Skill_GetConsumeMP(DDMagic) < myself.sm.mp) && (Skill_GetConsumeHP(DDMagic) < myself.sm.hp) && (Skill_InReuseDelay(DDMagic) == 0)) {
AddUseSkillDesire(attacker, DDMagic, 0, 1, 1000000);
}
}
}
}
Поправьте меня, если я не прав |
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|