Custom Schtuff

by Unknown

Back to Mechanic's Corner.

Unknown2006-07-22 08:25:22
Ok, doing my own system, adding more as I learn more. (zMUD) Working on cleaning up a lot of attack spam and such...

Was wondering, how do I turn something like this:

You allow an infinitesimally small mote of cosmic fire to manifest and direct it
at a morbidly-tainted grub. Cosmic fire blasts forth, dissolving his flesh in a
sparkling current of energy.

Into something more condensed like:

---Burn in Agony, grub---?
Shorlen2006-07-22 08:29:08
QUOTE(Enigmatic Eggplant @ Jul 22 2006, 04:25 AM) 310440

Ok, doing my own system, adding more as I learn more. (zMUD) Working on cleaning up a lot of attack spam and such...

Was wondering, how do I turn something like this:

You allow an infinitesimally small mote of cosmic fire to manifest and direct it
at a morbidly-tainted grub. Cosmic fire blasts forth, dissolving his flesh in a
sparkling current of energy.

Into something more condensed like:

---Burn in Agony, grub---?

Try this:
CODE
#trigger {^You allow an infinitesimally small mote of cosmic fire to manifest and direct it} {#gag}
#cond {at (*). Cosmic fire blasts forth} {#gag}
#cond {of energy.$} {#gag;#echo %ansi(75)---Burn in Agony, %1---}
Unknown2006-07-22 08:30:46
I tried #GA, but it doesn't remove the entire cosmic fire attack thing...And #GAGB is crap, as well...
Shorlen2006-07-22 08:31:38
QUOTE(Enigmatic Eggplant @ Jul 22 2006, 04:30 AM) 310442
I tried #GA, but it doesn't remove the entire cosmic fire attack thing...And #GAGB is crap, as well...

Even with it gagging each cond like that? Hmm. As I wrote it, it works fine for me.
Unknown2006-07-22 08:35:49
Yeah, it says

of energy.

No #SAY feedback or anything.
Shorlen2006-07-22 08:36:44
QUOTE(Enigmatic Eggplant @ Jul 22 2006, 04:35 AM) 310445
Yeah, it says

of energy.

No #SAY feedback or anything.

...oops. Take out the word "current" from the last cond.

EDIT: You see what the problem is, right? Varying name lengths mean you can't know what exactly will be on which line.
Unknown2006-07-22 08:39:47
Oooer...Thanks...Yeah, can tell I'm new...

Next question...

If I wanted to have it so that if an attack killed something, it'd not do the Burn in Agony thing, but something like Embrace the Darkness, how would I do that?
Shorlen2006-07-22 08:42:31
QUOTE(Enigmatic Eggplant @ Jul 22 2006, 04:39 AM) 310447

Oooer...Thanks...Yeah, can tell I'm new...

Next question...

If I wanted to have it so that if an attack killed something, it'd not do the Burn in Agony thing, but something like Embrace the Darkness, how would I do that?

You'd do a simliar thing for the dying from cosmicfire message. I don't know what it is. The way a multistate trigger works is it matches the first line (the one after #TRIGGER), then executes the stuff after the trigger and moves to the first #COND line. When that matches, it executes the stuff after the #cond and moves to the next #cond. When it matches the final line, it goes back to waiting for the beginning one.

EDIT It's kind of a hack used to make a multi-line trigger, but it works nicely.
Unknown2006-07-22 08:47:47
The message for death by cosmic fire is 'The final blow proves too much' after the standard attack message.

Is there a way to use an #IF to check what the next line is? Like, after 'of energy' check nextline, #IF it is 'the final blowblah' {say this} {say that}?
Shorlen2006-07-22 08:59:34
QUOTE(Enigmatic Eggplant @ Jul 22 2006, 04:47 AM) 310449

The message for death by cosmic fire is 'The final blow proves too much' after the standard attack message.

Is there a way to use an #IF to check what the next line is? Like, after 'of energy' check nextline, #IF it is 'the final blowblah' {say this} {say that}?

I'm not good enough with such triggers to answer that - hopefully someone who is will post. I only started using #conds a few days ago, to be honest.
Esano2006-07-22 09:51:01
#TRIGGER {You allow an infinitesimally small mote of cosmic fire to manifest and direct it$at (*). Cosmic fire blasts forth, dissolving his flesh in a{$| sparkling}{$| current}{$| of}{$| energy.}$} {#SUB {~-~-~- Burn in Agony, %1 ~-~-~-}}
#COND {The final blow proves too much} {#GAG -1;#SUB {~-~-~- Embrace the Darkness, %1 ~-~-~-}}

Not sure if it'll work, but try.
Unknown2006-07-22 11:05:45
QUOTE(Esano @ Jul 21 2006, 11:51 PM) 310453

#TRIGGER {You allow an infinitesimally small mote of cosmic fire to manifest and direct it$at (*). Cosmic fire blasts forth, dissolving his flesh in a{$| sparkling}{$| current}{$| of}{$| energy.}$} {#SUB {~-~-~- Burn in Agony, %1 ~-~-~-}}
#COND {The final blow proves too much} {#GAG -1;#SUB {~-~-~- Embrace the Darkness, %1 ~-~-~-}}

Not sure if it'll work, but try.


That's a very very bad trigger to use. Don't EVER use $ to do multiline triggers, just use it to match end of line else it'll slow down your system. Use conditional triggers with {within|param=1} to do multilines.
Unknown2006-07-22 16:47:56
Is Hypnotoad back or am I going crazy?
Unknown2006-07-24 13:55:40
I'd say crazy, but I'm seeing it too! -blinks, wondering if she's crazy too-
Unknown2006-07-24 14:26:44
Heheh, nah I put it back as my forum picture.
Unknown2006-07-25 12:58:02
For a warrior. No worky.

CODE
#VARIABLE rbal 1
#VARIABLE lbal 1
#VARIABLE bal 1
#VARIABLE eq 1
#VARIABLE fbal 1
#TRIGGER {^(%d)h, (%d)m, (%d)e, (%d)p, (%d)en,(%d)w (w%)-} {#IF {%7=*e*} {eq=1} {eq=0;fbal=0};#IF {%7=*x*} {bal=1} {bal=0;fbal=0};#IF {%7=*r*} {rbal=1} {rbal=0;fbal=0};#IF {%7=*l*} {lbal=1} {lbal=0;fbal=0}}
#TRIGGER {^You have recovered} {#GAG;#IF {rbal=1 & lbal=1 & bal=1 & eq=1} {fbal=1};#IF {fbal=1} {#SAY %ansi(white,blue)---Tengen Houmen---}}


Guess the main thing I'm asking, is it possible to include multiple conditions with a single #IF?
Unknown2006-07-25 13:09:43
Pretty sure you need the @ thingies infront of all the variables in the #IF statement. Well the second one anyway.
Unknown2006-07-25 13:58:26
Found a problem. It triggers against recovering balance, which means it'll pay attention to the prompt above, not below the message. Going to try something with temps and stuff, will post code and success or not.

Ok, tried making it send a blankline, then checking prompt after that. Results:

CODE
1=1
---Tengen Houmen---
548h, 839m, 404e, 0p, 2078en, 3095w erx-
548h, 839m, 404e, 0p, 2078en, 3095w erx-
I cannot fathom your meaning.
548h, 839m, 404e, 0p, 2078en, 3095w erx-

1=1
---Tengen Houmen---
548h, 839m, 404e, 0p, 2078en, 3095w elrx-
548h, 839m, 404e, 0p, 2078en, 3095w elrx-


Code:
CODE
#TRIGGER {^(%d)h, (%d)m, (%d)e, (%d)p, (%d)en,(%d)w (w%)-} {#IF {%7=*e*} {@eq=1} {@eq=0;@fbal=0};#IF {%7=*x*} {@bal=1} {@bal=0;@fbal=0};#IF {%7=*r*} {@rbal=1} {@rbal=0;@fbal=0};#IF {%7=*l*} {@lbal=1} {@lbal=0;@fbal=0}}
#TRIGGER {^You have recovered} {#GAG;#CR;#IF {@rbal=1 & @lbal=1 & @bal=1 & @eq=1} {@fbal=1} {@fbal=0};#IF {@fbal=1} {#SAY %ansi(white,blue)---Tengen Houmen---}}
Shorlen2006-07-25 18:55:28
QUOTE(Enigmatic Eggplant @ Jul 25 2006, 09:58 AM) 311413
Code:
CODE
#TRIGGER {^(%d)h, (%d)m, (%d)e, (%d)p, (%d)en,(%d)w (w%)-} {#IF {%7=*e*} {@eq=1} {@eq=0;@fbal=0};#IF {%7=*x*} {@bal=1} {@bal=0;@fbal=0};#IF {%7=*r*} {@rbal=1} {@rbal=0;@fbal=0};#IF {%7=*l*} {@lbal=1} {@lbal=0;@fbal=0}}
#TRIGGER {^You have recovered} {#GAG;#CR;#IF {@rbal=1 & @lbal=1 & @bal=1 & @eq=1} {@fbal=1} {@fbal=0};#IF {@fbal=1} {#SAY %ansi(white,blue)---Tengen Houmen---}}


That prompt trigger isn't defined as a prompt trigger. Add "" {nocr|prompt} to the end of it, I think, or just click the two boxes in the trigger options tab.
Unknown2006-07-26 02:17:24
Bleh, still not working...New code, also doesn't work....

CODE
#VARIABLE balances right|left|bal|equilibrium
#ALIAS balancescan {#IF {(%ismember( left, @balances) and %ismember( right, @balances) and %ismember( bal, @balances) and %ismember( equilibrium, @balances))} {#SAY %ansi(blue,white)---Tengen Houmen---}
#TRIGGER {^(%d)h, (%d)m, (%d)e, (%d)p, (%d)en,(%d)w (w%)-} {#if %pos( x, %7) {add balances bal} {del balances bal};#IF %pos( e, %7) {add balances equilibrium} {del balances equilibrium};#IF %pos( r, %7) {add balances right} {del balances right};#IF %pos( l, %7) {add balances left} {del balances left}}
#TRIGGER {^You have recovered *} {#GA;#IF {"%1"="balance on your left arm."} {add balances left};#IF {"%1"="balance on your right arm."} {add balances right};#IF {"%1"="balance on all limbs."} {add balances bal};#IF {"%1"="equilibrium."} {add balances equilibrium};balancescan}}


Actually, when I import the text file, the two triggers never show up...