|
Snookumz Beginner
Joined: 19 Nov 2003 Posts: 13
|
Posted: Thu Dec 04, 2003 9:00 pm
Confused on Trigger |
Ok when I make my triggers using zMUD I just click Triggers -> New and type stuff in the Pattern/Field boxes. Some of the triggers I've seen don't look like they're done this way so any help would be appreciated in making the following work.
I like to have all channels off while I'm leveling and I have my main sitting around nearby or following me, and sometimes I want to know what's on auction, but I want to know the items full stats. How would I go about doing this?
I have setup an alias to quickly [tell <main> auction?] and he will check auction, but I'm not sure how to get him to report all the lines through tells/say.
Here is a copy of an auction:
No bids on this item have been received.
Object 'Neptune's Trident'...
It is a level 18 blasting weapon, weight 12.
Locations it can be worn: wield
Special properties: metal
Alignments allowed: good neutral
This weapon has a gold value of 125000.
Damage is 5 to 19 (average 12).
Affects intelligence by 2.
Affects wisdom by 1.
Affects dexterity by 1.
Affects mana by 30.
Affects hp by 20.
Affects hit roll by 4.
Affects damage roll by 3.
Affects hit roll by 3.
Affects damage roll by 3
I've tried a few things but they always only report the first line. No bids on this item have been received. (or if it has a bid, it tells how much) Mostly it just gets incredibly spammy with nonsense text.
Basically this is what I want, but can't get it.
(Activate Trigger) Druzzil tells you 'auction?'
(My main) Tell Druzzil 'Checking Auction Status'
[If nothing is on auction]
(My main) Tell Druzzil 'Nothing on auction'
[If something is on auction]
(My main) Tell Druzzil 'First Line'
(My main) Tell Druzzil 'Second Line
...
(My main) Tell Druzzil 'Last Line'
(My main) Tell Druzzil 'Second Line' [Again]
~Moorthon |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Fri Dec 05, 2003 3:21 am |
What follows the last line? ie. 'Affects damage roll by 3'
A multi-state trigger would be ideal for capturing this information, but we don't know when to stop capturing. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Dec 05, 2003 5:08 pm |
You didn't tell us what the output looks like when there's nothing on auction. I'm going to assume you're smart enough to figure out that if (My main) doesn't tell you anything it's because there wasn't anything on auction.
Pattern:
Druzzil tells you 'auction?'
Value:
Tell Druzzil Checking Auction Status
check auction
Pattern:
^(Object '*')
Value:
Tell Druzzil %1
Pattern:
^(It is a level %d *, weight %d.)
Value:
Tell Druzzil %1
Pattern:
^(Locations it can be worn: *)
Value:
Tell Druzzil %1
Pattern:
^(Special properties: *)
Value:
Tell Druzzil %1
That should be enough for you to figure out the rest. Basically, just make a pattern to match each line, with the entire pattern enclosed in parentheses, then "Tell Druzzil %1". |
|
|
|
Snookumz Beginner
Joined: 19 Nov 2003 Posts: 13
|
Posted: Sat Dec 06, 2003 2:36 am |
Well the last line is *always* different.
LightBulb, if nothing is on auction it returns.
There is nothing being auctioned right now.
And what I "don't" want to do is create 20 triggers, one for each line, I want as few triggers as possible, hopefully max of 3-4.
Here is an example of what my screen looks like when I check item on auction.
1334/1334Hp 17Bp 607Mv $6 {-1000} New Darkhaven {HS} Lag: Auc: fight_token token No bids on this item have been received.
Object 'a small token'...
It is a level 1 treasure, weight 1.
Special properties: glow
This treasure has a gold value of 10000.
1334/1334Hp 17Bp 607Mv $6 {-1000} New Darkhaven {HS} Lag: Auc: fight_token token
and here is another example, this item is being bid on.
1334/1334Hp 15Bp 613Mv $1 {-1000} New Darkhaven {HS} Lag: Auc: robe yellow
Current bid on this item is 350,000 gold.
Object 'a shimmering, yellow robe'...
It is a level 43 armor, weight 3.
Locations it can be worn: back
Special properties: none
This armor has a gold value of 0.
Armor class is 7.
1334/1334Hp 15Bp 613Mv $1 {-1000} New Darkhaven {HS} Lag: Auc: robe yellow
Text in bold is my Prompt.
If you need anymore information and what not, ask away. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Dec 06, 2003 5:06 am |
Pattern:
There is nothing being auctioned right now.
Value:
Tell Druzzil 'Nothing on auction'
You shouldn't impose artificial limits on the number of triggers. The more specific the patterns, the easier and faster non-matching triggers can be eliminated, so more is usually better and fewer is usually worse. But your call. You won't need the trigger above. This is just the standard multi-line capture problem.
Pattern:
Druzzil tells you 'auction?'
Value:
Tell Druzzil Checking Auction Status
#T+ AuctionCheck
check auction
CLASS
Name:
AuctionCheck
Properties:
Disable class when connecting to a MUD checked
Enabled unchecked
Pattern:
^%n/%nHp %nBp %nMv ~$%n ~{%n~}
Value:
#T- AuctionCheck
Options:
Newline checked
Prompt checked
Pattern:
(*)
Value:
Tell Druzzil %1
Options:
Trigger on Trigger unchecked
NOTES:
1. The triggers below the CLASS should be included in the class. The one above it should not.
2. Options are extremely important. |
|
|
|
Snookumz Beginner
Joined: 19 Nov 2003 Posts: 13
|
Posted: Sat Dec 06, 2003 11:08 pm |
Hrm I tried both the things you told me and neither are working. The 2nd one just replies "Checking Auction Status..." Checks Auction, and I get disconnected w/o reporting the stats.
The first one is just INCREDIBLY spammy with non-sense. |
|
|
|
Snookumz Beginner
Joined: 19 Nov 2003 Posts: 13
|
Posted: Sat Dec 06, 2003 11:30 pm |
Ok I got it working with a little tweaking hehe.
Anyways, how would I go about making the trigger NOT work when just normally checking auction?
Like when I don't see "Druzzil tells you 'Auction?'
I tried to put a #T- CheckAuction after the last line, but I just made 1 trigger to report all Affects so and so by so and so.
Maybe put all the ^(Blah blah *) triggers into a serperate folder and use an alias to enable it while I'm playing Druzzil..mmmm good idea! :)
Anywho thank you very much LightBulb, you helped big time! |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Dec 07, 2003 6:18 am |
I'm sorry, but the "first one" is the "nothing on auction" trigger? I don't see how it can possibly be spammy, since it will only fire when you tell your (Main) to check auction (unless you spam your (Main) with tells). If you meant the multiple triggers in my first reply, I also don't see how they can be spammy as long as you anchor the patterns at the beginning of the line, like I did.
The "2nd one" is a complete script (if it's what I think you're referring to), consisting of one (1) class and three (3) triggers. As I said, "Options are EXTREMELY important. In particular, if you don't UNCHECK the Trigger on Trigger option for the last trigger, you'll create a trigger loop. The trigger loop can indeed be "extremely spammy" and cause you to be disconnected. The order of triggers was also important, but not critical. If you reverse the order of the two triggers inside the class, you'll tell Druzzil your prompt at the end. With the order I gave, you shouldn't.
In my first post, most of the patterns begin with ^. This is also extremely important to prevent them from causing trigger loops.
You limit when triggers work by putting them into a separate class which is normally disabled. You enable the class with a trigger (Druzzil tells you, 'check auction') which sends the #T+ command. Since you only need to enable the class when it's disabled, this trigger MUST be outside the class. You disable the class at the end with another trigger which sends the #T- command, and this trigger typically fires on your prompt or a blank line. Since you only need to disable the class when it's enabled, this trigger can be inside the class. For an example, see the script in my second reply.
Please try to be more specific next time. "Both the things", "the first one", and "the 2nd one" really don't give me a clue what you're referring to. And I'm glad I helped and sorry for any additional problems I may have caused by not being clear enough. |
|
|
|
megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Sun Dec 07, 2003 9:24 am |
I don't know what you two are going on about, And I don't whant to know.
Sounds like fun though
So here is your program If you do not follow my instructions it will not work!!!
Cut and Past Everything between the Green lines to the Command line of your Main
Then Press ENTER and follow The Directions, That simple.
____________________________________________________________________________
#CLASS {AuctionHouse}
#TRIGGER {^Druzzil tells you 'auction~?'$} {#t+ PriceScan;:Druzzil:#say Checking Auction Status;auction}
#CLASS 0
#CLASS {AuctionHouse|PriceScan}
#ALIAS auction {get auction}
#VAR Bidding {Current bid on this item is|No bids on this item have been received}
#TRIGGER {^There is nothing being auctioned right now.$} {#t- PriceScan;:Druzzil:#say Nothing on auction}
#TRIGGER {^({@Bidding})(*)} {#if "%1"="Current bid on this item is" {:Druzzil:#say The Bid currently on This item is "%2"} {:Druzzil:#say No bids on this item have been received}}
#TRIGGER "name" {^Object '(*)'...$} {#trigger again {^$} {#t- item;#t- PriceScan;:Druzzil:#say object ~'"%1"~'} PriceScan;#T+ item}
#TRIGGER "item" {^(%w) (*)} {:Druzzil:#say %1 "%2"} "" {disable}
#CLASS 0
#ALIAS NumskullName {#if @NumskullName=0 {#prompt NumskullName "Enter The name of the Character here";NumskullName} {#Name @NumskullName;#una NumskullName;#gag;#unv NumskullName;#gag;#say Please copy the text in Green to the command line of Druzzil and hit enter to Successfuly set up this program.;#say %ansi(green)~#name Druzzil}}
#VAR NumskullName {0}
#t- PriceScan
NumskullName
____________________________________________________________________________
Any Question? |
|
|
|
Snookumz Beginner
Joined: 19 Nov 2003 Posts: 13
|
Posted: Mon Dec 08, 2003 1:02 am |
...Wow....megamog75
Well it worked perfectly beautifully. I got the one LightBulb showed me set to one of my other alts, and yours set to one of them.
LightBulb,
"both things" = Both posts you put triggers.
"1st one" = First post you told me make triggers for each thing.
"2nd one" = The more direct one, the one that works. (Was my fault it didnt)
The reason the "1st one" was spammy was because it was returning this to my alt.
Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'Line too long.Main tells you 'Checking Auction Status...' And so on and so forth, it was just repeating the same thing over and over.
Main tells you 'Checking Auction Status...'
Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'
Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'
Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'
Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'Main tells you 'Checking Auction Status...'
Then it would return to my main, Line too long, and start over from the first line. Main tells you 'Checking Auction Status...'
Anyways, it was probably my fault it did that.
Thanks once again,` both of you for the help.
~Moorthon |
|
|
|
|
|
|
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
|
|