|
GLrunner13 Newbie
Joined: 03 Feb 2006 Posts: 2
|
Posted: Fri Feb 03, 2006 4:57 am
#log/#write help... |
Alright, I'm pretty new to using ZMud triggers and I am looking for some assistance in using the #log command, or possibly the #write command if that is what is needed.
In the MUD I play on, roleplaying is strongly encouraged. Therefore, there is a 'roleplay' channel and an 'rp-say' channel where people can talk outside of their roleplay. What I want to do is log the 'roleplay' channel and the 'rp-say' channel, but not everything else. I have tried to get it to work, but it logs everything or nothing. Assistance is greatly appreciated! |
|
|
|
nkei0 Beginner
Joined: 08 Oct 2005 Posts: 19
|
Posted: Sat Feb 04, 2006 7:27 am |
It depends on if you want it in a window that you can view like a character window, or if you want it actually saved to a file. It would also help if you had some sort of example text from your mud to base the triggers off of, but anyhow I think I can give you a good idea of what you want. Say the channels were set-up like this: JohnDoe roleplays 'Yarr, mate' and JohnDoe rp-says 'Shiver me timbers' You would want to trigger it like this:
Pattern: ^(%w) (*) '(*)'$
Command: #CAP RP (this is if you want to have it in the window like a charwindow, but it won't save to a file)
Command: #IF %ismember(%2,@rptalk) {#File 1 rplog.txt;#WRITE %1 %2 %3} {#NOOP}
You would also want to have a variable like this:
#VAR rptalk {roleplays|rp-says}
And then you can open this as a .txt file or in the setting editor in zmud, which is also the only place you'll be able to edit the file. This should work fine, as it does for me. Let me know if you have any problems/questions.
-Justin |
|
|
|
GLrunner13 Newbie
Joined: 03 Feb 2006 Posts: 2
|
Posted: Sun Feb 05, 2006 4:57 pm |
Hmm alright, well I tried to put in those triggers, and they fired and it created a roleplay log in my Zmud folder, but the .txt file was blank when I opened it...Any ideas? Here are some examples of MUD script:
Thor RP-says, 'test'
You RP-say, 'test'
You (Roleplay)'s, 'test'
And this is what I put in for my triggers:
Pattern: %1 ~(roleplay~)
Commands: #cap Roleplay
#IF %1( %2, @rptalk) {
#File 1 Roleplay1.txt
#WRITE %1 %2 %3
} {#NOOP}
#VAR rptalk {roleplay|rp-say}
Pattern: %1 RP-say
Commands: #cap Roleplay
#IF %1( %2, @rptalk) {
#File 1 Roleplay1.txt
#WRITE %1 %2 %3
} {#NOOP}
#VAR rptalk {roleplay|rp-say} |
|
|
|
nkei0 Beginner
Joined: 08 Oct 2005 Posts: 19
|
Posted: Sun Feb 05, 2006 9:37 pm |
You shouldn't need two triggers just put this in.
#AC { ^(%w) (*), '(*)'$} {#IF %ismember(%2,@rptalk) {#File 1 rplog.txt;#WRITE %1 %2 %3} {#NOOP}}
That should work correctly, if not the comma may be screwing it up, I've had problems with that before and I never really bothered to investigate the route of it, but I'm certain it wouldn't be hard to find.
-Justin |
|
|
|
|
|
|
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
|
|