Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 11.07.2005, 17:00   #1
Dave
Архивный участник
 
Join Date: Jun 2005
Posts: 364
Default Creating new trade NPC

Need some help I created npc to trade new weapons, I copied Alexandrias information from Giran and just renamed it and move to different location. but when I go into the game she is not there. any ideas.
Dave is offline  
Old 11.07.2005, 17:25   #2
Sakumi
Архивный участник
 
Join Date: Apr 2005
Posts: 555
Default

Did you do your client side modifications?

Did you add him to npcpos, can you summon him as a gm?

can you /target him where he should be?
Sakumi is offline  
Old 11.07.2005, 18:34   #3
Dave
Архивный участник
 
Join Date: Jun 2005
Posts: 364
Default new npc

did do client side mod. but cant //summon her and cant target.
Heres my code.
AI.OBJ
Code:
class LiLFrag: merchant_for_cgrade
handler 4	//  TALK_SELECTED
	variable_begin
		"talker"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  _from_choice
	push_const 332
	add
	fetch_i
	push_const 0
	equal
	branch_false L17215
L17214
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 229
	func_call 59	//  func[HaveMemo]
	shift_sp -2
	push_const 1
	equal
	push_reg_sp
	fetch_i
	branch_false L17216
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3308
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	push_const 1
	equal
	and
L17216
	branch_false L17218
L17217
	push_event	//  _choiceN
	push_const 328
	add
	push_reg_sp
	fetch_i
	push_event	//  _choiceN
	push_const 328
	add
	fetch_i
	push_const 1
	add
	assign
	shift_sp -1
	push_event	//  _code
	push_const 324
	add
	push_reg_sp
	fetch_i
	push_const 0
	assign
	shift_sp -1
	shift_sp 1
	push_const 0
S3542.	"??????"
	push_string S3542
	func_call 131	//  func[AddChoice]
	shift_sp -2
	shift_sp -1
L17218
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 229
	func_call 59	//  func[HaveMemo]
	shift_sp -2
	push_const 1
	equal
	push_reg_sp
	fetch_i
	branch_false L17219
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3309
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	push_const 1
	equal
	and
L17219
	branch_false L17221
L17220
	push_event	//  _choiceN
	push_const 328
	add
	push_reg_sp
	fetch_i
	push_event	//  _choiceN
	push_const 328
	add
	fetch_i
	push_const 1
	add
	assign
	shift_sp -1
	push_event	//  _code
	push_const 324
	add
	push_reg_sp
	fetch_i
	push_const 1
	assign
	shift_sp -1
	shift_sp 1
	push_const 1
S3543.	"? ??????"
	push_string S3543
	func_call 131	//  func[AddChoice]
	shift_sp -2
	shift_sp -1
L17221
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 229
	func_call 59	//  func[HaveMemo]
	shift_sp -2
	push_const 1
	equal
	push_reg_sp
	fetch_i
	branch_false L17222
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3324
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	push_const 1
	equal
	and
	push_reg_sp
	fetch_i
	branch_false L17222
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3323
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	push_const 1
	equal
	and
L17222
	branch_false L17224
L17223
	push_event	//  _choiceN
	push_const 328
	add
	push_reg_sp
	fetch_i
	push_event	//  _choiceN
	push_const 328
	add
	fetch_i
	push_const 1
	add
	assign
	shift_sp -1
	push_event	//  _code
	push_const 324
	add
	push_reg_sp
	fetch_i
	push_const 2
	assign
	shift_sp -1
	shift_sp 1
	push_const 2
S3544.	"??????"
	push_string S3544
	func_call 131	//  func[AddChoice]
	shift_sp -2
	shift_sp -1
L17224
	push_event	//  _choiceN
	push_const 328
	add
	fetch_i
	push_const 1
	greater
	branch_false L17226
L17225
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 1
	func_call 132	//  func[ShowChoicePage]
	shift_sp -2
	shift_sp -1
	exit_handler
L17226
L17215
	push_event	//  _from_choice
	push_const 332
	add
	fetch_i
	push_reg_sp
	fetch_i
	branch_true L17227
	push_event	//  _choiceN
	push_const 328
	add
	fetch_i
	push_const 1
	equal
	or
L17227
	branch_false L17229
L17228
	push_event	//  _code
	push_const 324
	add
	fetch_i
	push_reg_sp
	fetch_i
	push_const 0
	equal
	branch_false L17232
L17231
	push_event	//  _from_choice
	push_const 332
	add
	fetch_i
	push_const 0
	equal
	push_reg_sp
	fetch_i
	branch_true L17233
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 229
	func_call 59	//  func[HaveMemo]
	shift_sp -2
	push_const 1
	equal
	push_reg_sp
	fetch_i
	branch_false L17234
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3308
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	push_const 1
	equal
	and
L17234
	or
L17233
	branch_false L17236
L17235
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
S3545.	"alexandria_q0229_01.htm"
	push_string S3545
	func_call 43	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
L17236
	jump L17230
	jump L17237
L17232
	push_reg_sp
	fetch_i
	push_const 1
	equal
	branch_false L17238
L17237
	push_event	//  _from_choice
	push_const 332
	add
	fetch_i
	push_const 0
	equal
	push_reg_sp
	fetch_i
	branch_true L17239
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 229
	func_call 59	//  func[HaveMemo]
	shift_sp -2
	push_const 1
	equal
	push_reg_sp
	fetch_i
	branch_false L17240
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3309
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	push_const 1
	equal
	and
L17240
	or
L17239
	branch_false L17242
L17241
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
S3546.	"alexandria_q0229_04.htm"
	push_string S3546
	func_call 43	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
L17242
	jump L17230
	jump L17243
L17238
	push_reg_sp
	fetch_i
	push_const 2
	equal
	branch_false L17244
L17243
	push_event	//  _from_choice
	push_const 332
	add
	fetch_i
	push_const 0
	equal
	push_reg_sp
	fetch_i
	branch_true L17245
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 229
	func_call 59	//  func[HaveMemo]
	shift_sp -2
	push_const 1
	equal
	push_reg_sp
	fetch_i
	branch_false L17246
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3324
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	push_const 1
	equal
	and
	push_reg_sp
	fetch_i
	branch_false L17246
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3323
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	push_const 1
	equal
	and
L17246
	or
L17245
	branch_false L17248
L17247
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
S3547.	"alexandria_q0229_05.htm"
	push_string S3547
	func_call 43	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
L17248
	jump L17230
	jump L17249
L17244
L17249
L17230
	shift_sp -1
	exit_handler
L17229
	call_super
handler_end

handler 32	//  MENU_SELECTED
	variable_begin
		"ask"
		"reply"
		"talker"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  ask
	push_const 100
	add
	fetch_i
	push_const 229
	equal
	branch_false L17251
L17250
	push_event	//  reply
	push_const 104
	add
	fetch_i
	push_const 1
	equal
	branch_false L17253
L17252
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
S3548.	"alexandria_q0229_02.htm"
	push_string S3548
	func_call 43	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
L17253
push_event	//  reply
	push_const 104
	add
	fetch_i
	push_const 2
	equal
	branch_false L17255
L17254
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3308
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	push_const 1
	greater_equal
	branch_false L17257
L17256
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
S3549.	"alexandria_q0229_03.htm"
	push_string S3549
	func_call 43	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3308
	push_const 1
	func_call 80	//  func[DeleteItem1]
	shift_sp -3
	shift_sp -1
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_const 3309
	push_const 1
	func_call 77	//  func[GiveItem1]
	shift_sp -3
	shift_sp -1
L17257
L17255
L17251
	call_super
handler_end

class_end
Code:
NPC_PCH.TXT SCRIPT-last number +1
[LilFrag] = 1012623

NPCDATA.TXT- last number +1
Code:
npc_begin  citizen	12536	[LilFrag]	level=70	exp=4296345xx.xx5	acquire_exp_rate=0.40243902439	undying=1	can_be_attacked=0	acquire_sp=40	race=human	sex=female	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=[]	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=999999	org_mp=999999	base_defend=999999	base_magic_attack=999999	base_magic_defend=999999	base_physical_attack=999999	physical_hit_modify=99	physical_avoid_modify=999	base_attack_speed=999	base_reuse_delay=0	base_critical=99	magic_use_speed_modify=999	status={normal}	align=-4900	collision_radius=8	collision_height=25.3	category={}	clan={}	clan_help_range=300	guild={}	pledge={}	pledge_leader=0	alliance={}	alliance_leader=0	ignore_clan_list={}	ruler=0	ruling_domain={}	npc_ai={[LilFrag];{[fnHi] = [LilFrag001.htm]}}	corpse_time=7	no_sleep_mode=0	npc_end
NPCPOS.TXT-added to 20-18 section. which is DEV.
Code:
npc_begin	[LilFrag]	pos = {11444;16800;-3494;0}	total = 1	respawn = 1min	npc_end
CLIENT SIDE:
Code:
npc_begin	npc_id=30522	npc_name=[LilFrag]	npc_speed=1	class_name=[LineageNPC.a_traderB_FHuman]	mesh_name=[LineageNPCs.a_traderB_FHuman_m00]	texture_name={[LineageNPCsTex.a_traderB_FHuman_m00_t00_b00];[LineageNPCsTex.a_traderB_FHuman_m00_t00_b01];[LineageNPCsTex.a_traderB_FHuman_m00_t00_f];[LineageNPCsTex.a_traderB_FHuman_m00_t00_h]}	texture_name_second=[none]	collision_radius=8	collision_height=25.3	attack_sound1={[ItemSound.fist_1];[ItemSound.fist_2];[ItemSound.fist_3]}	defense_sound1={[ItemSound.armor_leather_1];[ItemSound.armor_leather_2];[ItemSound.armor_leather_5];[ItemSound.armor_leather_7];[ItemSound.armor_leather_8]}	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]	quest_be=0	level_limit={[]}	class_limit={[]}	npc_end
NPCNAME-E.TXT-last line+ 1
Code:
npc_begin	id=30522	nickcolor=default	nick=[Trader]	name=[LilFrag]	reserved1=0	npc_end
Dave is offline  
Old 11.07.2005, 22:12   #4
Sakumi
Архивный участник
 
Join Date: Apr 2005
Posts: 555
Default

Well I think you didnt need to set the AI to the other char. I think all thats used for whatever quest she is involved in.

Just make a blank merchant entry in ai.obj

Code:
class lilfrag: merchant_for_cgrade 
class_end
Also, lowercase ur name.

lemme know?
Sakumi is offline  
Old 11.07.2005, 22:55   #5
fflam
Архивный участник
 
Join Date: Jun 2005
Posts: 46
Default

somethign simaler to this happened to me once. and the problem was in teh npcpos.txt theres a line that looks somethig like this

npcmaker_begin [gludio_chamberlain_etc] initial_spawn=all maximum_npc=10

and my npc wouldent spawn becuse there was allredy the max number on npc. so i raised it by 1 (changed maximum_npc=10 to maximum_npc=11) and it worked fine.
fflam is offline  
Old 11.07.2005, 23:21   #6
Sakumi
Архивный участник
 
Join Date: Apr 2005
Posts: 555
Default

Quote:
Originally Posted by fflam
somethign simaler to this happened to me once. and the problem was in teh npcpos.txt theres a line that looks somethig like this

npcmaker_begin [gludio_chamberlain_etc] initial_spawn=all maximum_npc=10

and my npc wouldent spawn becuse there was allredy the max number on npc. so i raised it by 1 (changed maximum_npc=10 to maximum_npc=11) and it worked fine.
Nice 1
Sakumi is offline  
Old 12.07.2005, 04:13   #7
Dave
Архивный участник
 
Join Date: Jun 2005
Posts: 364
Default npcpos.txt

good one.. it was set to 1. I set to 5 and Ill try again tomorrow. next question. i can summon her now but shes a big bunny. why. I copied the npcgrp.txt from the npc I wanted. so it should be the same meshes right?
Dave is offline  
Old 12.07.2005, 05:16   #8
fflam
Архивный участник
 
Join Date: Jun 2005
Posts: 46
Default

you have to put the npc on the client side also. dont know how to do it off the top of my head. i usly let the other gm on are server do the client side.
fflam is offline  
Old 12.07.2005, 08:05   #9
BiGBoY
Архивный участник
 
Join Date: May 2005
Posts: 216
Default

https://postpacific.loc-online.com/f...ight=bodyguard

here u got example for adding custom npc to server and client files.

u need to take care of selectin right ai for ur npc and to select proper position for it.
BiGBoY is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:13.