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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Is this idea of mine possible, if so how?

Is this idea of mine possible, if so how?

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


Posted by Simimi   (40 posts)  [Biography] bio
Date Wed 29 Aug 2007 04:26 AM (UTC)
Message
Under Triggers in mush there are toggle-able matching criterion, two of which are matching in colours. Would there be anyway to say, have an alias randomise or a function randomise() that would randomize all the triggers I have to match on certain colours, and then have them be displayed that way also?

I'm just wondering if this is possible to cut down on illusions and other such things. I wouldn't think it would be, or if it is it is way out of my knowledge league, since the mud displays the triggers in its own colour.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 29 Aug 2007 04:29 AM (UTC)
Message
I don't quite understand what you are trying to do here. You want things that arrive from the MUD to be displayed in a random colour scheme? Or match on randomly-selected colours? (I can't see why you would want this)

- Nick Gammon

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

Posted by Simimi   (40 posts)  [Biography] bio
Date Reply #2 on Wed 29 Aug 2007 04:31 AM (UTC)

Amended on Wed 29 Aug 2007 07:25 AM (UTC) by Nick Gammon

Message
Quote:

I don't quite understand what you are trying to do here. You want things that arrive from the MUD to be displayed in a random colour scheme? Or match on randomly-selected colours? (I can't see why you would want this)


I mean like, I want the triggers I have to be displayed in a random colour scheme and match on that same scheme, to prevent triggers from firing incorrectly, such as when someone illusions a common trigger line, for example.
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #3 on Wed 29 Aug 2007 04:45 AM (UTC)
Message
It is possible to match colour schemes with the style info. Depending on how complicated the colour schemes are, it should just take a simple match between the colours and what is saved. The script function would still be called, but you would have it do nothing in the case of a wrong colour.

function example( sTrig, sLine, wildcards, style )
  if style[1].textcolour == matchcolour then
    print( 'trigger work done here.' )
  end
end

You could also just change the colour a trigger matches on by using the SetTriggerOption function.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Simimi   (40 posts)  [Biography] bio
Date Reply #4 on Wed 29 Aug 2007 04:47 AM (UTC)
Message
Yea but the triggers coming from the mud wouldn't be that colour... would they? They would be in the colour the system prints in, a sort of grayish text colour...
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #5 on Wed 29 Aug 2007 05:02 AM (UTC)
Message
Triggers match on what the server sends to the client, not what is eventually displayed on screen. If you press alt-6 a menu pops up which shows how the ANSI colours are displayed. Selecting a colour from the "match on" dropdown menu matches these colours. The style info also matches what is sent from the mud, but I believe you have to translate the colours into RGB values for the style[x].colourtext

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Simimi   (40 posts)  [Biography] bio
Date Reply #6 on Wed 29 Aug 2007 12:53 PM (UTC)
Message
Ok so. A person can illusion a common triggered line like...

 You have regained balance. 


They can also illusion in any colour they want. I am hoping to find a way to colour my triggers such that their illusions won't trigger my triggers because they are the wrong colour. But the triggers still need to fire from the mud. I'm not sure this is possible or if I am explaining the idea correctly as I imagine it...
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #7 on Wed 29 Aug 2007 03:55 PM (UTC)
Message
The colours that come from the mud server are all that matter. If you can select what colour these messages are on the server, then you can just have the trigger match that colour. If someone does happen to get the exact same colour as you have sent to you normally, there really is no way to have the client tell the difference. This is something that would fool people, so it's going to fool the client. The best advice I could offer is to have various flags set to check for status affects. If you receive a message in the correct colour saying that you have regained balance, the script will check to see if you were off balance to begin with. Granted, a skilled player will make sure to have only messages that will be very difficult for people to tell if they are fake or not.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Cadari   (25 posts)  [Biography] bio
Date Reply #8 on Wed 29 Aug 2007 05:49 PM (UTC)

Amended on Wed 29 Aug 2007 05:54 PM (UTC) by Cadari

Message
Do I misunderstand something? When your opponent weaves an illusion of You have regained balance, it is exactly the same as if you regained it in normal way. In both cases you receive the string from a MUD server, so if you'll colour this message, the illusion would be coloured just as well.

The two only ways to beat illusions in Lusternia are playing with affliction classes (turn off warrior-related stuff when fighting a mage) and comparing what you have done to what you was going to do (if your muscles unlock while you didn't send focus body, that's an illusion).
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #9 on Wed 29 Aug 2007 06:19 PM (UTC)
Message
Quote:
The two only ways to beat illusions in Lusternia are playing with affliction classes (turn off warrior-related stuff when fighting a mage) and comparing what you have done to what you was going to do (if your muscles unlock while you didn't send focus body, that's an illusion).

This is exactly what I was saying about setting up a set of flags to check and see if you actually have whatever status affect the illusion is mimicking.

Quote:
When your opponent weaves an illusion of You have regained balance, it is exactly the same as if you regained it in normal way. In both cases you receive the string from a MUD server, so if you'll colour this message, the illusion would be coloured just as well.

I don't really see how having the messages random colours would help then. All it would do would be to change what colour you see the messages in, without helping you differentiate between the real and illusionary ones.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Simimi   (40 posts)  [Biography] bio
Date Reply #10 on Sat 01 Sep 2007 09:03 AM (UTC)
Message
I see... Hrm. Thanks for everything everyone I appreciate the help once again!
[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.


23,411 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 HostDash]