Unknown2008-02-06 04:45:44
The way I have things working now is to have the prompt and affliction lines modify variables, adding the appropriate afflictions to a variable which contains a list, then I have an alarm to check the affliction list and if I have the proper balance, respond accordingly. zMUD alarms fire at a maximum speed of .5 seconds - is there a way to do this faster? Should I just trigger my curing queues off of my prompt?
Forren2008-02-06 04:51:54
QUOTE(Jiskirr @ Feb 5 2008, 11:45 PM) 484437
The way I have things working now is to have the prompt and affliction lines modify variables, adding the appropriate afflictions to a variable which contains a list, then I have an alarm to check the affliction list and if I have the proper balance, respond accordingly. zMUD alarms fire at a maximum speed of .5 seconds - is there a way to do this faster? Should I just trigger my curing queues off of my prompt?
I just call everything off my prompt.
Unknown2008-02-06 05:00:46
I'm using this little adaptation of Imperian's mudbot that gives me the nice mapper and a prompt that looks like
3360h, 3180m, 3000e, 10p, 15100en, 14200w 13% elrx-
which is cool 'cause of the xp
but when I switched my prompt trigger to trigger on prompt rather than newline, it ceased to function altogether, do I have to get rid of ILua and go back to the regular prompt?
3360h, 3180m, 3000e, 10p, 15100en, 14200w 13% elrx-
which is cool 'cause of the xp
but when I switched my prompt trigger to trigger on prompt rather than newline, it ceased to function altogether, do I have to get rid of ILua and go back to the regular prompt?
Forren2008-02-06 05:01:49
QUOTE(Jiskirr @ Feb 6 2008, 12:00 AM) 484444
I'm using this little adaptation of Imperian's mudbot that gives me the nice mapper and a prompt that looks like
3360h, 3180m, 3000e, 10p, 15100en, 14200w 13% elrx-
which is cool 'cause of the xp
but when I switched my prompt trigger to trigger on prompt rather than newline, it ceased to function altogether, do I have to get rid of ILua and go back to the regular prompt?
3360h, 3180m, 3000e, 10p, 15100en, 14200w 13% elrx-
which is cool 'cause of the xp
but when I switched my prompt trigger to trigger on prompt rather than newline, it ceased to function altogether, do I have to get rid of ILua and go back to the regular prompt?
Zmud allows you to match on newline as well - I know Iasmos prefers it, because Zmud has a bug where it won't match every prompt-matched prompt. It's apparently fixed in the new version of CMud though.
Unknown2008-02-06 05:08:06
Speaking of CMud, should I switch to it before I get too deep into creating this zMUD system? I've heard good things, but never actually used it.
EDIT: aww I have to pay again? nvm
EDIT: aww I have to pay again? nvm
Forren2008-02-06 05:09:45
QUOTE(Jiskirr @ Feb 6 2008, 12:08 AM) 484446
Speaking of CMud, should I switch to it before I get too deep into creating this zMUD system? I've heard good things, but never actually used it.
EDIT: aww I have to pay again? nvm
EDIT: aww I have to pay again? nvm
I use CMud myself - takes a little getting used to, knowing how not to crash it (I'm still on 1.34), etc. It's really nice for scripting though.
Unknown2008-02-06 05:11:24
Alright, back to coding then, thanks for the help Forren.
Unknown2008-02-06 06:09:06
Ok, so this is the kind of thing I'm doing with my system:
#CLASS {Curing Scripts|Afflictions|Writhe}
#ALIAS wr {
#if (%ismember( "grapple", @writhelist)) {
#if (@writhed=0) {
writhe grapple
#variable writhed {1}
}
}
#if (%ismember( "entangle", @writhelist)) {
#if (@writhed=0) {
writhe entangle
#variable writhed {1}
}
}
}
#ALIAS addwrithe {
#ADDI writhelist %1
#sa {===You are entangled in %1===}
#variable entangled {1}
}
#ALIAS delwrithe {
#DELI writhelist %1
#sa {===You have broken free of %1===}
#variable writhed {0}
#if (!(%ismember( "entangle", @writhelist)) and !(%ismember( "vines", @writhelist)) and !(%ismember( "transfix", @writhelist)) and !(%ismember( "clamp", @writhelist)) and !(%ismember( "hoist", @writhelist)) and !(%ismember( "ropes", @writhelist)) and !(%ismember( "shackles", @writhelist)) and !(%ismember( "grapple", @writhelist))) {#variable entangled {0}}
}
#VAR writhed {0} {0}
#VAR entangled {0} {0}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Entangle}
#TRIGGER {^A large yellow spider rears up on its hind legs and squirts sticky webbing all} {addwrithe entangle}
#TRIGGER {^Tight bindings prevent you from moving.$} {addwrithe entangle}
#TRIGGER {^A demented, monstrous nagameth wraps his tail about you and squeezes tightly,} {addwrithe entangle}
#TRIGGER {^A monstrous nagameth wraps his tail about you and squeezes tightly, crushing the} {addwrithe entangle}
#TRIGGER {^You have writhed free of your entanglement.$} {delwrithe entangle}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Vines}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Transfix}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Clamp}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Hoist}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Ropes}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Shackles}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Grapple}
#TRIGGER {^%w locks your {left|right} {leg|arm} in a solid grapple.$} {addwrithe grapple}
#TRIGGER {^%w locks your {head|chest|gut} in a solid grapple.} {addwrithe grapple}
#TRIGGER {^You carefully writhe out of %1 grapple, escaping {her|his} grasp.$} {delwrithe grapple}
#TRIGGER {^%w firmly holds you in place with an iron-strong grip.$} {addwrithe grapple}
#TRIGGER {^grappled by %w.$} {addwrithe grapple}
#TRIGGER {^With a snarl, %w clutches your throat and begins to painfully choke the life} {addwrithe grapple}
#TRIGGER {^Stepping behind you, %w locks your head with a battered tahto staff, choking} {addwrithe grapple}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Lists}
#VAR eatlist {}
#VAR applylist {}
#VAR smokelist {}
#VAR drinklist {}
#VAR writhelist {}
#CLASS 0
of course my system currently consists of springup, an autosipper, and writhing from grapple and entangle, BUT I have a basic concept for what I'm trying to do down I think. My writhing adds writhe afflictions into a list, checks the list on every prompt (can't see that in the above code, but it works), checks if I am writhing (@writhed), prioritises which writhes to do first (the wr alias) and writhes accordingly. What else should I consider other than the proper balance and inhibiting afflictions when I start putting real afflictions into my system?
#CLASS {Curing Scripts|Afflictions|Writhe}
#ALIAS wr {
#if (%ismember( "grapple", @writhelist)) {
#if (@writhed=0) {
writhe grapple
#variable writhed {1}
}
}
#if (%ismember( "entangle", @writhelist)) {
#if (@writhed=0) {
writhe entangle
#variable writhed {1}
}
}
}
#ALIAS addwrithe {
#ADDI writhelist %1
#sa {===You are entangled in %1===}
#variable entangled {1}
}
#ALIAS delwrithe {
#DELI writhelist %1
#sa {===You have broken free of %1===}
#variable writhed {0}
#if (!(%ismember( "entangle", @writhelist)) and !(%ismember( "vines", @writhelist)) and !(%ismember( "transfix", @writhelist)) and !(%ismember( "clamp", @writhelist)) and !(%ismember( "hoist", @writhelist)) and !(%ismember( "ropes", @writhelist)) and !(%ismember( "shackles", @writhelist)) and !(%ismember( "grapple", @writhelist))) {#variable entangled {0}}
}
#VAR writhed {0} {0}
#VAR entangled {0} {0}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Entangle}
#TRIGGER {^A large yellow spider rears up on its hind legs and squirts sticky webbing all} {addwrithe entangle}
#TRIGGER {^Tight bindings prevent you from moving.$} {addwrithe entangle}
#TRIGGER {^A demented, monstrous nagameth wraps his tail about you and squeezes tightly,} {addwrithe entangle}
#TRIGGER {^A monstrous nagameth wraps his tail about you and squeezes tightly, crushing the} {addwrithe entangle}
#TRIGGER {^You have writhed free of your entanglement.$} {delwrithe entangle}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Vines}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Transfix}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Clamp}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Hoist}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Ropes}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Shackles}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Writhe|Grapple}
#TRIGGER {^%w locks your {left|right} {leg|arm} in a solid grapple.$} {addwrithe grapple}
#TRIGGER {^%w locks your {head|chest|gut} in a solid grapple.} {addwrithe grapple}
#TRIGGER {^You carefully writhe out of %1 grapple, escaping {her|his} grasp.$} {delwrithe grapple}
#TRIGGER {^%w firmly holds you in place with an iron-strong grip.$} {addwrithe grapple}
#TRIGGER {^grappled by %w.$} {addwrithe grapple}
#TRIGGER {^With a snarl, %w clutches your throat and begins to painfully choke the life} {addwrithe grapple}
#TRIGGER {^Stepping behind you, %w locks your head with a battered tahto staff, choking} {addwrithe grapple}
#CLASS 0
#CLASS {Curing Scripts|Afflictions|Lists}
#VAR eatlist {}
#VAR applylist {}
#VAR smokelist {}
#VAR drinklist {}
#VAR writhelist {}
#CLASS 0
of course my system currently consists of springup, an autosipper, and writhing from grapple and entangle, BUT I have a basic concept for what I'm trying to do down I think. My writhing adds writhe afflictions into a list, checks the list on every prompt (can't see that in the above code, but it works), checks if I am writhing (@writhed), prioritises which writhes to do first (the wr alias) and writhes accordingly. What else should I consider other than the proper balance and inhibiting afflictions when I start putting real afflictions into my system?
Unknown2008-02-06 12:43:50
You'll have to consider conditions that prevent you from healing, such as being asleep, impaled, paralyzed, anorexic, slick, etc. Different afflictions or states will prevent different types of cures.
Also, I'd strongly recommend you have toggleable flag variables for when to actually call the various healing aliases on your prompt. If you don't have any "writhe" afflictions, skip the alias entirely and save the processing time. By the time you get all your curing aliases fully developed, you'll find that calling everything on every prompt gets really, really slow. Skipping over the ones you don't need saves you a lot.
Also, I'd strongly recommend you have toggleable flag variables for when to actually call the various healing aliases on your prompt. If you don't have any "writhe" afflictions, skip the alias entirely and save the processing time. By the time you get all your curing aliases fully developed, you'll find that calling everything on every prompt gets really, really slow. Skipping over the ones you don't need saves you a lot.
Unknown2008-02-06 20:38:49
Thank you Zarquan, I'll make sure to keep all that in mind.
Unknown2008-02-06 22:10:07
Ok, so I implemented the writhe flag idea using the @entangled variable I posted in the above code, my prompt trigger now looks like
#TRIGGER {^&%d{health}h, &%d{mana}m, &%d{ego}e, %dp, %den, %dw %d~% %9-$} {
#if (%pos( "p", %word( %9, 1))) {#variable proned {1}} {#variable proned {0}}
#if (%pos( "b", %word( %9, 1))) {#variable blindness {1}} {#variable blindness {0}}
#if (@entangled=1) {wr}
#if (@stayup=1) {st}
fb
sips
}
fb is focus body if I'm paralysed as I haven't yet implemented the other afflictions that focus body cures yet, but I believe the concept that you are talking about says that essentially no aliases should be firing on every prompt, so I should create a variable @focusbodycheck which will be set to 1 if I get leglock, paralysis, or throatlock. My question is about the method for setting @focusbodycheck. @entangle gets set to 1 every time I get a writhe added to me, and checks if I have any other entangles everytime I writhe free of one to set @entangle to 0.
#ALIAS addwrithe {
#ADDI writhelist %1
#sa {===You are entangled in %1===}
#variable entangled {1}
}
#ALIAS delwrithe {
#DELI writhelist %1
#sa {===You have broken free of %1===}
#variable writhed {0}
#if (!(%ismember( "entangle", @writhelist)) and !(%ismember( "vines", @writhelist)) and !(%ismember( "transfix", @writhelist)) and !(%ismember( "clamp", @writhelist)) and !(%ismember( "hoist", @writhelist)) and !(%ismember( "ropes", @writhelist)) and !(%ismember( "shackles", @writhelist)) and !(%ismember( "grapple", @writhelist))) {#variable entangled {0}}
}
Should I do the same thing with @focusbodycheck and other cures and have an alias 'addfb' when I get paralysed/leglocked/throatlocked? Or is there a cleaner way to do this?
#TRIGGER {^&%d{health}h, &%d{mana}m, &%d{ego}e, %dp, %den, %dw %d~% %9-$} {
#if (%pos( "p", %word( %9, 1))) {#variable proned {1}} {#variable proned {0}}
#if (%pos( "b", %word( %9, 1))) {#variable blindness {1}} {#variable blindness {0}}
#if (@entangled=1) {wr}
#if (@stayup=1) {st}
fb
sips
}
fb is focus body if I'm paralysed as I haven't yet implemented the other afflictions that focus body cures yet, but I believe the concept that you are talking about says that essentially no aliases should be firing on every prompt, so I should create a variable @focusbodycheck which will be set to 1 if I get leglock, paralysis, or throatlock. My question is about the method for setting @focusbodycheck. @entangle gets set to 1 every time I get a writhe added to me, and checks if I have any other entangles everytime I writhe free of one to set @entangle to 0.
#ALIAS addwrithe {
#ADDI writhelist %1
#sa {===You are entangled in %1===}
#variable entangled {1}
}
#ALIAS delwrithe {
#DELI writhelist %1
#sa {===You have broken free of %1===}
#variable writhed {0}
#if (!(%ismember( "entangle", @writhelist)) and !(%ismember( "vines", @writhelist)) and !(%ismember( "transfix", @writhelist)) and !(%ismember( "clamp", @writhelist)) and !(%ismember( "hoist", @writhelist)) and !(%ismember( "ropes", @writhelist)) and !(%ismember( "shackles", @writhelist)) and !(%ismember( "grapple", @writhelist))) {#variable entangled {0}}
}
Should I do the same thing with @focusbodycheck and other cures and have an alias 'addfb' when I get paralysed/leglocked/throatlocked? Or is there a cleaner way to do this?
Unknown2008-02-07 00:05:43
To clarify what I'm asking:
#CLASS {Curing Scripts|Afflictions|Eat|Yarrow}
#ALIAS eaddyarrow {
#ADDI afflist %1
#sa {===%1 Given===}
#variable eatyarrowcheck {1}
}
#ALIAS edelyarrow {
#DELI afflist %1
#sa {~>~>~>%1 Cured~<~<~<}
#if ((!(%ismember( "artery_leftarm", @afflist))) and (!(%ismember( "artery_leftleg", @afflist))) and (!(%ismember( "artery_rightarm", @afflist))) and (!(%ismember( "artery_rightleg", @afflist))) and (!(%ismember( "haemophilia", @afflist))) and (!(%ismember( "laceratedleftarm", @afflist))) and (!(%ismember( "laceratedrightarm", @afflist))) and (!(%ismember( "laceraterightarm", @afflist))) and (!(%ismember( "lefthipclot", @afflist))) and (!(%ismember( "leftshoulderclot", @afflist))) and (!(%ismember( "lethargy", @afflist))) and (!(%ismember( "relapsing", @afflist))) and (!(%ismember( "righthipclot", @afflist))) and (!(%ismember( "rightshoulderclot", @afflist))) and (!(%ismember( "slicedopenforehead", @afflist)))) {#variable eatyarrowcheck {0}}
}
#VAR eatyarrowcheck {0} {0}
I feel like there has to be a cleaner way to do this :/
#CLASS {Curing Scripts|Afflictions|Eat|Yarrow}
#ALIAS eaddyarrow {
#ADDI afflist %1
#sa {===%1 Given===}
#variable eatyarrowcheck {1}
}
#ALIAS edelyarrow {
#DELI afflist %1
#sa {~>~>~>%1 Cured~<~<~<}
#if ((!(%ismember( "artery_leftarm", @afflist))) and (!(%ismember( "artery_leftleg", @afflist))) and (!(%ismember( "artery_rightarm", @afflist))) and (!(%ismember( "artery_rightleg", @afflist))) and (!(%ismember( "haemophilia", @afflist))) and (!(%ismember( "laceratedleftarm", @afflist))) and (!(%ismember( "laceratedrightarm", @afflist))) and (!(%ismember( "laceraterightarm", @afflist))) and (!(%ismember( "lefthipclot", @afflist))) and (!(%ismember( "leftshoulderclot", @afflist))) and (!(%ismember( "lethargy", @afflist))) and (!(%ismember( "relapsing", @afflist))) and (!(%ismember( "righthipclot", @afflist))) and (!(%ismember( "rightshoulderclot", @afflist))) and (!(%ismember( "slicedopenforehead", @afflist)))) {#variable eatyarrowcheck {0}}
}
#VAR eatyarrowcheck {0} {0}
I feel like there has to be a cleaner way to do this :/
Unknown2008-02-07 01:02:23
Group your afflictions and curing aliases by balance type, so you should be queuing up herb things together and focus things together (focus body/mind/spirit all use the same balance type).
Unknown2008-02-07 01:13:28
What's the difference if they're in a different list? %ismember works either way. @afflist just stores every affliction I have. Do you mean that I should use like 'addeat' as an alias instead of eaddyarrow eaddcalamus eaddhorehound etc.? Then I would have a variable 'eatcheck' that would act as a flag in whether or not I send any eating cures?
Unknown2008-02-07 12:41:30
Yes. That's what I'm saying, basically. There are then various ways you can "lookup" the cures for various afflictions, whether you want to go the route of making a separate curing alias for each affliction that sends the right outr/eat/apply/sip commands or make variables to lookup the cures or whatever you decide to try.
Your initial "eating" alias can take care of all the conditions that would prevent you from eating, such as anorexia, slit throat, crushed windpipe, etc. If you can't eat at all, there's no need to call the aliases to cure any of the afflictions cured by eating (or drinking) something.
Your initial "eating" alias can take care of all the conditions that would prevent you from eating, such as anorexia, slit throat, crushed windpipe, etc. If you can't eat at all, there's no need to call the aliases to cure any of the afflictions cured by eating (or drinking) something.
Unknown2008-02-07 22:21:24
Thanks! No sleep for me until I get this thing working!
Unknown2008-02-13 04:55:09
With a powerful lunge, Vathael strikes at you with a bladed scimitar resembling
flame. Vathael strikes your forehead, causing blood to flow into your eyes and
coat your entire face.
That's from Noctu's log of him dueling Vathael, here Vathael afflicts with slicedforehead. But the slicedforehead line
%w strikes your forehead, causing blood to flow into your eyes and coat your entire face
is not on one line! How do you deal with this?
flame. Vathael strikes your forehead, causing blood to flow into your eyes and
coat your entire face.
That's from Noctu's log of him dueling Vathael, here Vathael afflicts with slicedforehead. But the slicedforehead line
%w strikes your forehead, causing blood to flow into your eyes and coat your entire face
is not on one line! How do you deal with this?
Catarin2008-02-13 05:07:00
QUOTE(Jiskirr @ Feb 12 2008, 09:55 PM) 486083
With a powerful lunge, Vathael strikes at you with a bladed scimitar resembling
flame. Vathael strikes your forehead, causing blood to flow into your eyes and
coat your entire face.
That's from Noctu's log of him dueling Vathael, here Vathael afflicts with slicedforehead. But the slicedforehead line
%w strikes your forehead, causing blood to flow into your eyes and coat your entire face
is not on one line! How do you deal with this?
flame. Vathael strikes your forehead, causing blood to flow into your eyes and
coat your entire face.
That's from Noctu's log of him dueling Vathael, here Vathael afflicts with slicedforehead. But the slicedforehead line
%w strikes your forehead, causing blood to flow into your eyes and coat your entire face
is not on one line! How do you deal with this?
Well, a pretty easy way of doing it is to set your wrapwidth to 0 in the config options in game. Then just set zmud to wrap for you. That in options somewhere. You'll capture the whole line that way rather than have it broken up.
Unknown2008-02-13 12:19:46
I have a way of capturing warrior afflictions quite reliably using the 80 wrapwidth, but it's a trade secret. Catarin's suggestion is the easier way to deal with them, though, definitely.
Unknown2008-02-14 00:09:06
So if I config wrapwidth 0 in game, and then #WRAP 80 in zmud, I can now use
^With a powerful lunge, %w strikes at you with a %1. %w strikes your forehead, causing blood to flow into your eyes and coat your entire face.$
and it'll match that line while still looking essentially the same while I play?
Is it possible to have zmud just put every sentence on a newline? That'd make things simpler as long as I have an alias to enable/disable it.
^With a powerful lunge, %w strikes at you with a %1. %w strikes your forehead, causing blood to flow into your eyes and coat your entire face.$
and it'll match that line while still looking essentially the same while I play?
Is it possible to have zmud just put every sentence on a newline? That'd make things simpler as long as I have an alias to enable/disable it.