Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Темы без сохранившегося раздела (https://postpacific.mmorpg-game.online/forumdisplay.php?f=10001)
-   -   NPC that play music (https://postpacific.mmorpg-game.online/showthread.php?t=1723)

rodier 05.09.2005 11:28

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
but dont have too much experience with AI and skill list.. do u think this will be working?
- 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

SoaPy 05.09.2005 13:01

well your code for this npc is wrong.

change npc_ai={[elpy];{DDMagic]=@s_carol_crystal1}}

to npc_ai={[elpy];{[DDMagic]=@s_carol_crystal1}}

rodier 05.09.2005 19:42

aah sorry ;-) but I think about whole Idea.. if this can work? do u think?

djvogans 05.09.2005 20:49

Code:

class warrior_flee : warrior
handler 0        //  NO_DESIRE
        variable_begin
                "myself"
                "_choiceN"
                "_code"
                "_from_choice"
        variable_end

        shift_sp 1
        push_const 40
        push_const 20
        func_call 0        //  func[AddMoveAroundDesire]
        shift_sp -2
        shift_sp -1
handler_end

handler 1        //  ATTACKED
        variable_begin
                "attacker"
                "damage"
                "myself"
                "_choiceN"
                "_code"
                "_from_choice"
        variable_end

        shift_sp 1
        push_event        //  attacker
        push_const 36
        add
        fetch_i
        push_const 30
        func_call 6        //  func[AddFleeDesire]
        shift_sp -2
        shift_sp -1
handler_end

class_end


Code:

class warrior : default_npc
parameter_define_begin
        float Attack_DecayRatio 6.600000
        float UseSkill_DecayRatio 660xx.xx0000
        float Attack_BoostValue 3xx.xx0000
        float UseSkill_BoostValue 1000xx.xx0000
        int MoveAroundSocial 0
        int ShoutMsg1 0
        int ShoutMsg2 0
        int ShoutMsg3 0
        int ShoutMsg4 0
parameter_define_end .....


do u see DDmagic on elpy ai ? NOT ! how do u supose to work ?

rodier 08.09.2005 11:12

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

Sire 30.04.2006 01:48

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.

Metalmurphy 30.04.2006 14:56

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.