Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
danwold
Newbie


Joined: 26 Mar 2006
Posts: 5

PostPosted: Sun Mar 26, 2006 9:34 pm   

VbScript Send To Window
 
Trigger Pattern:
Code:
(OOC: (%w): '(*)')


VbScript
Code:

'Command ID for ComWindow as defined in Zmud.inc
sendwindow = 224

'Variables Trigger Wildcard parameters
vbWho=%2
vbSaid=%3

'Put into the OOC Window
zmud.CurrentSession.zMudCommand sendwindow,"OOC",vbWho & " said: " & vbSaid


This should work theoretically, but it doesnt? Anyone have experiance with zMudCommand?
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Mon Mar 27, 2006 2:41 am   
 
Never used it in my life but I just worked it out for you.

zMudCommand sendwindow, array("OOC",vbWho,"said:",vbSaid)

It adds the spaces so no need for " said: " or at least it did for me anyway.

Oh and you don't need the zmud.CurrentSession, just zMudCommand on it's own is sufficient.
_________________
Taz :)
Reply with quote
danwold
Newbie


Joined: 26 Mar 2006
Posts: 5

PostPosted: Mon Mar 27, 2006 7:08 pm   Thanks Taz
 
Works Great, also, Is it possible to color text sent to window before hand?
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Mon Mar 27, 2006 10:48 pm   
 
Just put in something similar to "%ansi(high,red)" in the array part, you will end up with an extra space in the final output though.
_________________
Taz :)
Reply with quote
danwold
Newbie


Joined: 26 Mar 2006
Posts: 5

PostPosted: Mon Mar 27, 2006 11:26 pm   
 
Example? I tried putting it into the array before the Text I wanted colored, but it didnt work, error'ed out
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Tue Mar 28, 2006 1:02 am   
 
zMudCommand sendwindow, array("OOC",vbWho,"said:","%ansi(high,red)",vbSaid)

Make sure the window name is the first item in the array, you can put the ansi codes after that.
_________________
Taz :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net