Well I don’t know why I bothered coding this since it will probably go to waste on some never to be complete server but uhhh here it is anyway:
// NPC made by tricxta
if (playerenters){
disabledefmovement;
timereverywhere;
setfocus 32,32;
showstats ;
this.select=0;
setstring this.items,Hat,Head,Body,Skin,Coat,Belt,Sleeves,Shoes;
setstring this.item0,hat1.png,hat2.png,hat3.png,hat4.png,hat5.png;
setstring this.item1,head1.png,head2.png;
setstring this.item2,body1.png,body2.png,body3.png,body4.png,body5.png,body6.png,body7.png,body8.png,body9.png,body10.png,body11.png,body12.png,body13.png;
setstring this.item3,white,yellow,orange,pink,red,darkred,lightgreen,green,darkgreen,lightblue,blue,darkblue,brown,cynober,purple,darkpurple,lightgray,gray,black;
setstring this.item4,white,yellow,orange,pink,red,darkred,lightgreen,green,darkgreen,lightblue,blue,darkblue,brown,cynober,purple,darkpurple,lightgray,gray,black;
setstring this.item5,white,yellow,orange,pink,red,darkred,lightgreen,green,darkgreen,lightblue,blue,darkblue,brown,cynober,purple,darkpurple,lightgray,gray,black;
setstring this.item6,white,yellow,orange,pink,red,darkred,lightgreen,green,darkgreen,lightblue,blue,darkblue,brown,cynober,purple,darkpurple,lightgray,gray,black;
setstring this.item7,white,yellow,orange,pink,red,darkred,lightgreen,green,darkgreen,lightblue,blue,darkblue,brown,cynober,purple,darkpurple,lightgray,gray,black;
tokenize #s(this.items);
for (this.i=0;this.i<8;this.i++){
showtext 300+this.i,screenwidth/2-200,(screenheight/2-100)+(this.i*30),arial,c,#t(this.i);
changeimgvis 300+this.i,4;
changeimgcolors 300+this.i,.5,.5,.5,1;
}
showtext 311,screenwidth/2,screenheight/2+200,arial,c,Press R to generate a random character;
changeimgvis 311,4;
timeout=0.05;
}
if (timeout){
drawplayer();
drawselect();
tokenize #s(this.item#v(this.select));
if (keydown(0) && this.select>0 && this.key==0){this.select--;this.key=1;}
else if (keydown(2) && this.select<7 && this.key==0){this.select++;this.key=1;}
else if (keydown(1) && strtofloat(#s(this.items#v(this.select)))>0 && this.key==0){
setstring this.items#v(this.select),#v(strtofloat(#s(this.items#v(this.select)))-1);
this.key=1;
}
else if (keydown(3) && strtofloat(#s(this.items#v(this.select)))<tokenscount-1 && this.key==0){
setstring this.items#v(this.select),#v(strtofloat(#s(this.items#v(this.select)))+1);
this.key=1;
}
else if (keydown2(82,true) && this.key==0){
this.key=1;
for (this.i=0;this.i<8;this.i++){
tokenize #s(this.item#v(this.i));
setstring this.items#v(this.i),#v(int(random(0,tokenscount)));
}
}
if (!keydown(0) && !keydown(2) && !keydown(1) && !keydown(3) && this.key==1 && !keydown2(82,true))this.key=0;
timeout=0.05;
}
function drawplayer(){
tokenize #s(this.item0);
setcharprop #P1,#t(strtofloat(#s(this.items0)));
tokenize #s(this.item1);
setcharprop #3,#t(strtofloat(#s(this.items1)));
tokenize #s(this.item2);
setcharprop #8,#t(strtofloat(#s(this.items2)));
tokenize #s(this.item3);
setcharprop #C0,#t(strtofloat(#s(this.items3)));
tokenize #s(this.item4);
setcharprop #C1,#t(strtofloat(#s(this.items4)));
tokenize #s(this.item5);
setcharprop #C4,#t(strtofloat(#s(this.items5)));
tokenize #s(this.item6);
setcharprop #C2,#t(strtolfoat(#s(this.items6)));
tokenize #s(this.item7);
setcharprop #C3,#t(strtofloat(#s(this.items7)));
showani 1,33.5,34,2,idle,;
}
function drawselect(){
tokenize #s(this.items);
this.width=textwidth(1,arial,,#t(this.select))/2;
showimg 308,character-select-arrows.png,screenwidth/2-this.width-237,screenheight/2-100+(this.select*30)-16;
changeimgpart 308,0,0,32,32;
changeimgvis 308,4;
showimg 309,character-select-arrows.png,screenwidth/2+this.width-195,screenheight/2-100+(this.select*30)-16;
changeimgpart 309,32,0,32,32;
changeimgvis 309,4;
showtext 310,screenwidth/2-200,(screenheight/2-100)+(this.select*30),arial,c,#t(this.select);
changeimgvis 310,5;
}
Its pretty bulky since something when tokenizing item strings was being difficult but I managed to get something out lol.
Once again attached is a screenie of it in action and the arrows it uses. Have fun I guess lol