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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
diehard2k0
Beginner


Joined: 17 Aug 2008
Posts: 25

PostPosted: Mon Dec 06, 2010 5:13 am   

Capture every command sent?
 
Is there a way i can capture the first word of every command i send?
Like if it 'tell BLAH this or that' it will store 'tell' into a variable
then if i 'mount horse' it will replace 'tell' with 'mount' for everything i send that is.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Mon Dec 06, 2010 9:37 am   
 
Code:
<trigger type="Command Input" priority="10" id="319">
  <pattern>^((%w)*)$</pattern>
  <value>$lastCommand=%1
$firstWord=%2
myCommandList=%additem($lastCommand, @myCommandList)
</value>
</trigger>


That will store the entire command to a list, you can change the $localVar used in the %additem function if you really only want the first word.
_________________
Discord: Shalimarwildcat
Reply with quote
diehard2k0
Beginner


Joined: 17 Aug 2008
Posts: 25

PostPosted: Mon Dec 06, 2010 10:23 am   Re: Capture every command sent?
 
Thanks a million.
Reply with quote
diehard2k0
Beginner


Joined: 17 Aug 2008
Posts: 25

PostPosted: Tue Dec 07, 2010 4:52 am   
 
Is there a way this can be redone to only take commands i send the mud, and not triggers?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Tue Dec 07, 2010 8:10 am   
 
Not that I can think of. There is no way currently to differentiate the source of the entered command.
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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