Toribash
Original Post
[REL] Gradients
This script is like Twister, but with a twist - you get to choose the gradients!
Big thank you to Kyat and lsl, who helped a lot. This is my first script, so I needed it.
Edit: Thanks to yoyo for finding my mistake.

Instructions for gradients2.lua:
1. Go to www.toribash.com/colors.txt
2. Find the color you want for the primary gradient, and type (/ec color number) without parentheses in the chat box, then press enter.
3. Repeat for the secondary gradient.
4. Press = to set the gradients.

Instructions for gradients3.lua:
1. Go to www.toribash.com/colors.txt
2. Find the number to the left of the color you want for the primary gradient, and type (/ec color name) without parentheses in the chat box, then press enter.
3. Repeat for the secondary gradient.
4. Press = to set the gradients.
Attached Files
gradients2.lua (890 Bytes, 48 views)
gradients3.lua (2.9 KB, 38 views)
Last edited by supahninja; Jan 16, 2011 at 11:14 PM.
colors = {}
colors['white'] = 1
colors['none'] = 0
colors['red'] = 2
colors['dark_red'] = 3
colors['blue'] = 4
colors['dark_blue'] = 5
colors['purple'] = 6
colors['black'] = 7
colors['grey'] = 8
colors['static'] = 9
colors['green'] = 10
colors['neptune'] = 11
colors['ecto'] = 12
colors['spring'] = 13
colors['violet'] = 14
colors['pink'] = 15
colors['copper'] = 16
colors['skin'] = 17
colors['light_orange'] = 18
colors['brown'] = 19
colors['blood'] = 20
colors['juryo'] = 21
colors['aurora'] = 22
colors['hold'] = 23
colors['hold_active'] = 24
colors['fracture'] = 25
colors['acid'] = 26
colors['amethyst'] = 27
colors['aqua'] = 28
colors['bronze'] = 29
colors['demon'] = 30
colors['dragon'] = 31
colors['elf'] = 32
colors['gold'] = 33
colors['marine'] = 34
colors['noxious'] = 35
colors['orc'] = 36
colors['quicksilver'] = 37
colors['radioactive'] = 38
colors['sapphire'] = 39
colors['toxic'] = 40
colors['vampire'] = 41
colors['chronos'] = 42
colors['gaia'] = 43
colors['gladiator'] = 44
colors['hydra'] = 45
colors['pharos'] = 46
colors['sphinx'] = 47
colors['titan'] = 48
colors['typhon'] = 49
colors['pure'] = 50
colors['shaman'] = 65
colors['azurite'] = 62
colors['void'] = 85
colors['raptor'] = 58
colors['supernova'] = 71
colors['amber'] = 61
colors['viridian'] = 64
colors['crimson'] = 57
colors['platinum'] = 87
colors['imperial'] = 86
colors['cobra'] = 89
colors['beetle'] = 92
colors['plasma'] = 59
colors['adamantium'] = 75
colors['ivory'] = 97
colors['camo'] = 101
colors['magnetite'] = 102
colors['vulcan'] = 104
colors['tyrian'] = 107
colors['helios'] = 123
colors['velvet'] = 115
colors['hotpink'] = 105
colors['maya'] = 109
colors['persia'] = 114
colors['alphaimperial'] = 110
colors['raider'] = 106
colors['olive'] = 124
colors['kevlar'] = 108
colors['demolition'] = 113
colors['warrior'] = 116
colors['mysterio'] = 118
colors['superfly'] = 120
colors['knox'] = 121
colors['OldGold'] = 100
colors['hunter'] = 95
This could be helpful if you upgrade to allow people to type the color's name rather than the color's id.
Thank you. I'll try to add that in.
Edit: Updated code. Now you type /ec (color name) instead of /ec (color number).
I haven't tested it yet, but it should work.
I'll update the first post, too.
--Original script: Twister
--This Version (choose gradients) made by: SupahNinja
--Help from: kyat, lsl, and yoyo
echo("go to www.toribash.com/colors.txt")
echo("find the color you want for the primary gradient, and type, /ec (color here), then press enter")
echo("repeat for the secondary gradient")
echo("press tab to see more lines")
echo("press = to set the gradients")
colors = {}
colors['white'] = 1
colors['none'] = 0
colors['red'] = 2
colors['dark_red'] = 3
colors['blue'] = 4
colors['dark_blue'] = 5
colors['purple'] = 6
colors['black'] = 7
colors['grey'] = 8
colors['static'] = 9
colors['green'] = 10
colors['neptune'] = 11
colors['ecto'] = 12
colors['spring'] = 13
colors['violet'] = 14
colors['pink'] = 15
colors['copper'] = 16
colors['skin'] = 17
colors['light_orange'] = 18
colors['brown'] = 19
colors['blood'] = 20
colors['juryo'] = 21
colors['aurora'] = 22
colors['hold'] = 23
colors['hold_active'] = 24
colors['fracture'] = 25
colors['acid'] = 26
colors['amethyst'] = 27
colors['aqua'] = 28
colors['bronze'] = 29
colors['demon'] = 30
colors['dragon'] = 31
colors['elf'] = 32
colors['gold'] = 33
colors['marine'] = 34
colors['noxious'] = 35
colors['orc'] = 36
colors['quicksilver'] = 37
colors['radioactive'] = 38
colors['sapphire'] = 39
colors['toxic'] = 40
colors['vampire'] = 41
colors['chronos'] = 42
colors['gaia'] = 43
colors['gladiator'] = 44
colors['hydra'] = 45
colors['pharos'] = 46
colors['sphinx'] = 47
colors['titan'] = 48
colors['typhon'] = 49
colors['pure'] = 50
colors['shaman'] = 65
colors['azurite'] = 62
colors['void'] = 85
colors['raptor'] = 58
colors['supernova'] = 71
colors['amber'] = 61
colors['viridian'] = 64
colors['crimson'] = 57
colors['platinum'] = 87
colors['imperial'] = 86
colors['cobra'] = 89
colors['beetle'] = 92
colors['plasma'] = 59
colors['adamantium'] = 75
colors['ivory'] = 97
colors['camo'] = 101
colors['magnetite'] = 102
colors['vulcan'] = 104
colors['tyrian'] = 107
colors['helios'] = 123
colors['velvet'] = 115
colors['hotpink'] = 105
colors['maya'] = 109
colors['persia'] = 114
colors['alphaimperial'] = 110
colors['raider'] = 106
colors['olive'] = 124
colors['kevlar'] = 108
colors['demolition'] = 113
colors['warrior'] = 116
colors['mysterio'] = 118
colors['superfly'] = 120
colors['knox'] = 121
colors['OldGold'] = 100
colors['hunter'] = 95
gradientcolor = set_gradient_color
a,b = 0,0
it = 0
add_hook('console', '', function(s,i)
 if (s:find("%d%d?%d?")) then
  it=it+1
  if (it==1) then
   a=colors[s]
   echo("Color 1 = " .. colors[a])
  elseif (it==2) then
   b=colors[s]
   echo("Color 2 = " .. colors[b])
   it=0
  end
  return 1
 end
end)
local function key_up(key)
 if key == string.byte('=') then
  primarygradient = a
  secondarygradient = b
    end
gradientcolor(0, primarygradient, secondarygradient)
end
add_hook("key_up","key_up",key_up)
Last edited by supahninja; Jan 16, 2011 at 11:12 PM.