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
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Tue Jan 07, 2003 11:26 pm   

Help with an alias/trigger combo
 
alias colgos -->

#math tempsay
#loop %len( "%-1") {#if (%random( 1)=0) {#math tempsay @tempsay+%C%random( 1, 7)+%copy( "%-1", %i, 1)} {#math tempsay @tempsay+%B%random( 1, 7)+%copy( "%-1", %i, 1)}}
gossip @tempsay


so colgos blah
makes me gossip blah, each letter a different color =)

Now i wanted to make it more usable for other channels then gossip.

alias -> colgos
#echo Color This!

so i type colgos tell tom - hi

thought trigger should be Color this! (*) - (*)

#math tempsay
#loop %len( "%-1") {#if (%random( 1)=0) {#math tempsay @tempsay+%C%random( 1, 7)+%copy( "%-1", %i, 1)} {#math tempsay @tempsay+%B%random( 1, 7)+%copy( "%-1", %i, 1)}}
%1 @tempsay

This is probably something easy, but I'm just learning these commands too....


(eventually i'll know them all...hell will freeze over, but i will =) )


Edwub the Mage
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Jan 08, 2003 12:49 am   
 
Hello I am kind of new too and I have only been doing this about a year but thanks I had a lot of fun with this one. I put it in a folder called color. JUst make a new folder and in class script cut and past whole thing.

megamog75
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Wed Jan 08, 2003 12:53 am   
 
The problem has to do with setting the first tempsay.



Edwub the Mage
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Jan 08, 2003 1:05 am   
 
Ok i posted a script but it did not work right,but after a nother hour i finally got it. Istead of useing "colgos" use "color"

#CLASS {color}
#ALIAS colgos {#math tempsay;#loop %len( "%-1") {#if (%random( 1)=0) {#math tempsay @tempsay+%C%random( 1, 7)+%copy( "%-1", %i, 1)} {#math tempsay @tempsay+%B%random( 1, 7)+%copy( "%-1", %i, 1)}};@pretext @tempsay}
#VAR tempsay {%C1a%B1l%C1l%C2 %C7f%B6a%C4l%C6l%C2 %B7d%B6o%C6w%B6n}
#VAR pretext {we}
#TRIGGER {color (%w) (*)} {#gag;#var pretext %1;colgos %2}
#CLASS 0

Cut and past this to a new folder in the class scripts tab. Assume that all @var are located within this class.

have fun I am posting this to the finished mud scripts, for the world to love.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jan 08, 2003 4:15 am   
 
I haven't analyzed your alias, but possible problems from a quick glance include:
%C%random( 1, 7)
You should probably use a ~ before %C, since % is a special character.

colgos tell Tom - hi
It's probably a bad idea to use math symbols, such as the minus sign, with an alias that relies heavily on the #MATH command.

You don't seem to be doing any actual math, so #MATH probably isn't the best choice.

LightBulb
Senior Member
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