|
Fitzwilliam Beginner
Joined: 24 Aug 2006 Posts: 11
|
Posted: Fri Aug 25, 2006 3:37 am
Prompt Trigger Question |
On Realms of Despair I am playing with a vampire. There is a feed command when you start to go low on BP (blood points).
I was thinking that it might be nice to have zMud activate the feed command whenever the BP drop
Here is an example of the prompt: <89/89hp 15/15bp 240/240mv>
maybe the trigger prompt part would be like-- #TRIGGER {^<(%d)/(%d)hp (%d)/(%d)b (%d)/(%d)mv |}
1. What is the most effective way to do this?
2. Would this be a bad idea?
Say I cast a spell that uses BP and BP goes down after the spell hits. Then I would guess the trigger would activate Feed to get the BP back up.
I just worry that it might spam feed too much, instead of elegantly monitor and keep blood points high while fighting.
Thank you |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Fri Aug 25, 2006 2:44 pm |
toggle feed then on the kill msg if feed is toggled then feed
something like
#TRIGGER {^<%d/%dhp (%d)/(%d)b %d/%dmv~>} {#if (%1 =< (%2/2)) {#var feeder 1}}
#trigger {^RoD's death msg} {#if (@feeder=1) {feed;#var feeder 0}
the (%1 =< (%2/2)) part isn't right, but don't have zmud with me. check help file for it
As it is, i'm not sure i'm even right about this. |
|
|
|
Fitzwilliam Beginner
Joined: 24 Aug 2006 Posts: 11
|
Posted: Sat Aug 26, 2006 12:45 am |
Thank you for the reply! I probably am misunderstanding. Feed has to be done during a combat and if it hits it steals a few points to keep your BP (Blood Points) up.
You use BP like mana so if you cast spells your BP drops.
I just wanted to the trigger to monitor the prompt and if BP dropped below a certain point it will keep feeding until it gets back to full, then stop (smarter people could probably make it more intelligent, but I have no idea).
I am not sure if it can work. Maybe if it gets down to 2/22 it feeds back to 22/22 then you can cast other spells until it gets low again. I am kind of new and this and not sure what would work best. Or if you start a battle low, it will start feeding immediately... |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Sat Aug 26, 2006 1:24 am |
oh i'm sorry, i misunderstood
#TRIGGER {^<%d/%dhp (%d)/(%d)b %d/%dmv~>} {#if (%1 =< (%2/2)) {feed}}
I THINK that it should be okay. |
|
|
|
Qiz Novice
Joined: 14 Aug 2006 Posts: 34 Location: Sweden
|
Posted: Sat Aug 26, 2006 2:48 am |
Fitzwilliam wrote: |
I just wanted to the trigger to monitor the prompt and if BP dropped below a certain point it will keep feeding until it gets back to full, then stop (smarter people could probably make it more intelligent, but I have no idea).
I am not sure if it can work. Maybe if it gets down to 2/22 it feeds back to 22/22 then you can cast other spells until it gets low again. I am kind of new and this and not sure what would work best. Or if you start a battle low, it will start feeding immediately... |
First off, it is possible to make this work. However, it may not be wise to do so. Each time you feed you are unable to perform any other action for a little while, and there are times when you can't afford to wait 3 seconds (or however long the feed delay is) to quaff heal potions. Some mobs will have a random chance to pick up things from the ground, including your disarmed weapons (others do so automatically and for that there's little to do) which means that you may want to time your feeding properly to reduce the chance of losing your weapons until you kill the mob. Also, some mobs lack blood, most notably golems and _some_ undead (yes, not all of them!). You should find out what message you get if you try to feed off a mob lacking blood and disable all triggers until that mob is dead, then reenable the "readyprompt" trigger.
But my advice is, do this manually! No, seriously - do it manually!
I still have written a script to handle the autofeed process, but I strongly advice against using it.
You will die sooner or later if you do. Well you could also adapt the script to start checking what mob you're fighting, then go lookup up how low you can get while fighting that mob, and if you're below that, start quaffing heals like a madman instead... That is, can the mob hit for up to 500hp per round or does this particular mob hit for up to 1200 hp per round? What happens if you are fighting two mobs etc... It's hard to handle every single possible situation with scripts, even if you do know everything there is to know about every mob in the game.
To effectively make use of autofeed, you'd end up having to either disable it during some fights, or create a priority queue to make sure that cure blindness is prio 1, quaffing true sight is prio 2, quaffing heal pots is prio 3, feed is prio 4. Now, are you certain you handle everything in your prio queue? If not, what happens...
Anyway, the outline for this script is to make use of the waitstate token that you must add to your fprompt in RoD.
For example:
fprompt &g<&O%h/%Hhp &r%b/%Bbp &g%v/%Vmv &g| %f%A | %L >
will make your fprompt look something like
<681/681hp 35/51bp 358/358mv | YI | > (when waitstate is 0)
<681/681hp 34/51bp 358/358mv | YI | ||| > (right after casting float)
The waitstate characters are | (pipe) and ! (exclamaition mark)
Now, use this to your advantage to toggle your triggers on and off as needed:
For prompt with waitstate
#TRIGGER {<%d/%dhp (%d)/(%d)bp %d/%dmv | %w | [~|!] >} {#SHOW In waitstate} "" {nocr|prompt}
For prompt without waitstate:
#TRIGGER {<%d/%dhp (%d)/(%d)bp %d/%dmv | %w |%s>} {#SHOW READY!} "" {nocr|prompt}
Now, if you cast a spell, attack someone with the kill command etc, "In waitstate" will show up on your screen. As soon as you see a new prompt, you will see "READY!" show up on your screen (nothing is sent to the mud). On a side note, if you use this outside of combat, there's no telling when you'll get to see a new prompt after you see the first prompt in waitstate, but if you enter any command to the mud (look, peer, bounce...) that command won't take place until you come out of the waitstate, and this way you will get a new prompt wihtout waitstate as soon as possible. In combat, we don't have to worry about that as you will get new info from the mud like "A guard misses you" after which a new prompt is always sent.
So, on to the real stuff...
These are used to check input. Anything you may send to the mud that causes waitstate should appear in these variables. Grasp suspiria, energy drain also qualify, while socials, tells etc do not.
#VAR skillBreak {shriek|vom}
#VAR spellBreak {chill|shock}
Once the waitprompt appears, turn off this trigger and enable the readyprompt
#TRIGGER "waitprompt" {<%d/%dhp (%d)/(%d)bp %d/%dmv | %w | [~|!] >} {
#T- waitprompt
#T+ readyprompt
} "" {nocr|prompt}
once the readyprompt appears, if you're at full blood turn off feeding until you're low on blood. if you feed, turn off the readyprompt trigger and turn on the waitprompt trigger.
#TRIGGER "readyprompt" {<%d/%dhp (%d)/(%d)bp %d/%dmv | %w |%s>} {
#IF (%1 = %2) {needBlood = 0}
#IF (@needBlood) {
#T- readyprompt
#T+ waitprompt
feed} {
#IF (%1 < 5) {
needblood = 1
#T- readyprompt
#T+ waitprompt
feed
} "" {nocr|prompt}
capture skills
#ONINPUT {(%w)*} {
#IF %ismember( %1, @inputBreak) {
#T- readyprompt
#T+ waitprompt}} "" {notrig}
capture spells
#ONINPUT {(%w) (%w)*} {
#IF (%1 = "c") {
#IF %ismember( %2, @spellBreak) {
#T- readyprompt
#T+ readyprompt}}} "" {notrig}
Why all the extra stuff?
Let's assume you get below 5bp and your autofeed kicks in. After this you see the waitstate prompt and are happy with the result. As such, you decide to send "c chill" to the mud. If you did not capture this input command and momentarily disabled the readyprompt trigger what would happen is this:
<readyprompt> feed
<waitprompt> c chill (your manual input)
<waitprompt>
<waitprompt>
<readyprompt> feed (feed is entered by the trigger and sent to the mud, but right now, the mud will be dealing with your "c chill" spell and your triggers would be trailing behind one step)
Also, as this is written, only check for "c chill" is made, not "c chi" or "c chilling", and the same goes for "vom", no check is made for "vomica" or "vomica pravus".
If you necessarily want to solve this problem, either store all possible combinations for each skill/spell or build regular expressions and use the %regex instead of %ismember.
WARNING: I have not tested this code, nor do I intend to. So, before you start using it for real:
1. Make sure you have config +norecall
2. Enable the script
3. Find a mob that you can survive for a long time even if the script messes things up badly
4. Make sure you test the "end criterias" well, such as dropping below 5 bp, getting up to full bp again.
5. Make sure that the script successfully handles input from you while it's in waitstate as well as not in waitstate.
6. Don't just test "c chill" for example. What happens if you quaff a potion for example. |
|
|
|
Qiz Novice
Joined: 14 Aug 2006 Posts: 34 Location: Sweden
|
Posted: Sat Aug 26, 2006 3:05 am |
Vitae wrote: |
oh i'm sorry, i misunderstood
#TRIGGER {^<%d/%dhp (%d)/(%d)b %d/%dmv~>} {#if (%1 =< (%2/2)) {feed}}
I THINK that it should be okay. |
If he does not have the waitstate token in the fprompt, then that will keep firing away continously until bp is up to max with no regard to the duration of the feed or any actions taken in between. If he does have it, it should be ok in most circumstances. My suggestion above is a bit safer to use though.
Something like this would happen:
<prompt> feed
<prompt> feed (first hasn't ended yet, still 3 more seconds to go)
<prompt> feed (first hasn't ended yet, still 2.98 more seconds to go)
<prompt> feed (first hasn't ended yet, still 2.96 more seconds to go)
...
you're kicked from the mud |
|
|
|
Fitzwilliam Beginner
Joined: 24 Aug 2006 Posts: 11
|
Posted: Sat Aug 26, 2006 4:40 pm |
Thank you for the information you two.
|
|
|
|
|
|
|
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
|
|