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
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Thu Dec 26, 2002 8:51 pm   

Realms of Dispair auto eat 4.1 (Darmir eat rev)
 
#CLASS {eat}
#TRIGGER {you are thirsty} {#t- eatfood;#t+ eatcon;#var eatordrink eatdrink;#var concount "";#var conitem "";#var drinkcount "";#var drinkitem "";#var examcount "";#var examitem "";#ad eatuse 1;inv}
#TRIGGER {you are hungry} {#t- eatdrink;#t+ eatcon;#var eatordrink eatfood;#var concount "";#var conitem "";#var foodcount "";#var fooditem "";#var examcount "";#var examitem "";#ad eatuse 1;inv}
#CLASS 0

#CLASS {eat|eatcon}
#TRIGGER {^%s({@keyitemcon})$} {#var concount %ismember("%1",@keyitemcon);exam %item(@keywordcon,@concount)}
#TRIGGER {^(*) contains~:$} {#var examcount %ismember(%lower("%1"),@keyitemcon);#var examitem %item(@keywordcon,@examcount);#t+ @eatordrink}
#TRIGGER {^$} {#if @concount="" {#echo you have no containers!!;#t- eatcon}}
#CLASS 0

#CLASS {eat|eatdrink}
#TRIGGER {^%s({@keyitemdrink})$} {#var drinkcount %ismember("%1",@keyitemdrink);#var drinkitem %item(@keyworddrink,@drinkcount)}
#TRIGGER {^$} {#if @drinkcount="" {you have nothing to drink in this container!} {get @drinkitem @examitem;drink @drinkitem;put @drinkitem @examitem;#t- eatcon;#t- eatdrink}}
#CLASS 0

#CLASS {eat|eatfood}
#TRIGGER {^%s({@keyitemfood})$} {#var foodcount %ismember("%1",@keyitemfood);#var fooditem %item(@keywordfood,@foodcount)}
#TRIGGER {^$} {#if @foodcount="" {you have nothing to eat in this container!} {get @fooditem @examitem;eat @fooditem;#t- eatcon;#t- eatfood}}
#CLASS 0

#CLASS {eat|eatvars}
#VAR keyitemfood {}
#VAR keywordfood {}
#VAR foodcount {}
#VAR keyitemdrink {}
#VAR keyworddrink {}
#VAR drinkcount {}
#VAR keyitemcon {}
#VAR keywordcon {}
#VAR concount {}
#VAR keyitem {}
#VAR keyword {}
#VAR showuse {}
#VAR conitem {}
#VAR drinkitem {}
#VAR examcount {}
#VAR examitem {}
#VAR eatordrink {eatdrink}
#VAR fooditem {}
#VAR eatuse {12}
#CLASS 0

#CLASS {eat|programeat}
#ALIAS eathelp {#ECHO ~_;#echo %ansi( bright, green)*********************************************************************************;#ECHO %ANSI( HIGH, CYAN)THIS IS A LIST OF ALL YOUR COMMANDS.;#echo %ansi( bright, green)ADDCON %ansi( bright, red)Will allow you to add more containers to your list of all posible containers.;#echo %ansi( bright, green)ADDFOOD %ansi( bright, red)Will allow you to add more foods to your list of all posible foods.;#echo %ansi( bright, green)ADDDRINK %ansi( bright, red)Will allow you to add more drinks to your list of all posible drinks.;#echo %ansi( bright, green)*********************************************************************************;#echo %ansi( bright, green)SHOWALL %ansi( bright, red)Will allow you to see all of your stoered varibels for your eating.;#echo %ansi( bright, green)SHOWFOOD %ansi( bright, red)Will allow you to see all of your stoered varibels for your foods.;#echo %ansi( bright, green)SHOWDRINK %ansi( bright, red)Will allow you to see all of your stoered varibels for your drinks.;#echo %ansi( bright, green)SHOWCON %ansi( bright, red)Will allow you to see all of your stoered varibels for your containers.;#echo %ansi( bright, green)SHOWUSE %ansi( bright, red)Will allow you to see all of the times you have used this program.;#echo %ansi( bright, green)*********************************************************************************;#echo %ansi( blink, high, red)CAN NOT BE REVERSED!!;#echo %ansi( bright, green)DELALL %ansi( bright, red)Will allow you to delete all of your stored variables;#echo %ansi( bright, green)DELCONALL %ansi( bright, red)Will allow you to delete all of your stored variables for your containres.;#echo %ansi( bright, green)DELFOODALL %ansi( bright, red)Will allow you to delete all of your stored variables for your foods.;#echo %ansi( bright, green)DELDRINKALL %ansi( bright, red)Will allow you to delete all of your stored variables for your drinks.;#echo %ansi( bright, green)DELCON %ansi( bright, red)Will allow you to delete one of your stored variables for your containers.;#echo %ansi( bright, green)DELFOOD %ansi( bright, red)Will allow you to delete one of your stored variables for your foods.;#echo %ansi( bright, green)DELDRINK %ansi( bright, red)Will allow you to delete one of your stored variables for your drinks.;#echo %ansi( bright, green)*********************************************************************************;#echo %ansi(bold,high,blue)The trigs are tuned off at first so you can add your CONtainers FOODs and DRINKs;#echo %ansi(bold,high,blue)Type EATHELP to see this again.}
#ALIAS eathelp {#ECHO ~_;#echo %ansi( bright, green)*********************************************************************************;#ECHO %ANSI( HIGH, CYAN)THIS IS A LIST OF ALL YOUR COMMANDS.;#echo %ansi( bright, green)ADDCON %ansi( bright, red)Will allow you to add more containers to your list of all posible containers.;#echo %ansi( bright, green)ADDFOOD %ansi( bright, red)Will allow you to add more foods to your list of all posible foods.;#echo %ansi( bright, green)ADDDRINK %ansi( bright, red)Will allow you to add more drinks to your list of all posible drinks.;#echo %ansi( bright, green)*********************************************************************************;#echo %ansi( bright, green)SHOWALL %ansi( bright, red)Will allow you to see all of your stoered varibels for your eating.;#echo %ansi( bright, green)SHOWFOOD %ansi( bright, red)Will allow you to see all of your stoered varibels for your foods.;#echo %ansi( bright, green)SHOWDRINK %ansi( bright, red)Will allow you to see all of your stoered varibels for your drinks.;#echo %ansi( bright, green)SHOWCON %ansi( bright, red)Will allow you to see all of your stoered varibels for your containers.;#echo %ansi( bright, green)SHOWUSE %ansi( bright, red)Will allow you to see all of the times you have used this program.;#echo %ansi( bright, green)*********************************************************************************;#echo %ansi( blink, high, red)CAN NOT BE REVERSED!!;#echo %ansi( bright, green)DELALL %ansi( bright, red)Will allow you to delete all of your stored variables;#echo %ansi( bright, green)DELCONALL %ansi( bright, red)Will allow you to delete all of your stored variables for your containres.;#echo %ansi( bright, green)DELFOODALL %ansi( bright, red)Will allow you to delete all of your stored variables for your foods.;#echo %ansi( bright, green)DELDRINKALL %ansi( bright, red)Will allow you to delete all of your stored variables for your drinks.;#echo %ansi( bright, green)DELCON %ansi( bright, red)Will allow you to delete one of your stored variables for your containers.;#echo %ansi( bright, green)DELFOOD %ansi( bright, red)Will allow you to delete one of your stored variables for your foods.;#echo %ansi( bright, green)DELDRINK %ansi( bright, red)Will allow you to delete one of your stored variables for your drinks.;#echo %ansi( bright, green)*********************************************************************************;#echo %ansi(bold,high,blue)The trigs are tuned off at first so you can add your CONtainers FOODs and DRINKs;#echo %ansi(bold,high,blue)Type EATHELP to see this again.}
#ALIAS addcon {#prom keyitem "Enter the name of the container here,not the keyword.";#addi keyitemcon @keyitem;#prom keyword "Enter the keyword of the container here.";#addi keywordcon @keyword}
#ALIAS addfood {#prom keyitem "Enter the name of the food here,not the keyword.";#addi keyitemfood @keyitem;#prom keyword "Enter the keyword of the food here.";#addi keywordfood @keyword}
#ALIAS adddrink {#prom keyitem "Enter the name of the drink here,not the keyword.";#addi keyitemdrink @keyitem;#prom keyword "Enter the keyword of the drink here.";#addi keyworddrink @keyword}
#ALIAS showall {#echo %ansi( bright, green)*********************************************************************************;#echo %ansi( high, white)THIS IS ALL OF YOUR KEY ITEMS~:;#echo %ansi( high, red)CONTAINERS~:;#forall @keyitemcon {#echo %ansi( high, cyan)%i};#echo %ansi( high, red)FOODS~:;#forall @keyitemfood {#echo %ansi( high, cyan)%i};#echo %ansi( high, red)DRINKS~:;#forall @keyitemdrink {#echo %ansi( high, cyan)%i};#echo %ansi(bright,green)*********************************************************************************}
#ALIAS showcon {#echo %ansi( bright, green)*********************************************************************************;#echo %ansi( high, red)CONTAINERS:;#forall @keyitemcon {#echo %ansi( high, cyan)%i};#echo %ansi( bright, green)*********************************************************************************}
#ALIAS showfood {#echo %ansi( bright, green)*********************************************************************************;#echo %ansi( high, red)FOODS:;#forall @keyitemfood {#echo %ansi( high, cyan)%i};#echo %ansi( bright, green)*********************************************************************************}
#ALIAS showdrink {#echo %ansi( bright, green)*********************************************************************************;#echo %ansi( high, red)DRINKS:;#forall @keyitemdrink {#echo %ansi( high, cyan)%i};#echo %ansi( bright, green)*********************************************************************************}
#ALIAS showuse {#echo %ansi( bright, green)*********************************************************************************;#echo %ansi( high, red)YOU HAVE USED THIS EAT PROGRAM:;#echo %ansi( high, cyan)%format("&3.0n",@showuse) TIMES;#echo %ansi( bright, green)*********************************************************************************}
#ALIAS delall {#yesno "Are you sure you want to do that?" {#VAR keyitem "";#var keyword "";#var keyitemcon "";#var keyitemfood "";#var keyitemdrink "";#var keywordcon "";#var keywordfood "";#var keyworddrink "";#echo %ansi(high,red)EVERYTHING HAS BEEN DELETED!!!}}
#ALIAS delall {#yesno "Are you sure you want to do that?" {#VAR keyitem "";#var keyword "";#var keyitemcon "";#var keyitemfood "";#var keyitemdrink "";#var keywordcon "";#var keywordfood "";#var keyworddrink "";#echo %ansi(high,red)EVERYTHING HAS BEEN DELETED!!!}}
#ALIAS delconall {#yesno "Are you sure you want to do that?" {#var keyitemcon "";#var keywordcon "";#ECHO %ANSI(HIGH,RED)ALL OF YOUR %ANSI(HIGH,YELLOW)CONTAINERS %ANSI(HIGH,RED)HAVE BEEN DELETED!!!}}
#ALIAS delconall {#yesno "Are you sure you want to do that?" {#var keyitemcon "";#var keywordcon "";#ECHO %ANSI(HIGH,RED)ALL OF YOUR %ANSI(HIGH,YELLOW)CONTAINERS %ANSI(HIGH,RED)HAVE BEEN DELETED!!!}}
#ALIAS delfoodall {#yesno "Are you sure you want to do that?" {#var keyitemfood "";#var keywordfood "";#ECHO %ANSI(HIGH,RED)ALL OF YOUR %ANSI(HIGH,YELLOW)FOOD %ANSI(HIGH,RED)HAS BEEN DELETED!!!}}
#ALIAS deldrinkall {#yesno "Are you sure you want to do that?" {#var keyitemdrink "";#var keyworddrink "";#ECHO %ANSI(HIGH,RED)ALL OF YOUR %ANSI(HIGH,YELLOW)DRINKS %ANSI(HIGH,RED)HAVE BEEN DELETED!!!.}}
#ALIAS deldrinkall {#yesno "Are you sure you want to do that?" {#var keyitemdrink "";#var keyworddrink "";#ECHO %ANSI(HIGH,RED)ALL OF YOUR %ANSI(HIGH,YELLOW)DRINKS %ANSI(HIGH,RED)HAVE BEEN DELETED!!!.}}
#ALIAS delcon {#if (%1 =~ {@keyitemcon}) {#DELNITEM keywordcon %ismember( %1, @keyitemcon);#delitem keyitemcon %1} {#echo NOT ON THE LIST}}
#ALIAS delcon {#if (%1 =~ {@keyitemcon}) {#DELNITEM keywordcon %ismember( %1, @keyitemcon);#delitem keyitemcon %1} {#echo NOT ON THE LIST}}
#ALIAS delfood {#if (%1 =~ {@keyitemfood}) {#DELNITEM keywordfood %ismember( %1, @keyitemfood);#delitem keyitemfood %1} {#echo NOT ON THE LIST}}
#ALIAS delfood {#if (%1 =~ {@keyitemfood}) {#DELNITEM keywordfood %ismember( %1, @keyitemfood);#delitem keyitemfood %1} {#echo NOT ON THE LIST}}
#ALIAS deldrink {#if (%1 =~ {@keyitemdrink}) {#DELNITEM keyworddrink %ismember( %1, @keyitemdrink);#delitem keyitemdrink %1} {#echo NOT ON THE LIST}}
#ALIAS deldrink {#if (%1 =~ {@keyitemdrink}) {#DELNITEM keyworddrink %ismember( %1, @keyitemdrink);#delitem keyitemdrink %1} {#echo NOT ON THE LIST}}
#CLASS 0














#t- eatfood
#t- eatdrink
#t- eatcon
#echo Type eathelp for help options.
#input eathelp
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Fri Dec 27, 2002 4:47 pm   
 
Looks alot like my first autoeat script for any mud , that I wrote back in 1999
You will need carabas's color replacement script also.

#ALIAS unload {#unv havefood;#unv havecontainers} {unload}
#ALIAS checkcontainers {#ADD loopcount 1;#T+ foodcheck;look in %item(@havecontainer,@loopcount);#wa 3000;#T- foodcheck;#IF (%numitems(@havefood)>0) {##; get %item(@havefood,1) %item(@havecontainer,@loopcount); eat %item(@havefood,1) ; stillhungry = 0 ; #abort 1;##} {##; #echo I have no food in %item(@havecontainer,@loopcount);##};#IF ((@stillhungry=1) and (@loopcount<@containercount)) {##; checkcontainers;##} {##; #echo I have nothing at all better get some;##}} {checkcon}
#ALIAS condel {#delitem containertypes {%-1}} {AutoeatAliases}
#ALIAS eathelp {#show { <@bGreen>AutoEat Help};#show {<@bYellow>-------------------------------------------------------------------};#show {<@bGreen>This script is to reduce the mundane eating crap!};#show {<@bGreen>foodadd <@bYellow>------------------------ <@bRed>add food to the food list (variable)};#show {<@bGreen>fooddel <@bYellow>------------------------ <@bRed>delete food from the food list (variable)};#show {<@bGreen>conadd <@bYellow>------------------------ <@bRed>add container to the container list (variable)};#show {<@bGreen>condel <@bYellow>------------------------ <@bRed>delete container from the container list (variable)};#show {<@bGreen>eatshow <@bYellow>----------------------- <@bRed>shows the list of food and container you have in your lists (variables)}} {AutoeatAliases}
#ALIAS fooddel {#delitem foodtypes {%-1}} {AutoeatAliases}
#ALIAS foodadd {#additem foodtypes {%-1}} {AutoeatAliases}
#ALIAS conadd {#additem containertypes {%-1}} {AutoeatAliases}
#ALIAS eatshow {#show %crlf<@dGreen>Food List;#show <@dGreen>-------------------;#loop 1,%numitems(@foodtypes) #show <@dGreen>%i~. <@dRed>%item(@foodtypes,%i);#show %crlf<@dGreen>Container's List;#show <@dGreen>-------------------;#loop 1,%numitems(@containertypes) #show <@dGreen>%i~. <@dRed>%item(@containertypes,%i)} {AutoeatAliases}
#VAR foodtypes {waybread|cookie|filet|clams|meat} {waybread|cookie|filet|clams|meat} {food}
#VAR containertypes {backpack|bag|jar} {backpack|bag|jar} {multcontainer}
#VAR havefood {waybread|waybread|cookie|filet|clams|meat}
#VAR havecontainer {backpack|bag|jar}
#TRIGGER {({@foodtypes})} {#IF %ismember(%1,{@foodtypes}) {##; #VAR havefood %addItem(%1, @havefood) ;##}} {foodcheck} 517
#TRIGGER {({@containertypes})} {#IF %ismember(%1,{@containertypes}) {##; #VAR havecontainer %addItem(%1, @havecontainer);##}} {containercheck} 517
#TRIGGER {^You are hungry.} {#unv havefood;#unv havecontainer;#unv loopcount;#unv containercount;#unv stillhungry;#T+ containercheck;#T+ foodcheck;inventory;#wa 3000;#T- containercheck;#T- foodcheck;#IF (%numitems(@havefood)>0) {##; eat %item(@havefood,1); #ab 1;##} {##; #show {<@bCyan>I have no food on me};##}; #IF (%numitems(@havecontainer)>0) {##; #var stillhungry 1; #var loopcount 0; #var containercount %numitems(@havecontainer); checkcontainers; ##} {##; #show {<@bCyan>I have no containers need go buy one, duh!}; ##}} {autoeat} 517
#BUTTON 1 {AutoEat On} {#T- autoeat;#T- containercheck;#T- foodcheck} {AutoEat Off} {#T+ autoeat;#T+ containercheck;#T+ foodcheck} {} {1} {} {} {} {} {Pos} {1} {1} {} {} {} {} {AutoEatButton} {} {}


Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Mon Dec 30, 2002 7:28 pm   
 
From all those who see this script and like it I would like to give thanks to the person who created it,Darmir. Without people like him the rest of us would be lost.

After a talk with Darmir I revised my eairlier post to this new one.

megamog75
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Thu Jan 30, 2003 7:35 pm   
 
Made for Realms of Dispair (SMAUG)
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