iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: 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 |
|