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
Khaldar
Newbie


Joined: 11 Jan 2002
Posts: 7

PostPosted: Fri Jan 11, 2002 10:03 pm   

need help !
 
Ok, I need some help.

This is what I want:
I want, if I flee north, to go south and backstab my target but only when I say so. I made a trigger for the stabbing that works fine:

Pattern: You flee %1ward

Trigger: #if {%1 = west} {east;bat};#if {%1 = east} {west;bat};#if {%1 = north} {s;bat};#if {%1 = south} {n;bat};#if {%1 = down} {up;bat};#if {%1 = up} {down;bat};#if {%1 = northeast} {sw;bat};#if {%1 = southeast} {nw;bat};#if {%1 = northwest} {se;bat};#if {%1 = southwest} {ne;bat}

But the problem is the following.
I only want it to go off when I type 'bb' not when I normally flee.

So: 'flee' should make me flee %ward but nothing more (normal).
And: 'bb' should make me flee %ward and activate the trigger so I come back and stab my target.

Please help me :-)

Khal Al' Thacor
Reply with quote
Khaldar
Newbie


Joined: 11 Jan 2002
Posts: 7

PostPosted: Fri Jan 11, 2002 10:17 pm   
 
Sorry I posted this twice, I'm using a touchpad portable and with moving the mouse I accidently refresh on the posting screen.

Anyway, could someone help me? this is quite urgent ;-))

I just want to manually type 'bb' whenever I want to use the you flee %ward trigger; but I must not work normally. thanks peeps.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Jan 11, 2002 10:30 pm   
 
Try this trigger instead:
Pattern: You flee (%w)ward
Trigger: #VAR dir %item("south|southwest|west|northwest|north|northeast|east|southeast", %ismember(%1, "north|northeast|east|southeast|south|southwest|west|northwest"))

Alias: bb
Value: #EXEC @dir;bat

After creating the trigger and alias, you will have a trigger that will always record the opposite direction of where you flee in the variable @dir. When you execute the bb alias, it will use this stored direction to move you and then sends bat to the MUD.

Kjata
Reply with quote
Khaldar
Newbie


Joined: 11 Jan 2002
Posts: 7

PostPosted: Fri Jan 11, 2002 10:39 pm   
 
thanks, will try this now
Reply with quote
Khaldar
Newbie


Joined: 11 Jan 2002
Posts: 7

PostPosted: Fri Jan 11, 2002 10:44 pm   
 
Hm, this Is what I get:

On bb:

< 379h/379H 113v/113V Pos: standing> %item("south|southwest|west|northwest|north|northeast|east|southeast", %ismember(south, "north|northeast|east|southeast|south|southwest|west|northwest"))
back lalala

Pardon?

< 379h/379H 113v/113V Pos: standing>
Backstab who?

And when I flee first:


< 379h/379H 113v/113V Pos: standing> flee

You attempt to flee...
The Path Ends Beside a Large Boulder
Obvious exits: -S -W
You flee northward!

< 379h/379H 112v/113V Pos: standing> %item("south|southwest|west|northwest|north|northeast|east|southeast", %ismember(north, "north|northeast|east|southeast|south|southwest|west|northwest"))
back lalala

Pardon?

< 379h/379H 112v/113V Pos: standing>
Backstab who?
Reply with quote
Khaldar
Newbie


Joined: 11 Jan 2002
Posts: 7

PostPosted: Fri Jan 11, 2002 10:46 pm   
 
A friend of mine made it once, and it was with the trigger I used (not so sure about pattern) and it was something with the bb alias I had to do.

Any idea?

Think this was the alias:

alias: bb
command : ...something to activate the trigger?...... ;flee

and then I would flee and come back to stab
but not when i normally fleed
Reply with quote
Khaldar
Newbie


Joined: 11 Jan 2002
Posts: 7

PostPosted: Fri Jan 11, 2002 11:24 pm   
 
What I did now is, I put the trigger in a 'Autobackstab' class and made 2 new aliases.

bb: #T+ Autobackstab
cc: #T- Autobackstab

So when bb is activated, the flee trigger works, but it doesnt send me back when I type cc first.

Still, there is a way to just make it work on 'bb' alone.

Any help is welcome !
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Sat Jan 12, 2002 9:26 am   
 
Kjata's trigger and alias will do the job for you, but from your output, I can see you didn't type them in correctly.

The trigger is designed to capture the direction, then save the opposite direction to the variable @dir. Therefore the two lists of directions should be mirror images of each other. You've cut and pasted the same list in twice. In addition, you did not include the %1 in the %ismember function. Reread what Kjata wrote and correct the trigger.

Troubadour
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Jan 12, 2002 1:15 pm   
 
Be careful of how you copy a script form the Forum and paste it in zMUD. The forum tends to add newlines that aren't there when the line is too long. Specifically, there is only one line in the commands of the trigger I posted, the Forum just splits it up in more because it is very long. Remember that in scripts, no line starts (or at least should not start) with a function.

Kjata
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