point isn't the change in the random "engine", it's the same just done in a different way, but the myself.sm instead of attacker because the target_type is self in the skilldata of those skills; and the check for enough MP and HP should be there every time you use a skill.
Code:
EventHandler ATTACKED(attacker, damage, i0)
{
i0 = Rand(6);
if(i0 == 1)
{
if(Skill_GetConsumeMP(PhysicalSpecial) < myself.sm.mp && Skill_GetConsumeHP(PhysicalSpecial) < myself.sm.hp)
AddUseSkillDesire(attacker, PhysicalSpecial, @ST_ATTACK, @AMT_MOVE_TO_TARGET, damage*50);
}
else if(i0 == 2)
{
if(Skill_GetConsumeMP(DeBuff) < myself.sm.mp && Skill_GetConsumeHP(DeBuff < myself.sm.hp)
AddUseSkillDesire(attacker, DeBuff, @ST_ATTACK, @AMT_MOVE_TO_TARGET, damage*50);
}
else if(i0 == 3)
{
if(Skill_GetConsumeMP(HoldMagic) < myself.sm.mp && Skill_GetConsumeHP(HoldMagic) < myself.sm.hp)
AddUseSkillDesire(attacker, HoldMagic, @ST_ATTACK, @AMT_MOVE_TO_TARGET, damage*50);
}
else if(i0 == 4)
{
if(Skill_GetConsumeMP(SelfRangeDDMagic) < myself.sm.mp && Skill_GetConsumeHP(SelfRangeDDMagic) < myself.sm.hp)
AddUseSkillDesire(myself.sm, SelfRangeDDMagic, @ST_ATTACK, @AMT_MOVE_TO_TARGET, damage*50);
}
else if(i0 == 5)
{
if(Skill_GetConsumeMP(SleepMagic) < myself.sm.mp && Skill_GetConsumeHP(SleepMagic) < myself.sm.hp)
AddUseSkillDesire(myself.sm, SleepMagic, @ST_ATTACK, @AMT_MOVE_TO_TARGET, damage*50);
}
}
Code:
EventHandler SEE_SPELL(speller, skill_name_id)
{
if(Skill_GetEffectPoint(skill_name_id) > 0)
AddUseSkillDesire(speller, DeBuff, @ST_ATTACK, @AMT_STAND, Skill_GetEffectPoint(skill_name_id)*100);
}
remove the CLAN_ATTACKED Handler, it's pointless.
this should slow down the regen speed to something "normal".
Code:
npc_begin boss 12372 [baium] level=84 exp=2127179090 acquire_exp_rate=600 undying=0 can_be_attacked=1 acquire_sp=5600 race=humanoid sex=male temper=100 safe_height=100 org_jump=15 skill_list={@s_full_magic_defence} magic_list={} max_item=50 item_make_list={} corpse_make_list={} additional_make_list={{[adena];100000000;200000000;100};{[adena];100000000;200000000;100};{[adena];100000000;200000000;100};{[adena];100000000;200000000;100};{[adena];100000000;200000000;100};{[hero_mobs_token];1;1;100};{[hero_mobs_token];1;1;100};{[hero_mobs_token];1;1;100};{[hero_mobs_token];1;1;100};{[hero_mobs_token];1;1;100};{[temple_barton];1;1;100};{[temple_staff];1;1;100};{[xp_scroll2];1;1;100};{[xp_scroll2];1;1;100};{[blessed_scroll_of_escape];10;15;100};{[God's_Blade*God's_Blade_haste];1;2;100};{[heavy_titanium_helmet];1;1;20};{[heavy_titanium_body];1;1;20};{[heavy_titanium_gloves];1;1;50};{[heavy_titanium_boots];1;1;50}} additional_make_multi_list={} slot_chest=[] slot_rhand=[] slot_lhand=[] base_attack_type=fist base_can_penetrate=0 base_attack_range=130 base_damage_range={0;0;540;580} base_rand_dam=10 str=40 int=21 dex=30 wit=20 con=43 men=10 hp_increase=12 mp_increase=7 org_hp_regen=5.5 org_mp_regen=2.7 ground_low={50;0;10} ground_high={140;-30;30} underwater_low={50;0;10} underwater_high={0;0;30} fly_low={0;0;10} fly_high={0;-30;30} float_low={0;0;10} float_high={0;-30;30} org_earshot=100 sight={0;0;2500;120;5} agro_range=1200 org_hp=3000000 org_mp=24355 base_defend=4104 base_magic_attack=3859 base_magic_defend=2273 base_physical_attack=5148 physical_hit_modify=4.75 physical_avoid_modify=2.5 base_attack_speed=250 base_reuse_delay=0 base_critical=8 magic_use_speed_modify=0 status={normal} align=-4900 collision_radius=65 collision_height=174 category={} clan={@angel_clan} clan_help_range=450 guild={} pledge={} pledge_leader=0 alliance={} alliance_leader=0 ignore_clan_list={} ruler=0 ruling_domain={} npc_ai={[baium]} corpse_time=30 no_sleep_mode=1 npc_end
that should work fine, didn't test it tho.