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
Mangese
Beginner


Joined: 14 Mar 2003
Posts: 11
Location: USA

PostPosted: Sat Oct 18, 2003 10:58 pm   

Achaea bashing auto heal/mana
 
I found this script in a previous post.
I’d love to be able to make this script work for me.

Trigger: H:(%n) M:(%n) (*)
Command:
#IF (@healbalance=1) {#IF (%1 < 2350) {
drink health
healbalance = 0
} {#IF (%2 < 1800) {
drink mana
healbalance=0
}}
#IF (%1 < 1301) {
outr moss
eat moss}}
I play Achaea my health and mana prompt look like this
3338h, 2966m exdb-
the health and mana prompt also turn from green to yellow to red as it goes down.

I can’t figure out how to make it work and keep working.
Can someone walk me through this?

Thanks
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Oct 19, 2003 1:04 am   
 
1. Open your character
2. Click the Triggers button
3. Click the New button
4. Copy and paste the line after Trigger: in the box labeled Pattern
5. Copy and paste the lines after Command: in the box labeled Value
6. You might need to change the trigger's options from Trigger on Newline (uncheck) to Trigger on Prompt (check)
7. Click the Save button

If you would prefer different threshold numbers, the changes should be obvious.
You'll also need the trigger(s) which set @healbalance to 1.
Reply with quote
Mangese
Beginner


Joined: 14 Mar 2003
Posts: 11
Location: USA

PostPosted: Sun Oct 19, 2003 1:10 am   
 
quote:
You'll also need the trigger(s) which set @healbalance to 1.


What would that look like?
how do I do it?

ok I've been playing around with this for a while and none of its working Sad
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Oct 19, 2003 4:39 am   
 
It's probably mentioned somewhere in the previous post you started from, or the post before that which that person started from, or the post before that...and if everyone who was asking about something they saw in a previous post gave a link to the post they were asking about, it would only take a minute or two to get back to the original script where it certainly would be mentioned.

It would look something like
Trigger: You can drink another health or mana elixir
Commands: healbalance = 1
Reply with quote
Mangese
Beginner


Joined: 14 Mar 2003
Posts: 11
Location: USA

PostPosted: Sun Oct 19, 2003 9:04 pm   
 
Thank you much for you help. I have this working now - sorta.
trigger
(%n)h, (%n)m (*) //set to prompt
pattern
#IF (@healbalance=1) {
#IF (%1 <2900) {
drink health
manabalance=1
} {#IF (%2 < 1800) {
drink mana
healbalance=1
}}
#IF (%1 < 1500) {
outr moss
eat moss
}
}
It will work fine for a couple of rounds then suddenly it will loop
into
The elixir flows down your throat without effect.
until the vial is empty
then continue on to
What is it that you wish to drink?

the loop produces 2 or 4 pages od spam and just as suddenly as it started it will stop.

the variable is
healbalance
and manabalance
they are both set to 1 and defalted to 1

What do I need to do to stop the looping and make it so I priortize drinking health over mana

The trigger to drink is
pattern
You may drink another health or mana elixir.
value
healbalance=1

Thanks again for your help
Reply with quote
zyran
Beginner


Joined: 16 Apr 2003
Posts: 17
Location: USA

PostPosted: Sun Oct 19, 2003 10:47 pm   
 
#TRIGGER {^(%n)h, (%n)m (*)-} {
#var hp %1
#var mp %2
#if (%pos( e, %3)) {#var equi 1} {
#var equi 0}
#if (%pos( x, %3)) {
#var bal 1} {
#var bal 0
}
} "prompt" {nocr|prompt}
#COND {x} {#cw green} {reparse}
This will keep track if you got balance or equi as well as what your health and mana is at. I have a reparse in there for highlighting the x so that it stands out when I have balance.
#TRIGGER "health" {(@db=1) & (@anorexia=0) & ((@hp<@mhp | @mp<@mmp))} {
#if (@hp<@mhp) {
drink health
} {
drink mana
}
} "hlth" {loopexp|param=1|nocr|prompt}
#COND {} {} {wait|param=1000}
This prioratizes health over mana. It will only heal mana only when all your health is full. You need set @mhp(max hit points) and @mmp (maz mana points) to represent the max for the both of them. Since there are skills that manipulate the value of your max hp and mp I'd also make a alias that changes your max mana and hitpoints to the current @hp and @mp value, that is when both are at its max value.
You can do the same to moss and reconfigure it so that another trigger can prioritize mana over health and switch between them by enabling and disabling one with an alias.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Oct 20, 2003 1:50 am   
 
@healbalance has nothing to do with either balance or equilibrium, only with whether or not a health/mana elixir will work. There is no need for @manabalance at all, since health and mana elixirs are treated the same. The original trigger worked correctly and prioritized health over mana. Go back to it.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Oct 20, 2003 4:44 am   
 
Specifically, use this:

Pattern:
(%n)h, (%n)m//set to prompt
Value:
#IF (@healbalance=1) {
#IF (%1 <2900) {
drink health
healbalance=0
} {
#IF (%2 < 1800) {
drink mana
healbalance=0
}}
#IF (%1 < 1500) {
outr moss
eat moss
}}

Pattern:
You may drink another health or mana elixir.
Value:
healbalance=1

Zyran's triggers probably won't work for you because they include variables which aren't created by the script.
Reply with quote
Mangese
Beginner


Joined: 14 Mar 2003
Posts: 11
Location: USA

PostPosted: Mon Oct 20, 2003 5:04 am   
 
Thank you lightbulb!
I'm trying to understand how things work can you tell me what was in this script that was causing my character to loop and drink the vial dry and then continue to try to drink
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Oct 20, 2003 5:20 am   
 
Yes. @healbalance is the variable used to prevent looping. It prevents looping because the first thing checked is
#IF (@healbalance = 1)
The original trigger, and the one I fixed, set healbalance to 0 with the command
healbalance=0

You changed that to
manabalance=1
after drinking a health elixir or to
healbalance=1
after drinking a mana elixir. Since you always kept @healbalance set to 1, there was never anything to stop you from drinking another one so it looped.
Reply with quote
Davos
Adept


Joined: 30 Jan 2003
Posts: 228
Location: USA

PostPosted: Mon Oct 20, 2003 10:26 pm   
 
I have a properly working script that does this for Achaea allready, and also instead of going off a flat Health amount to start healing it goes off a % of your max health, as to account for level changes, I also have accounted it for Moss, it currently drink health/mana at 80% and eats moss at 50% but this, obviously can be changed. It also Prioritizes Health over mana, as it should be. Contact me in Achaea, -Davos-, and I will give it to you or help you make your own.
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