|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Thu Jan 30, 2003 6:44 am
Prompt activated trigger, help please |
My prompt looks like this... <12495/13015hp 3681/4766m 5106/5543v -95005|-71005|24995tnl>
whenever the last number (24995) reaches a negative value, i want a trigger to input a command, how can i do that? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jan 30, 2003 7:18 am |
I've assumed your max hp's, mana, and moves will never go negative, but that any of the other numbers could.
#TR {~<(%n)/(%d)hp (%n)/(%d)m (%n)/(%d)v (%n)~|(%n)~|(%n)tnl~>} {#IF (%9 < 0) {input command}} {} {nocr|prompt}
LightBulb
Senior Member |
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Thu Jan 30, 2003 7:27 am |
hmm, it isnt working, what it is is theres a multiclass system, so i used it and on the %9 < 0 it triggers level mindbender, which is the 3rd class, but it isnt working
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Jan 30, 2003 12:47 pm |
How does your trigger look right now? The trigger supplied by LightBulb should fire with the line supplied by you. Try posting an example from the MUD where you see the line displayed and it is seen that the trigger did not fire on that line.
Kjata |
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Thu Jan 30, 2003 6:14 pm |
the pattern is ~<(%n)/(%d)hp (%n)/(%d)m (%n)/(%d)v (%n)~|(%n)~|(%n)tnl~> and the output when the pattern matches is #IF (%9 < 0) {level mindbender} and the prompt is show after any bit of text, so it is basically displayed at all times. An instance of when it should fire is <14814/14814hp 5201/5201m 6932/6932v -139442|-115442|-19442tnl>
, since the last number is negative, i want the trigger to execute and cause that third class i have, in this case mindbender, to level since i have more than the required experience |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jan 30, 2003 6:38 pm |
Don't forget that you'll (usually) have to be at a guildmaster to level your multiclasses (yes, I recognize the MUD).
Check the options, the trigger should be set to Trigger on Prompt, not on Newline. If you cut-and-pasted the whole thing it will be.
LightBulb
Senior Member |
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Thu Jan 30, 2003 6:50 pm |
in this mud, (Clandestine) you can buy an item called a sphere of knowledge which is basically a portable guildmaster, so thats not the problem. And it is triggered on prompt, not newline
|
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Thu Jan 30, 2003 6:52 pm |
the problem was that it WAS triggered on prompt, i am not sure what that is for, but i switched it to newline and it works now... the only problem is this... when you input a command it shows your mud prompt again, so it tries to input the command twice, below is a segment of the mud i copy and pasted...
<11143/15084hp 5213/46309m 2736/7040v -127138|-103138|-7138tnl>
level mindbender
<11143/15084hp 5213/46309m 2736/7040v -127138|-103138|-7138tnl>
level mindbender
You gain a level!!
You gain 0 hit points, 6 mana, 137 move, and 20 practices.
<11143/15084hp 5213/46315m 2736/7177v 1576|25576|121576tnl>
You don't have enough experience to level.
is there any way to prevent that from happening? i have highlighted the trigger output |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jan 30, 2003 7:19 pm |
Ah, looks like you used the carriage-return token at the end of your prompt. In that case, Trigger on Newline would be the correct choice.
To eliminate double-triggering on prompt triggers, you need to incorporate some method of temporarily disabling the trigger.
#TR "LevelMindbender" {~<(%n)/(%d)hp (%n)/(%d)m (%n)/(%d)v (%n)~|(%n)~|(%n)tnl~>} {#T- LevelMindbender;#IF (%9 < 0) {level mindbender};#ALA +1 {#T+ LevelMindbender}}
LightBulb
Senior Member |
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Thu Jan 30, 2003 7:22 pm |
actually i figured out a solution, if i make it disable my autolevel class each time it levels, and re-enable the class every time it displays the message "You gain a level!!" that should solve the problem, thoughts or comments on this?
|
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Thu Jan 30, 2003 7:46 pm |
ok, new quiz... i want it to alternate leveling each class... so i want it to level my primary class 5 times, then my second class 5 times, then my third class 5 times, and go back to my primary and begin anew, how can i do that?
|
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Thu Jan 30, 2003 8:18 pm |
ooo, wait wait i think i found a way... let me try
|
|
|
|
Latent Apprentice
Joined: 19 Aug 2002 Posts: 120 Location: USA
|
Posted: Thu Jan 30, 2003 8:46 pm |
basically i made a variable for each class, and each time i level, i add one to that variable, and when the variable reaches a certain number, it flips the trigger to the next class, and so on...
|
|
|
|
|
|