Another option is to use triggers, example below. It may not go into stock tbaMUD but I'm sure others would be interested in it here, please share and who knows if there is enough demand for it maybe it will be added down the road.
Code:
Name: 'Horse Petshop - 203', VNum: [ 338], RNum: [ 260]
Trigger Intended Assignment: Mobiles
Trigger Type: Command , Numeric Arg: 100, Arg list: *
Commands:
if %cmd.mudcommand% == list
*
%send% %actor%
%send% %actor% ## Pet Cost
%send% %actor% --------------------------------------------------------------
%send% %actor% 1) a horse 1500
%send% %actor% 2) a fine mare 1800
%send% %actor% 3) a stallion 3000
*
elseif %cmd.mudcommand% == buy
if %actor.gold% < 1500
tell %actor.name% You have no money, go beg somewhere else.
halt
* lets not allow them to have more than one pet to keep the game balanced.
elseif %actor.follower%
tell %actor.name% You already have someone following you.
halt
end
if horse /= %arg% || %arg% == 1
set pet_name horse
set pet_vnum 202
set pet_cost 1500
elseif fine /= %arg% || mare /= %arg% || %arg% == 2
set pet_name mare
set pet_vnum 204
set pet_cost 1800
elseif stallion /= %arg% || %arg% == 3
set pet_name stallion
set pet_vnum 205
set pet_cost 3000
else
tell %actor.name% What? I don't have that.
halt
end
*
if %actor.gold% < %pet_cost%
tell %actor.name% You don't have enough gold for that.
else
* Need to load the mob, have it follow the player AND set the affect
* CHARM so the mob will follow the masters orders.
%load% mob %pet_vnum%
dg_affect %pet_name% charm on 999
emote opens the stable door and returns leading a horse by its reins.
tell %actor.name% here you go. Treat'em well.
%force% %pet_name% follow %actor.name%
nop %actor.gold(-%pet_cost%)%
end
elseif %cmd.mudcommand% == sell
tell %actor.name% Does it look like I buy things?
else
return 0
end