Grendal-777
Veteran
I am having a little issue with my mount vendor in multiplayer mod.
He spawns the mount just fine but the option showing on the spawned horse is "equip" not mount. If you equip him he replaces your second weapon and vanishes into your inventory.
I searched for a mountable item type.. but all are just itm_horsename.
Ideas for me to try?
My code:
EDIT: 10/5/2010 Seems all I needed was to use "spawn_horse". Goes to show, don't just believe a command doesn't work based on reading threads, some have been fixed and work with Warband now.
My finished code that spawns a horse (my "use" item is buried under ground in a stable slot to explain the raise z 100 part).
He spawns the mount just fine but the option showing on the spawned horse is "equip" not mount. If you equip him he replaces your second weapon and vanishes into your inventory.
I searched for a mountable item type.. but all are just itm_horsename.
Ideas for me to try?
My code:
check_horse_two = (ti_on_scene_prop_use,
[
(store_trigger_param_1, ":agent_id"),
(store_trigger_param_2, ":instance_id"),
(multiplayer_is_server),
(assign, ":cost", 5000), #:profit to gain, :cost to loose, edit
amount of cost or profit
(agent_get_player_id,":player_no",":agent_id"),
(try_begin),
(player_is_active, ":player_no"),
(player_get_gold, ":player_gold", ":player_no"),
(ge, ":player_gold", ":cost"), #:profit to gain, :cost to loose
(prop_instance_get_position, pos1, ":instance_id"),
(position_move_z,pos1,100), #Use this to tell where item will
spawn to in relation to scene prop
# (position_rotate_x, pos1, 180),
(set_spawn_position, pos1),
(spawn_item,"itm_hunter"), #actual spawning of the item
(val_sub, ":player_gold", ":cost"), #Use val_sub to
subtract and val_add to add, :profit to gain, :cost to loose
(player_set_gold, ":player_no", ":player_gold",
multi_max_gold_that_can_be_stored),
(try_end),
]
[
(store_trigger_param_1, ":agent_id"),
(store_trigger_param_2, ":instance_id"),
(multiplayer_is_server),
(assign, ":cost", 5000), #:profit to gain, :cost to loose, edit
amount of cost or profit
(agent_get_player_id,":player_no",":agent_id"),
(try_begin),
(player_is_active, ":player_no"),
(player_get_gold, ":player_gold", ":player_no"),
(ge, ":player_gold", ":cost"), #:profit to gain, :cost to loose
(prop_instance_get_position, pos1, ":instance_id"),
(position_move_z,pos1,100), #Use this to tell where item will
spawn to in relation to scene prop
# (position_rotate_x, pos1, 180),
(set_spawn_position, pos1),
(spawn_item,"itm_hunter"), #actual spawning of the item
(val_sub, ":player_gold", ":cost"), #Use val_sub to
subtract and val_add to add, :profit to gain, :cost to loose
(player_set_gold, ":player_no", ":player_gold",
multi_max_gold_that_can_be_stored),
(try_end),
]
EDIT: 10/5/2010 Seems all I needed was to use "spawn_horse". Goes to show, don't just believe a command doesn't work based on reading threads, some have been fixed and work with Warband now.
My finished code that spawns a horse (my "use" item is buried under ground in a stable slot to explain the raise z 100 part).
check_horse_two = (ti_on_scene_prop_use,
[
(store_trigger_param_1, ":agent_id"),
(store_trigger_param_2, ":instance_id"),
(multiplayer_is_server),
(assign, ":cost", 1000), #:profit to gain, :cost to loose, edit amount of cost or profit
(agent_get_player_id,":player_no",":agent_id"),
(try_begin),
(player_is_active, ":player_no"),
(player_get_gold, ":player_gold", ":player_no"),
(ge, ":player_gold", ":cost"), #:profit to gain, :cost to loose
(prop_instance_get_position, pos1, ":instance_id"),
(position_move_z,pos1,100), #Use this to tell where item will spawn to in relation to scene prop
# (position_rotate_x, pos1, 180), #use if you want him to face buyer on spawn
(set_spawn_position, pos1),
(spawn_horse,"itm_hunter"), #actual spawning of the item
(val_sub, ":player_gold", ":cost"), #Use val_sub to subtract and val_add to add, :profit to gain, :cost to loose
(player_set_gold, ":player_no", ":player_gold", multi_max_gold_that_can_be_stored),
(display_message, "@You have bought a hunter horse."),
(try_end),
])
[
(store_trigger_param_1, ":agent_id"),
(store_trigger_param_2, ":instance_id"),
(multiplayer_is_server),
(assign, ":cost", 1000), #:profit to gain, :cost to loose, edit amount of cost or profit
(agent_get_player_id,":player_no",":agent_id"),
(try_begin),
(player_is_active, ":player_no"),
(player_get_gold, ":player_gold", ":player_no"),
(ge, ":player_gold", ":cost"), #:profit to gain, :cost to loose
(prop_instance_get_position, pos1, ":instance_id"),
(position_move_z,pos1,100), #Use this to tell where item will spawn to in relation to scene prop
# (position_rotate_x, pos1, 180), #use if you want him to face buyer on spawn
(set_spawn_position, pos1),
(spawn_horse,"itm_hunter"), #actual spawning of the item
(val_sub, ":player_gold", ":cost"), #Use val_sub to subtract and val_add to add, :profit to gain, :cost to loose
(player_set_gold, ":player_no", ":player_gold", multi_max_gold_that_can_be_stored),
(display_message, "@You have bought a hunter horse."),
(try_end),
])