|
Brother Marius Beginner
Joined: 09 Oct 2000 Posts: 14 Location: Sweden
|
Posted: Fri Mar 29, 2002 11:50 pm
Fleeing N Stuff |
First of all, I'd really like to have my current Health and Mana in the, er.. Status Bar (is it called that?). I once found a post on these forums with some triggers and stuff that set it up for me. But I lost it and can't find the post anymore. :/
My prompt looks like this:
** HP: 168/202 SP: 178/202
Also, I'd really need some help with auto-wimping (I've read several posts here on this matter, but I just seem to understand anything of it). If it is possible, I'd like to flee the same direction that I last typed. So if I went 'n', then I'd want to flee 's', but I only want to do this if my Health is, say, below 30% of Max. Can anyone help, please? :) |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Mar 30, 2002 8:18 am |
quote:
First of all, I'd really like to have my current Health and Mana in the, er.. Status Bar (is it called that?). I once found a post on these forums with some triggers and stuff that set it up for me. But I lost it and can't find the post anymore. :/
My prompt looks like this:
** HP: 168/202 SP: 178/202
Also, I'd really need some help with auto-wimping (I've read several posts here on this matter, but I just seem to understand anything of it). If it is possible, I'd like to flee the same direction that I last typed. So if I went 'n', then I'd want to flee 's', but I only want to do this if my Health is, say, below 30% of Max. Can anyone help, please? :)
For the prompt:
#trigger {~*~* HP: (%d)/(%d) SP: (%d)/(%d)} {#var CurHP %1;#var MaxHP %2;#var CurSP %3;#var MaxSP %4}
Maybe I'll come by tomorrow with some wimpy script, but right now I'm very tired and unable to formulate complex thoughts.
li'l shmoe of Dragon's Gate MUD |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Mar 30, 2002 6:25 pm |
Matt already gave you the trigger to capture your current health and mana, here's the command to put it in the status bar:
#STATUS {Health: @CurHP Mana: @CurSP}
Wimping is usually done by the MUD and in most places, you can't control which direction you flee. So my guess is that what you want won't be possible, if it is you'll have to adjust the commands since you didn't provide them. You'll need a pair of triggers for each direction you can move to put the correct reverse direction into @fleedir. I've provided the two for north as examples.
#ONINPUT {^n$} {#VAR fleedir south;~north}
#ONINPUT {^north$} {#VAR fleedir south;~north}
#TR {HP: (%d)/(%d)} {#IF ((%1 * 10) < (%2 * 3)) {flee @fleedir}}
LightBulb
All scripts untested unless otherwise noted |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Mar 30, 2002 8:54 pm |
quote:
Matt already gave you the trigger to capture your current health and mana, here's the command to put it in the status bar:
#STATUS {Health: @CurHP Mana: @CurSP}
Wimping is usually done by the MUD and in most places, you can't control which direction you flee. So my guess is that what you want won't be possible, if it is you'll have to adjust the commands since you didn't provide them. You'll need a pair of triggers for each direction you can move to put the correct reverse direction into @fleedir. I've provided the two for north as examples.
#ONINPUT {^n$} {#VAR fleedir south;~north}
#ONINPUT {^north$} {#VAR fleedir south;~north}
#TR {HP: (%d)/(%d)} {#IF ((%1 * 10) < (%2 * 3)) {flee @fleedir}}
LightBulb
All scripts untested unless otherwise noted
Actually, can't you turn off wimpy (wimpy 0 or something like that)? All the muds I've played preset the wimpy level at 0, but once I've set it I never tried to reset it to zero.
If you can do that, then it's much easier to monitor your health and do a self-wimpy on your own (since you don't have to worry about ever getting to the point where the mud wimpy will kick in).
Since you have a complex prompt (and I assume it gets sent after every action?), you need only create the several triggers to handle the text lines describing how much damage you took. You can do the wimpy comparison in the prompt trigger, and if you need to run you can simply enter in the direction.
#trigger {~*~* HP: (%d)/(%d) SP: (%d)/(%d)} {HP.current = %1;HP.max = %2;SP.current = %3;SP.max = %4;#IF (@HP.current <= @Hp.wimpy) {@fleedirection} {#noop do nothing since you aren't under the wimpy amount}}
#ALIAS wimpy {
#if (%version <= 616) {
;since version 6.16 and lower does not handle floating points, getting a percent of HP.max might be a little harder to do, so I'm wimpying based on actual HP
HP.wimpy = %1
} {
;version is greater than 6.16, and so you probably can do floating-point math (not sure which version first started that, so I've put the boundary at 6.16)
#MATH HP.wimpy {@HP.max * .%1}}
}
li'l shmoe of Dragon's Gate MUD |
|
|
|
|
|
|
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
|
|