Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
twoudwijk
Newbie


Joined: 30 Nov 2008
Posts: 3

PostPosted: Sun Nov 30, 2008 9:25 pm   

Killing trigger?
 
Hi all,

Just wondering if anyone could help me with how I would create a trigger. Basically lets say there are 1, 2, 3 or more identical mobiles (let's call them Guard) in a room and and I would like to do three things. Note - they do not aid eachother.

What I would like to do to each individually is:
- firstly cast 'sleep' guardian
- If it fails the mud says two things... "you lose concentration, and your spell has no effect" if that's the case I would like the trigger to recast until the guard "falls to sleep"
- once asleep I would like to do an action E.G backstab guard.
- If a guard walks in, to repeat the same sequence.

I understand some triggers but I think this is far above my weight category! If someone could explain in layman's terms how I could create something like this it would be fantastic. I think it would need some kind of multiline catch to recognise that there is more than one mobile in the room...

I would really appreciate the help!!!

Twoud
Reply with quote
VgWizard14
Beginner


Joined: 30 Nov 2008
Posts: 14

PostPosted: Sun Nov 30, 2008 9:27 pm   
 
This isn't going to be constructive at all but...

GOTO's are the devil! STAY AWAY!

..that is all. :o
Reply with quote
symposes
Novice


Joined: 26 Apr 2006
Posts: 34

PostPosted: Mon Dec 01, 2008 2:52 am   
 
Bare with me

I would setup an alias

call it, fight for lack of better term

#var target %1
cast sleep @target
#t+ stabem


create a new class, called stabem
put these 2 triggers into that class

first trigger
pattern = you lose concentration, and your spell has no effect

action = cast sleep @target


second trigger
pattern = guard falls asleep

action = backstab guard
#t- stabem



As far as the trigger to attack guards that enter, just make a trigger for "Guard arrives" or whatever the string is
and make the action , fight guard, this way it starts the loop from the fight alias. this trigger wont be in the stabem class...
Reply with quote
twoudwijk
Newbie


Joined: 30 Nov 2008
Posts: 3

PostPosted: Tue Dec 02, 2008 12:32 am   re killer trigger
 
Hey, thanks very much for the help with the alias - i really appreciate this!!!

The only problem i can see here is that if there are 3 or more in the room...

There needs to be something to recognise that and type cast 'spell' guard, then cast 'spell' 2.guard and cast 'spell' 3.guard and so on...

If i set up that alias for recasting.. And i fail on the second guard... Then the recast would hit the 1st one and not the 2.guard.

How would i set it so that if i walk into the room... see 3 guards, cast 'spell' guard, 2.guard and so on,... and if during this there is a fail, it recasts the same equation e.g 2.guard.

If you could help, that would be great!

Twoud
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net