Ok, so here's what I have so far. I have 2 questions, and then will supply data to hopefully help.
Questions
- 1. I may be doing my wildcards incorrectly, and need some guidance there.
- 2. This script fires a "mark <mob>" or "gtell None here." on EACH mob in the room. Is there a way to alter it to parse the whole room and either fire on the first, and break, or do a single "gtell None here." if none are present?
Data
Auto-look when entering a room: (mobs I want in bold)
Inside A Small Cave
The air here is dank and gloomy. Shadows dance and play about the
walls as light filters through cracks in the roof of this small shaft
leading into the mountain. Dripping water can constantly be heard, as
well as other, more ominous sounds from deeper within.
| |
| |
|*|_
|_
[5 am Full Moon][17, Nov-Fall] [LoS = 5']
[Exits: north south]
(M) (weak) A small mouse is here, squeaking at you.
(M) (wimpy) A water bug skitters over a small puddle.
(Hidden) (F) (even) A goblin slinks in a corner, with a knife already drawn.
(M) (weak) A small mouse is here, squeaking at you.
(Hidden) (M) (challenge) A large shadow looms over you.
(Glowing Aura) (F) (hard) A rock troll towers over the room.
And my script, based on what Nick graciously gave me.
<triggers>
<trigger
enabled="y"
match="(^|>)(.+)\((even|challenge|hard|insane)\) (.+)"
regexp="y"
send_to="12"
sequence="100"
>
<send>
mobname = "%1"
specialMobs = {
{ desc = "A goblin slinks in a corner, with a knife already drawn.", send = "mark goblin" },
{ desc = "A large shadow looms over you.", send = "mark shadow" },
{ desc = "A rock troll towers over the room.", send = "mark troll" },
-- add more here ...
} -- end of table
for k, v in ipairs (specialMobs) do
if string.find (mobname, v.desc, 1, true) then
Send (v.send)
return
end -- if found
end -- for each table item
Send ("gtell None here")
print "%1"
print "%2"
print "%3"
print "%4"
print "%5"
Question #1
- The "print"s are so I could see what my wildcards actually were...didn't know another way.
- The following is what the room shows when using this script when printing the wildcards. Don't understand why %4 is the one I need
- mobname = "%4" works just fine, I just want to understand WHY its the 4th wildcard
Question #1 Data (script stuff in bold)
Inside A Small Cave
The air here is dank and gloomy. Shadows dance and play about the
walls as light filters through cracks in the roof of this small shaft
leading into the mountain. Dripping water can constantly be heard, as
well as other, more ominous sounds from deeper within.
| |
| |
|*|_
|_
[5 am Full Moon][17, Nov-Fall] [LoS = 5']
[Exits: north south]
(M) (weak) A small mouse is here, squeaking at you.
(M) (wimpy) A water bug skitters over a small puddle.
(Hidden) (F) (even) A goblin slinks in a corner, with a knife already drawn.gtell None here
(Hidden) (F)
even
A goblin slinks in a corner, with a knife already drawn.
(M) (weak) A small mouse is here, squeaking at you.
(Hidden) (M) (challenge) A large shadow looms over you.gtell None here
(Hidden) (M)
challenge
A large shadow looms over you.
(Glowing Aura) (F) (hard) A rock troll towers over the room.gtell None here
(Glowing Aura) (F)
hard
A rock troll towers over the room.
Question #2
- If I expand my trigger match to "(wimpy|weak|even|challenge|hard|insane)" to match every mob possible, I then get the following.
- I would rather have the script match once, send the matched mark, and break OR match none, send the gtell ONCE and break
Question #2 Data (script stuff in bold)
Inside A Small Cave
The air here is dank and gloomy. Shadows dance and play about the
walls as light filters through cracks in the roof of this small shaft
leading into the mountain. Dripping water can constantly be heard, as
well as other, more ominous sounds from deeper within.
| |
| |
|*|_
|_
[5 am Full Moon][17, Nov-Fall] [LoS = 5']
[Exits: north south]
(M) (weak) A small mouse is here, squeaking at you.gtell None here
(M) (wimpy) A water bug skitters over a small puddle.gtell None here
(Hidden) (F) (even) A goblin slinks in a corner, with a knife already drawn.mark goblin
(M) (weak) A small mouse is here, squeaking at you.gtell None here
(Hidden) (M) (challenge) A large shadow looms over you.mark shadow
(Glowing Aura) (F) (hard) A rock troll towers over the room.mark troll
Any help or pointing to the right place to read up on something is greatly appreciated!
[EDIT] Corrected forum codes
[EDIT] Changed quote tags to code tags so I can see what you are seeing. (Nick) |