View Single Post
Old 28.06.2005, 23:59   #57
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

Here's how to get the Wild Hog Cannon working so he consumes B gemstones like he should...You can tinker with the amount he consumes in the ai.obj file...Keep in mind this code is still a bit buggy...

First you need to edit your npcdata.txt file to look like this:
Code:
npc_begin	summon	12375	[range_golem]	level=80	exp=485484454	acquire_exp_rate=198	undying=0	can_be_attacked=1	acquire_sp=16250	race=humanoid	sex=male	temper=100	safe_height=100	org_jump=15	skill_list={}	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=pole	base_can_penetrate=0	base_attack_range=40	base_damage_range={0;0;80;120}	base_rand_dam=7	str=40	int=21	dex=30	wit=20	con=43	men=25	hp_increase=40	mp_increase=7	org_hp_regen=4.5	org_mp_regen=1.8	ground_low={50;0;10}	ground_high={186;-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=500000	org_mp=2154	base_defend=837	base_magic_attack=1098	base_magic_defend=1358	base_physical_attack=1256	physical_hit_modify=3.75	physical_avoid_modify=0	base_attack_speed=257	base_reuse_delay=0	base_critical=4	magic_use_speed_modify=0	status={normal}	align=-484	collision_radius=93	collision_height=90	category={}	clan={@lizardman_clan}	clan_help_range=300	guild={}	pledge={}	pledge_leader=0	alliance={}	alliance_leader=0	ignore_clan_list={}	ruler=0	ruling_domain={}	npc_ai={[range_golem]}	corpse_time=7	no_sleep_mode=0	npc_end
The important part there is in bold...It will reflect the class you create in the ai.obj file for the wild hog cannon...

In the ai.obj file you need to look for particular things such as functions like this:

Code:
shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  master
	push_const 2404
	add
	fetch_i
	push_const 2132
	func_call 81	//  func[OwnItemCount]
2132 corresponds to the item gemstone_b instead of the way it was set up before to point to gemstone_c...You need to edit this file so that it has its own class..I just modified mine so that it was the same routine as the siege golem, but it consumed gemstone_b every minute instead of gemstone_c....Make sure that you have the following code as well:

Code:
class range_golem : summon_range_golem
class_end
This usually goes towards the end of the file at the bottom...The code you need to create the class needs to look something like this:

Code:
class summon_range_golem : default_npc
......
......
.....
more code...
That's pretty much what ya need to do to make the wild hog cannon not disappear within a minute of summoning it...It disappeared before mainly cause it was set to the same AI as the siege_golem and was looking for c gemstones which you prolly didn't have...but if you have learned how to program AI you can set it up to do what it's really supposed to do...
HongK is offline