天堂2单机交流论坛
标题:
给游戏里面添加新的NPC,使用SQL版本
[打印本页]
作者:
myage
时间:
2019-4-27 11:15
标题:
给游戏里面添加新的NPC,使用SQL版本
首先 先找个NPC来改在ai.obj 我找了哈莫妮来复制 我定了400%的税来卖 B C D套餐class trader_yen : merchantproperty_define_begin buyselllist_begin SellList0 {1463; 400 } {1464; 400 } {1465; 400 } {2510; 400 } {2511; 400 } {2512; 400 } {3948; 400 } {3949; 400 } {3950; 400 } buyselllist_endproperty_define_endclass_endclass trader_harmony : merchantproperty_define_begin buyselllist_begin SellList0 {1370; 20 } {1401; 20 } {1411; 20 } {1372; 20 } {1513; 20 } {1399; 20 } {1386; 20 } {1856; 20 } {1377; 20 } {1383; 20 } {1514; 20 } {1405; 20 } {1403; 20 } {1371; 20 } {1515; 20 } {1667; 20 } {1669; 20 } {1671; 20 } {1512; 20 } {1379; 20 } {1402; 20 } {1517; 20 } {1415; 20 } {1391; 20 } {1398; 20 } {1389; 20 } {1388; 20 } {1410; 20 } {1404; 20 } {1417; 20 } {1400; 20 } {1418; 20 } {1668; 20 } {1670; 20 } {3038; 20 } {1378; 20 } {1516; 20 } {1414; 20 } {1385; 20 } {1394; 20 } {1412; 20 } {3944; 20 } {1392; 20 } {1407; 20 } {1416; 20 } {1397; 20 } {1406; 20 } {1408; 20 } {1390; 20 } {1387; 20 } {1409; 20 } {1413; 20 } {1381; 20 } {1382; 20 } {1384; 20 } {1380; 20 } {1535; 20 } {1521; 20 } {1523; 20 } {1534; 20 } {1537; 20 } {1533; 20 } {1536; 20 } {1532; 20 } {1528; 20 } {1519; 20 } {1518; 20 } {1520; 20 } {1530; 20 } buyselllist_endproperty_define_endclass_end之后在 npc_pch.txt 新增NPC代号[trader_yen] = 1012374再到 npcdata 用了哈莫妮的对话档 当然也可以改別的 也可以新增npc_begin merchant 12374 [trader_yen] level=70 exp=429634524.325 acquire_exp_rate=0.3 undying=1 can_be_attacked=0 acquire_sp=30 race=human sex=female 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={} additional_make_multi_list={} slot_chest=[] slot_rhand=[shining_bow] slot_lhand=[] base_attack_type=bow base_can_penetrate=0 base_attack_range=40 base_damage_range={0;0;80;120} base_rand_dam=30 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=2444.46818899627 org_mp=1345.8 base_defend=295.91597408024 base_magic_attack=470.404627426724 base_magic_defend=216.538467292763 base_physical_attack=688.863725587608 physical_hit_modify=4.75 physical_avoid_modify=0 base_attack_speed=253 base_reuse_delay=0 base_critical=4 magic_use_speed_modify=0 status={normal} align=-4900 collision_radius=7 collision_height=23 category={} clan={} clan_help_range=300 guild={} pledge={} pledge_leader=0 alliance={} alliance_leader=0 ignore_clan_list={} ruler=0 ruling_domain={} npc_ai={[trader_yen];{[fnHi] = [trader_harmony001.htm]};{[fnSell] = [trader_harmony002.htm]};{[fnBuy] = [trader_harmony003.htm]};{[fnUnableItemSell] = [trader_harmony005.htm]};{[fnYouAreChaotic] = [trader_harmony006.htm]};{[fnNowSiege] = [trader_harmony007.htm]}} corpse_time=7 no_sleep_mode=0 npc_end再到npcpos.txt 加入NPC的位置npc_begin [trader_yen] pos = {-14694;124205;-3114;61440} total = 1 respawn = 1min npc_end npc_begin [trader_harmony] pos = {-14934;124468;-3114;61440} total = 1 respawn = 1min npc_end服务端完成 X Y Z 人物面对的方向pos = {-14694;124205;-3114;61440} 最后一个是代表人物面对的方向到npcgrp.txt 加入npc_begin npc_id=12374 npc_name=[trader_yen] npc_speed=1 class_name=[LineageNPC.a_traderA_FHuman] mesh_name=[LineageNPCs.a_traderA_FHuman_m00] texture_name={[LineageNPCsTex.a_traderA_FHuman_m00_t00_b00];[LineageNPCsTex.a_traderA_FHuman_m00_t00_b01];[LineageNPCsTex.a_traderA_FHuman_m00_t00_f];[LineageNPCsTex.a_traderA_FHuman_m00_t00_h]} collision_radius=7 collision_height=23 attack_sound1={[ItemSound.fist_1];[ItemSound.fist_2];[ItemSound.fist_3]} defense_sound1={[ItemSound.armor_leather_1];[ItemSound.armor_leather_3];[ItemSound.armor_leather_4];[ItemSound.armor_leather_5];[ItemSound.armor_leather_7]} damage_sound={[ChrSound.FNpc_Lady_Dmg_1];[ChrSound.FNpc_Lady_Dmg_2];[ChrSound.FNpc_Lady_Dmg_3]} sound_vol=250 sound_radius=50 sound_random=70 attack_effect=[LineageEffect.p_u002_a] npc_end再到 npcname-cn.txt 加入npc_begin id=12374 nickcolor=default nick=[秘密商人] name=[Yen] npc_end客户端也完成了
作者:
1483472248
时间:
2022-5-28 10:59
太难了。小白只适合java。。。。。
作者:
liuxuezhong01
时间:
2022-12-7 12:36
根本看不懂
作者:
liuxuezhong01
时间:
2023-1-24 14:59
财富商人和铁匠怎么永久刷城里
作者:
woaitiantang2
时间:
2023-2-7 08:44
大神 可以告诉我一下精品店的物品兑换的NPC 怎么添加吗?
商店的我学会了
作者:
andysu111
时间:
2023-2-12 07:48
liuxuezhong01 发表于 2023-1-24 14:59
财富商人和铁匠怎么永久刷城里
把财富商人和铁匠对话链接嫁接到其他NPC身上就可以了
欢迎光临 天堂2单机交流论坛 (http://l2cn.com/)
Powered by Discuz! X3.2