BUILDIN(setcolor){ int color = script_getnum(st, 2); char colorstring[7]; TBL_PC* sd; sd = script->rid2sd(st); snprintf(colorstring, 7, "%06X", color); script_pushstrcopy(st, colorstring); pc_setglobalreg_str(sd, script->add_str("CHAT_COLOR"), colorstring); return true; }