I'm sick to death of going on servers that have "/setcoat black" or whatnot. Here's a no-frills GUI that impliments all the basic functions of a tailor without the need for tedius chat-commands. Feel free to use and edit at your will. Also available on Graal.net
PHP Code:
//Created by Giltwist
//#CLIENTSIDE
function onweaponfired(){
showtailor();
}
function showtailor(){
if (!tailormenu.active)
{
settimer(1);
new GuiWindowCtrl("tailormenu")
{
width = 325;
height = 156;
x = client.tailorx;
y = client.tailory;
canMove = true;
canResize = false;
canMaximize = false;
canClose = false;
canMinimize = false;
tile = true;
text = "Outfit";
visible = true;
// Color Attributes
parts={"Skin","Shoes","Sleeves","Coat","Belt"};
for (m=0;m<5;m++){
new GuiMLTextCtrl("text" @ parts[m]){
width = 60;
height = 25;
allowcolorchars=true;
parsetags=true;
x = 10;
y = 27+25*m;
text = "<font size=20 color='black'>" @ parts[m] @ ":</font>";
}
new GuiPopUpMenuCtrl("tailor" @ parts[m]){
width=70;
height=25;
x=75;
y=25+25*m;
addcolors();
canMove = false;
canResize = false;
canMaximize = false;
canClose = false;
canMinimize = false;
tile = true;
visible = true;
thiso.catchevent(this,"onSelect","updatecolor");
}
}
//Body
new GuiMLTextCtrl("bodytext"){
width = 50;
height = 25;
allowcolorchars=true;
parsetags=true;
x = 160;
y = 27;
text = "<font size=20 color='black'>Body:</font>";
}
new GuiTextEditCtrl("tailorbody")
{
width=100;
height=25;
x= 215;
y= 25;
canMove = false;
canResize = false;
canMaximize = false;
canClose = false;
canMinimize = false;
tile = true;
visible = true;
text=player.bodyimg;
}
//Head
new GuiMLTextCtrl("headtext"){
width = 50;
height = 25;
allowcolorchars=true;
parsetags=true;
x = 160;
y = 52;
text = "<font size=20 color='black'>Head:</font>";
}
new GuiTextEditCtrl("tailorhead")
{
width=100;
height=25;
x= 215;
y= 50;
canMove = false;
canResize = false;
canMaximize = false;
canClose = false;
canMinimize = false;
tile = true;
visible = true;
text=player.headimg;
}
//Sword
new GuiMLTextCtrl("swordtext"){
width = 50;
height = 25;
allowcolorchars=true;
parsetags=true;
x = 160;
y = 77;
text = "<font size=20 color='black'>Sword:</font>";
}
new GuiTextEditCtrl("tailorsword")
{
width=100;
height=25;
x= 215;
y= 75;
canMove = false;
canResize = false;
canMaximize = false;
canClose = false;
canMinimize = false;
tile = true;
visible = true;
text=player.swordimg;
}
//shield
new GuiMLTextCtrl("shieldtext"){
width = 50;
height = 25;
allowcolorchars=true;
parsetags=true;
x = 160;
y = 102;
text = "<font size=20 color='black'>Body:</font>";
}
new GuiTextEditCtrl("tailorshield")
{
width=100;
height=25;
x= 215;
y= 100;
canMove = false;
canResize = false;
canMaximize = false;
canClose = false;
canMinimize = false;
tile = true;
visible = true;
text=player.shieldimg;
}
}
GraalControl.makefirstresponder(true);
}
else
{
client.tailorx=tailormenu.x;
client.tailory=tailormenu.y;
tailormenu.destroy();
}
}
function addcolors(){
this.colors={"white","yellow","orange","pink","red","darkred","lightgreen","green","darkgreen","lightblue","blue","darkblue","brown","cynober","purple","darkpurple","lightgray","gray","black","transparent"};
for (this.i=0;this.i<this.colors.size();this.i++){
("tailor" @ parts[m]).addrow(this.i, this.colors[this.i]);
("tailor" @ parts[m]).text=this.colors[player.colors[m]];
}
}
function updatecolor(temp.part,temp.colnum)
{
player.colors[parts.index(temp.part.substring(6))]=temp.colnum;
}
function tailorbody.onAction(temp.body){
player.bodyimg=temp.body;
settimer(.1);
GraalControl.makefirstresponder(true);
}
function tailorhead.onAction(temp.body){
player.headimg=temp.body;
settimer(.1);
GraalControl.makefirstresponder(true);
}
function tailorsword.onAction(temp.body){
player.swordimg=temp.body;
settimer(.1);
GraalControl.makefirstresponder(true);
}
function tailorshield.onAction(temp.body){
player.shieldimg=temp.body;
settimer(.1);
GraalControl.makefirstresponder(true);
}
//File not found check
function ontimeout(){
tailorbody.text=player.bodyimg;
tailorhead.text=player.headimg;
tailorsword.text=player.swordimg;
tailorshield.text=player.shieldimg;
}