mfollow + food unit = hours of following

Login to reply  Page: « < 1 of 1 > »
24 Jul 2010 - 03:342918
mfollow + food unit = hours of following
What I'm trying to do.

Make a trigger that depending on the food units make the mod follow you for that period of time...
Example 1: You give a Mob a food with 4 food units. Mob follows you for 4 tics, then follows self.
Example 1: You give a Mob a food with 24 food units. Mob follows you for 24 tics, then follows self.

I have this:

Name: 'Chip the loyal dog', VNum: [61600], RNum: [ 1465]
Trigger Intended Assignment: Mobiles
Trigger Type: Receive , Numeric Arg: 100, Arg list: None
Commands:
if %object.vnum% == 61600
wait 2 sec
emote hungerly eats the steak.
wait 1 sec
emote licks %actor.name%.
%purge% %object%
wait 1 sec
mfollow %actor%
%echoaround% %actor.name% Chip the Loyal dog now follows %actor.name%.
%send% %actor% Chip the Loyal dog now follows you.
else
emote growls at %actor%.
return 0
end

Which works with only one ovnum. I could write up more if's for all the kinds of food, but there has to be something like.

if %object.vnum% == food
stat %object.vnum%
if %object.Makes full:% == 1
mfollow %actor%
wait 60 sec
follow %self%
if %object.Makes full:% == 2
mfollow %actor%
wait 120 sec
follow %self%
(and so on)


Am I even close with that?


24 Jul 2010 - 15:412919
if (%object.type% == FOOD)
  eval time %object.val0% * 60
  mfollow %actor.name%
  wait %time%
  mfollow %self%
end

The above code will work with any food type and follows for 60 seconds times the makes full value.


__________________
Owner/Coder/Head Admin
Caer Dubrin
Login to reply  Page: « < 1 of 1 > »