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


Joined: 16 Feb 2001
Posts: 57

PostPosted: Wed Mar 19, 2003 6:04 am   

zChat with MM2k - Colors
 
Hi,

Is there an easy way to send color codes with zChat to MM2k? I've always used zMUD as my mud client, but I used MM2k as my chat client.
At first I wrote out some scripts with %ansi() but that turned out that the colors were just grey in MM2k.

After playing around with different possiblities such as sending the @ForeRed() commands through the chat and escape codes..
Escape codes worked :p

#VAR ForeRed {}
#VAR ForeGreen {}
#VAR ForeYellow {}
#VAR ForeBlue {}
#VAR ForeMagenta {}
#VAR ForeCyan {}
#VAR ForeWhite {}

Those return the escape codes of the bolded colors.
[Oh actually.. I've been using @ForeRed() like in MM2k, but I guess @ForeRed would work by itself. @{ForeRed} would probably be better when adding on text]

Is there any way easier than that? I guess it doesn't really matter to me now that I've got something that works.

Also, zMUD parser doesn't like this, but it works. This function takes 2 parameters (hp, hpmax or mana, manamax) and figures out which color to choose for it.
#VAR zChatColor {%if(%1 = %2, @ForeWhite(), %if( %1*100/%2 > 75, @ForeCyan(), %if( %1*100/%2 > 50, @ForeGreen(), %if( %1*100/%2 > 25, @ForeYellow(), @ForeRed()))))}
I use it in my chat alias: @zChatColor(@zChatHP,@zChatHPMax)@zChatHP
Also, it got evaluated (as it should I suppose) when I imported the script to another character.

And on a completely different topic.. because zMUD comes with 3 licenses, couldn't I share my orderID with a friend? (hehe.. have to start making sure that I unlicense before upgrading the betas :P)
I've gotten some MM2k users interested in zMUD with the scripts I've been writing, but they don't want to pay for zMUD.
I guess I could pay a third copy of zMUD for my friend or something like that ;)

HariKari
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Mar 19, 2003 5:03 pm   
 
With regards to sharing your orderID:

The registration document clearly states, "zMUD is licensed to a single user." This would be a specific violation of the registration agreement.

In addition, it's a bad idea because there's nothing you could do to prevent your "friend" from using your registration on a second or even a third computer, as your licenses expired, thereby preventing you from using it at all. All that would be necessary is for him to try to register a computer between the moment your auto-expiration occurs and the time you next start zMUD and need that license yourself.

ZuggSoft already provides a free 30-day trial of zMUD. That's more than enough for your "friends" to decide if they find zMUD worth the cost. If they don't, there's no reason for you to help them steal it.

I don't know enough about MM2K to give you any advice on the colors.

LightBulb
Advanced Member
Reply with quote
HariKari
Wanderer


Joined: 16 Feb 2001
Posts: 57

PostPosted: Wed Mar 19, 2003 6:54 pm   
 
Ah, ok. I don't really know the other person, but he's in the same clan as the one I'm in for a mud. ;) He said that he installed and tried out for a day and uninstalled to test it out later.. but if I remember correctly.. from long time ago :p.. that the timer doesnt reset. :p oops

About MM2K, theres procedures such as @ForeWhite() @AnsiReset() @AnsiBold() @ForeGreen()
You can do something like..
/alias {chat %0} {/chatall @AnsiBold()@ForeWhite()$0 @ForeBlue()- @ForeRed()HariKari
Then I could do something like "chat hello all"
[Yes yes.. MM2k is very basic :p no pattern matching except for * but that's kinda off toppic. :P]

I looked through the source code and saw that the functions just converted those calls to the equivalent escape codes.

I guess the method that I'm using right now with the color variables is the best way to go without modifying the zChat code.

zChat would probably have to be modified to automatically convert %ansi(high,red) to %e[1;31m.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Mar 19, 2003 7:53 pm   
 
Well, if it was a version before 6.40 he is in luck since 6.40 resets the 30-day free trial. Even if it wasn't, there is also a 30-day complete refund period for zMUD. He (or you if you want) could pay for it, and if he doesn't like it, he can get his money back.

Kjata
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