Here's some sample MUD output:
>attack rat
You slash at the giant rat with your iron sword.
(5 seconds.)
>attack rat
You slash at the giant rat with your iron sword.
(7 seconds.)
A giant rat angrily bites you in the torso!
You have 72/90 HP.
>attack rat
You slash at the giant rat with your iron sword.
(5 seconds.)
What I'm trying to do is create aliases/triggers that upon catching the command 'attack X' will store X as the target, and attack it. I also need a way to catch the time left before the next action, and create a timer that will send 'attack X' when it reaches 0, while at the same time catching */90 HP and sending 'flee' instead of 'attack' when the next round comes up.
Any pointers?
>attack rat
You slash at the giant rat with your iron sword.
(5 seconds.)
>attack rat
You slash at the giant rat with your iron sword.
(7 seconds.)
A giant rat angrily bites you in the torso!
You have 72/90 HP.
>attack rat
You slash at the giant rat with your iron sword.
(5 seconds.)
What I'm trying to do is create aliases/triggers that upon catching the command 'attack X' will store X as the target, and attack it. I also need a way to catch the time left before the next action, and create a timer that will send 'attack X' when it reaches 0, while at the same time catching */90 HP and sending 'flee' instead of 'attack' when the next round comes up.
Any pointers?