![]() |
NPC that play music
I changed xmass tree:
Code:
npc_begin warrior 12619 [x_mas_tree_a] level=66 exp=2.925 acquire_exp_rate=7.2 undying=1 can_be_attacked=1 acquire_sp=60 race=castle_guard sex=male temper=100 safe_height=100 org_jump=15 skill_list={@s_carol_crystal1} magic_list={} max_item=80 item_make_list={} corpse_make_list={} additional_make_list={} additional_make_multi_list={} slot_chest=[] slot_rhand=[] slot_lhand=[] base_attack_type=fist base_can_penetrate=0 base_attack_range=100 base_damage_range={0;0;80;120} base_rand_dam=0 str=40 int=21 dex=30 wit=20 con=43 men=10 hp_increase=40 mp_increase=7 org_hp_regen=7.5 org_mp_regen=2.7 ground_low={80;0;10} ground_high={120;-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=1000 org_hp=97xx.xx146118935 org_mp=1219.8 base_defend=5xx.xx5040328361 base_magic_attack=1.735709791816 base_magic_defend=2.497189482006 base_physical_attack=1.92431336161 physical_hit_modify=10 physical_avoid_modify=0 base_attack_speed=293 base_reuse_delay=1000 base_critical=8 magic_use_speed_modify=0 status={normal} align=-1296 collision_radius=12 collision_height=15 category={} clan={} clan_help_range=1200 guild={} pledge={} pledge_leader=0 alliance={} alliance_leader=0 ignore_clan_list={} ruler=0 ruling_domain={} npc_ai={[elpy];{DDMagic]=@s_carol_crystal1}} corpse_time=7 no_sleep_mode=0 npc_end- when player attack NPC.. NPC start attacking back - but with very low dmg and start casting skill s_carol_crystal1 (that skill play music) I can;t try it now.. but later today or yesterday ......... any ideas here ;-D |
well your code for this npc is wrong.
change npc_ai={[elpy];{DDMagic]=@s_carol_crystal1}} to npc_ai={[elpy];{[DDMagic]=@s_carol_crystal1}} |
aah sorry ;-) but I think about whole Idea.. if this can work? do u think?
|
Code:
class warrior_flee : warriorCode:
class warrior : default_npcdo u see DDmagic on elpy ai ? NOT ! how do u supose to work ? |
heh ;-) I think this is not required.. because many monsters dont have AI code and cast spells..
but its not working ;[ dont know why.. he dont start use that skill |
No, all monsters that cast skills have the skills in their AI. the DDMagic parameter in NPC data just tells it which skill to use whenever it uses DDMagic in the Ai. Also, you will not need the skill in your skill_list, skill_list is for passive skills such as critical chance, critical power, resist dark, etc. It is also used sometimes just to display some info like the strong type x5 mobs. And raid bosses.
|
This AI will make the NPC play randomly all the Xmas carols from time to time. Make sure you change the IDs to the ones in your skill_pch in the beguining of the AI
*removed* |
| All times are GMT. The time now is 21:48. |