Code:
Name: 'Horse Petshop - 203', VNum: [ 338], RNum: [ 256]
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%
%force% %pet_name% mfollow %actor%
dg_affect %pet_name% charm on 999
emote opens the stable door and returns leading your horse by its reins.
tell %actor.name% here you go. Treat'em well.
nop %actor.gold(-%pet_cost%)
end
elseif %cmd.mudcommand% == sell
tell %actor.name% Does it look like I buy things?
else
return 0
end
for TBA.