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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Tue Mar 11, 2003 9:20 am   

Another toy, makes you talk backwards!!!
 
Hey i was working on a nother project a cam across this:

#CLASS {forwardback}
#VAR new {}
#VAR new2 {}
#VAR newc {}
#ONINPUT {(%W) sc (*)} {#var new2 "";#var new %replace(%2," ","|");#var newc %numitems(@new);#loop @newc,1 {#addi new2 %item(@new,%i)};#var new2 %replace(@new2,"|"," ");%1 @new2}
#CLASS 0

It lets you "say sc anything you want"
say want you anything
get the idea?

Ok hey fun kiddies Smile

megamog75
Reply with quote
galldron
Novice


Joined: 08 Nov 2002
Posts: 34
Location: Elanthia

PostPosted: Fri May 16, 2003 6:53 am   
 
okie works great so far only one problem it first speaks backward then speaks forward prempted with sc any thoughts
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Sat May 17, 2003 7:24 pm   
 
Yes the second line that is preentered by Sc is just what was typed in so you can see it yourself and should not be sent to the mud.

I don't think that it is sent but I will check and get back to you.

Thank you

megamog75
Keeper of the only printable help files for Zmud.
Reply with quote
galldron
Novice


Joined: 08 Nov 2002
Posts: 34
Location: Elanthia

PostPosted: Sun May 18, 2003 7:31 am   
 
I use dragonrealms and so far it seems to be sending to the mud
Reply with quote
Noboyuki
Beginner


Joined: 27 Jul 2001
Posts: 17

PostPosted: Wed May 21, 2003 1:16 am   
 
Did you ever Figure out how to get around haveing the Sc sentence sent to the mud with this script?
Reply with quote
psyborg
Beginner


Joined: 12 May 2003
Posts: 24

PostPosted: Thu May 22, 2003 7:54 pm   
 
change it to something other than "say?" maybe /say or something. since say is a command the server will parse. I dunno, just an Idea.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Fri May 23, 2003 10:44 pm   
 
I have reviewed your request and while I am going to give you a fixed version that does not goto the mud keep in mind I created it for people it to goto the mud to have fun with.

_________________________________________________________

#CLASS {forwardback}
#VAR new {}
#VAR new2 {}
#VAR newc {}
#TRIGGER {%w sc (*)} {#var new2 "";#var new "%1";#var new %replace(%1," ","|");#var newc %numitems(@new);#loop @newc,1 {#addi new2 %item(@new,%i)};#var new2 %replace(@new2,"|"," ");#gag;#echo @new2}
#CLASS 0

_______________________________________________________________________________


megamog75
Keeper of the only printable help files for Zmud.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 09, 2003 5:38 pm   
 
Did you actually change something or are you just so impressed with your own scripts you can't bear to not have them at the top of the list? Please stop the spam.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Sat Sep 13, 2003 3:34 am   
 
I had a problem with my other program that colors them for this forum, when using it the program duplicated certain patterns and this one just happend to have acouple others only had one or two.

SO I fixed it, using edit, it is not my fault the forum put it on top of the list.

I undertsand your spam comment, but pleas do not drink too much and reply to finished forums unless you have a real question and are wanting some pointers. Thank you.

Love you.
Reply with quote
Backu
Novice


Joined: 24 Feb 2003
Posts: 36
Location: USA

PostPosted: Wed Oct 01, 2003 12:56 pm   
 
Make sure you set the trigger to be a command input trigger, as Megamog75 seems to have failed to point that little thing out.

-Backu Zethara
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Nov 28, 2007 8:29 pm   
 
Ok, I see what everyone's problem with this is, and wow! its SOO simple.
In the original post he had (%W), in the "fixed" version he had %w without
the paren, and it should be (%w)! so simply copy and paste the original
post's code to zMUD's command line, lowercase the W, and press enter.

Now if you want, you can talk backwards using any communication channel/command
on the MUD with the exception of tell (because it would have 2 words before the sc)

For instance:
chat sc I like to talk backwards
would then (sent to MUD)
chat backwards talk to like I
What a silly misunderstanding. :)

Here is the proper code (With a new class name)
Code:

#CLASS {BackwardsSpeech}
#VAR new {}
#VAR new2 {}
#VAR newc {}
#ONINPUT {(%w) sc (*)} {#var new2 "";#var new %replace(%2," ","|");#var newc %numitems(@new);#loop @newc,1 {#addi new2 %item(@new,%i)};#var new2 %replace(@new2,"|"," ");%1 @new2}
#CLASS 0
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Leyline
Wanderer


Joined: 03 Feb 2007
Posts: 64

PostPosted: Wed Jan 16, 2008 4:32 am   
 
Here is a way to make it an alias.
Tells work,
and all other single channel send chats.
Enter this in a new alias window like
TalkBack, then you can do "talkback say I like apples and bannanas" or "talkback tell myBuddy I like apples and bannanas"

#if (%1 = "tell") {
#var BackLineOut {%1 %2}
#var BackLineIn %replace( %-3, " ", "|")
} {
#var BackLineOut %1
#var BackLineIn %replace( %-2, " ", "|")
}
#loop %numitems( @BackLineIn),1 {#var BackLineOut %additem( %item( @BackLineIn, %{i}), @BackLineOut)}
#var BackLineOut %replace( @BackLineOut, "|", " ")
#say @BackLineOut


Modified Replace #additem with the %additem function, as #additem does not allow duplicates,
This would also be a bug in the posts above, they should use %additem() also.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Jan 16, 2008 4:49 am   
 
You'll want to change the command on line 10 of that alias from #say to #exec, but other than that, it looks good.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Leyline
Wanderer


Joined: 03 Feb 2007
Posts: 64

PostPosted: Wed Jan 16, 2008 6:57 pm   
 
Oh yes sorry I was just running it to test for myself.

I would like to ask,
why would I use #exec
instead of just putting the command on it's own line.
I see alias with
#var target %1
#exec say @target

what benefit does that have overjust putting
#var target %1
say @target


is it because some people have parse commands off, but #exec forces parse?
(I keep parse command line on because I name my bags @a = large-mailbag and I like to say open @a;put all @a)
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Jan 16, 2008 7:10 pm   
 
In that case, you don't need #exec. In the case where you're doing #exec @BackLineOut, using the exec is good practice.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Oct 15, 2008 2:59 am   
 
I wrote this script a really long time ago, I think some of the problems with the original script was the fact that I only wrote them for one Mudd and did not make them more versatile.

I just want to say thanks to everyone who has helped it to keep working. Thanks!
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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