Help With Lua

Language: JP EN DE FR
New Items
2022-08-11
329 users online
Forum » FFXI » Jobs » Corsair » help with lua
help with lua
 Asura.Xxpoure
Offline
Server: Asura
Game: FFXI
user: Xxpoure
Posts: 17
By Asura.Xxpoure 2022-08-05 17:34:18
Link | Quote | Reply
 
so im trying to do some thing that im unsure is possible

inn my cor lua it has the rolls and there lucky/unlucky numbers
so when i roll i get a text in game with the lucky/unlucky number for the roll... but the text is white and can get easy missed because of this ...

is there a way to change that colour so it shows in game as yellow or some thing like that?
By Asura.Kuroganashi 2022-08-05 17:50:52
Link | Quote | Reply
 
Asura.Xxpoure said: »
so im trying to do some thing that im unsure is possible

inn my cor lua it has the rolls and there lucky/unlucky numbers
so when i roll i get a text in game with the lucky/unlucky number for the roll... but the text is white and can get easy missed because of this ...

is there a way to change that colour so it shows in game as yellow or some thing like that?
Code
 if rollinfo then
        add_to_chat(104, spell.english..' provides a bonus to '..rollinfo.bonus..'.  Roll size: '..rollsize)
        add_to_chat(104, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
    end
 Asura.Xxpoure
Offline
Server: Asura
Game: FFXI
user: Xxpoure
Posts: 17
By Asura.Xxpoure 2022-08-05 18:04:11
Link | Quote | Reply
 
i have this in my lua mate but it doesnt change the colour of the in game text
 Asura.Yottaxa
Offline
Server: Asura
Game: FFXI
user: Yottaxa
Posts: 67
By Asura.Yottaxa 2022-08-06 00:39:39
Link | Quote | Reply
 
You should just have to change the “104”s to a different number. I seem to recall the colors are set to match your custom color scheme, so it can vary. I found a chart at one time that shows the matchups, (like shout equals what #), but cant find it right now - try some lower numbers like 4 or 6 etc.
Offline
Posts: 599
By kishr 2022-08-06 02:54:01
Link | Quote | Reply
 
I know it's not exactly what you are asking, I use a 2nd line in macro for it.

/echo --------------------------------------------------------------------------------------------- L # U #

echo is yellow

Puts the LU to the far right in the chat log, hard to miss.
Offline
Posts: 220
By cuddlyhamster 2022-08-06 03:33:57
Link | Quote | Reply
 
if you use battlemod, can type in //bm colortest
will display text color options and the number associated with them.
 Asura.Xxpoure
Offline
Server: Asura
Game: FFXI
user: Xxpoure
Posts: 17
By Asura.Xxpoure 2022-08-06 05:26:43
Link | Quote | Reply
 
kishr said: »
I know it's not exactly what you are asking, I use a 2nd line in macro for it.

/echo --------------------------------------------------------------------------------------------- L # U #

echo is yellow

Puts the LU to the far right in the chat log, hard to miss.


was thinking of using the echo but was hoping i could change the colour first ... if i cant then ech is still a good option
 Asura.Xxpoure
Offline
Server: Asura
Game: FFXI
user: Xxpoure
Posts: 17
By Asura.Xxpoure 2022-08-06 05:33:14
Link | Quote | Reply
 
Asura.Yottaxa said: »
You should just have to change the “104”s to a different number. I seem to recall the colors are set to match your custom color scheme, so it can vary. I found a chart at one time that shows the matchups, (like shout equals what #), but cant find it right now - try some lower numbers like 4 or 6 etc.

changed the 104 to 103 and the text is now yellow...

i cant find the codes for colours but this really helped so thank you
 Lakshmi.Elidyr
Offline
Server: Lakshmi
Game: FFXI
user: elii
Posts: 886
By Lakshmi.Elidyr 2022-08-06 08:47:03
Link | Quote | Reply
 
Using the example above, because you didn't post any code and I have no idea what you are dealing with. Any kind of example of what it says in your LUA would be nice.
Code
require('chat') -- Not needed if already included, or part of the file.
if rollinfo then
    add_to_chat(1, string.format("%s provides a bonus to %s. Rolls Size: %s", spell.english:color(258), rollinfo.bonus:color(258), rollsize:color(258)))
    add_to_chat(1, string.format("Lucky roll is %s, Unlucky roll is %s.", rollinfo.lucky:color(258), rollinfo.unlucky:color(258)))
end

This could be possibly be wrong due to a lot of things, but I don't have any of your sample code to determine so this should be a clear enough example.

Used this method as it doesn't limit you to users current colors for chat logs.
 Asura.Xxpoure
Offline
Server: Asura
Game: FFXI
user: Xxpoure
Posts: 17
By Asura.Xxpoure 2022-08-06 10:29:28
Link | Quote | Reply
 
Lakshmi.Elidyr said: »
Using the example above, because you didn't post any code and I have no idea what you are dealing with. Any kind of example of what it says in your LUA would be nice.
Code
require('chat') -- Not needed if already included, or part of the file.
if rollinfo then
    add_to_chat(1, string.format("%s provides a bonus to %s. Rolls Size: %s", spell.english:color(258), rollinfo.bonus:color(258), rollsize:color(258)))
    add_to_chat(1, string.format("Lucky roll is %s, Unlucky roll is %s.", rollinfo.lucky:color(258), rollinfo.unlucky:color(258)))
end

This could be possibly be wrong due to a lot of things, but I don't have any of your sample code to determine so this should be a clear enough example.

Used this method as it doesn't limit you to users current colors for chat logs.
Code
if rollinfo then
       add_to_chat(104, spell.english..' provides a bonus to '..rollinfo.bonus..'.  Roll size: '..rollsize)
       add_to_chat(104, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
   end

it was this code i had the issue with .. i just needed to change the ingame font colour from the lua ... changing the 104 to 103 changed the font colour from white to yellow... making it easyer to see in game
 Valefor.Erhagorn
Offline
Server: Valefor
Game: FFXI
Posts: 11
By Valefor.Erhagorn 2022-08-06 10:48:10
Link | Quote | Reply
 
https://www.ffxiah.com/forum/topic/49314/looking-for-font-color-hex-codes/
 Lakshmi.Elidyr
Offline
Server: Lakshmi
Game: FFXI
user: elii
Posts: 886
By Lakshmi.Elidyr 2022-08-06 10:51:52
Link | Quote | Reply
 
Asura.Xxpoure said: »
Lakshmi.Elidyr said: »
Using the example above, because you didn't post any code and I have no idea what you are dealing with. Any kind of example of what it says in your LUA would be nice.
Code
require('chat') -- Not needed if already included, or part of the file.
if rollinfo then
    add_to_chat(1, string.format("%s provides a bonus to %s. Rolls Size: %s", spell.english:color(258), rollinfo.bonus:color(258), rollsize:color(258)))
    add_to_chat(1, string.format("Lucky roll is %s, Unlucky roll is %s.", rollinfo.lucky:color(258), rollinfo.unlucky:color(258)))
end

This could be possibly be wrong due to a lot of things, but I don't have any of your sample code to determine so this should be a clear enough example.

Used this method as it doesn't limit you to users current colors for chat logs.
Code
if rollinfo then
       add_to_chat(104, spell.english..' provides a bonus to '..rollinfo.bonus..'.  Roll size: '..rollsize)
       add_to_chat(104, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
   end

it was this code i had the issue with .. i just needed to change the ingame font colour from the lua ... changing the 104 to 103 changed the font colour from white to yellow... making it easyer to see in game

Understood. I really want sure exactly what was needed, but using the chat library will ultimately give you a lot more flexibility and customization.
 Asura.Xxpoure
Offline
Server: Asura
Game: FFXI
user: Xxpoure
Posts: 17
By Asura.Xxpoure 2022-08-06 11:49:36
Link | Quote | Reply
 
thank you and thank you all for the help
Log in to post.