(New message)
Subject review (reverse sequence)
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Fri 12 Feb 2010 04:29 AM (UTC) [ quote
]
Message
See:
http://www.gammon.com.au/scripts/doc.php?dialog=IDD_EDIT_TRIGGER
In particular:
If you use "send to script (after omit)" then the style runs are also available from the global variable: TriggerStyleRuns.
So, either use a script function, in which case the styles are the 4th argument, or change it to "send to script (after omit)" and then use:
style = GetStyle (TriggerStyleRuns, 10)
Then check style.textcolour.
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Zeno
USA (2,867 posts) bio
Moderator
Date
Fri 12 Feb 2010 04:24 AM (UTC) [ quote
]
Message
<triggers>
<trigger
enabled="y"
group="wand"
match="The \w+ of the wand glows"
regexp="y"
send_to="12"
sequence="100"
>
<send>require "getstyle"
style = GetStyle (styles, 10)
</send>
</trigger>
</triggers>
From what I remember triggers had an implicit arg passed to it called styles, along with line, wildcards etc. Maybe not.
I then need to check the color of the arg to see if it's red.
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org top
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Fri 12 Feb 2010 04:05 AM (UTC) [ quote
]
Message
Can you post your trigger please?
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Zeno
USA (2,867 posts) bio
Moderator
Date
Fri 12 Feb 2010 03:47 AM (UTC) [ quote
]
Message
Not sure I follow. You mean I need to change my trigger to match the color instead of looking for that in the Send?
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org top
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Thu 11 Feb 2010 03:21 AM (UTC) [ quote
]
Message
The style runs as supplied to your trigger.
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Zeno
USA (2,867 posts) bio
Moderator
Date
Thu 11 Feb 2010 03:15 AM (UTC) [ quote
]
Message
Yeah I read that post and it only provides examples of functions, unless I'm missing something. I guess I'm wondering what the first arg of getstyles would be then.
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org top
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Thu 11 Feb 2010 03:10 AM (UTC) [ quote
]
Message
It is more or less covered here:
In essence, getstyle gives you the colour if you know the column, and in your case you do (it's column 5).
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Zeno
USA (2,867 posts) bio
Moderator
Date
Thu 11 Feb 2010 03:03 AM (UTC) [ quote
]
Message
I'm trying to remember how to match on (part) of a triggers color. There's a line like "The <noun> of the wand glows." where I need to match if the word color is red. My regex is more or less "The * of the wand glows".
I see getstyle, but I don't know how to have it match arg1 (%1) for this trigger.
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org top
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
2,334 views.
Reply to this subject
Start a new subject
  Refresh page
Go to topic:
(Choose topic)
Area Editor: Bug reports
Area Editor: General
Area Editor: News and updates
Area Editor: Suggestions
Area Editor: Tips and tricks
Dawn of Time: Administration
Dawn of Time: Configuration
Dawn of Time: Installing/compiling the server
Dawn of Time: New Dawn Muds Announcements
Dawn of Time: Playing
Dawn of Time: What is Dawn of Time (Dawn)?
Electronics: Microprocessors
Electronics: Operational Amplifiers
Forum: About
Forum: Announcements
Forum: Mailing other users
Forum: Problems
Forum: Registering
Forum: Searching
Forum: Subscribing
Forum: Suggestions
Forum: Test
Forum: Time zones / time display
Forum software: Administration
Forum software: Installation
MUDs: Announcements
MUDs: General
MUDs: MUD Design Concepts
MUSHclient: Announcements
MUSHclient: Beta testing
MUSHclient: Bug reports
MUSHclient: Development
MUSHclient: General
MUSHclient: Getting Started
MUSHclient: International
MUSHclient: Jscript
MUSHclient: Lua
MUSHclient: Miniwindows
MUSHclient: MXP and Pueblo
MUSHclient: Perlscript
MUSHclient: Plugins
MUSHclient: Python
MUSHclient: Suggestions
MUSHclient: Tips and tricks
MUSHclient: VBscript
MUSHclient: Wine
PennMUSH: Compiling the server
PennMUSH: Running the server
Programming: General
Programming: STL
Quilting: General
ROM: Compiling the server
ROM: Running the server
SMAUG: Commands
SMAUG: Compiling the server
SMAUG: Lua
SMAUG: Running the server
SMAUG: SMAUG coding
Search the forum
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )