-- Entire script by ChrisFurry. -- Welcome to version 2 where i make them animate on other screens -- Don't want duplicates to cause errors. if(rawget(_G,"Ouch_MakeSkinColorAnimated"))then print("Lua script terminated to prevent errors, Eyesore Colors has already been added.") return end local asc_timer = 0 local animated_skin_colors = {} local function MakeSkinColorAnimated(color_id,tic_delay) animated_skin_colors[color_id] = { ramp = {}, delay = 0 } animated_skin_colors[color_id].delay = tic_delay end local function SkinColorAddRamp(color_id,...) if(animated_skin_colors[color_id] == nil)then MakeSkinColorAnimated(color_id,3) end local ramptable = animated_skin_colors[color_id].ramp for j,i in ipairs({...}) do if(type(i) ~= "table")then continue end if(#i ~= 16)then continue end ramptable[#ramptable + 1] = i end end -- Literally this line and the add hooks are the only new changes local function ASCThink() -- im just adding reducevfx support lol local limited = CV_FindVar("reducevfx").value; if limited then asc_timer = $+0 else asc_timer = $+1 for i,u in pairs(animated_skin_colors) do local t_ramp = u["ramp"] local new_index = (asc_timer / u.delay) % #t_ramp skincolors[i].ramp = t_ramp[new_index + 1] end end end -- Only reason im adding this is because i'm unsure if skin colors need -- to be same on server & client. addHook("NetVars",function(n) asc_timer = n($) end) addHook("PostThinkFrame",ASCThink) addHook("IntermissionThinker",ASCThink) addHook("VoteThinker",ASCThink) -- Make these global functions that other scripts can use rawset(_G,"Ouch_MakeSkinColorAnimated",MakeSkinColorAnimated) rawset(_G,"ASC_SkinColorAddRamp",SkinColorAddRamp) -- And the var too rawset(_G,"asc_animated_skin_colors",animated_skin_colors) freeslot( "SKINCOLOR_BECHOLODESCENT", "SKINCOLOR_BECNICKELODEON", "SKINCOLOR_BECZXSPECTRUM", "SKINCOLOR_BECGRAPEJELLY", "SKINCOLOR_BECAQUAFRESH", "SKINCOLOR_BECSTUDIOPOLIS" ) skincolors[SKINCOLOR_BECHOLODESCENT] = { name = "Holodescent", ramp = {73,72,83,81,1,145,145,146,140,64,177,201,203,203,192,195}, invcolor = SKINCOLOR_PLAGUE, invshade = 3, chatcolor = V_SKYMAP, accessible = true } skincolors[SKINCOLOR_BECNICKELODEON] = { name = "Nickelodeon", ramp = {0,80,88,99,98,99,66,53,53,55,67,68,79,237,239,31}, invcolor = SKINCOLOR_TAFFY, invshade= 5, chatcolor = V_PERIDOTMAP, accessible = true } skincolors[SKINCOLOR_BECZXSPECTRUM] = { name = "ZX Spectrum", ramp = {255,255,255,255,112,112,112,181,181,35,35,35,35,152,152,152}, invcolor = SKINCOLOR_BLACK, invshade = 1, chatcolor = V_WHITEMAP, accessible = true } skincolors[SKINCOLOR_BECGRAPEJELLY] = { name = "Grape Jelly", ramp = {0,252,200,201,202,202,182,182,183,183,184,184,185,167,167,168}, invcolor = SKINCOLOR_LEMONADE, invshade = 10, chatcolor = V_PURPLEMAP, accessible = true } skincolors[SKINCOLOR_BECAQUAFRESH] = { name = "Aquafresh", ramp = {0,1,2,3,120,131,133,135,136,137,33,34,37,38,60,61}, invcolor = SKINCOLOR_AQUAMARINE, invshade = 7, chatcolor = V_AQUAMAP, accessible = true } skincolors[SKINCOLOR_BECSTUDIOPOLIS] = { name = "Studiopolis", ramp = {84,84,84,188,98,98,98,220,180,180,180,146,129,129,129,121}, invcolor = SKINCOLOR_RED, invshade = 3, chatcolor = V_PINKMAP, accessible = true} Ouch_MakeSkinColorAnimated(SKINCOLOR_BECSTUDIOPOLIS,7) ASC_SkinColorAddRamp(SKINCOLOR_BECSTUDIOPOLIS, {84,84,84,188,98,98,98,220,180,180,180,146,129,129,129,121}, {121,121,121,84,188,188,188,98,220,220,220,180,146,146,146,129}, {129,129,129,121,84,84,84,188,98,98,98,220,180,180,180,146}, {146,146,146,129,121,121,121,84,188,188,188,98,220,220,220,180}, {180,180,180,146,129,129,129,121,84,84,84,188,98,98,98,220}, {220,220,220,180,146,146,146,129,121,121,121,84,188,188,188,98}, {98,98,98,220,180,180,180,146,129,129,129,121,84,84,84,188}, {188,188,188,98,220,220,220,180,146,146,146,129,121,121,121,84})