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
Phanku
Novice


Joined: 09 Oct 2003
Posts: 40

PostPosted: Sat Jul 17, 2004 12:35 am   

#unkey in a script and varables
 
Okay,

I've wracked my brain over this. I'm sure it's just a parsing thing. What i'm trying to do is erase a key on the fly using the #unkey command. The key I want to erase is in a Record called @sxconfig.macro_key.

Here is my script.

#CLASS {Search}
#ALIAS sxadd {#reset @sxconfig.file_number;#if (%null( %filesize( @sxconfig.file_number))=1) {#cr;#echo %ansi( hi, red, bold) ~>~> ERROR %ansi( hi, cyan)NO FILE NUMBER AND OR FILE NAME HAS BEEN DEFINED TYPE %ansi( hi, red, bold)~<~<;#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)SXCONFIG, DEFINE THEM AND THEN RECONNECT TO THE MUD %ansi( hi, red, bold)~<~<} {#if (%null( %1)=0) {#if (%ismember( %1, %grep( @sxconfig.file_number, *))=0) {#echo %ansi( hi, red, bold)~>~> SUCCESS %ansi( hi, cyan)%upper( %1) ADDED TO THE SEARCH.%ansi( hi, red, bold) ~<~<;#write @sxconfig.file_number {%1}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)%upper( %1) ALREADY EXISTS IN THE SEARCH.%ansi( hi, red, bold) ~<~<}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS sxadd ~(noun to add~) %ansi( hi, red, bold)~<~<}}}
#ALIAS sxsearch {#reset @sxconfig.file_number;#if (%null( %1)=0) {#if (%null( %grep( @sxconfig.file_number, %1))=1) {#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)DID NOT FIND %ansi( white)%upper( %1)%ansi( hi, cyan) IN SEARCH SYSTEM. PRESS @sxconfig.macro_key TO ADD TO SEARCH SYSTEM.%ansi( hi, red, bold) ~<~<;#key @sxconfig.macro_key {#reset @sxconfig.file_number;#if (%null( %1)=0) {#if (%ismember( %1, %grep( @sxconfig.file_number, *))=0) {#echo %ansi( hi, red, bold)~>~> SUCCESS %ansi( hi, cyan)%upper( %1) ADDED TO THE SEARCH.%ansi( hi, red, bold) ~<~<;#write @sxconfig.file_number {%1}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)%upper( %1) ALREADY EXISTS IN THE SEARCH.%ansi( hi, red, bold) ~<~<}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS sxadd ~(noun to add~) %ansi( hi, red, bold)~<~<}} Search} {#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)FOUND %ansi( white)%numwords( %grep( @sxconfig.file_number, %1), "|")%ansi( hi, cyan) SEARCH RESULTS FOR %ansi( white)%upper( %1)%ansi( hi, cyan) %ansi( red, hi, bold)~<~<;#echo %repeat( " ", 2)%ansi( hi, red, bold)|%repeat( "~-", @sxconfig.window_size);#echo %repeat( " ", 3)%ansi( hi, white)%replace( %grep( @sxconfig.file_number, %1), |, " ");#echo %repeat( " ", 2)%ansi( hi, red, bold)|%repeat( "~-", @sxconfig.window_size)}} {#echo %ansi( hi, red, bold)~>~> ERROR%ansi( hi, cyan) SYNTAX IS sxsearch ~(noun to look for in the search~)%ansi( hi, red, bold) ~<~<}}

#ALIAS sxlist {#var dummy 1;#echo %cr;#echo %ansi( hi, red, bold)|%repeat( "~-", @sxconfig.window_size)|;#while (%eval( %filesize( @sxconfig.file_number)+1)>@dummy) {#echo %ansi( hi, red, bold)|%ansi( hi, cyan)%format( "&3.0n", @dummy) %read( @sxconfig.file_number, @dummy)%repeat( " ", %eval( (@sxconfig.window_size/(@sxconfig.collum_number)-4)-%len( %read( @sxconfig.file_number, %eval( @dummy)))))%format( "&3.0n", %eval( @dummy+1)) %read( @sxconfig.file_number, %eval( @dummy+1))%repeat( " ", %eval( (@sxconfig.window_size/(@sxconfig.collum_number)-4)-%len( %read( @sxconfig.file_number, %eval( @dummy+1)))))%format( "&3.0n", %eval( @dummy+2)) %read( @sxconfig.file_number, %eval( @dummy+2))%repeat( " ", %eval( ( @sxconfig.window_size/(@sxconfig.collum_number)-4)-%len( %read( @sxconfig.file_number, %eval( @dummy+2)))))%if( @sxconfig.collum_number>=4, %format( "&3.0n", %eval( @dummy+3)) %read( @sxconfig.file_number, %eval( @dummy+3))%repeat( " ", %eval( ( (@sxconfig.window_size/@sxconfig.collum_number)-4)-%len( %read( @sxconfig.file_number, %eval( @dummy+3))))))%if( @sxconfig.collum_number>=5, %format( "&3.0n", %eval( @dummy+4)) %read( @sxconfig.file_number, %eval( @dummy+4))%repeat( " ", %eval( ( (@sxconfig.window_size/@sxconfig.collum_number)-4)-%len( %read( @sxconfig.file_number, %eval( @dummy+4))))))%if( @sxconfig.collum_number>=6, %format( "&3.0n", %eval( @dummy+5)) %read( @sxconfig.file_number, %eval( @dummy+5))%repeat( " ", %eval( ( (@sxconfig.window_size/@sxconfig.collum_number)-4)-%len( %read( @sxconfig.file_number, %eval( @dummy+5))))))%ansi( hi, bold, red)~|;#case @sxconfig.collum_number {} {} {#add dummy 3} {#add dummy 4} {#add dummy 5} {#add dummy 6}};#echo %ansi( hi, red, bold)|%repeat( "~-", @sxconfig.window_size)|;#echo %ansi( hi, red, bold) ~>~>%ansi( hi, cyan) TOTAL NUMBER OF SEARCH NOUNS IS %filesize( @sxconfig.file_number) %ansi( hi, red, bold)~<~<}

#ALIAS sxload {#if (%null( %-1)=0) {#echo %ansi( hi, red, bold) ~>~> ERROR%ansi( hi, cyan) SYNTAX IS SXLOAD (NO PARAMTERS) %ansi( hi, red, bold)~<~<} {#var dummy2 1;#var dummy "";#until (%null( %filesize( @dummy2))=1) {#add dummy2 1};#prompt dummy "Enter File Name";#yesno "Open file <@dummy> in file slot <@dummy2> and load into sx search engine?" {#file @dummy2 @dummy;#loop 1,%filesize( @dummy2) {sxadd %read( @dummy2, %{i})}} {#noop};#unvar dummy2;#gag}}
#ALIAS sxcmds {#echo %cr;#echo %ansi( hi, red, bold)%repeat( " ", 16)~>~> %ansi( hi, cyan)SX COMMANDS %ansi( hi, red, bold) ~<~<;#echo %ansi( hi, red, bold) |%repeat( "~-", 46)|;#echo %ansi( hi, red, bold) |%ansi( white) sx - activates search command %repeat( " ", 15)%ansi( hi, bold, red)|;#echo %ansi( hi, red, bold) |%ansi( white) sxadd - adds noun to search list %repeat( " ", 12)%ansi( hi, red, bold)|;#echo %ansi( hi, red, bold) |%ansi( white) sxlist - list all search nouns %repeat( " ", 14)%ansi( hi, red, bold)|;#echo %ansi( hi, red, bold) |%ansi( white) sxsearch - searchs the list for a given noun %ansi( hi, red, bold)|;#echo %ansi( hi, red, bold) |%ansi( white) sxcmds - this window%repeat( " ", 25)%ansi( hi, red, bold)|;#echo %ansi( hi, red, bold) |%repeat( "~-", 46)|}

#ALIAS sx {#if (%null( %filesize( @sxconfig.file_number))=1) {#cr;#echo %ansi( hi, red, bold) ~>~> ERROR %ansi( hi, cyan)NO FILE NUMBER AND OR FILE NAME HAS BEEN DEFINED TYPE %ansi( hi, red, bold)~<~<;#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)SXCONFIG, DEFINE THEM AND THEN RECONNECT TO THE MUD %ansi( hi, red, bold)~<~<} {#if (%null( %1)=1) {#t+ searchgag;#echo %ansi( hi, red, bold)~>~>%ansi( hi, cyan) SX FIRING %ansi( hi, red, bold)~<~< %cr;#loop 1,%filesize( @sxconfig.file_number) {#send {x %read( @sxconfig.file_number, %{i})};#send {search %read( @sxconfig.file_number, %{i})}};#send {examine xyz123}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS SX ~(NO PARAMETERS~) %ansi( hi, red, bold)~<~<}}}

#ALIAS x {~x %-1;#reset @sxconfig.file_number;#if (%null( %1)=0) {#if (%null( %grep( @sxconfig.file_number, %1))=1) {#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)DID NOT FIND %ansi( white)%upper( %1)%ansi( hi, cyan) IN SEARCH SYSTEM. PRESS @sxconfig.macro_key TO ADD TO SEARCH SYSTEM.%ansi( hi, red, bold) ~<~<;#key @sxconfig.macro_key {#reset @sxconfig.file_number;#if (%null( %1)=0) {#if (%ismember( %1, %grep( @sxconfig.file_number, *))=0) {#echo %ansi( hi, red, bold)~>~> SUCCESS %ansi( hi, cyan)%upper( %1) ADDED TO THE SEARCH.%ansi( hi, red, bold) ~<~<;#write @sxconfig.file_number {%1}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)%upper( %1) ALREADY EXISTS IN THE SEARCH.%ansi( hi, red, bold) ~<~<}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS sxadd ~(noun to add~) %ansi( hi, red, bold)~<~<}} Search}} {#echo %ansi( hi, red, bold)~>~> ERROR%ansi( hi, cyan) SYNTAX IS sxsearch ~(noun to look for in the search~)%ansi( hi, red, bold) ~<~<}}

#ALIAS atconnect {#if (%null( @sxconfig.file_number)=1 OR %null( @sxconfig.file_name)=1) {#echo %ansi( hi, red, bold) ~>~> ERROR %ansi( hi, cyan)NO FILE NUMBER AND OR FILE NAME HAS BEEN DEFINED TYPE %ansi( hi, red, bold)~<~<;#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)SXCONFIG, DEFINE THEM AND THEN RECONNECT TO THE MUD %ansi( hi, red, bold)~<~<} {#file @sxconfig.file_number @sxconfig.file_name};#file 1 pretitle.txt;#state uptime1;#state uptime2;#t+ uptime1;#t+ uptime2}

#ALIAS sxconfig {#var dummy ""
#unkey %lower(@sxconfig.macro_key) Search
#if (%null( @sxconfig)=1) {#var sxconfig {} {} Search;#echo var reset};#pick {p:SX CONFIG %cr Select one to adjust} {o:1} {} {SX File Number:#file;#prompt dummy "File Number";#addkey sxconfig file_number {@dummy}} {SX File Name:#prompt dummy "File Name";#addkey sxconfig file_name {@dummy}} {SX Add Macro Key:#prompt dummy "Add Word Macro Key";#unkey <@sxconfig.macro_key> Search;#addkey sxconfig macro_key {%upper(@dummy)}} {SXlist Coloume Size:#yesno "How many Collums" {Six:#addkey sxconfig collum_number {6}} {Five:#addkey sxconfig collum_number {5}} {Four:#addkey sxconfig collum_number {4}} {Three:#addkey sxconfig collum_number {3}}} {SXlist Window Size:#var dummy "";#prompt dummy "SXlist Window Size";#addkey sxconfig window_size {@dummy}}}
#VAR sxconfig {file_number2file_namesearchmacro_keyF12window_size85collum_number4}
#KEY F12 {#reset @sxconfig.file_number;#if (%null( bob)=0) {#if (%ismember( bob, %grep( @sxconfig.file_number, *))=0) {#echo %ansi( hi, red, bold)~>~> SUCCESS %ansi( hi, cyan)%upper( bob) ADDED TO THE SEARCH.%ansi( hi, red, bold) ~<~<;#write @sxconfig.file_number {bob}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)%upper( bob) ALREADY EXISTS IN THE SEARCH.%ansi( hi, red, bold) ~<~<}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS sxadd ~(noun to add~) %ansi( hi, red, bold)~<~<}}
#CLASS 0

#CLASS {Search|searchgag} {disable}
#TRIGGER {Try as you might, the more you search the more nothing you find.} {#gag}
#TRIGGER {The hallway is immaculate. Your search yields nothing of interest.} {#gag}
#TRIGGER {There is no xyz123 here.} {#gag;#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)SX FINISHED%ansi( hi, red, bold) ~<~<;#t- searchgag}
#TRIGGER {You find nothing of interest.} {#gag}
#TRIGGER {There is no %w here.} {#gag}
#TRIGGER {You search around you but find nothing other than the hair on the back} {#gag}
#TRIGGER {of your hand. God that is disgusting!} {#gag}
#TRIGGER {You search with all of your might and find what? Nothing? DAMN! } {#gag}
#CLASS 0

In alias sxconfig is where I'm having troubles. No matter what I do. I cannot get the #unkey command to work like it's suppose to and erase the macro key like I would like it to.

If you guys could help I would be so happy.
Thanks
Phanku
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Sat Jul 17, 2004 4:00 am   
 
Not positive but it looks like its not getting parsed.

Try this
Code:

#EXEC {#unkey %lower(@sxconfig.macro_key) Search}


Cheers
_________________
I love deadlines. I like the whooshing sound they make as they fly by.
Reply with quote
Phanku
Novice


Joined: 09 Oct 2003
Posts: 40

PostPosted: Sat Jul 17, 2004 4:18 am   Thank You
 
I believe that fixed it. I havn't wrote it into my script yet but i tested it with my command bar and it worked, which is more then i have gotten to happen so far.

If your wondering, this is a Search engine I've been working on for about a month now. On 3K, the mud I play, quests are a real pain. This makes it just a bit easier to deal with. I now have a search list of 430 words.

Thanks alot

Phanku
Reply with quote
Phanku
Novice


Joined: 09 Oct 2003
Posts: 40

PostPosted: Sun Jul 18, 2004 12:46 am   Update
 
I just finished putting in the #exec command.
It works great. I also changed a few things to make it more streamline.
I'm posting my script once more, just so people can look it over. If any one has any feed back on my script feel free to post here.

Thanks

Phanku

#CLASS {Search}
#ALIAS sxadd {#reset @sxconfig.file_number;#if (%null( %filesize( @sxconfig.file_number))=1) {#cr;#echo %ansi( hi, red, bold) ~>~> ERROR %ansi( hi, cyan)NO FILE NUMBER AND OR FILE NAME HAS BEEN DEFINED TYPE %ansi( hi, red, bold)~<~<;#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)SXCONFIG, DEFINE THEM AND THEN RECONNECT TO THE MUD %ansi( hi, red, bold)~<~<} {#if (%null( %1)=0) {#if (%ismember( %1, %grep( @sxconfig.file_number, *))=0) {#echo %ansi( hi, red, bold)~>~> SUCCESS %ansi( hi, cyan)%upper( %1) ADDED TO THE SEARCH.%ansi( hi, red, bold) ~<~<;#write @sxconfig.file_number {%1}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)%upper( %1) ALREADY EXISTS IN THE SEARCH.%ansi( hi, red, bold) ~<~<}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS sxadd ~(noun to add~) %ansi( hi, red, bold)~<~<}}}
#ALIAS sxsearch {#reset @sxconfig.file_number;#if (%null( %1)=0) {#if (%null( %grep( @sxconfig.file_number, %1))=1) {#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)DID NOT FIND %ansi( white)%upper( %1)%ansi( hi, cyan) IN SEARCH SYSTEM. PRESS @sxconfig.macro_key TO ADD TO SEARCH SYSTEM.%ansi( hi, red, bold) ~<~<;#key @sxconfig.macro_key {#reset @sxconfig.file_number;#if (%null( %1)=0) {#if (%ismember( %1, %grep( @sxconfig.file_number, *))=0) {#echo %ansi( hi, red, bold)~>~> SUCCESS %ansi( hi, cyan)%upper( %1) ADDED TO THE SEARCH.%ansi( hi, red, bold) ~<~<;#write @sxconfig.file_number {%1}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)%upper( %1) ALREADY EXISTS IN THE SEARCH.%ansi( hi, red, bold) ~<~<}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS sxadd ~(noun to add~) %ansi( hi, red, bold)~<~<}} Search} {#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)FOUND %ansi( white)%numwords( %grep( @sxconfig.file_number, %1), "|")%ansi( hi, cyan) SEARCH RESULTS FOR %ansi( white)%upper( %1)%ansi( hi, cyan) %ansi( red, hi, bold)~<~<;#echo %repeat( " ", 2)%ansi( hi, red, bold)|%repeat( "~-", @sxconfig.window_size);#echo %repeat( " ", 3)%ansi( hi, white)%replace( %grep( @sxconfig.file_number, %1), |, " ");#echo %repeat( " ", 2)%ansi( hi, red, bold)|%repeat( "~-", @sxconfig.window_size)}} {#echo %ansi( hi, red, bold)~>~> ERROR%ansi( hi, cyan) SYNTAX IS sxsearch ~(noun to look for in the search~)%ansi( hi, red, bold) ~<~<}}
#ALIAS sxlist {#var dummy 1;#echo %cr;#echo %ansi( hi, red, bold)|%repeat( "~-", @sxconfig.window_size)|;#while (%eval( %filesize( @sxconfig.file_number)+1)>@dummy) {#echo %ansi( hi, red, bold)|%ansi( hi, cyan)%format( "&3.0n", @dummy) %read( @sxconfig.file_number, @dummy)%repeat( " ", %eval( @sxconfig.window_size/@sxconfig.collum_number)-%eval( 4 + %len( %read( @sxconfig.file_number, @dummy))))%format( "&3.0n", %eval( @dummy+1)) %read( @sxconfig.file_number, %eval( @dummy+1))%repeat( " ", %eval( @sxconfig.window_size/@sxconfig.collum_number)-%eval( 4 + %len( %read( @sxconfig.file_number, %eval( @dummy+1)))))%format( "&3.0n", %eval( @dummy+2)) %read( @sxconfig.file_number, %eval( @dummy+2))%repeat( " ", %eval( @sxconfig.window_size/@sxconfig.collum_number)-%eval( 4 + %len( %read( @sxconfig.file_number, %eval( @dummy+2)))))%if( @sxconfig.collum_number>=4, %format( "&3.0n", %eval( @dummy+3)) %read( @sxconfig.file_number, %eval( @dummy+3))%repeat( " ", %eval( @sxconfig.window_size/@sxconfig.collum_number)-%eval( 4 + %len( %read( @sxconfig.file_number, %eval( @dummy+3))))))%if( @sxconfig.collum_number>=5, %format( "&3.0n", %eval( @dummy+4)) %read( @sxconfig.file_number, %eval( @dummy+4))%repeat( " ", %eval( @sxconfig.window_size/@sxconfig.collum_number)-%eval( 4 + %len( %read( @sxconfig.file_number, %eval( @dummy+4))))))%if( @sxconfig.collum_number>=6, %format( "&3.0n", %eval( @dummy+5)) %read( @sxconfig.file_number, %eval( @dummy+5))%repeat( " ", %eval( @sxconfig.window_size/@sxconfig.collum_number)-%eval( 4 + %len( %read( @sxconfig.file_number, %eval( @dummy+5))))))%repeat( " ", %eval( @sxconfig.window_size\@sxconfig.collum_number))%ansi( hi, bold, red)~|;#case @sxconfig.collum_number {} {} {#add dummy 3} {#add dummy 4} {#add dummy 5} {#add dummy 6}};#echo %ansi( hi, red, bold)|%repeat( "~-", @sxconfig.window_size)|;#echo %ansi( hi, red, bold) ~>~>%ansi( hi, cyan) TOTAL NUMBER OF SEARCH NOUNS IS %filesize( @sxconfig.file_number) %ansi( hi, red, bold)~<~<}
#ALIAS sxload {#if (%null( %-1)=0) {#echo %ansi( hi, red, bold) ~>~> ERROR%ansi( hi, cyan) SYNTAX IS SXLOAD (NO PARAMTERS) %ansi( hi, red, bold)~<~<} {#yesno "Are you sure you want to continue?" {#var dummy2 1;#var dummy "";#until (%null( %filesize( @dummy2))=1) {#add dummy2 1};#prompt dummy "Enter File Name";#yesno "Open file <@dummy> in file slot <@dummy2> and load into sx search engine?" {#file @dummy2 @dummy;#loop 1,%filesize( @dummy2) {sxadd %read( @dummy2, %{i})}} {#noop};#unvar dummy2;#gag} {#echo %ansi( hi, red, bold) ~>~>%ansi( hi, cyan) SXLOAD ABORTED%ansi( hi, red, bold) ~<~<}}}
#ALIAS sxcmd {#echo %cr;#echo %ansi( hi, red, bold)%repeat( " ", 16)~>~> %ansi( hi, cyan)SX COMMANDS %ansi( hi, red, bold) ~<~<;#echo %ansi( hi, red, bold) |%repeat( "~-", 46)|;#echo %ansi( hi, red, bold) |%ansi( white) sxconfig - Configuration Window %repeat( " ", 13)%ansi( hi, bold, red)|;#echo %ansi( hi, red, bold) |%ansi( white) sx - activates search command %repeat( " ", 15)%ansi( hi, bold, red)|;#echo %ansi( hi, red, bold) |%ansi( white) sxadd - adds noun to search list %repeat( " ", 12)%ansi( hi, red, bold)|;#echo %ansi( hi, red, bold) |%ansi( white) sxlist - list all search nouns %repeat( " ", 14)%ansi( hi, red, bold)|;#echo %ansi( hi, red, bold) |%ansi( white) sxsearch - searchs the list for a given noun %ansi( hi, red, bold)|;#echo %ansi( hi, red, bold) |%ansi( white) sxcmds - this window%repeat( " ", 25)%ansi( hi, red, bold)|;#echo %ansi( hi, red, bold) |%repeat( "~-", 46)|}
#ALIAS sx {#if (%null( %filesize( @sxconfig.file_number))=1) {#cr;#echo %ansi( hi, red, bold) ~>~> ERROR %ansi( hi, cyan)NO FILE NUMBER AND OR FILE NAME HAS BEEN DEFINED TYPE %ansi( hi, red, bold)~<~<;#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)SXCONFIG, DEFINE THEM AND THEN RECONNECT TO THE MUD %ansi( hi, red, bold)~<~<} {#if (%null( %1)=1) {#t+ searchgag;#echo %ansi( hi, red, bold)~>~>%ansi( hi, cyan) SX FIRING %ansi( hi, red, bold)~<~< %cr;#loop 1,%filesize( @sxconfig.file_number) {#send {x %read( @sxconfig.file_number, %{i})};#send {search %read( @sxconfig.file_number, %{i})}};#send {examine xyz123}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS SX ~(NO PARAMETERS~) %ansi( hi, red, bold)~<~<}}}
#ALIAS x {~x %-1;#reset @sxconfig.file_number;#if (%null( %1)=0) {#if (%null( %grep( @sxconfig.file_number, %1))=1) {#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)DID NOT FIND %ansi( white)%upper( %1)%ansi( hi, cyan) IN SEARCH SYSTEM. PRESS @sxconfig.macro_key TO ADD TO SEARCH SYSTEM.%ansi( hi, red, bold) ~<~<;#key @sxconfig.macro_key {#reset @sxconfig.file_number;#if (%null( %1)=0) {#if (%ismember( %1, %grep( @sxconfig.file_number, *))=0) {#echo %ansi( hi, red, bold)~>~> SUCCESS %ansi( hi, cyan)%upper( %1) ADDED TO THE SEARCH.%ansi( hi, red, bold) ~<~<;#write @sxconfig.file_number {%1}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)%upper( %1) ALREADY EXISTS IN THE SEARCH.%ansi( hi, red, bold) ~<~<}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS sxadd ~(noun to add~) %ansi( hi, red, bold)~<~<}} Search}} {#echo %ansi( hi, red, bold)~>~> ERROR%ansi( hi, cyan) SYNTAX IS sxsearch ~(noun to look for in the search~)%ansi( hi, red, bold) ~<~<}}
#ALIAS atconnect {#if (%null( @sxconfig.file_number)=1 OR %null( @sxconfig.file_name)=1) {#echo %ansi( hi, red, bold) ~>~> ERROR %ansi( hi, cyan)NO FILE NUMBER AND OR FILE NAME HAS BEEN DEFINED TYPE %ansi( hi, red, bold)~<~<;#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)SXCONFIG, DEFINE THEM AND THEN RECONNECT TO THE MUD %ansi( hi, red, bold)~<~<} {#file @sxconfig.file_number @sxconfig.file_name};#file 1 pretitle.txt;#state uptime1;#state uptime2;#t+ uptime1;#t+ uptime2}
#ALIAS sxconfig {#var dummy ""
#if (%null( @sxconfig)=1) {#var sxconfig {} {} Search;#echo var reset};#pick {p:SX CONFIG %cr Select one to adjust} {o:1} {} {SX File Number:#file;#prompt dummy "File Number";#addkey sxconfig file_number {@dummy}} {SX File Name:#prompt dummy "File Name";#addkey sxconfig file_name {@dummy}} {SX Add Macro Key:#prompt dummy "Add Word Macro Key";#exec {#unkey <@sxconfig.macro_key> [Search]};#addkey sxconfig macro_key {%upper(@dummy)}} {SXlist Coloume Size:#yesno "How many Collums" {Six:#addkey sxconfig collum_number {6}} {Five:#addkey sxconfig collum_number {5}} {Four:#addkey sxconfig collum_number {4}} {Three:#addkey sxconfig collum_number {3}}} {SXlist Window Size:#var dummy "";#prompt dummy "SXlist Window Size";#addkey sxconfig window_size {@dummy}}
}
#VAR sxconfig {file_number2file_namesearchmacro_keyF12window_size115collum_number5}
#KEY F12 {#reset @sxconfig.file_number;#if (%null( diagram)=0) {#if (%ismember( diagram, %grep( @sxconfig.file_number, *))=0) {#echo %ansi( hi, red, bold)~>~> SUCCESS %ansi( hi, cyan)%upper( diagram) ADDED TO THE SEARCH.%ansi( hi, red, bold) ~<~<;#write @sxconfig.file_number {diagram}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)%upper( diagram) ALREADY EXISTS IN THE SEARCH.%ansi( hi, red, bold) ~<~<}} {#echo %ansi( hi, red, bold)~>~> ERROR %ansi( hi, cyan)SYNTAX IS sxadd ~(noun to add~) %ansi( hi, red, bold)~<~<}}
#CLASS 0

#CLASS {Search|searchgag} {disable}
#TRIGGER {Try as you might, the more you search the more nothing you find.} {#gag}
#TRIGGER {The hallway is immaculate. Your search yields nothing of interest.} {#gag}
#TRIGGER {There is no xyz123 here.} {#gag;#echo %ansi( hi, red, bold) ~>~> %ansi( hi, cyan)SX FINISHED%ansi( hi, red, bold) ~<~<;#t- searchgag}
#TRIGGER {You find nothing of interest.} {#gag}
#TRIGGER {There is no %w here.} {#gag}
#TRIGGER {You search around you but find nothing other than the hair on the back} {#gag}
#TRIGGER {of your hand. God that is disgusting!} {#gag}
#TRIGGER {You search with all of your might and find what? Nothing? DAMN! } {#gag}
#CLASS 0
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