[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Format description
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Format description

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Hadar   (3 posts)  [Biography] bio
Date Sun 22 Jan 2017 06:19 AM (UTC)
Message
I have been all over the place

Not exactly sure if possible without making a function then calling the function, but I was wondering if there was a way to "format" a description, i basically don't want my "help file" to be one color.

I am pretty sure ill have to do a function, just wanted to check before i set it up though
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Sun 22 Jan 2017 12:28 PM (UTC)

Amended on Sun 22 Jan 2017 12:34 PM (UTC) by Fiendish

Message
More information needed. What description?

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sun 22 Jan 2017 09:04 PM (UTC)
Message
Are you coding a MUD server? And you want the help files to be shown in various colours? Then embed colour codes inside the help. What is usually done in this case is to use easy-to-use sequences (eg. @R for bold red, and @r for dim red, @G for bold green, etc.) and then have the server do a find-and-replace to change them to ANSI colour sequences.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Hadar   (3 posts)  [Biography] bio
Date Reply #3 on Mon 23 Jan 2017 04:51 AM (UTC)
Message
was talking about this part in the code:


<description trim="y">
<![CDATA[
Just use the command predict to take a guess at the next hour of double
]]>
</description>


that way i can just call the function to display it, i ended up making a function:


function HadarHelp()
	ColourNote("#159FE5","","+---------------------------------","Green","","[","Cyan","","D","Teal","","ouble ","Cyan","","P","Teal","","redictor","Green","","]","#159FE5","","---------------------------------+")
	ColourNote("#159FE5","","|"..string.format("%84s"," ").."|")
	ColourNote("#159FE5","","|","#E55B15","",string.format("%-19s"," Predict <Channel>"),"#159FE5","","-","#F1D566","",string.format("%-64s"," Outputs an estimate to a channel when double might happen"),"#159FE5","","|")
	ColourNote("#159FE5","","|"..string.format("%84s"," ").."|")
	ColourNote("#159FE5","","+"..string.rep("-",84).."+")
end



I mean if there is an easier way, then ill do it, if not ill just add the function to all my scripts
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Mon 23 Jan 2017 05:43 AM (UTC)
Message
OK, that description is shown if you click on "Show Info" in the plugins list.

It is also echoed by the default alias made by the plugin wizard (for your "help" action).

For example:

function OnHelp ()
Note (GetPluginInfo (GetPluginID (), 3))
end

Plugin info 3 is the contents of that description box.


However you can of course make your own help action (like you have already) which shows lots of colours. I think some plugin writers do that already.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,774 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]