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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Thu Aug 23, 2001 2:42 am   

eiekal's automapper and fleeing script
 
This one is based on vrsoft's script, but tailored for the mud that eiekal plays on, don't know which mud it is though. Here it is:

#VAR roomname {}
#VAR curline {}
#VAR roomdesc {}
#VAR found {0}
#VAR current_exits {}
#VAR roomdesc_map {}
#VAR exits_map {}
#VAR found_dir {}

#TRIGGER {You flee head over heels.$(%*)$(%*)$} {#T+ flee;#VARIABLE roomname "%1";#VARIABLE curline "%2";#VARIABLE roomdesc %concat(@curline, " ")}

#TRIGGER {^%dH %dV %dX %dC Exits:(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)>} {#VARIABLE found 0;#VARIABLE current_exits "";#LOOP %numparam() {#VARIABLE current_exits %concat(@current_exits, %if(%param(%i)!="", %concat(%lower(%param(%i)), "|"), ""))};#LOOP 6 {#IF (%pos("(", @current_exits)) {#VARIABLE count %pos("(", @current_exits);#VARIABLE current_exits %concat(%left(@current_exits, @count-1), %right(@current_exits, @count+5))}};#IF (%right(@current_exits, "|")) {#VARIABLE current_exits %leftback(@current_exits, 1)};#NOOP;#FORALL %roomexit() {#VARIABLE roomdesc_map %replace(%roomdesc(%roomlink(, %i)), %concat(%char(13), %char(10)), " ");#VARIABLE exits_map %sort(%roomexit(%roomlink(, %i)));#IF ((@roomname==%roomname(%roomlink(, %i))) and (%begins(@roomdesc, @roomdesc_map)) and (@current_exits==@exits_map)) {#VARIABLE found_dir %i;#ADD found 1}};#IF (@found == 0) {#SAY %ansi(13)--> ~[ABORT~] No room matches found.;#ABORT 1};#IF (@found > 1) {#SAY %ansi(13)--> ~[ABORT~] @found room matches found.;#ABORT 1};#TELEPORT %roomlink(, @found_dir);#T- flee} "flee" {prompt}

#TRIGGER {{@curline}$(%*)$} {#VARIABLE curline "%1";#VARIABLE roomdesc %concat(@roomdesc, @curline, " ")} "flee"

Here's the original thread: http://www.zuggsoft.com/forum/topic.asp?TOPIC_ID=3102&FORUM_ID=7&CAT_ID=1&Topic_Title=Modify+script+made+by+Vrsoft+%26+iljhar&Forum_Title=zMUD+General+Discussion

Iljhar
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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