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
Kaine
Beginner


Joined: 04 Feb 2002
Posts: 21
Location: Ireland

PostPosted: Wed Feb 13, 2002 7:49 pm   

Vrsoft's original flee script post
 
Yeah, Im trying to modify his finished script for the Mud I play, but am having a little difficulty understanding it without the explanations in the original post. It seems the links to the original post are broken. Just wondering if anyone had a working link to it, or a copy somewhere.
Also, in anticipation of me being particularly dim-witted and still not being able to work it out, Ill throw in the output of my Mud if some kind hearted soul feels like taking a crack at it...

On typing flee, the mud reads

You panic, and attempt to flee.

If successful, you move to a random room adjacent the one you fled from, no additional message. Occasionally the attempt will fail, and you'll stay in the same room. This message reads...

PANIC! You couldn't escape!

Thanking you in anticipation...
Kaine
Reply with quote
undergod
Wanderer


Joined: 27 Jun 2001
Posts: 82

PostPosted: Wed Feb 13, 2002 8:06 pm   
 
Well, what do you want the script to do? Do you want it to automatically retry if you can't flee? If so, this will do it for you:

#trigger {^PANIC! You couldn't escape!$} {flee}
Reply with quote
Kaine
Beginner


Joined: 04 Feb 2002
Posts: 21
Location: Ireland

PostPosted: Wed Feb 13, 2002 8:38 pm   
 
Oops, wasnt too clear on that. Just want it to do what Vrsoft's script did - move my place on the automapper to the new room.
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Wed Feb 13, 2002 9:05 pm   
 
Okay, after you flee, does it automatically look in the room that you've fled to? If not, then the script will be a bit harder to tweak, but shouldn't be too bad.

Iljhar
Reply with quote
Kaine
Beginner


Joined: 04 Feb 2002
Posts: 21
Location: Ireland

PostPosted: Wed Feb 13, 2002 9:36 pm   
 
yeah, after a successful flee the room that is entered is displayed. eg

You panic, and attempt to flee.
Kaine's House
You have entered an elaborate figment of this poor persons imagination.
[Exits: n s]

Sorry about the lack of info in the previous posts.
Kaine
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Feb 14, 2002 12:30 am   
 
So, does Vrsoft's script no longer work, or are you trying to modify it because of something else? It would also help if you could post the script that you currently have.

Basically, a solution that I have seen for this consists in looking at the description (and possible also name and exits for greater accuracy) of the room you fled into and comparing this with the rooms adjacent to your current position (the room from which you fled) in the mapper. The one that matches, is your current position. In essence, this is just a #FIND but restricted to adjacent rooms only.

Kjata
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 14, 2002 9:41 pm   
 
VrSoft's script

I have something like that working at the same
mud where it works for me.

How did you modify it and what isn't working?

I would add an #ECHO to each of the triggers
so you could see which one fired when.

The you could figure out which one isn't
properly going off.

TonDiening is sprawled from Kaine's bible bash.
Beta Upgrading to 6.26

All keys, aliases, variables, paths, triggers, tabs, menus, status bars deleted
Reply with quote
Kaine
Beginner


Joined: 04 Feb 2002
Posts: 21
Location: Ireland

PostPosted: Thu Feb 28, 2002 6:01 pm   
 
The way I tried to modify it was by replacing Vrsoft's trigger - "You choose a direction at random and begin to run..."
with the line generated by the mud I use - "You panic, and attempt to flee."
However Im not sure what to use to replace the other trigger he uses - "You flee from combat!" since there is no second line generated by my mud to tell you you have successfully fled - the room name, description and exits of the room I have randomly fled into is only displayed.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 28, 2002 8:14 pm   
 
Try using the exits description to determine
that you had actually fled into the next room.

I believe I double mounted the possible
directions with the you have successfully
fled into the next room.

I haven't used that .mud file since I killed
Dusk :P If you are still stuck I go unarchive
it and see what I used.

TonDiening
Beta Upgrading to 6.26
Reply with quote
Kaine
Beginner


Joined: 04 Feb 2002
Posts: 21
Location: Ireland

PostPosted: Fri Mar 01, 2002 11:24 am   
 
Wow, you were Dusk? So can I believe that some of your unbeatability was due to my maps? ;) Heehee! Looking forward to kicking your butt when you become a LotP!
Kaine
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Mar 01, 2002 11:42 am   
 
er.. I killed Dusk with a CON surgeon. Dusk 6: Yui: 1

I couldn't roleplay such a mean streak that long to play Dusk :)

I'll unarchive that .mud file and see what I did.

TonDiening
Beta Upgrading to 6.26
Reply with quote
Kaine
Beginner


Joined: 04 Feb 2002
Posts: 21
Location: Ireland

PostPosted: Fri Mar 01, 2002 11:45 am   
 
Heh, whoops! Cheers for that, appreciate it.
Kaine
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Mar 12, 2002 12:12 am   
 
How about something like the following for all the triggers needed:

#TRIGGER {~[Exits: (*)~]$} {last_current_exits=@Current_exits;#IF ("%1" == "none") {current_exits = %1} {current_exits=%replace( %1, " ", "|");#FORALL @current_exits {current_exits = %sort( %replace( @current_exits, %1, %left( %i, 1)))}}} "System|AutomapperAll|Flee" {case}

#TRIGGER {You panic, and attempt to flee.$(%*)$(%*)$} {roomname = "%1";roomdesc = %concat( "%2", "|", %char( 10), "|", %char( 10));found = 0;#FORALL %roomexit( ) {roomdesc_map = %replace( %roomdesc( %roomlink( ,%i)), %char( 13), "|");exits_map = %sort( %roomexit( %roomlink( ,%i)));#IF (({@roomname} == {%roomname( %roomlink( ,%i))}) and ({@roomdesc} == {@roomdesc_map}) and ({@last_current_exits} == {@exits_map})) {found_dir = %i;#MATH found (@found+1)}};#IF (@found == 0) {#SH %ansi( 13)--> ~[ABORT~] No room matches found.;#ABORT 1};#IF (@found > 1) {#SH %ansi( 13)--> ~[ABORT~] @found room matches found.;#ABORT 1};#TELEPORT %roomlink( ,@found_dir)} "System|AutomapperAll|Flee"


TonDiening
Beta Upgrading to 6.26
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