Tip: You can center a GUI when it's created by setting it's X and Y like this:
PHP Code:
//#CLIENTSIDE
function center(guiObj) {
with (guiObj) {
x = (screenwidth - width) / 2;
y = (screenheight - height) / 2;
}
}
In your case you could just change the X and Y lines with the ones I suggested above. The default coordinates you left (1050,100) when you were making it with the GUI Editor could cause it to be off the screen for people.
You can also use a for-each loop and catchevent to remove the redundant button code.
PHP Code:
// For-each Example
temp.servers = {
"Login",
"Graal Kingdoms",
"Zone",
"Zodiac",
"Era",
"Unholy Nations",
"Valikorlia",
"Maloria",
"AEON"
};
for (temp.server: temp.servers) {
new GuiButtonCtrl("ServerList_Button_" @ temp.server) {
profile = GuiRedButtonProfile;
text = temp.server;
width = 80;
x = 10;
y = 10 + (40 * temp.servers.index(temp.server);
thiso.catchevent(this, "onAction", "onServerWarp");
}
}
// All your 'obj.onAction()' functions can then be replaced with just this:
function onServerWarp(obj) {
serverwarp(obj.text);
}