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
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Wed Jun 18, 2008 1:52 am   

Use of a range in an ansi trigger
 
I wish to use an ansi trigger to
#tag name
in Aetolia.

I use the mudbot mapper, which means ATCP is stripped. I want to use the onRoomEnter event for something not at all related to mapping.

%e[33m*.
This as a trigger pattern works, but I'm not sure I really want to use * in this way.

%e[33m[A-z'].
would be perfect, but I think that in an ansi trigger, [ cannot be used for a range.


Alternatively, I tried configuring the mapper to work without ATCP. It worked flawlessly, but the onRoomEnter event only gets raised when entering an already mapped room. Since I have no wish to map the whole game, this route seems to be a dead and for me.


Does anyone have advice?


Maybe if I explain what I actually want this for. Three classes in Aetolia give some fairly nasty afflictions (biles) that cannot be cured until you are not in the same room as the person that gave them to you. Along with everyone else in the game, I move;cure;move back. I would prefer to have onRoomEnter call my curing automatically for this. There are other possible uses for this if I could get it working, such as automatically leaving the constant-aeon mode (retardation vibe) when the event is raised.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed Jun 18, 2008 2:29 am   
 
First off to use this you would past the XML into the tree view and it will create a simple ANSI trigger that you CAN use a range in.
You simply have to put a ~ before the [ in the ANSI tag. Then the range will work.
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger priority="10" ansi="true" copy="yes">
    <pattern>%e~[33m[A-z']</pattern>
    <value>#show %stripansi(%Trigger)</value>
  </trigger>
</cmud>

If you KNEW that the color %e[33m was only ever sent from the mud when you get a room name then you could create a multi-state trigger or even raise the onroomenter event yourself.

I used #show instead of tag as a reminder that you could examine the whole line once the trigger fired without having to capture anything with (*) *shrugs*
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Wed Jun 18, 2008 2:26 pm   
 
Hm.

Thanks for that Smile
_________________
Athlon 64 3200+
Win XP Pro x64
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