Staredit Network

Staredit Network -> Computers and Technical -> Color Pack
Report, edit, etc...Posted by O)FaRTy1billion on 2005-12-19 at 00:03:46
Update
Version 1.1
Change: Downloads file to StealthBot folder and runs from there.

When I was adding scripts to my bot, I found that there are very few (8) VB colors. So I decided to go out there and make a larger list of colors (140).
(I probably did a very n00b job for something as simple as this)

Normal script:
CODE
Set ColorPack_FSO = CreateObject("Scripting.FileSystemObject")
Sub Event_Load()
If Not ColorPack_FSO.FileExists(BotPath() & "VbsColors.dat") Then
addChat 64636, "ÿcbDownloading ColorPack 1.1… Please wait."
PrintURLToFile "VbsColors.dat","http://venus.walagata.com/w/farty1billion/VbsColors.dat"
addChat 64636, "ÿcbDownloading Complete!"
End If
Set File = ColorPack_FSO.OpenTextFile(BotPath()&"VbsColors.dat",1)
executeglobal(File.ReadAll)
File.Close
Call ReloadColors()
End Sub


For a bot with the Plugin script (ColorPack.plug or whatever):
CODE
'ColorPack
'1.1
Set ColorPack_FSO = CreateObject("Scripting.FileSystemObject")
Sub ColorPack_Event_Load()
End Sub
Sub ColorPack_Event_LoadDisplay()
If Not ColorPack_FSO.FileExists(BotPath() & "VbsColors.dat") Then
addChat 64636, "ÿcbDownloading ColorPack 1.1… Please wait."
PrintURLToFile "VbsColors.dat","http://venus.walagata.com/w/farty1billion/VbsColors.dat"
addChat 64636, "ÿcbDownloading Complete!"
End If
Set File = ColorPack_FSO.OpenTextFile(BotPath()&"VbsColors.dat",1)
executeglobal(File.ReadAll)
File.Close
Call ReloadColors()
End Sub


If you ever need to reload the colors, just put "ReloadColors" or "Call ReloadColors()" in your script. (Or make something to do that).

Anything that needs a color (Such as AddChat) you can use this.
Example:
CODE
addchat cadetblue, "omg!"


Internet required to use this. Every time you reload script or open the bot, it needs to download the file. Only downloads once.
[Filesize: 5.44 KB (5,573 bytes)]

Edit: Did I mention this is for Bots unless you want to make it for a program?

[codebox]Color list:
aliceblue
antiquewhite
aqua
aquamarine
azure
beige
bisque
black
blanchedalmond
blue
blueviolet
brown
burlywood
cadetblue
chartreuse
chocolate
coral
cornflowerblue
cornsilk
crimson
cyan
darkblue
darkcyan
darkgoldenrod
darkgray
darkgreen
darkkhaki
darkmagenta
darkolivegreen
darkorange
darkorchid
darkred
darksalmon
darkseagreen
darkslateblue
darkslategray
darkturquoise
darkviolet
deeppink
deepskyblue
dimgray
dodgerblue
firebrick
floralwhite
forestgreen
fuchsia
gainsboro
ghostwhite
gold
goldenrod
gray
green
greenyellow
honeydew
hotpink
indianred
indigo
ivory
khaki
lavender
lavenderblush
lawngreen
lemonchiffon
lightblue
lightcoral
lightcyan
lightgoldenrod
lightgreen
lightgray
lightpink
lightsalmon
lightseagreen
lightskyblue
lightslategray
lightsteelblue
lightyellow
lime
limegreen
linen
magenta
maroon
mediumaquamarine
mediumblue
mediumorchid
mediumpurple
mediumseagreen
mediumslateblue
mediumspringgreen
mediumturquoise
mediumvioletred
midnightblue
mintcream
mistyrose
moccasin
navajowhite
navy
oldlace
olive
olivedrab
orange
orangered
orchid
palegoldenrod
palegreen
paleturquoise
palevioletred
papayawhip
peachpuff
peru
pink
plum
powderblue
purple
red
rosybrown
royalblue
saddlebrown
salmon
sandybrown
seagreen
seashell
sienna
silver
skyblue
slateblue
slategray
snow
springgreen
steelblue
tan
teal
thistle
tomato
turquoise
violet
wheat
white
whitesmoke
yellow
yellowgreen[/codebox]

EDIT: Color list now in color! biggrin.gif
Report, edit, etc...Posted by www.com.au on 2005-12-19 at 09:52:48
Wow awesome job.

how long did it take you to script it and then list all the colour on vb? jeez!'

good job. keep it up, this is handy. maybe you could ask stealth if he could implement something similair in the next revision..
Report, edit, etc...Posted by O)FaRTy1billion on 2005-12-19 at 17:21:03
A few hours for two days. I still need to submit it to StealthBot.net wink.gif
Report, edit, etc...Posted by O)FaRTy1billion on 2006-01-01 at 03:23:08
Update
Version 1.1
Change: Downloads file to StealthBot folder and runs from there. (Thanks to raylu for pointing out "PrintURLToFile")
(Tested with Plugin System, still need to test without.)

Only downloads once.
[Filesize: 5.44 KB (5,573 bytes)]

(For the Script, go to the first post.)
Next Page (1)