View Single Post
Old 09.04.2005, 03:33   #1
Dubie
Архивный участник
 
Join Date: Mar 2005
Posts: 133
Default Adding NPC's & area

Sup all,

Just trying to add a couple new NPC's to a different area.
Guard & Warehouse NPC's
If there is any easier way please let me know.
The cords for the area are wrong I just have not added them yet wanted to see if I was even close first
What I have layed out so far:

[Server Side]

AI.OBJ

WareHouse NPC's
Code:
class warehouse_chief_Sluginator : master_lv3_ware
class_end

class warehouse_chief_Storer : master_lv3_ware
class_end

class warehouse_chief_KeeperofGoods : master_lv3_ware
class_end
Guard NPC's

This is just a defualt Guard NPC in the AI File I was just going to use it.
Code:
class guard : default_npc
parameter_define_begin
	string fnHi "chi.htm"
	float Attack_DecayRatio 6.600000
	float UseSkill_DecayRatio 660xx.xx0000
	float Attack_BoostValue 5xx.xx0000
	float UseSkill_BoostValue 1000xx.xx0000
parameter_define_end
handler 3	//  TALKED
	variable_begin
		"talker"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_parameter fnHi
	func_call 43	//  func[ShowPage]
	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 1
	push_const 2000
	func_call 2	//  func[AddAttackDesire]
	shift_sp -3
	shift_sp -1
handler_end

handler 5	//  SEE_CREATURE
	variable_begin
		"creature"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  creature
	push_const 68
	add
	fetch_i	//  karma
	push_const 412
	add
	fetch_i
	push_const 0
	greater
	branch_false L1
L0
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 1
	push_const 1500
	func_call 2	//  func[AddAttackDesire]
	shift_sp -3
	shift_sp -1
L1
handler_end

class_end
What I added for my Guard

Code:
class guard_JustInTime : guard_stand
class_end

class guard_GrimKiller : guard_stand
class_end
Same for the Warehouse looks like there is a defualt class for it so I wont post that one.


NPCPOS.TXT

WareHouse NPC's
Code:
territory_begin	[21_23_NPC_031201_01]	{{115110;76603;-2798;-3324};{115469;76363;-2798;-3324};{115747;77149;-2798;-3324};{115504;77247;-2798;-3324}}	territory_end		
npcmaker_begin	[21_23_NPC_031201_01]				
npc_begin	[warehouse_chief_sluginator]	pos = {115647;77114;-2649;42000}	total = 1	respawn = 1min	npc_end
npc_begin	[warehouse_keeper_Storer]	pos = {115271;76705;-2650;42000}	total = 1	respawn = 1min	npc_end
npc_begin	[warehouse_keeper_KeeperofGoods]	pos = {115435;76541;-2649;42000}	total = 1	respawn = 1min	npc_end
npcmaker_end
Guard NPC's

GrimKiller & JustInTime
Code:
territory_begin	[21_23_NPC_031201_02]	{{147155;32035;-2560;-2360};{147781;32020;-2560;-2360};{147783;32228;-2560;-2360};{147157;32225;-2560;-2360}}	territory_end		
npcmaker_begin	[21_23_NPC_031201_02]	initial_spawn = all	maximum_npc = 2		
npc_begin	[guard_GrimKiller]	pos = {147191;32128;-2475;16384}	total = 1	respawn = 1min	npc_end
npc_begin	[guard_JustInTime]	pos = {147727;32126;-2471;16384}	total = 1	respawn = 1min	npc_end
npcmaker_end

NPCDATA.TXT

WareHouse NPC's

Code:
npc_begin	warehouse_keeper	13010	[__warehouse_keeper_sluginator]	level=70	exp=4296345xx.xx5	acquire_exp_rate=15	undying=1	can_be_attacked=0	acquire_sp=4000	race=dwarf	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={}	additional_make_multi_list={}	slot_chest=[]	slot_rhand=[]	slot_lhand=[]	base_attack_type=fist	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=24xx.xx818899627	org_mp=1345.8	base_defend=2xx.xx597408024	base_magic_attack=4xx.xx4627426724	base_magic_defend=2xx.xx8467292763	base_physical_attack=6xx.xx3725587608	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=8	collision_height=17	category={}	clan={}	clan_help_range=300	guild={}	pledge={}	pledge_leader=0	alliance={}	alliance_leader=0	ignore_clan_list={}	ruler=0	ruling_domain={}	npc_ai={[default_npc]}	corpse_time=7	no_sleep_mode=0	npc_end
npc_begin	warehouse_keeper	13020	[__warehouse_keeper_storer]	level=70	exp=4296345xx.xx5	acquire_exp_rate=15	undying=1	can_be_attacked=0	acquire_sp=4000	race=dwarf	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={}	additional_make_multi_list={}	slot_chest=[]	slot_rhand=[]	slot_lhand=[]	base_attack_type=fist	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=24xx.xx818899627	org_mp=1345.8	base_defend=2xx.xx597408024	base_magic_attack=4xx.xx4627426724	base_magic_defend=2xx.xx8467292763	base_physical_attack=6xx.xx3725587608	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=8	collision_height=17	category={}	clan={}	clan_help_range=300	guild={}	pledge={}	pledge_leader=0	alliance={}	alliance_leader=0	ignore_clan_list={}	ruler=0	ruling_domain={}	npc_ai={[default_npc]}	corpse_time=7	no_sleep_mode=0	npc_end
npc_begin	warehouse_keeper	13030	[__warehouse_keeper_keeperofgoods]	level=70	exp=4296345xx.xx5	acquire_exp_rate=15	undying=1	can_be_attacked=0	acquire_sp=4000	race=dwarf	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={}	additional_make_multi_list={}	slot_chest=[]	slot_rhand=[]	slot_lhand=[]	base_attack_type=fist	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=24xx.xx818899627	org_mp=1345.8	base_defend=2xx.xx597408024	base_magic_attack=4xx.xx4627426724	base_magic_defend=2xx.xx8467292763	base_physical_attack=6xx.xx3725587608	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=8	collision_height=17	category={}	clan={}	clan_help_range=300	guild={}	pledge={}	pledge_leader=0	alliance={}	alliance_leader=0	ignore_clan_list={}	ruler=0	ruling_domain={}	npc_ai={[default_npc]}	corpse_time=7	no_sleep_mode=0	npc_end
Guard NPC's

Guard GrimKiller
Code:
npc_begin	guard	13001	[guard_GrimKiller]	level=75	exp=9000000xx.xx5	acquire_exp_rate=15	undying=0	can_be_attacked=0	acquire_sp=4000	race=human	sex=male	temper=100	safe_height=100	org_jump=15	skill_list={@s_full_magic_defence}	magic_list={}	max_item=80	item_make_list={}	corpse_make_list={}	additional_make_list={}	additional_make_multi_list={}	slot_chest=[]	slot_rhand=[bow]	slot_lhand=[]	base_attack_type=bow	base_can_penetrate=0	base_attack_range=1100	base_damage_range={0;0;80;120}	base_rand_dam=55	str=60	int=21	dex=40	wit=20	con=63	men=10	hp_increase=80	mp_increase=27	org_hp_regen=9.5	org_mp_regen=20	ground_low={80;0;10}	ground_high={160;-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=24xx.xx818899627	org_mp=5000	base_defend=2xx.xx597408024	base_magic_attack=4xx.xx4627426724	base_magic_defend=2xx.xx8467292763	base_physical_attack=15xx.xx519825567	physical_hit_modify=0	physical_avoid_modify=20	base_attack_speed=227	base_reuse_delay=500	base_critical=8	magic_use_speed_modify=0	status={normal}	align=-4900	collision_radius=8	collision_height=24	category={}	clan={}	clan_help_range=300	guild={}	pledge={}	pledge_leader=0	alliance={}	alliance_leader=0	ignore_clan_list={}	ruler=0	ruling_domain={}	npc_ai={[guard_GrimKiller];{[fnHi] = [guard_coleman001.htm]}}	corpse_time=7	no_sleep_mode=0	npc_end
npc_begin	guard	13002	[guard_justintime]	level=75	exp=9000000xx.xx5	acquire_exp_rate=15	undying=0	can_be_attacked=0	acquire_sp=4000	race=human	sex=male	temper=100	safe_height=100	org_jump=15	skill_list={@s_full_magic_defence}	magic_list={}	max_item=80	item_make_list={}	corpse_make_list={}	additional_make_list={}	additional_make_multi_list={}	slot_chest=[]	slot_rhand=[bow]	slot_lhand=[]	base_attack_type=bow	base_can_penetrate=0	base_attack_range=1100	base_damage_range={0;0;80;120}	base_rand_dam=55	str=60	int=21	dex=40	wit=20	con=63	men=10	hp_increase=80	mp_increase=27	org_hp_regen=9.5	org_mp_regen=20	ground_low={80;0;10}	ground_high={160;-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=24xx.xx818899627	org_mp=5000	base_defend=2xx.xx597408024	base_magic_attack=4xx.xx4627426724	base_magic_defend=2xx.xx8467292763	base_physical_attack=15xx.xx519825567	physical_hit_modify=0	physical_avoid_modify=20	base_attack_speed=227	base_reuse_delay=500	base_critical=8	magic_use_speed_modify=0	status={normal}	align=-4900	collision_radius=8	collision_height=24	category={}	clan={}	clan_help_range=300	guild={}	pledge={}	pledge_leader=0	alliance={}	alliance_leader=0	ignore_clan_list={}	ruler=0	ruling_domain={}	npc_ai={[guard_justintime];{[fnHi] = [guard_coleman001.htm]}}	corpse_time=7	no_sleep_mode=0	npc_end

NPC_PH.TXT

WareHouse NPC's

Code:
[guard_Sluginator]	=	10013010
[guard_Storer]	=	10013020
[guard_KeeperofGoods]	=	10013030
Guard NPC's

Code:
[guard_grimkiller]	=	10013001
[guard_justintime]	=	10013002

[Client Side]

NPCGRP.TXT

WareHouse NPC's

Code:
npc_begin	npc_id=13010	npc_name=[__warehouse_keeper_klug]	npc_speed=1	class_name=[LineageNPC.a_warehouse_keeper_MDwarf]	mesh_name=[LineageNPCs.a_warehouse_keeper_MDwarf_m00]	texture_name={[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_b00];[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_b01];[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_f];[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_h]}	collision_radius=8	collision_height=17	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.MNpc_Old_Dmg_1];[ChrSound.MNpc_Old_Dmg_2];[ChrSound.MNpc_Old_Dmg_3]}	sound_vol=250	sound_radius=50	sound_random=70	attack_effect=[LineageEffect.p_u002_a]	npc_end
npc_begin	npc_id=13020	npc_name=[__warehouse_keeper_klug]	npc_speed=1	class_name=[LineageNPC.a_warehouse_keeper_MDwarf]	mesh_name=[LineageNPCs.a_warehouse_keeper_MDwarf_m00]	texture_name={[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_b00];[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_b01];[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_f];[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_h]}	collision_radius=8	collision_height=17	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.MNpc_Old_Dmg_1];[ChrSound.MNpc_Old_Dmg_2];[ChrSound.MNpc_Old_Dmg_3]}	sound_vol=250	sound_radius=50	sound_random=70	attack_effect=[LineageEffect.p_u002_a]	npc_end
npc_begin	npc_id=13030	npc_name=[__warehouse_keeper_klug]	npc_speed=1	class_name=[LineageNPC.a_warehouse_keeper_MDwarf]	mesh_name=[LineageNPCs.a_warehouse_keeper_MDwarf_m00]	texture_name={[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_b00];[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_b01];[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_f];[LineageNPCsTex.a_warehouse_keeper_MDwarf_m00_t00_h]}	collision_radius=8	collision_height=17	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.MNpc_Old_Dmg_1];[ChrSound.MNpc_Old_Dmg_2];[ChrSound.MNpc_Old_Dmg_3]}	sound_vol=250	sound_radius=50	sound_random=70	attack_effect=[LineageEffect.p_u002_a]	npc_end
Guard NPC's

Code:
npc_begin	npc_id=13001	npc_name=[guard_grimkiller]	npc_speed=2	class_name=[LineageNPC.a_guard_MHuman]	mesh_name=[LineageNPCs.a_guard_MHuman_m00]	texture_name={[LineageNPCsTex.a_guard_MHuman_m00_t00_b00];[LineageNPCsTex.a_guard_MHuman_m00_t00_b01];[LineageNPCsTex.a_guard_MHuman_m00_t00_h]}	collision_radius=8	collision_height=24	attack_sound1={[ItemSound.fist_1];[ItemSound.fist_2];[ItemSound.fist_3]}	defense_sound1={[ItemSound.armor_metal_strong_1];[ItemSound.armor_metal_strong_3];[ItemSound.armor_metal_strong_7];[ItemSound.armor_metal_alt_6];[ItemSound.armor_metal_alt_2]}	damage_sound={[ChrSound.MNpc_Fighter_Dmg_1];[ChrSound.MNpc_Fighter_Dmg_2];[ChrSound.MNpc_Fighter_Dmg_3]}	sound_vol=250	sound_radius=50	sound_random=70	attack_effect=[LineageEffect.p_u002_a]	npc_end
npc_begin	npc_id=13002	npc_name=[gurad_justintime]	npc_speed=2	class_name=[LineageNPC.a_guard_MHuman]	mesh_name=[LineageNPCs.a_guard_MHuman_m00]	texture_name={[LineageNPCsTex.a_guard_MHuman_m00_t00_b00];[LineageNPCsTex.a_guard_MHuman_m00_t00_b01];[LineageNPCsTex.a_guard_MHuman_m00_t00_h]}	collision_radius=8	collision_height=24	attack_sound1={[ItemSound.fist_1];[ItemSound.fist_2];[ItemSound.fist_3]}	defense_sound1={[ItemSound.armor_metal_strong_1];[ItemSound.armor_metal_strong_3];[ItemSound.armor_metal_strong_7];[ItemSound.armor_metal_alt_6];[ItemSound.armor_metal_alt_2]}	damage_sound={[ChrSound.MNpc_Fighter_Dmg_1];[ChrSound.MNpc_Fighter_Dmg_2];[ChrSound.MNpc_Fighter_Dmg_3]}	sound_vol=250	sound_radius=50	sound_random=70	attack_effect=[LineageEffect.p_u002_a]	npc_end


NPCNAME-E.TXT

WareHouse NPC's

Code:
npc_begin	id=13010	nickcolor=default	nick=[Warehouse Keeper]	name=[Sluginator]	npc_end
npc_begin	id=13020	nickcolor=default	nick=[Warehouse Keeper]	name=[Storer]	npc_end
npc_begin	id=13030	nickcolor=default	nick=[Warehouse Keeper]	name=[KeeperofGoods]	npc_end
Guard NPC's

Code:
npc_begin	id=13001	nickcolor=default	nick=[Private Guard]	name=[guard_grimkiller]	npc_end
npc_begin	id=13002	nickcolor=default	nick=[Private Guard]	name=[guard_justintime]	npc_end
Not sure I undestand the 21_23_NPC_031201_02 part on these in the NPCPOS.TXT.
How are these figured out, like with me making a new NPC in an area how do I find out what they should be?

Does this look good to add in a new set of 3 Warehouse NPC's & 2 Guards to an area?
Not sure if I missed anything or have some code that is out of wack.
Any help would be appreciated

Thanks for your time,
Dubie
Dubie is offline