|
help with lua
サーバ: Asura
Game: FFXI
Posts: 27
By Asura.Xxpoure 2022-08-05 17:34:18
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?
サーバ: Asura
Game: FFXI
Posts: 160
By Asura.Kuroganashi 2022-08-05 17:50:52
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
Game: FFXI
Posts: 27
By Asura.Xxpoure 2022-08-05 18:04:11
i have this in my lua mate but it doesnt change the colour of the in game text
サーバ: Asura
Game: FFXI
Posts: 176
By Asura.Yottaxa 2022-08-06 00:39:39
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.
By kishr 2022-08-06 02:54:01
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.
By cuddlyhamster 2022-08-06 03:33:57
if you use battlemod, can type in //bm colortest
will display text color options and the number associated with them.
サーバ: Asura
Game: FFXI
Posts: 27
By Asura.Xxpoure 2022-08-06 05:26:43
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
Game: FFXI
Posts: 27
By Asura.Xxpoure 2022-08-06 05:33:14
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
サーバ: Lakshmi
Game: FFXI
Posts: 912
By Lakshmi.Elidyr 2022-08-06 08:47:03
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
Game: FFXI
Posts: 27
By Asura.Xxpoure 2022-08-06 10:29:28
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
サーバ: Valefor
Game: FFXI
Posts: 13
By Valefor.Erhagorn 2022-08-06 10:48:10
Lakshmi.Elidyr
サーバ: Lakshmi
Game: FFXI
Posts: 912
By Lakshmi.Elidyr 2022-08-06 10:51:52
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
Game: FFXI
Posts: 27
By Asura.Xxpoure 2022-08-06 11:49:36
thank you and thank you all for the help
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?
|
|