 |
racolon Beginner
Joined: 27 Apr 2003 Posts: 25 Location: USA
|
Posted: Mon Apr 28, 2003 8:59 pm
Herbs and Potions Heal |
Im trying to figure how to create a heal auto trigger that checks my pouch for herbs and my inventory or backpack for potions, so when Im below 60% of my hps down or when my health says Im in a bad shape my triggers act for me. And some way to monitor my health as well.
Type of potions:
green potions = heal hps
blue potions = heal mana
herbs:
greenish-brown leaf = heal hps
cephlex = heal hps
If anyone help on making a script for this let me know.
Thanks
Endora
Ancient Empires
mud.ancientempires.net 5011 |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Mon Apr 28, 2003 9:33 pm |
Perhaps some mud output showing
1)you looking in your inventory, herb pouch and backpack
2)your prompt or method of monitoring your mana/Hps (prompt?)
As for your vague request:
1)Make a trigger to count objects in your inventory, herb pouch and backpack.
2)Check your health/mana monitor and see if you are <60%
3)Use a toggling variable to reflect that you are going to eat/quaff something so you don't spam yourself silly if your monitor is a prompt.
4) Reflect the inventory change when you take things out of a container.
5) Reflect the loss of that item when you eat/quaff it.
6) Check your health monitor again.
Ton Diening |
|
|
 |
racolon Beginner
Joined: 27 Apr 2003 Posts: 25 Location: USA
|
Posted: Mon Apr 28, 2003 9:53 pm |
Pouch:
The small leather pouch contains three meadowsweets, seven cephlexes and an
artimisia vulgaris.
Backpack:
The large leather backpack contains two bubbling green potions, many silver
coins, 62 iron coins, a gold coin and two copper coins.
Inventory:
You are wearing a silver signet ring and a small leather pouch.
You are carrying:
a grey wooden pipe and a beautiful runed sword.
Score: (Prompt)
Con : Vigorous Race : Roman Alignment : Nice
Int : Bright Intox : Slightly tips Hunger : Gorged
Wis : Learned Thirst : Bone dry Fatigue : 380 / 528
Dis : Brave Hit Points : 22094 / 26400 Mana : 4020 / 4020
Vitals:
You are physically slightly hurt and mentally in full vigour.
You feel extremely secure and alert.
You can barely eat more and drink quite a lot more.
You are somewhat drunk.
Levels Health:
at death's door, barely alive, terribly hurt, in
a very bad shape, in a bad shape, very hurt, feeling
rather hurt, hurt, somewhat hurt, slightly hurt
and feeling very well.
Levels Mana:
in a vegetable state, exhausted, worn down,
indisposed, in a bad shape, very degraded, rather
degraded, degraded, somewhat degraded, slightly
degraded and in full vigour.
Potions usage:
quaff (*type*) potion
Pouch:
pget = get herbs from pouch
pstore = put herbs in pouch
Herbs usage:
get *herb* from pouch
put *herb* in pipe
#6 smoke pipe
Thats all I can think of, hope it works.
Endora
Ancient Empires
mud.ancientempires.net 5011 |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Mon Apr 28, 2003 10:17 pm |
Edited: 8pm am thinking my implementation concept over.
|
|
|
 |
racolon Beginner
Joined: 27 Apr 2003 Posts: 25 Location: USA
|
Posted: Mon Apr 28, 2003 11:01 pm |
I gave you the prompt and everything pasted from the mud exactly. Basically all I want is:
My #ST as defined show my current hps of total hps and every time I type health it shows my health for example 23000/27000 in the format I gave earlier. Im a hardcore playerkiller and what Im tryint to accomplish is to create a monitoring script that checks hps, vitals and if like I said im below the 60% or in a bad shape check the pouch for herbs, check the backpack for green potions, heal myself using 1 herbs til Im feeling very well, and so on with the potions I can only carry 3 of those. I hope Im expressing correctly what I want to do.
Thanks for your time.
Endora
Ancient Empires
mud.ancientempires.net 5011 |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Apr 29, 2003 4:39 am |
I'll dump what I have, 2.5 hours later and do with as you please
Play with this offline, probably 10 times harder than a Lightbulb solution but it is something I'd use with a pure bot.
Idea is to grab your containers and inventory and "find" out what healing item is where and store that information in a list. Sorting the list so you quaff, smoke then try and get items for speed. "Health" does a quick health check and if you are less than 7/11 ok try and execute the first healing list item. A #STW or a child window you %expanddb the things for relevancy to human reading.
Testing stuff:
#CLASS {TonDieningSolution}
#ALIAS a {#SH Pouch:;#SH The small leather pouch contains three meadowsweets, seven cephlexes, an;#SH artimisia vulgaris, seven hounds teeth and an;#SH piece of shit.;%crlf;#SH Backpack:;#SH The large leather backpack contains two bubbly green potions, many silver;#SH coins, 62 iron coins, nine greenish-brown leaf, a gold coin and two copper coins.;%crlf;#SH Inventory:;#SH You are wearing a silver signet ring and a small leather pouch.;#SH You are carrying:;#SH " "two bubbly green potion, a grey wooden pipe and a beautiful runed sword.;%crlf}
#BUTTON 1 {AutoHeal %if(%trigger(AutoHealScript)=0,Off,On)} {#IF (%trigger( AutoHealScript)) {#T- AutoHealScript;#NOOP %btncol( AutoHealScriptToggle, red, white, bold)} {#T+ AutoHealScript;#NOOP %btncol( AutoHealScriptToggle, green, white, bold)}} {} {} {} {} {} {Size} {100} {23} {} {} {} {47} {} {} {} "" {} {} {AutoHealScriptToggle}
#CLASS 0
Active elements:
#CLASS {TonDieningSolution|AutoHealScript} {enable}
#ALIAS AHCheck {#T+ AHContainerCheck;#SH l in pouch;#SH l in backpack;#SH inventory;a}
#ALIAS vitals {~vitals;#T+ VitalsCapture}
#ALIAS health {~health;#T+ HealthTriggerCheck}
#ALIAS smoke {put %1 pipe;#6 ~smoke pipe}
#VAR HealThings {List{bubbly green potion|greenish-brown leaf|cephlex}bubbly green potiongreen quaffgreenish-brown leafgreenish-brown smokecephlexcephlex smoke}
#TRIGGER "HealthTriggerCheck" {You are (*) and (*).} {#VAR AHData_Health %ismember( {%1}, @AHData_HealthLevels);#VAR AHData_Mana %ismember( {%2}, @AHData_ManaLevels);#IF (@AHData_Health < 7) {#T+ AHHealSelf;%item( @AutoHealHP.List, 1)};#T- HealthTriggerCheck} "" {disable}
#CLASS 0
Container Checking:
#CLASS {TonDieningSolution|AutoHealScript|AHContainerCheck} {disable|menu}
#VAR ListParse {%replace( %replace( %replace( %replace( "%1", ";", " "), ", ", "|"), " and ", "|"), ".", "")}
#VAR WordToNumber {a1an1one1two2twen2three3thir3four4for4five5fif5six6seven7eight8nine9ten10eleven11twelve12teen+10ty*10-+many100}
#VAR Container_Name {inventory}
#VAR Container_List {two bubbly green potion|a grey wooden pipe|a beautiful runed sword}
#VAR Container_Item_Count {a}
#VAR ContainerDePluralize {%if( %ends( %1, "ies"), %concat( %copy( %1, 1, %len( %1)-3), "y"), %if( %ends( %1, "ves"), %concat( %copy( %1, 1, %len( %1)-3), "f"), %if( %ends( %1, es), %concat( %copy( %1, 1, %len( %1)-2), ""), %if( %ends( %1, s), %concat( %copy( %1, 1, %len( %1)-1), ""), %if( %ends( %1, ii), %concat( %copy( %1, 1, %len( %1)-2), "i"), %1)))))}
#VAR Container_Item_Name {copper coin} {cephlexes}
#TRIGGER "Container_List" {^(%w):$* contains} {#VAR Container_Name %lower( %1);#VAR Container_List "";#VAR Container@Container_Name "";#ADDITEM Container_Search @Container_Name;#TEMP Container_ListEndState {^$} {#STATE Container_List 0;#VAR Container_List @ListParse(%copy( {@Container_List}, %pos( "contains", {@Container_List})+9, %len( {@Container_List})-1));#FORALL @Container_List {#VAR Container_Item_Name {%i};#VAR Container_Item_Name %concat( %copy( {@Container_Item_Name}, 1, %pos( %word( {@Container_Item_Name}, %numwords( {@Container_Item_Name})), {@Container_Item_Name})-1), @ContainerDePluralize(%word({@Container_Item_Name},%numwords({@Container_Item_Name}))));#VAR Container_Item_Count %copy( %i, 1, %pos( " ", %i)-1);#VAR Container_Item_Name %copy( {@Container_Item_Name}, %pos( " ", {@Container_Item_Name})+1, %len( @Container_Item_Name));#ADDKEY Container@Container_Name {@Container_Item_Name} {%if( @Container_Item_Count=%int( @Container_Item_Count), @Container_Item_Count, %db( @WordToNumber, @Container_Item_Count))}}}} "" {notrig}
#COND {^(*)$} {#VAR Container_List %concat( @Container_List, " ", {"%1"})} {looppat|param=99|notrig}
#TRIGGER "Container_Carrying" {You are carrying:} {#VAR Container_Name inventory;#VAR Container_List "";#TEMP Container_ListEndState {^$} {#STATE Container_Carrying 0;#VAR Container_List %trim( @ListParse(%copy( @Container_List,1, %len( @Container_List)-1)));#FORALL @Container_List {#VAR Container_Item_Count %copy( %i, 1, %pos( " ", %i)-1);#ADDKEY Container@Container_Name {%copy( %i, %pos( " ", %i)+1, %len( %i))} {%if( @Container_Item_Count=%int( @Container_Item_Count), @Container_Item_Count, %db( @WordToNumber, @Container_Item_Count))}};AutoHealScriptSearch}} "" {notrig}
#COND {^(*)$} {#VAR Container_List %concat( @Container_List, " ", {"%1"})} {looppat|param=99|notrig}
#CLASS 0
Character Status (Need to check for too full to eat/quaff?)
#CLASS {TonDieningSolution|AutoHealScript|VitalsCapture} {disable|menu}
#TRIGGER {^You are physically (*) and mentally (*).} {#CO 71;#VAR AHData_Health %ismember( {%1}, @AHData_HealthLevels);#VAR AHData_Mana %ismember( {%2}, @AHData_ManaLevels)}
#COND {^You feel (*) and (*).} {#VAR AHData_Secure {%1};#VAR AHData_Alert {%2}}
#COND {^You can eat (*) and drink (*).} {#VAR AHData_Eat {%1};#VAR AHData_Drink {%2}}
#COND {^You are (*).} {#VAR AHData_Drunk {%1};#T- VitalsCapture}
#CLASS 0
Live background variables/aliases:
#CLASS {TonDieningSolution|AutoHealScript|AHData} {enable|menu}
#CLASS 0
#CLASS {TonDieningSolution|AutoHealScript|AHData|AHData_Inventory}
#ALIAS AutoHealScriptSearch {#T- AHContainerCheck;#VAR AutoHealHP "";#FORALL @Container_Search {#FORALL @{HealThings.List} { #IF (%db( @Container%i, %j)>0) {#ADDKEY AutoHealHP {get %if( %iskey( @HealThings, {%j})>0, %word( %db( @HealThings, {%j}), 1), %word( {%j}, %numwords( {%j}))) from %i} {%db( @Container%i, %j)};#ADDITEM AutoHealHP.List {get %if( %iskey( @HealThings, {%j})>0, %word( %db( @HealThings, {%j}), 1), %word( {%j}, %numwords( {%j}))) from %i}}}};#FORALL Inventory {#FORALL @{HealThings.List} { #IF (%db( @Container%i, %j)>0) {#ADDKEY AutoHealHP {%if( %iskey( @HealThings, {%j})>0, %word( %db( @HealThings, {%j}), 2) %word( %db( @HealThings, {%j}), 1), quaff %word( {%j}, %numwords( {%j})))} {%db( @Container%i, %j)};#ADDITEM AutoHealHP.List {%if( %iskey( @HealThings, {%j})>0, %word( %db( @HealThings, {%j}), 2) %word( %db( @HealThings, {%j}), 1), quaff %word( {%j}, %numwords( {%j})))}}}};#VAR AutoHealHP.List %sort( @AutoHealHP.List, 1);#SH AutoHeal scrip found;#FORALL @AutoHealHP.List {#SH %tab %i~:%db( @AutoHealHP, %i)}}
#VAR ContainerPouch {meadowsweet3cephlex7artimisia vulgari1hounds teeth7piece of shit1}
#VAR ContainerBackpack {silver coin100iron coin62greenish-brown leaf9gold coin1copper coin2}
#VAR ContainerInventory {grey wooden pipe1beautiful runed sword1bubbly green potion2asdf1cephlexes7artimisia vulgaris1hounds teeth7piece of shit1}
#VAR Container_Search {pouch|backpack}
#VAR AutoHealHP {get cephlex from pouch7Listquaff green|get greenish-brown from backpack|get cephlex from pouchget greenish-brown from backpack9quaff green2}
#CLASS 0
#CLASS {TonDieningSolution|AutoHealScript|AHData|AHData_Vitals}
#VAR AHData_HealthLevels {at death's door|barely alive|terribly hurt|in a very bad shape|in a bad shape|very hurt|feeling rather hurt|hurt|somewhat hurt|slightly hurt|feeling very well}
#VAR AHData_ManaLevels {in a vegetable state|exhausted|worn down|indisposed|in a bad shape|very degraded|rather degraded|degraded|somewhat degraded|slightly degraded|in full vigour}
#VAR AHData_Health {11}
#VAR AHData_Mana {11}
#VAR AHData_Secure {extremely secure}
#VAR AHData_Alert {extremely alert}
#VAR AHData_Eat {quite a lot more}
#VAR AHData_Drink {quite a lot more}
#VAR AHData_Drunk {sober}
#CLASS 0
Heal bot concept:
#CLASS {TonDieningSolution|AutoHealScript|AHHealSelf} {disable|menu}
#TRIGGER {You get {a|an|the} (@HealThings.List) from * backpack.} {#CO 71;#IF (%db( @ContainerBackpack, {%1}) <2) {#DELKEY ContainerBackpack {%1};#DELKEY AutoHealHP {get %word( %db( @HealThings, %1), 1) from backpack};#ADDKEY AutoHealHP {List} {%delitem( {get %word( %db( @HealThings, %1), 1) from backpack}, @AutoHealHP.List)}} {#ADDKEY ContainerBackpack {%1} {%eval( %db( @ContainerBackpack, {%1})-1)};#ADDKEY AutoHealHP {get %word( %db( @HealThings, %1), 1) from backpack} {%eval( %db( @AutoHealHP, {get %word( %db( @HealThings, {%1}), 1) from backpack})-1)}};#SH %word( %db( @HealThings, %1), 2) %word( %db( @HealThings, %1), 1)}
#TRIGGER {You get {a|an|the} (*) from * pouch.} {#CO 71;#NOOP Like the backpack script}
#TRIGGER {You quaff {a|an|the} (*).} {#CO 71;#NOOP Do we care if you lose inventory objects?}}
#TRIGGER {You put {a|an|the} ({@HealingThings.List}) into a pipe.} {#CO 71;#NOOP Do we care if you lose inventory objects?}
#CLASS 0
It plunders Vijilante's number converter concept from the forums.
I'll mail the .mud file if anyone wants it. With no interest to play this particular LPC I submit the general concept.
Ton Diening
All keys, aliases, variables, paths, triggers, tabs, menus, status bars deleted |
|
|
 |
racolon Beginner
Joined: 27 Apr 2003 Posts: 25 Location: USA
|
Posted: Tue Apr 29, 2003 5:17 am |
All I can say is:
Holy ****
Amazing and incredible, too complex for me but I will paste it into my settings and see what happens.
Thanks a lot!
Endora
Ancient Empires
mud.ancientempires.net 5011 |
|
|
 |
racolon Beginner
Joined: 27 Apr 2003 Posts: 25 Location: USA
|
Posted: Wed Apr 30, 2003 1:35 am |
8)
Sorry, its not working dont know why. If you think of something let me know please.
And thanks for your time.
9:05 PM
zMUD Just crashed on me using the script dunno why.
I imported the test exactly from here also I got this message
-1), @ContainerDePluralize(%word({@Container_Item_Name},%numwords({@Container_Item_Name}))));#VAR Container_Item_Count %copy( %i, 1, %pos( " ", %i)-1);#VAR Container_Item_Name %copy( {@Container_Item_Name}, %pos( " ", {@Container_Item_Name})+1, %len( @Container_Item_Name));#ADDKEY Container@Container_Name {@Container_Item_Name} {%if( @Container_Item_Count=%int( @Container_Item_Count), @Container_Item_Count, %db( @WordToNumber, @Container_Item_Count))}}}
^ syntax error
Dont know pretty complex script
Question: The message is You are in a bad shape;inventory(idea check_containers;pouch for herbs|backpack for potions} It finds 2 cephlexes in the pouch, puts one in the pipe and #6 smoke pipe, vitals again, checks for healthlevel, and checks containers again to see if there's any more healing.
Also the #alias a I cant understand what it does, because I dont always have the same inventory and would be nice if it checked the containers because I always carry herbs on pouch or they rot, and potions in backpack
I know the button turns it on and off but Im kinda lost with this. Sorry for all the babling just trying to learn here.
Endora
Ancient Empires
mud.ancientempires.net 5011 |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed May 07, 2003 8:12 pm |
Emailed .mud file.
Will take the nitty gritty explanation to email
Ton Diening |
|
|
 |
|
|
|
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
|
|