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
RobMacAF
Apprentice


Joined: 09 Jun 2002
Posts: 186
Location: USA

PostPosted: Thu Jul 29, 2004 4:26 am   

Changing You's to I's, etc
 
In my mud I am able to predict peoples future and its given to me in a vision, What I want is to beable to have a script that will tell the people what I say, but say it to them, not as I see it....

I want an alias that starts is pred
When I run it it will take %1 and save it as @PredictName

Then when I get the prediction it will switch some words around and read it back to them

This is an example of a prediction


After a few moments, the mists of time begin to part.
You see Etrina eviscerating a yi latagi.
You see snow falling upon a high, stony mountain.
You see a full Xibar, shining high in the night sky.
A sudden feeling of warmth pervades your soul.
You sense the visions involve using light blunt weapons.

I want it to be say this to them...


After a few moments, the mists of time begin to part.
I see you eviscerating a yi latagi.
I see snow falling upon a high, stony mountain.
I see a full Xibar, shining high in the night sky.
A sudden feeling of warmth pervades my soul.
I sense the visions involve using light blunt weapons.


I know this should be fairly easy, prolly having it trigger on AFTER A FEW MOMENTS, that will be the same with every prediction. Then capture each line into maybe a string list...then change the Yous to I's and the person's name to You's....but I am not sure on all that. ANy help would be great.
The only thing that is the same with all predictions is the first line
Reply with quote
SCORNME
Novice


Joined: 25 Jul 2004
Posts: 48
Location: aka Falan

PostPosted: Thu Jul 29, 2004 7:37 am   Re: Changing You's to I's, etc
 
RobMacAF wrote:
In my mud I am able to predict peoples future and its given to me in a vision, What I want is to beable to have a script that will tell the people what I say, but say it to them, not as I see it....

I want an alias that starts is pred
When I run it it will take %1 and save it as @PredictName


What's the MUD command to start your prediction?
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Thu Jul 29, 2004 9:21 am   
 
#class Prediction 0
#TRIGGER {(*)} {#var Prediction {%additem("%1",@Prediction)}}
#class 0
#ALIAS pred {#var PredictName {%1};predict}
#TRIGGER {After a few moments, the mists of time begin to part.} {#var Prediction %null;#Alarm +3 {#forall %replace(%replace(%replace(@Prediction,"your","my"),"You ","I "),@PredictName,"you") {say %i};#T- Prediction}}
#COND {*} {#T+ Prediction}
Reply with quote
SCORNME
Novice


Joined: 25 Jul 2004
Posts: 48
Location: aka Falan

PostPosted: Thu Jul 29, 2004 10:08 am   
 
In reference to just the replace and say part, can #SUB and #SEND be used for this? For example, would

#SUB You I
#TRIG {^(*).$} {#SEND %1}

replace each 'You' with 'I', capture all the text, and send it to the MUD with all the changes?
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Thu Jul 29, 2004 1:38 pm   
 
Scornme, you need to use #PSUB to substitute You for I in a line. #SUB will substitute the entire matchine line with I. Secondly, if "You" occurs twice in a line, it'll only Substitute the first occurence.
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