//by Salatiel, this is a function that lets you draw 3D pixel arts using IMTOC color data ( https://salatielsauer.github.io/IMTOC-Converter/ ) //make sure you have the movesel command installed on your client ( https://gist.github.com/SalatielSauer/d0c3f7676d7962c8451eb701fc1220f3#gistcomment-2956010 ) //usage: /autodraw //both arguments are optional, the first argument turns alpha on/off, and the second defines the color value that will be considered alpha (black as default). pushup = [ movesel $arg1 2; loop ms $arg1 [movesel -1 2; paste; vcolor (at $curpixelcolor 0) (at $curpixelcolor 1) (at $curpixelcolor 2)] ] autodraw = [ if (=s $arg2 "")[alphavalue = "0x000000"] [alphavalue = $arg2] pixeldata = $imtoc_colordata pixelid = 0 editcopy autodraw_y $arg1 rndseed = (rnd 3); ] autodraw_y = [ canpng = $arg1 loop w $imtoc_imagew [ w = (+ $w 1) sleep (* $w 5)[ curpixel = (at $pixeldata $pixelid) paste if (&& (=s $curpixel $alphavalue) (= $canpng 1))[ delcube ] curpixelcolor = (format "%1 %2 %3" (divf (& (>> $curpixel 0x10) 0xFF) 0xFF) (divf (& (>> $curpixel 0x8) 0xFF) 0xFF) (divf (& $curpixel 0xFF) 0xFF)) pushup (substr (at $curpixelcolor $rndseed) 2 1) vcolor (at $curpixelcolor 0) (at $curpixelcolor 1) (at $curpixelcolor 2) movesel 1 0 //go to next pixel pixelid = (+ $pixelid 1) if (= @w $imtoc_imagew)[ movesel (- 0 $imtoc_imagew) 0 //back to first pixel movesel 1 1 //go to next line autodraw_y $canpng ] if (= $pixelid (* $imtoc_imagew $imtoc_imageh))[clearsleep; echo "^f7done"] ] ] ]