[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]  Item Identifier
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Item Identifier

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page


Posted by Xandler   (3 posts)  [Biography] bio
Date Thu 07 Dec 2017 09:39 PM (UTC)
Message
Hopefully this is possible, but I don't know...basically I made an item identifier that brings the stats of certain item, throws it in a variable based off a trigger match then an alias calls that variable(s) into a say string...but one little caveat is, I want it to copy the color code of whatever the item is. I'm also using the copy color output (with the colors switched to match the colors of the mud). Is there a way to call the copy color plugin into this?
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Thu 07 Dec 2017 11:35 PM (UTC)

Amended on Thu 07 Dec 2017 11:37 PM (UTC) by Fiendish

Message
Quote:
Is there a way to call the copy color plugin into this?


Yes, but that kind of contamination is generally a bad idea. It's better to move color handling code out of that plugin and into a lua module and then use it in both places.

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

Posted by Nick Gammon   Australia  (21,324 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Fri 08 Dec 2017 12:22 AM (UTC)
Message
Xandler said:

Hopefully this is possible, but I don't know...basically I made an item identifier that brings the stats of certain item, throws it in a variable ...


Almost anything is possible, but it is unclear what you are trying to do. Can you explain more clearly, with examples?

- Nick Gammon

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

Posted by Xandler   (3 posts)  [Biography] bio
Date Reply #3 on Fri 08 Dec 2017 01:20 AM (UTC)
Message
Hard to show examples but basically when I identify an item it throws it into the variable (but its just plain with no color codes), I want to throw it into the variable with the full color code.

What it currently does: Truffle Armor

What I want: &14T&06ruffl&14e&15 A&16rmor&07&07

This would return the said item into whatever the color code it's set to within the mud.
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #4 on Fri 08 Dec 2017 03:32 AM (UTC)

Amended on Fri 08 Dec 2017 11:10 PM (UTC) by Fiendish

Message
It sounds like Xandler wants something like
https://github.com/fiendish/aardwolfclientpackage/blob/b700ea3228ebbd12da514b3db63530fbe23a281d/MUSHclient/worlds/plugins/aardwolf_colors.lua#L160

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

Posted by Nick Gammon   Australia  (21,324 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Fri 08 Dec 2017 06:20 AM (UTC)
Message
See the forum post: http://www.gammon.com.au/forum/?id=7818

That lets you find the colour of an item in a style run, given its column. So if you make the trigger call a script (and not just send-to-script) then you have access to the style runs which includes the colour information.

So as suggested in the above thread, if you searched for "Truffle Armor" you can find what column that starts, and then use the "getstyle" module to find the colour at that column. If the colour changes during the name you could increment the column by one to find the next colour and so on.

Then you could save those colours along with the name. That would give you RGB colour codes, which you could interpret back into the colours used by the MUD (if wanted).

- 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.


127 views.

You need to log onto the forum to reply or create new threads.

  [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]