Thread: [SHARE] C4 Pets
View Single Post
Old 12.02.2006, 16:52   #3
Sdw
Архивный участник
 
Join Date: Sep 2005
Posts: 150
Default

Damn error -_-

Now the npc :

AI
Code:
class pet_dude : citizen
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 1
   equal
   branch_false L50000
   push_event   //  reply
   push_const 104
   add
   fetch_i
   push_const 0
   equal
   branch_false L50000
   shift_sp 1
   push_event   //  talker
   push_const 32
   add
   fetch_i
   push_const 6648
   push_const 1012780
   func_call 196   //  func[CreatePet]
   shift_sp -3
   shift_sp -1
   jump L50000
L50000
   push_event   //  reply
   push_const 104
   add
   fetch_i
   push_const 1
   equal
   branch_false L50001
   shift_sp 1
   push_event   //  talker
   push_const 32
   add
   fetch_i
   push_const 6648
   push_const 1012781
   func_call 196   //  func[CreatePet]
   shift_sp -3
   shift_sp -1
   jump L50001
L50001
   push_event   //  reply
   push_const 104
   add
   fetch_i
   push_const 2
   equal
   branch_false L50002
   shift_sp 1
   push_event   //  talker
   push_const 32
   add
   fetch_i
   push_const 6649
   push_const 1012782
   func_call 196   //  func[CreatePet]
   shift_sp -3
   shift_sp -1
   jump L50002
L50002
   push_event   //  reply
   push_const 104
   add
   fetch_i
   push_const 3
   equal
   branch_false L50003
   shift_sp 1
   push_event   //  talker
   push_const 32
   add
   fetch_i
   push_const 6649
   push_const 1012786
   func_call 196   //  func[CreatePet]
   shift_sp -3
   shift_sp -1
   jump L50003
L50003
   push_event   //  reply
   push_const 104
   add
   fetch_i
   push_const 4
   equal
   branch_false L50004
   shift_sp 1
   push_event   //  talker
   push_const 32
   add
   fetch_i
   push_const 6650
   push_const 1012787
   func_call 196   //  func[CreatePet]
   shift_sp -3
   shift_sp -1
   jump L50004
L50004
   push_event   //  reply
   push_const 104
   add
   fetch_i
   push_const 5
   equal
   branch_false L50005
   shift_sp 1
   push_event   //  talker
   push_const 32
   add
   fetch_i
   push_const 6650
   push_const 1012788
   func_call 196   //  func[CreatePet]
   shift_sp -3
   shift_sp -1
   jump L50005
L50005
   call_super
handler_end

class_end
npcdata, well I'm using Taurin since wh don't work on C4 anyway & I just wanted to see them for fun. Just use the npc you want. Just need to replace AI.
Code:
npc_begin	warehouse_keeper	7086	[taurin]	level=70	exp=4296345xx.xx5	acquire_exp_rate=0.3	undying=1	can_be_attacked=0	acquire_sp=30	race=dwarf	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=[]	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={[pet_dude];{[fnHi] = [petdude.htm]}}	corpse_time=7	no_sleep_mode=0	npc_end

itemdata
Code:
item_begin   etcitem   6648   [ostrich_flute_a]   item_type=etcitem   slot_bit_type={none}   armor_type=none   etcitem_type=pet_collar   blessed=0   weight=20   default_action=action_skill_maintain   consume_type=consume_type_normal   initial_count=1   maximum_count=1   soulshot_count=0   spiritshot_count=0   immediate_effect=0   price=0   default_price=1000   item_skill=[s_wolf_collar]   critical_attack_skill=[none]   material_type=steel   crystal_type=none   crystal_count=0   is_trade=1   is_drop=1   is_destruct=1   physical_damage=0   random_damage=0   weapon_type=none   can_penetrate=0   critical=0   hit_modify=0   avoid_modify=0   dual_fhit_rate=0   shield_defense=0   shield_defense_rate=0   attack_range=0   effective_range=0   damage_range={}   attack_speed=0   reuse_delay=0   mp_consume=0   magical_damage=0   durability=0   damaged=0   physical_defense=0   magical_defense=0   mp_bonus=0   category={}   enchanted=0   html=[item_default.htm]   equip_pet={0}   magic_weapon=0   item_end
item_begin   etcitem   6649   [buffalo_flute_a]   item_type=etcitem   slot_bit_type={none}   armor_type=none   etcitem_type=pet_collar   blessed=0   weight=20   default_action=action_skill_maintain   consume_type=consume_type_normal   initial_count=1   maximum_count=1   soulshot_count=0   spiritshot_count=0   immediate_effect=0   price=0   default_price=1000   item_skill=[s_wolf_collar]   critical_attack_skill=[none]   material_type=steel   crystal_type=none   crystal_count=0   is_trade=1   is_drop=1   is_destruct=1   physical_damage=0   random_damage=0   weapon_type=none   can_penetrate=0   critical=0   hit_modify=0   avoid_modify=0   dual_fhit_rate=0   shield_defense=0   shield_defense_rate=0   attack_range=0   effective_range=0   damage_range={}   attack_speed=0   reuse_delay=0   mp_consume=0   magical_damage=0   durability=0   damaged=0   physical_defense=0   magical_defense=0   mp_bonus=0   category={}   enchanted=0   html=[item_default.htm]   equip_pet={0}   magic_weapon=0   item_end
item_begin   etcitem   6650   [saber_toothed_tiger_flute_a]   item_type=etcitem   slot_bit_type={none}   armor_type=none   etcitem_type=pet_collar   blessed=0   weight=20   default_action=action_skill_maintain   consume_type=consume_type_normal   initial_count=1   maximum_count=1   soulshot_count=0   spiritshot_count=0   immediate_effect=0   price=0   default_price=1000   item_skill=[s_wolf_collar]   critical_attack_skill=[none]   material_type=steel   crystal_type=none   crystal_count=0   is_trade=1   is_drop=1   is_destruct=1   physical_damage=0   random_damage=0   weapon_type=none   can_penetrate=0   critical=0   hit_modify=0   avoid_modify=0   dual_fhit_rate=0   shield_defense=0   shield_defense_rate=0   attack_range=0   effective_range=0   damage_range={}   attack_speed=0   reuse_delay=0   mp_consume=0   magical_damage=0   durability=0   damaged=0   physical_defense=0   magical_defense=0   mp_bonus=0   category={}   enchanted=0   html=[item_default.htm]   equip_pet={0}   magic_weapon=0   item_end
itempch
Code:
[ostrich_flute_a] = 6648
[buffalo_flute_a] = 6649
[saber_toothed_tiger_flute_a] = 6650
petdude.htm
Code:
<html>
<head>
<body>
I'm selling some C4 pet, here you go.

<a action="bypass -h menu_select?ask=1&reply=0">Baby Ostrich</a>

<a action="bypass -h menu_select?ask=1&reply=1">Ostrich</a>

<a action="bypass -h menu_select?ask=1&reply=2">Baby Buffalo</a>

<a action="bypass -h menu_select?ask=1&reply=3">Buffalo</a>

<a action="bypass -h menu_select?ask=1&reply=4">Baby Cougar</a>

<a action="bypass -h menu_select?ask=1&reply=5">Cougar</a>

</body>
</html>
Hope I don't forget anything.
Sdw is offline