1 2 3 4 5 6 7 8 9 10 11 12 13 | 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; } |