import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import javax.swing.border.EmptyBorder;

import org.rsbot.script.Script;
import org.rsbot.script.ScriptManifest;
import org.rsbot.util.GlobalConfiguration;

/**
 * @author BeanXMan
 * @version 1.5 (c)2009-2010 BeanXMan, No one except BeanXMan has the right to
 *          modify and/or spread this script without the permission of BeanXMan.
 *          I'm not held responsible for any damage that may occur to your
 *          property. Only download original version at
 *          http://www.binaryx.nl/beanman/XSingStarV2.java
 */
@ScriptManifest(authors = "BeanXMan", category = "#1 SingStar", name = "XSingStarV2", version = 1.5, description = "<html><head>"
		+ "</head><body style='font-family: Eurostile; margin: 10px;'>"
		+ "<center>Thanks for using my script!</center>"
		+ "<center></center>"
		+ "<center>-> Copyright (c) 2009-2010 BeanXMan<-</center>")
public class XSingStarV2 extends Script {

	public ScriptManifest properties = getClass().getAnnotation(
			ScriptManifest.class);

	SingGUI gui;

	public final File settingsFile = new File(new File(
			GlobalConfiguration.Paths.getSettingsDirectory()),
			"XSingStar Settings.txt");

	public int waitTime, selectedIndex = 9999;

	public boolean guiWait = true, slow, normal, fast, effectRandomized,
			effect2Randomized, restart, clanChat, randomizedSong, pause;

	public String effect, effect2, songString, effectString, effect2String,
			fastString, chatString;

	public String effectRandomizedString[] = { "", "cyan:", "red:", "white:",
			"green:", "purple:", "glow1:", "glow2:", "glow3:", "flash1:",
			"flash2:", "flash3:" };

	public String effect2RandomizedString[] = { "", "scroll:", "slide:",
			"shake:", "wave:", "wave2:" };

	public String songText[];

	public String rickroll[] = { "Song: Rick Astley - Never gonna give you up",
			"We’re no strangers to love,", "You know the rules and so do I.",
			"A full commitment’s what I’m thinking of,",
			"You wouldnt get this from any other guy.",
			"I just wanna tell you how I’m feeling,",
			"Gotta make you understand…", "Never gonna give you up,",
			"Never gonna let you down,",
			"Never gonna run around and desert you.",
			"Never gonna make you cry,", "Never gonna say goodbye,",
			"Never gonna tell a lie and hurt you.",
			"We’ve known each other for so long", "Your heart’s been aching",
			"But you’re too shy to say it.",
			"Inside we both know what’s been going on,",
			"We know the game and we’re gonna play it.",
			"Annnnnd if you ask me how I’m feeling,",
			"Don’t tell me you’re too blind to see…",
			"Never gonna give you up,", "Never gonna let you down,",
			"Never gonna run around and desert you.",
			"Never gonna make you cry,", "Never gonna say goodbye,",
			"Never gonna tell a lie and hurt you.", "Never gonna give you up,",
			"Never gonna let you down,",
			"Never gonna run around and desert you.",
			"Never gonna make you cry,", "Never gonna say goodbye,",
			"Never gonna tell a lie and hurt you.", "Never gonna give you up,",
			"Never gonna let you down,",
			"Never gonna run around and desert you.",
			"Never gonna make you cry,", "Never gonna say goodbye,",
			"Never gonna tell a lie and hurt you.",
			"We’ve known each other for so long", "Your heart’s been aching",
			"But you’re too shy to say it.",
			"Inside we both know what’s been going on,",
			"We know the game and we’re gonna play it.",
			"I just wanna tell you how I’m feeling,",
			"Gotta make you understand…", "Never gonna give you up,",
			"Never gonna let you down,",
			"Never gonna run around and desert you.",
			"Never gonna make you cry,", "Never gonna say goodbye,",
			"Never gonna tell a lie and hurt you.", "Never gonna give you up,",
			"Never gonna let you down,",
			"Never gonna run around and desert you.",
			"Never gonna make you cry,", "Never gonna say goodbye,",
			"Never gonna tell a lie and hurt you." };
	public String bananaphone[] = { "Song: Bananaphone",
			"Ring ring ring ring ring ring ring bananaphone",
			"Ring ring ring ring ring ring ring bananaphone",
			"I've got this feeling, so appealing",
			"For us to get together and sing, sing !",
			"Ring ring ring ring ring ring ring bananaphone",
			"Ding dong ding dong ding dong ding donanaphone",
			"It grows in bunches", "I've got my hunches",
			"It's the best, beats the rest",
			"Cellular, Modular, Interactive odular",
			"Ring ring ring ring ring ring ring bananaphone",
			"Ping pong ping pong ping pong ping pananaphone",
			"It’s no baloney", "It ain’t a phony",
			"My cellular, Bananularphone",
			"Don’t need quarters, don’t need dimes",
			"To call a friend of mine", "Don’t need computer or TV",
			"To have a real good time", "I call for pizza, I call my cat",
			"I call the White House, have a chat",
			"I place a call around the world",
			"Operator get me Beijing jing jing jing",
			"Ring ring ring ring ring ring ring bananaphone",
			"Ying yang ying yang ying yang ying yananaphone",
			"It’s a real live mama and papaphone",
			"A brother and a sister and a dogophone",
			"A grandpa phone and a grandma phone too, oh yeah",
			"My cellular, bananular phone", "Bananaphone, ring ring ring",
			"It’s a phone with a peel", "Bananaphone, ring ring ring ",
			"Now you can have your phone and eat", "it too",
			"Bananaphone, ring ring ring ", "This song drives me bananas!",
			"Bananaphone, ring ring ring….." };
	public String barbiegirl[] = { "Song: Barbie Girl", "- Hi Barbie!",
			"- Hi Ken!", "- You wanna go for a ride?", "- Sure, Ken!",
			"- Jump in!", "- Ha ha ha ha!",
			"I'm a Barbie girl in the Barbie world",
			"Life in plastic, it's fantastic",
			"You can brush my hair, undress me everywhere",
			"Imagination, life is your creation",
			"Come on, Barbie, let's go party",
			"I'm a Barbie girl in the Barbie world",
			"Life in plastic, it's fantastic",
			"You can brush my hair, undress me everywhere",
			"Imagination, life is your creation",
			"I'm a blonde single girl in the fantasy world",
			"Dress me up, take your time, I'm your dollie",
			"You're my doll, rock and roll, ", "feel the glamour and pain",
			"Kiss me here, touch me there, hanky-panky",
			"You can touch, you can play",
			"You can say I'm always yours, oooh whoa",
			"I'm a Barbie girl in the Barbie world",
			"Life in plastic, it's fantastic",
			"You can brush my hair, undress me everywhere",
			"Imagination, life is your creation",
			"Come on, Barbie, let's go party, ha ha ha, yeah",
			"Come on, Barbie, let's go party, oooh, oooh",
			"Come on, Barbie, let's go party, ha ha ha, yeah",
			"Come on, Barbie, let's go party, oooh, oooh",
			"Make me walk, make me talk, do whatever you please",
			"I can act like a star, I can beg on my knees",
			"Come jump in, be my friend, let us do it again",
			"Hit the town, fool around, let's go party",
			"You can touch, you can play", "You can say I'm always yours",
			"You can touch, you can play", "You can say I'm always yours",
			"Come on, Barbie, let's go party, ha ha ha, yeah",
			"Come on, Barbie, let's go party, oooh, oooh",
			"Come on, Barbie, let's go party, ha ha ha, yeah",
			"Come on, Barbie, let's go party, oooh, oooh",
			"I'm a Barbie girl in the Barbie world",
			"Life in plastic, it's fantastic",
			"You can brush my hair, undress me everywhere",
			"Imagination, life is your creation",
			"I'm a Barbie girl in the Barbie world",
			"Life in plastic, it's fantastic",
			"You can brush my hair, undress me everywhere",
			"Imagination, life is your creation",
			"Come on, Barbie, let's go party, ha ha ha, yeah",
			"Come on, Barbie, let's go party, oooh, oooh",
			"Come on, Barbie, let's go party, ha ha ha, yeah",
			"Come on, Barbie, let's go party, oooh, oooh",
			"- Oh, I'm having so much fun!",
			"- Well, Barbie, we're just getting started!",
			"- Oh, I love you Ken!" };
	public String wholetthedogsout[] = { "Song: Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out ?",
			"Well, the party was nice, the party was pumpin'", "Yippie yi yo",
			"And everybody havin' a ball", "Yippie yi yo",
			"I tell the fellas start the name callin'", "Yippie yi yo",
			"And the girls respond to the call", "I heard a woman shout out",
			"Who let the dogs out?", "Who, who, who, who, who?",
			"Who let the dogs out?", "Who, who, who, who, who?",
			"Who let the dogs out ?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out ?",
			"I see de dance people had a ball",
			"'Coz she really want to skip town",
			"Get back, Gruffy, back, Scruffy",
			"Get back you flea infested mongrel",
			"Gonna tell myself, 'Hey, man, no get angry'", "Yippie yi yo",
			"To any girls callin' them canine", "Yippie yi yo",
			"But they tell me,", "'Hey, man, it's part of the party?'",
			"Yippie yi yo", "You put a woman in front and her man behind",
			"I heard woman shout out", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out ?",
			"Who let the dogs out?", "Who, who, who, who, who?",
			"Who let the dogs out?", "Who, who, who, who, who?",
			"Who let the dogs out ?",
			"Say, a doggy is nuttin' if he don' have a bone",
			"All doggy, hold ya' bone, all doggy, hold it",
			"A doggy is nuttin' if he don' have a bone",
			"All doggy, hold ya' bone, all doggy, hold it",
			"Who let the dogs out?", "Who, who, who, who, who?",
			"Who let the dogs out?", "Who, who, who, who, who?",
			"Who let the dogs out ?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out ?",
			"I see de dance people had a ball",
			"'Coz she really want to skip town",
			"Get back, Gruffy, back, Scruffy",
			"Get back you flea infested mongrel",
			"Well, if I am a dog, the party is on",
			"I gotta get my groove 'cause my mind done gone",
			"Do you see the rays comin' from my eye",
			"Walkin' through the place that Digi-man", "is breakin' it down?",
			"Me and my white short shorts",
			"And I can't see color, any color will do",
			"I'll stick on you, that's why they call me 'Pit bull'",
			"'Cause I'm the man of the land",
			"When they see me they say, ?Who??", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out ?",
			"Who let the dogs out?", "Who, who, who, who, who?",
			"Who let the dogs out?", "Who, who, who, who, who?",
			"Who let the dogs out ?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out?",
			"Who, who, who, who, who?", "Who let the dogs out ?" };
	public String ymca[] = { "Song: Village People - YMCA",
			"Young man, there's no need to feel down.",
			"I said, young man, pick yourself off the ground.",
			"I said, young man, 'cause you're in a new town",
			"There's no need to be unhappy.",
			"Young man, there's a place you can go.",
			"I said, young man, when you're short on your dough.",
			"You can stay there, and I'm sure you will find",
			"Many ways to have a good time.",
			"It's fun to stay at the Y-M-C-A.",
			"It's fun to stay at the Y-M-C-A.",
			"They have everything that you need to enjoy,",
			"You can hang out with all the boys ...",
			"It's fun to stay at the Y-M-C-A.",
			"It's fun to stay at the Y-M-C-A.",
			"You can get yourself clean, you can have a good meal",
			"You can do whatever you feel ...",
			"Young man, are you listening to me?",
			"I said, young man, what do you want to be?",
			"I said, young man, you can make real your dreams.",
			"But you've got to know this one thing!",
			"No man does it all by himself.",
			"I said, young man, put your pride on the shelf,",
			"And just go there, to the Y.M.C.A.",
			"I'm sure they can help you today.",
			"It's fun to stay at the Y-M-C-A.",
			"It's fun to stay at the Y-M-C-A.",
			"They have everything that you need to enjoy,",
			"You can hang out with all the boys ...",
			"It's fun to stay at the Y-M-C-A.",
			"It's fun to stay at the Y-M-C-A.",
			"You can get yourself clean, you can have a good meal,",
			"You can do whatever you feel ...",
			"Young man, I was once in your shoes.",
			"I said, I was down and out with the blues.",
			"I felt no man cared if I were alive.",
			"I felt the whole world was so jive ...",
			"That's when someone came up to me,",
			"And said, young man, take a walk up the street.",
			"It's a place there called the Y.M.C.A.",
			"They can start you back on your way.",
			"It's fun to stay at the Y-M-C-A.",
			"It's fun to stay at the Y-M-C-A.",
			"They have everything that you need to enjoy,",
			"You can hang out with all the boys ...", "YMCA",
			"It's fun to stay at the Y-M-C-A",
			"Young man, young man there's no need to feel down",
			"Young man, young man pick yourself off the ground", "Y-M-C-A",
			"then just go to the Y-M-C-A",
			"young man, young man I was once in your shoes",
			"young man, young man I said,",
			"I was down and out with the blues.", "Y-M-C-A" };
	public String freshprinceofbelair[] = {
			"Song: The Fresh Prince Of Bel-Air",
			"Now, this is the story all about how",
			"My life got flipped-turned upside down",
			"And I'd like to take a minute", "Just sit right there",
			"I'll tell you how I became the prince",
			"of a town called Bel Air", "In west Philadelphia born and raised",
			"On the playground was where I spent most of my days",
			"Chillin' out maxin' relaxin' all cool",
			"And all shootin some b-ball outside of school",
			"When a couple of guys", "Who were up to no good",
			"Startin making trouble in my neighborhood",
			"I got in one little fight and my mom got scared",
			"She said 'You're movin' with your auntie",
			"and uncle in Bel Air'",
			"I begged and pleaded with her day after day",
			"But she packed my suite case and sent me on my way",
			"She gave me a kiss and then she gave me my ticket.",
			"I put my walkman on and said, 'I might as well kick it'.",
			"First class, yo this is bad",
			"Drinking orange juice out of a champagne glass.",
			"Is this what the people of Bel-Air living like?",
			"Hmmmmm this might be alright.",
			"But wait, I hear the prissy, booze, whine, all that",
			"Is this the type of place that they should send",
			"this cool cat?", "I don't think so", "I'll see when I get there",
			"I hope they're prepared for the prince of Bel-Air",
			"Well uh, the plane landed and when I came out",
			"There was a dude who looked like a cop standing",
			"there with my name out", "I ain't trying to get arrested yet.",
			"I just got here!",
			"I sprang with the quickness, like lightening disappeared",
			"I whistled for a cab and when it came near",
			"The license plate said fresh and it had dice", "in the mirror",
			"If anything I can say is that this cab was rare",
			"But I thought 'Man forget it' - 'Yo home to Bel Air'",
			"I pulled up to the house about seven or eight",
			"And I yelled to the cabbie 'Yo homes smell ya later'",
			"I looked to my kingdom", "I was finally there",
			"To sit on my throne as the Prince of Bel Air" };
	public String alwayslookonthebrightsideoflife[] = {
			"Song: Always look on the bright side of life",
			"Some things in life are bad", "They can really make you mad",
			"Other things just make you swear and curse.",
			"When you're chewing on life's gristle",
			"Don't grumble, give a whistle",
			"And this'll help things turn out for the best...",
			"And...always look on the bright side of life...",
			" Always look on the light side of life... ",
			"If life seems jolly rotten", "There's something you've forgotten",
			"And that's to laugh and smile and dance and sing.",
			"When you're feeling in the dumps", "Don't be silly chumps",
			"Just purse your lips and whistle - that's the thing.",
			"And...always look on the bright side of life...",
			" Always look on the light side of life... ",
			"For life is quite absurd", "And death's the final word",
			"You must always face the curtain with a bow.",
			"Forget about your sin - give the audience a grin",
			"Enjoy it - it's your last chance anyhow.",
			"So always look on the bright side of death",
			"Just before you draw your terminal breath ",
			"Life's a piece of shit", "When you look at it",
			"Life's a laugh and death's a joke, it's true.",
			"You'll see it's all a show", "Keep 'em laughing as you go",
			"Just remember that the last laugh is on you.",
			"And...always look on the bright side of life...",
			" Always look on the light side of life... ",
			"'Come on guys, cheer up!'",
			"Always look on the bright side of life...",
			"Always look on the bright side of life...",
			"'Worse things happen at sea, you know.'",
			"Always look on the bright side of life...",
			"'I mean - what have you got to lose?'",
			"'You know, you come from nothing", "you're going back to nothing",
			"What have you lost? Nothing!'",
			"Always look on the right side of life..." };
	public String allmyfriendsaredead[] = {
			"Song: Turbo Negro - All My Friends Are Dead",
			"Where're your friends?", "Where're your friends?",
			"Where are your friends, man?", "What? What? Where're my friends?",
			"All my friends are dead.", "All my friends are dead.",
			"They got kicked in the head,", "All my friends are dead.",
			"All my friends are dead.", "All my friends are dead.",
			"They got smacked in the head,", "All my friends are dead.",
			"I always knew that they would", "end up like today.",
			"They bought the bullet and they", "played with hand grenades.",
			"Hey!", "Hey!", "Hey!", "All my dreams were lies.",
			"All my dreams were lies.", "Lemme see the skies,",
			"All my dreams were lies.", "All my friends are dead.",
			"All my friends are dead.", "They got dragged outta bed,",
			"Now they're buried and they're dead.",
			"I always knew that they would", "end up like today.",
			"They bought the bullet and they", "payed with hand grenades.",
			"Hey!", "Hey!", "Hey!", "Fuckin' Eh!",
			"I always knew that they would", "end up like today.",
			"They bought the bullet and they", "payed with hand grenades.",
			"Now they're buried and they're dead!",
			"Now they're buried and they're dead!",
			"Now they're buried and they're dead!", "Dead!" };

	public String theinternetisforporn[] = { "Song: The Internet Is For Porn",
			"Finally I get to teach a whole lesson", "All by myself!",

			"And I'm gonna teach something relevant", "Something modern",
			"The Internet!",

			"The Internet is really really great", "- For porn",
			"I've got a fast connection, so I don't have to wait",
			"- For porn (huh?)", "There's always some new site", "- For porn",
			"I browse all day and night", "- For porn",
			"It's like I'm surfing at the speed of light",
			"- For porn (Trekkie)", "- The Internet is for porn (Trekkie!)",
			"- The Internet is for porn (What're you doing)",
			"- Why you think the net was born?", "- Porn, Porn, Porn!",

			"Trekkie!", "- Oh hello Katemonster", "You are ruining my song!",
			"- Oh, me sorry, me no mean to",
			"Well if you wouldn't mind, being quite please for a minute",
			"So I can finish?", "- Okidoki", "Good!",

			"I'm glad we have this new technology", "- For porn (uh!)",
			"It gives us untold opportunity!", "- For porn (uh! sorry)",
			"Search your own desktop (for, uh!)",
			"Research browse and shop (ih?)",
			"Until you've had enough and you're ready to stop",
			"- FOR PORN! (Trekkie)",

			"- The Internet is for porn (Nooo!)",
			"- The Internet is for porn (Trekkie!)",
			"- Me up all night, hugging me horn, to porn porn porn!",

			"That's gross!", "You're a pervert",
			"- Ah! Sticks and stones Katemonster",
			"No really, you're a pervert.",
			"Normal people don't sit at home and look at porn on the Internet",

			"- OHHH??!", "What?!",

			"- You have NO idea", "- Ready normal people?!",
			"(Ready!.. Ready!.. Ready!)", "- Let me hear it!",

			"- The Internet is for porn (Sorry Kate)",
			"- The Internet is for porn (And masterbaitin')",
			"- All these guys unzip their flies for porn porn porn",
			"The Internet is not for porn!",

			"- PORN! PORN!!", "Hold on a second! (Wrah)",
			"Now I happen to know for a fact",
			"That you, Rod check your portfolio and trades stocks online",
			"- That's correct", "And Brian, you buy things on Amazon.com",
			"- Sure", "And Gerry, you keep selling your possessions on Ebay",
			"- Yees I doo",
			"And Prinston, you sent me that sweet online birthday card",
			"- True!", "- Oohh but Kate, what you think he do after, hmm?",
			"- Yea (hmhmhm)", "EEEWWW!",

			"- The Internet is for porn (gross)",
			"- The Internet is for porn (I hate porn)",
			"Grab your dick, and double click for porn, porn, porn",
			"Porn (porn(porn(porn)))", "Porn (porn(porn(porn)))",
			"The Internet is for", "Internet is for", "Internet is for porn!" };

	public String pokerface[] = { "Song: Lady GaGa - Pokerface",
			"Mum mum mum mah", "Mum mum mum mah",
			"I wanna hold em' like they do in Texas Plays",
			"Fold em' let em' hit me raise it baby stay with me (I love it)",
			"Lovegame and intuition play the cards with Spades to start",
			"And after he's been hooked I'll play the one that's on his heart",
			"Oh, oh, oh, oh, ohhhh, ohh-oh-e-ohh-oh-oh",
			"I'll get him hot, show him what I've got",
			"Oh, oh, oh, oh, ohhhh, ohh-oh-e-ohh-oh-oh,",
			"I'll get him hot, show him what I've got", "Can't read my,",
			"Can't read my", "No he can't read my poker face",
			"(she’s got to love nobody)", "Can't read my", "Can't read my",
			"No he can't read my poker face", "(she’s got to love nobody)",
			"P-p-p-poker face, p-p-poker face", "(Mum mum mum mah)",
			"P-p-p fuck her face, p-p-p fuck her face", "(Mum mum mum mah)",
			"I wanna roll with him a hard pair we will be",
			"A little gambling is fun when you're with me I love it)",
			"Russian Roulette is not the same without a gun",
			"And baby when it's love if its not rough it isn't fun, fun",
			"Oh, oh, oh, oh, ohhhh, ohh-oh-e-ohh-oh-oh",
			"I'll get him hot, show him what I've got",
			"Oh, oh, oh, oh, ohhhh, ohh-oh-e-ohh-oh-oh,",
			"I'll get him hot, show him what I've got", "Can't read my,",
			"Can't read my", "No he can't read my poker face",
			"(she’s got to love nobody)", "Can't read my", "Can't read my",
			"No he can't read my poker face", "(she’s got to love nobody)",
			"P-p-p-poker face, p-p-poker face", "(Mum mum mum mah)",
			"P-p-p fuck her face, p-p-p fuck her face", "(Mum mum mum mah)",
			"I won't tell you that I love you", "Kiss or hug you",
			"Cause I'm bluffin' with my muffin",
			"I'm not lying I'm just stunnin' with my love-glue-gunning",
			"Just like a chick in the casino",
			"Take your bank before I pay you out",
			"I promise this, promise this",
			"Check this hand cause I'm marvelous", "Can't read my,",
			"Can't read my", "No he can't read my poker face",
			"(she’s got to love nobody)", "Can't read my", "Can't read my",
			"No he can't read my poker face", "(she’s got to love nobody)",
			"Can't read my,", "Can't read my",
			"No he can't read my poker face", "(she’s got to love nobody)",
			"Can't read my", "Can't read my", "No he can't read my poker face",
			"(she’s got to love nobody)", "Can't read my,", "Can't read my",
			"No he can't read my poker face", "(she’s got to love nobody)",
			"Can't read my", "Can't read my", "No he can't read my poker face",
			"(she’s got to love nobody)", "P-p-p-poker face, p-p-poker face",
			"(Mum mum mum mah)", "P-p-p fuck her face, p-p-p fuck her face",
			"(Mum mum mum mah)", "P-p-p-poker face, p-p-poker face",
			"(Mum mum mum mah)", "P-p-p fuck her face, p-p-p fuck her face",
			"(Mum mum mum mah)", "P-p-p-poker face, p-p-poker face",
			"(Mum mum mum mah)", "P-p-p fuck her face, p-p-p fuck her face",
			"(Mum mum mum mah)" };

	public String spongebobsquarepants[] = { "Song: Spongebob Squarepants",
			"Are ya ready kids?", "Aye, Aye captain!",
			"I can't heeeaaar yooouuu!", "AYE, AYE CAPTAIN!",
			"oooooooooooo.........", "Who lives in a pineapple under the sea?",
			"Sponge Bob Square Pants!",
			"Absorbent and yellow and porous is he.",
			"Sponge Bob Square Pants!",
			"If nautical nonsense be somethin' ya wish.",
			"Sponge Bob Square Pants!",
			"Then drop on the deck and flop like a fish.",
			"Sponge Bob Square Pants!", "Ready?", "Sponge Bob Square Pants,",
			"Sponge Bob Square Pants,", "Sponge Bob Square Pants,",
			"Sponge Booob Square Paaants!",
			"Ah Ha Ha, Ha Ha Ha, Ha, hArgh wh..arire..Ha arrrigh.", };

	public String pokemontheme[] = { "Song: Pokémon Theme",
			"I want to be the very best", "Like no one ever was",
			"To catch them is my real test", "To train them is my cause",
			"I will travel across the land", "Searchin' far and wide",
			"Each Pokemon to understand",
			"The power that's inside! (Power inside!)", "Pokemon!",
			"It's you and me.", "I know it's my destiny!", "Pokemon!",
			"Ooh you're my best friend", "In a world we must defend!",
			"Pokemon!", "A heart so true", "Our courage will pull us through",
			"You teach me and I'll teach you", "Pokemon!",
			"Gotta catch 'em Gotta catch 'em all!",
			"Every challenge along the way", "With courage I will face",
			"I will battle everyday", "To claim my rightful place!",
			"Come with me, the time is right!", "There's no better team",
			"Arm and arm, we'll win the fight!", "It's always been a dream!",
			"Pokemon!", "It's you and me.", "I know it's my destiny!",
			"Pokemon!", "Ooh you're my best friend",
			"In a world we must defend!", "Pokemon!", "A heart so true",
			"Our courage will pull us through",
			"You teach me and I'll teach you", "Pokemon", "Gotta catch 'em",
			"Pokemon!", "It's you and me.", "I know it's my destiny!",
			"Pokemon!", "Ooh you're my best friend",
			"In a world we must defend!", "Pokemon!", "A heart so true",
			"Our courage will pull us through",
			"You teach me and I'll teach you", "Pokemon!", "I'll catch you!",
			"(Gotta catch 'em Gotta catch 'em Gotta catch 'em all!", "Pokemon!" };

	public String pokemonteamrocket[] = { "Song: Pokémon - Team Rocket",
			"To protect the world from devestation",
			"To unite all peoples within our nation",
			"To denounce the evils of truth and love",
			"To extend our reach to the stars above", "Jesse and James",
			"Team Rocket, blastoff at the speed of light",
			"Surrender now or prepare to fight", "-Meowth, thats right", };

	public String tiktok[] = { "Song: Kesha - Tick Tock",
			"Wake up in the morning feeling like P Diddy",
			"(Hey, what up girl?)",
			"Grab my glasses, I'm out the door, I'm gonna hit this city",
			"(Lets go)",
			"Before I leave, brush my teeth with a bottle of Jack",
			"'Cause when I leave for the night, I ain't coming back",

			"I'm talking pedicure on our toes, toes",
			"Trying on all our clothes, clothes",
			"Boys blowing up our phones, phones",
			"Drop-topping, playing our favorite CDs",
			"Pulling up to the parties", "Trying to get a little bit tipsy",

			"Don't stop, make it pop", "DJ, blow my speakers up",
			"Tonight, I'mma fight", "'Til we see the sunlight",
			"Tick tock on the clock", "But the party don't stop, no",

			"Don't stop, make it pop", "DJ, blow my speakers up",
			"Tonight, I'mma fight", "'Til we see the sunlight",
			"Tick tock, on the clock", "But the party don't stop, no",

			"Ain't got a care in world, but got plenty of beer",
			"Ain't got no money in my pocket, but I'm already here",
			"And now, the dudes are lining up cause they hear we got swagger",
			"But we kick em to the curb unless they look like Mick Jagger",

			"I'm talking about everybody getting crunk, crunk",
			"Boys tryin' to touch my junk, junk",
			"Gonna smack him if he getting too drunk, drunk",

			"Now, now, we go until they kick us out, out",
			"Or the police shut us down, down", "Police shut us down, down",
			"Po-po shut us",

			"Don't stop, make it pop", "DJ, blow my speakers up",
			"Tonight, I'mma fight", "'Til we see the sunlight",
			"Tick tock on the clock", "But the party don't stop, no",

			"Don't stop, make it pop", "DJ, blow my speakers up",
			"Tonight, I'mma fight", "'Til we see the sunlight",
			"Tick tock on the clock", "But the party don't stop, no",

			"DJ, you build me up", "You break me down", "My heart, it pounds",
			"Yeah, you got me",

			"With my hands up", "You got me now", "You got that sound",
			"Yeah, you got me",

			"DJ, you build me up", "You break me down", "My heart, it pounds",
			"Yeah, you got me",

			"With my hands up", "Put your hands up", "Put your hands up",

			"Now, the party don't start 'til I walk in",

			"Don't stop, make it pop", "DJ, blow my speakers up",
			"Tonight, I'mma fight", "'Til we see the sunlight",
			"Tick tock on the clock", "But the party don't stop, no",

			"Don't stop, make it pop", "DJ, blow my speakers up",
			"Tonight, I'mma fight", "'Til we see the sunlight",
			"Tick tock on the clock", "But the party don't stop, no", };

	public String sweethomealabama[] = { "Song: Kid Rock - All Summer Long",
			"It was 1989 my thoughts were short", "my hair was long",
			"Caught somewhere between", "a boy and man,",
			"She was 17 and she was far", "from in-between",
			"It was summer-time in Northern Michigan",
			"Splashing through the sand-bar,", "talking by the camp fire,",
			"It's the simple things in life", "like when and where",
			"We didn't have no internet", "but man I never will forget",
			"The way the moon light shined upon her hair",
			"And, we were trying different things",
			"we were smoking funny things", "Making love out by the lake",
			"to our favorite song", "Sipping whisky out the bottle",
			"not thinking bout tomorrow",
			"Singing Sweet Home Alabama all summer long",
			"Singing Sweet Home Alabama all summer long",
			"Catching walleye from the dock",
			"watching the waves roll off the rocks",
			"She'll forever hold a spot inside my soul",
			"We blister in the sun", "we couldn't wait for night to come",
			"To hit that saving place of rock and roll",
			"While, we were trying different things",
			"we were smoking funny things", "Making love out by the lake",
			"to our favorite song", "Sipping whisky out the bottle",
			"not thinking bout tomorrow",
			"Singing Sweet Home Alabama all summer long",
			"Singing Sweet Home Alabama all summer long",
			"Now nothing seems as strange",
			"as when the leaves begin to change",
			"Or how we thought those days would never end",
			"Sometimes I hear that song", "and I start to sing along",
			"And think, Man I'd love to ", "see that girl again",
			"And, we were trying different things",
			"we were smoking funny things", "Making love out by the lake",
			"to our favorite song", "Sipping whisky out the bottle",
			"not thinking bout tomorrow",
			"Singing Sweet Home Alabama all summer long",
			"Singing Sweet Home Alabama all summer long",
			"We were trying different thing", "we were smoking funny things",
			"Making love out by the lake", "to our favorite song",
			"Sipping whisky out the bottle", "not thinking bout tomorrow",
			"Singing Sweet Home Alabama all summer long",
			"Singing Sweet Home Alabama all summer long",
			"Singing Sweet Home Alabama all summer long ",
			"Singing Sweet Home Alabama all summer long ",
			"Singing Sweet Home Alabama all summer long " };

	public String portalstillalive[] = { "Song: Portal - Still Alive",
			"This was a triumph.", "I'm making a note here:", "HUGE SUCCESS.",
			"It's hard to overstate my satisfaction.", "Aperture Science",
			"We do what we must", "because we can.",
			"For the good of all of us.", "Except the ones who are dead.",
			"But there's no sense crying", "over every mistake.",
			"You just keep on trying", "till you run out of cake.",
			"And the Science gets done.", "And you make a neat gun.",
			"For the people who", "are still alive", "I'm not even angry.",
			"I'm being so sincere right now", "Even though you broke my heart",
			"And killed me.", "And tore me to pieces",
			"And threw every piece into a fire.", "As they burned it hurt",
			"because I was so happy for you!", "Now these points of data",
			"make a beautiful line.", "And we're out of beta.",
			"We're releasing on time.", "So I'm GLaD. I got burned.",
			"Think of all the things we learned", "for the people",
			"Who are still alive", "Go ahead and leave me.",
			"I think I prefer to stay inside", "Maybe you'll find someone",
			"else to help you.", "Maybe Black Mesa", "THAT WAS A JOKE.",
			"HAHA. FAT CHANCE.", "Anyway, this cake is great.",
			"It's so delicious and moist.", "Look at me still talking",
			"when there's Science to do.", "When I look out there,",
			"it makes me GLaD I'm not you.", "I've experiments to run.",
			"There is research to be done",
			"On the people who are still alive.",
			"And believe me I am still alive.", "I'm doing Science",
			"and I'm still alive", "I feel FANTASTIC", "and I'm still alive.",
			"While you're dying", "I'll be still alive",
			"And when you're dead", "I will be still alive.", "STILL ALIVE",
			"STILL ALIVE" };

	public String wonderwall[] = { "Song: Oasis - Wonderwall",
			"Today is gonna be the day",
			"That there gonna throw it back to you",
			"By now you should've somehow", "Realized what you gotta do",
			"I don't believe that anybody", "Feels the way I do about you now",
			"Backbeat the word was on the street",
			"That the fire in your heart is out",
			"I'm sure you've heard it all before",
			"But you never really had a doubt",
			"I don't believe that anybody feels", "The way I do about you now",
			"And all the roads we have ", "to walk along are winding",
			"And all the lights that", "lead us there are blinding",
			"There are many things that I would", "Like to say to you",
			"I don't know how", "Because maybe",
			"You're gonna be the one who saves me ?", "And after all",
			"You're my wonderwall ", "Today was gonna be the day?",
			"But they'll never throw it back to you",
			"By now you should've somehow", "Realized what you're not to do",
			"I don't believe that anybody", "Feels the way I do",
			"About you now", "And all the roads we have ",
			"to walk along are winding", "And all the lights that",
			"lead us there are blinding", "There are many things that I would",
			"Like to say to you", "I don't know how", "Because maybe",
			"You're gonna be the one who saves me ?", "And after all",
			"You're my wonderwall ", "Because maybe",
			"You're gonna be the one who saves me ?", "And after all",
			"You're my wonderwall ", "You're gonna be the one that saves me",
			"You're gonna be the one that saves me",
			"You're gonna be the one that saves me" };

	public String fromyesterday[] = {
			"Song: 30 Seconds To Mars - From Yesterday",
			"He's a stranger to some", "and a vision to none",
			"He can never get enough,", "get enough of the one",
			"For a fortune, he'd quit but it's hard to admit",
			"How it ends and begins on", "his face is a map of the world",
			"A map of the world, on his", "face is a map of the world",
			"A map of the world",

			"From yesterday, it's coming", "From yesterday, the fear",
			"From yesterday, it calls him",
			"But he doesn't wanna read the message here",

			"On a mountain he sits, not of gold, but of sin",
			"Through the blood, he can", "learn see the life that it turn",
			"From council of one", "he'll decide when he's done",
			"With the innocent on his", "face is a map of the world",
			"A map of the world, on", "his face is a map of the world",
			"A map of the world",

			"From yesterday, it's coming", "From yesterday, the fear",
			"From yesterday, it calls him",
			"But he doesn't wanna read the message",
			"He doesn't wanna read the message",
			"He doesn't wanna read the message here",

			"On his face is a map of the world", "From yesterday, it's coming",
			"From yesterday, the fear", "From yesterday, it calls him",
			"But he doesn't wanna read the message here",

			"From yesterday, from yesterday", "From yesterday, the fear",
			"From yesterday, from yesterday",
			"But he doesn't wanna read the message",
			"He doesn't wanna read the message",
			"He doesn't wanna read the message here" };

	public String whatislove[] = { "Song: Haddaway - What is love?",
			"What is love", "Oh baby, don't hurt me", "Don't hurt me no more",
			"Oh, baby don't hurt me", "Don't hurt me no more",

			"What is love", "Yeah",

			"Oh, I don't know why you're not there",
			"I give you my love, but you don't care",
			"So what is right and what is wrong", "Gimme a sign",

			"What is love", "Oh baby, don't hurt me", "Don't hurt me no more",
			"What is love", "Oh baby, don't hurt me", "Don't hurt me no more",

			"Whoa whoa whoa, oooh oooh", "Whoa whoa whoa, oooh oooh",

			"Oh, I don't know, what can I do",
			"What else can I say, it's up to you",
			"I know we're one, just me and you", "I can't go on",

			"What is love", "Oh baby, don't hurt me", "Don't hurt me no more",
			"What is love", "Oh baby, don't hurt me", "Don't hurt me no more",

			"Whoa whoa whoa, oooh oooh", "Whoa whoa whoa, oooh oooh",

			"What is love, oooh, oooh, oooh", "What is love, oooh, oooh, oooh",

			"What is love", "Oh baby, don't hurt me", "Don't hurt me no more",

			"Don't hurt me", "Don't hurt me",

			"I want no other, no other lover", "This is your life, our time",
			"When we are together, I need you forever", "Is it love",

			"What is love", "Oh baby, don't hurt me", "Don't hurt me no more",
			"What is love", "Oh baby, don't hurt me",
			"Don't hurt me no more (oooh, oooh)",

			"What is love", "Oh baby, don't hurt me", "Don't hurt me no more",
			"What is love", "Oh baby, don't hurt me",
			"Don't hurt me no more (oooh, oooh)",

			"What is love?" };

	public boolean onStart(Map<String, String> args) {
		URLConnection url = null;
		BufferedReader in = null;
		BufferedWriter out = null;

		try {

			url = new URL("http://binaryx.nl/beanman/XSingStarV2VERSION.txt")
					.openConnection();

			in = new BufferedReader(new InputStreamReader(url.getInputStream()));

			if (Double.parseDouble(in.readLine()) > getVersion()) {

				if (JOptionPane.showConfirmDialog(null,
						"Update found. Do you want to update?") == 0) {

					JOptionPane
							.showMessageDialog(null,
									"Please choose 'XSingStarV2.java' in your RSBot scripts folder and hit 'Open'");
					JFileChooser fc = new JFileChooser();

					if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {

						url = new URL(
								"http://binaryx.nl/beanman/XSingStarV2.java")
								.openConnection();
						in = new BufferedReader(new InputStreamReader(url
								.getInputStream()));
						out = new BufferedWriter(new FileWriter(fc
								.getSelectedFile().getPath()));
						String inp;

						while ((inp = in.readLine()) != null) {
							out.write(inp);
							out.newLine();
							out.flush();
						}
						JOptionPane.showMessageDialog(null,
								"Script successfully downloaded");
						JOptionPane
								.showMessageDialog(null,
										"Now RECOMPILE everything in order to use the updated version !");

						return false;
					} else
						log("Update canceled");
				} else
					log("Update canceled");
			} else
				JOptionPane.showMessageDialog(null,
						"You have the latest version of XSingStarV2 :)");
			if (in != null)
				in.close();
			if (out != null)
				out.close();
		} catch (IOException e) {
			log("Problem getting version :/");
			return false;
		}

		try {
			settingsFile.createNewFile();
		} catch (final IOException ignored) {

		}

		gui = new SingGUI();
		gui.setVisible(true);
		while (guiWait) {
			wait(100);
		}
		return true;
	}

	@Override
	public int loop() {
		if (pause) {
			return random(50, 100);
		}

		restart = false;

		if (randomizedSong) {
			randomSong();
		}

		for (int i = 0; i < songText.length; i++) {
			if (restart) {
				return random(50, 100);
			}
			while (pause) {
				wait(random(50, 150));
			}
			sendText(songText[i]);
		}

		return random(25, 100);
	}

	public void sendText(String text) {
		if (clanChat) {
			input.sendKeys("/" + text, true, random(20, 40));
			wait(waitTime);
		} else if (effectRandomized && !effect2Randomized) {
			input.sendKeys(effectRandomizedString[random(0, 12)] + effect2
					+ text, true, random(20, 40));
			wait(waitTime);
		} else if (!effectRandomized && effect2Randomized) {
			input.sendKeys(effect + effect2RandomizedString[random(0, 6)]
					+ text, true, random(20, 40));
			wait(waitTime);
		} else if (effectRandomized && effect2Randomized) {
			input.sendKeys(effectRandomizedString[random(0, 12)]
					+ effect2RandomizedString[random(0, 6)] + text, true,
					random(20, 40));
			wait(waitTime);
		} else {
			input.sendKeys(effect + effect2 + text, true, random(20, 40));
			wait(waitTime);
		}
	}

	public double getVersion() {
		return properties.version();
	}

	public void openURL(final String url) {

		final String osName = System.getProperty("os.name");
		try {
			if (osName.startsWith("Mac OS")) {
				final Class<?> fileMgr = Class
						.forName("com.apple.eio.FileManager");
				final Method openURL = fileMgr.getDeclaredMethod("openURL",
						new Class[] { String.class });
				openURL.invoke(null, new Object[] { url });
			} else if (osName.startsWith("Windows")) {
				Runtime.getRuntime().exec(
						"rundll32 url.dll,FileProtocolHandler " + url);
			} else {
				final String[] browsers = { "firefox", "opera", "konqueror",
						"epiphany", "mozilla", "netscape" };
				String browser = null;
				for (int count = 0; count < browsers.length && browser == null; count++) {
					if (Runtime.getRuntime().exec(
							new String[] { "which", browsers[count] })
							.waitFor() == 0) {
						browser = browsers[count];
					}
				}
				if (browser == null) {
					throw new Exception("Could not find web browser");
				} else {
					Runtime.getRuntime().exec(new String[] { browser, url });
				}
			}
		} catch (final Exception e) {

		}
	}

	public void randomSong() {
		int r = random(0, 19);

		if (r == 0) {
			songText = rickroll;
		} else if (r == 1) {
			songText = bananaphone;
		} else if (r == 2) {
			songText = barbiegirl;
		} else if (r == 3) {
			songText = wholetthedogsout;
		} else if (r == 4) {
			songText = ymca;
		} else if (r == 5) {
			songText = freshprinceofbelair;
		} else if (r == 6) {
			songText = alwayslookonthebrightsideoflife;
		} else if (r == 7) {
			songText = allmyfriendsaredead;
		} else if (r == 8) {
			songText = theinternetisforporn;
		} else if (r == 9) {
			songText = pokerface;
		} else if (r == 10) {
			songText = spongebobsquarepants;
		} else if (r == 11) {
			songText = pokemontheme;
		} else if (r == 12) {
			songText = pokemonteamrocket;
		} else if (r == 13) {
			songText = tiktok;
		} else if (r == 14) {
			songText = sweethomealabama;
		} else if (r == 15) {
			songText = portalstillalive;
		} else if (r == 16) {
			songText = wonderwall;
		} else if (r == 17) {
			songText = fromyesterday;
		} else if (r == 18) {
			songText = whatislove;
		}
	}

	public class SingGUI extends JFrame {

		private static final long serialVersionUID = 1L;

		public SingGUI() {
			initComponents();
		}

		public void okButtonActionPerformed(ActionEvent e) {
			randomizedSong = false;
			if (comboBox1.getSelectedIndex() == 0) {
				randomizedSong = true;
			} else if (comboBox1.getSelectedIndex() == 1) {
				songText = rickroll;
				log("Song starting: RickRoll");
			} else if (comboBox1.getSelectedIndex() == 2) {
				songText = bananaphone;
				log("Song starting: BananaPhone");
			} else if (comboBox1.getSelectedIndex() == 3) {
				songText = barbiegirl;
				log("Song starting: Barbie Girl");
			} else if (comboBox1.getSelectedIndex() == 4) {
				songText = wholetthedogsout;
				log("Song starting: Who Let The Dogs Out");
			} else if (comboBox1.getSelectedIndex() == 5) {
				songText = ymca;
				log("Song starting: YMCA");
			} else if (comboBox1.getSelectedIndex() == 6) {
				songText = freshprinceofbelair;
				log("Song starting: The Fresh Prince Of Bel-Air");
			} else if (comboBox1.getSelectedIndex() == 7) {
				songText = alwayslookonthebrightsideoflife;
				log("Song starting: Always Look On The Bright Side Of Life");
			} else if (comboBox1.getSelectedIndex() == 8) {
				songText = allmyfriendsaredead;
				log("Song starting: Turbo Negro - All My Friends Are Dead");
			} else if (comboBox1.getSelectedIndex() == 9) {
				songText = theinternetisforporn;
				log("Song starting: The Internet Is For Porn");
			} else if (comboBox1.getSelectedIndex() == 10) {
				songText = pokerface;
				log("Song starting: Lady GaGa - Pokerface");
			} else if (comboBox1.getSelectedIndex() == 11) {
				songText = spongebobsquarepants;
				log("Song starting: SpongeBob Squarepants");
			} else if (comboBox1.getSelectedIndex() == 12) {
				songText = pokemontheme;
				log("Song starting: Pokémon Theme");
			} else if (comboBox1.getSelectedIndex() == 13) {
				songText = pokemonteamrocket;
				log("Song starting: Pokémon - Team Rocket Intro");
			} else if (comboBox1.getSelectedIndex() == 14) {
				songText = tiktok;
				log("Song starting: Kesha - Tick Tock");
			} else if (comboBox1.getSelectedIndex() == 15) {
				songText = sweethomealabama;
				log("Song starting: All summer long");
			} else if (comboBox1.getSelectedIndex() == 16) {
				songText = portalstillalive;
				log("Song starting: Portal Credits - Still alive");
			} else if (comboBox1.getSelectedIndex() == 17) {
				songText = wonderwall;
				log("Song starting: Oasis - Wonderwall");
			} else if (comboBox1.getSelectedIndex() == 18) {
				songText = fromyesterday;
				log("Song starting: 30 seconds to Mars - From Yesterday");
			} else if (comboBox1.getSelectedIndex() == 19) {
				songText = whatislove;
				log("Song starting: Haddaway - What is love");
			}

			if (selectedIndex != comboBox1.getSelectedIndex()) {
				restart = true;
			} else {
				restart = false;
			}

			selectedIndex = comboBox1.getSelectedIndex();

			if (comboBox2.getSelectedIndex() == 0) {
				effect = "";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 1) {
				effect = "cyan:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 2) {
				effect = "red:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 3) {
				effect = "white:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 4) {
				effect = "green:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 5) {
				effect = "purple:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 6) {
				effect = "glow1:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 7) {
				effect = "glow2:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 8) {
				effect = "glow3:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 9) {
				effect = "flash1:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 10) {
				effect = "flash2:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 11) {
				effect = "flash3:";
				effectRandomized = false;
			} else if (comboBox2.getSelectedIndex() == 12) {
				effectRandomized = true;
			}

			if (comboBox3.getSelectedIndex() == 0) {
				effect2 = "";
				effect2Randomized = false;
			} else if (comboBox3.getSelectedIndex() == 1) {
				effect2 = "scroll:";
				effect2Randomized = false;
			} else if (comboBox3.getSelectedIndex() == 2) {
				effect2 = "slide:";
				effect2Randomized = false;
			} else if (comboBox3.getSelectedIndex() == 3) {
				effect2 = "shake:";
				effect2Randomized = false;
			} else if (comboBox3.getSelectedIndex() == 4) {
				effect2 = "wave:";
				effect2Randomized = false;
			} else if (comboBox3.getSelectedIndex() == 5) {
				effect2 = "wave2:";
				effect2Randomized = false;
			} else if (comboBox3.getSelectedIndex() == 6) {
				effect2Randomized = true;
			}

			if (comboBox4.getSelectedIndex() == 0) {
				waitTime = 2700;
			} else if (comboBox4.getSelectedIndex() == 1) {
				waitTime = 2200;
			} else if (comboBox4.getSelectedIndex() == 2) {
				waitTime = 1700;
			}

			if (comboBox5.getSelectedIndex() == 0) {
				clanChat = false;
			} else if (comboBox5.getSelectedIndex() == 1) {
				clanChat = true;
			}

			songString = comboBox1.getSelectedItem().toString();
			effectString = comboBox2.getSelectedItem().toString();
			effect2String = comboBox3.getSelectedItem().toString();
			fastString = comboBox4.getSelectedItem().toString();
			chatString = comboBox5.getSelectedItem().toString();

			try {
				final BufferedWriter out = new BufferedWriter(new FileWriter(
						settingsFile));
				out.write(songString + ":" + effectString + ":" + effect2String
						+ ":" + fastString + ":" + chatString);
				out.close();
			} catch (final Exception e1) {
				e1.printStackTrace();
			}

			guiWait = false;
			pause = false;
		}

		public void pauseActionPerformed(ActionEvent e) {
			pause = !pause;
		}

		public void button2ActionPerformed(ActionEvent e) {
			openURL("http://www.rsbot.org/vb/showthread.php?p=3309365");
		}

		private void initComponents() {
			try {
				// JFormDesigner - Component initialization - DO NOT MODIFY
				// //GEN-BEGIN:initComponents
				dialogPane = new JPanel();
				contentPanel = new JPanel();
				comboBox1 = new JComboBox();
				label1 = new JLabel();
				okButton = new JButton();
				label2 = new JLabel();
				label4 = new JLabel();
				comboBox2 = new JComboBox();
				button1 = new JButton();
				label5 = new JLabel();
				comboBox3 = new JComboBox();
				button2 = new JButton();
				label6 = new JLabel();
				comboBox4 = new JComboBox();
				label3 = new JLabel();
				comboBox5 = new JComboBox();

				// ======== this ========
				setTitle("Advanced Song Selector V2");
				setResizable(false);
				setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
				setAlwaysOnTop(true);
				Container contentPane = getContentPane();
				contentPane.setLayout(new BorderLayout());

				// ======== dialogPane ========
				{
					dialogPane.setBorder(new EmptyBorder(12, 12, 12, 12));
					dialogPane.setLayout(new BorderLayout());

					// ======== contentPanel ========
					{
						contentPanel.setLayout(null);

						// ---- comboBox1 ----
						comboBox1
								.setModel(new DefaultComboBoxModel(
										new String[] {
												"[Randomized]",
												"RickRoll",
												"BananaPhone",
												"Barbie Girl",
												"Who Let The Dogs Out",
												"YMCA",
												"The Fresh Prince Of Bel-Air",
												"Always Look On The Bright Side Of Life",
												"Turbo Negro - All My Friends Are Dead",
												"The Internet Is For Porn",
												"Lady GaGa - Pokerface",
												"SpongeBob Squarepants",
												"Pokémon Theme",
												"Pokémon Team Rocket",
												"Kesha - Tick Tock",
												"'Sweet Home Alabama'",
												"Portal Credits - Still Alive",
												"Oasis - Wonderwall",
												"30 seconds to mars-From Yesterday",
												"Haddaway - What is love?" }));
						contentPanel.add(comboBox1);
						comboBox1.setBounds(new Rectangle(new Point(40, 0),
								comboBox1.getPreferredSize()));

						// ---- label1 ----
						label1.setText("Song");
						contentPanel.add(label1);
						label1.setBounds(new Rectangle(new Point(0, 2), label1
								.getPreferredSize()));

						// ---- okButton ----
						okButton.setText("START/CHANGE !");
						okButton.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent e) {
								okButtonActionPerformed(e);
							}
						});
						contentPanel.add(okButton);
						okButton.setBounds(5, 150, 120, okButton
								.getPreferredSize().height);

						// ---- label2 ----
						label2
								.setText("Settings can be changed while script is running!");
						label2.setFont(label2.getFont().deriveFont(
								label2.getFont().getStyle() | Font.ITALIC));
						contentPanel.add(label2);
						label2.setBounds(new Rectangle(new Point(15, 180),
								label2.getPreferredSize()));

						// ---- label4 ----
						label4.setText("Colour");
						contentPanel.add(label4);
						label4.setBounds(new Rectangle(new Point(0, 62), label4
								.getPreferredSize()));

						// ---- comboBox2 ----
						comboBox2.setModel(new DefaultComboBoxModel(
								new String[] { "yellow (regular text)", "cyan",
										"red", "white", "green", "purple",
										"glow1", "glow2", "glow3", "flash1",
										"flash2", "flash3", "[Randomized]" }));
						contentPanel.add(comboBox2);
						comboBox2.setBounds(40, 60, 210, comboBox2
								.getPreferredSize().height);

						// ---- button1 ----
						button1.setText("PAUSE/CONTINUE");
						button1.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent e) {
								pauseActionPerformed(e);
							}
						});
						contentPanel.add(button1);
						button1.setBounds(130, 150, 120, button1
								.getPreferredSize().height);

						// ---- label5 ----
						label5.setText("Effect");
						contentPanel.add(label5);
						label5.setBounds(new Rectangle(new Point(0, 92), label5
								.getPreferredSize()));

						// ---- comboBox3 ----
						comboBox3.setModel(new DefaultComboBoxModel(
								new String[] { "No effect", "scroll", "slide",
										"shake", "wave", "wave2",
										"[Randomized]" }));
						contentPanel.add(comboBox3);
						comboBox3.setBounds(40, 90, 210, comboBox3
								.getPreferredSize().height);

						// ---- button2 ----
						button2
								.setText(">> Say Thanks or request new songs here <<");
						button2.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent e) {
								button2ActionPerformed(e);
							}
						});
						contentPanel.add(button2);
						button2.setBounds(new Rectangle(new Point(0, 205),
								button2.getPreferredSize()));

						// ---- label6 ----
						label6.setText("Speed");
						contentPanel.add(label6);
						label6.setBounds(new Rectangle(new Point(0, 122),
								label6.getPreferredSize()));

						// ---- comboBox4 ----
						comboBox4.setModel(new DefaultComboBoxModel(
								new String[] { "Slow", "Normal", "Fast" }));
						comboBox4.setSelectedIndex(1);
						contentPanel.add(comboBox4);
						comboBox4.setBounds(40, 120, 210, comboBox4
								.getPreferredSize().height);

						// ---- label3 ----
						label3.setText("Chat");
						contentPanel.add(label3);
						label3.setBounds(new Rectangle(new Point(0, 33), label3
								.getPreferredSize()));

						// ---- comboBox5 ----
						comboBox5.setModel(new DefaultComboBoxModel(
								new String[] { "Normal Chat", "Clan Chat" }));
						contentPanel.add(comboBox5);
						comboBox5.setBounds(40, 30, 210, comboBox5
								.getPreferredSize().height);

						{ // compute preferred size
							Dimension preferredSize = new Dimension();
							for (int i = 0; i < contentPanel
									.getComponentCount(); i++) {
								Rectangle bounds = contentPanel.getComponent(i)
										.getBounds();
								preferredSize.width = Math.max(bounds.x
										+ bounds.width, preferredSize.width);
								preferredSize.height = Math.max(bounds.y
										+ bounds.height, preferredSize.height);
							}
							Insets insets = contentPanel.getInsets();
							preferredSize.width += insets.right;
							preferredSize.height += insets.bottom;
							contentPanel.setMinimumSize(preferredSize);
							contentPanel.setPreferredSize(preferredSize);
						}
					}
					dialogPane.add(contentPanel, BorderLayout.CENTER);
				}
				contentPane.add(dialogPane, BorderLayout.CENTER);
				pack();
				setLocationRelativeTo(getOwner());
				// JFormDesigner - End of component initialization
				// //GEN-END:initComponents
				final BufferedReader in = new BufferedReader(new FileReader(
						settingsFile));
				String line;
				String[] opts = {};
				while ((line = in.readLine()) != null) {
					if (line.contains(":")) {
						opts = line.split(":");
					}
				}
				in.close();
				if (opts.length == 5) {
					comboBox1.setSelectedItem(opts[0]);
					comboBox2.setSelectedItem(opts[1]);
					comboBox3.setSelectedItem(opts[2]);
					comboBox4.setSelectedItem(opts[3]);
					comboBox4.setSelectedItem(opts[4]);
				}
			} catch (final Exception e2) {
				e2.printStackTrace();
			}
		}

		// JFormDesigner - Variables declaration - DO NOT MODIFY
		// //GEN-BEGIN:variables
		private JPanel dialogPane;
		private JPanel contentPanel;
		private JComboBox comboBox1;
		private JLabel label1;
		private JButton okButton;
		private JLabel label2;
		private JLabel label4;
		private JComboBox comboBox2;
		private JButton button1;
		private JLabel label5;
		private JComboBox comboBox3;
		private JButton button2;
		private JLabel label6;
		private JComboBox comboBox4;
		private JLabel label3;
		private JComboBox comboBox5;
		// JFormDesigner - End of variables declaration //GEN-END:variables
	}
}

