{"name":"cnote","enabled":true,"description":"Echo multiple colour strings on a single line!","type":"group","id":1,"items":[{"type":"function","name":"Read_Me","enabled":true,"id":5,"code":"/* \n\nCnote v1.0.0\nby: Zahan of Achaea\n\n\nDisplay multi-colour notices, with smoothing gradient effect!\n\n\nIn an action \"Execute script\" or function text box, use cnote(text, fg, bg);\nArguments must be in sets in multiples of 3, however many multiples you want.\nLeaving the bg parameter empty (with \"\") will leave the background transparent.\nUse \"rainbow\" as the fg, to get the rainbow effect!\n\n\nExamples:\ncnote(\"This is\", \"red\", \"\", \"an example.\", \"green\", \"purple\");\ncnote(\"Ermagerd rernberws!\", \"rainbow\", \"\")\ncnote(\n \"It might be\", \"red\", \"purple\",\n \"easier to write\", \"#FF8080\", \"yellow\",\n \"3 parameters per line\", \"rainbow\", \"dimgray\",\n \"if it is long.\", \"#808000\", \"\"\n);\n\n\nYou can turn off the fade/gradient effect in the onLoad setting.\n\n\nIf you have any problems or questions, send me a msg in the game or on the forum.\n\n\nThis plugin is provided for free but donations to Zahan (achaea) are always appreciated, no matter how small!\n\n\n\n\n\nVersion notes:\n\n*/","items":[]},{"type":"function","name":"onLoad","enabled":true,"id":2,"code":"// This controls the fade/gradient. Set it to 0 or false to turn it off.\nvar cnote_gradient = true;\n\n\n// Overrrrrr the rainbowwwwww\nvar rainbow_c = [\n \"red\",\n \"orange\",\n \"yellow\",\n \"green\",\n \"blue\",\n \"indigo\",\n \"violet\"\n];\n\n\n// Magic\ncnote = function () {\n var args = arguments;\n var divi = args.length / 3;\n if (divi % 1 != 0) {\n display_notice(\"Invalid cnote(\\\"\"+args[0]+\"\\\"...)\", \"red\");\n display_notice(\"Paramaters must be in sets of 3!\", \"red\");\n return;\n }\n\n var line = \"\";\n for (var i=0; i\" + txt + \"\";\n }\n else {\n for (var j=0; j\" + txt[j] + \"\";\n }\n }\n }\n ow_Write(\"#output_main\", \"

\"+line+\"

\");\n //setTimeout(function(){ow_Write(\"#output_main\", \"

\"+line+\"

\");}, 50);\n};"},{"type":"alias","name":"example alias","enabled":true,"id":3,"matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true,"actions":[{"action":"script","script":"cnote(\n \"Example\", \"white\", \"darkorange\",\n \" of a \", \"#80FF80\", \"\",\n \"cnote\", \"red\", \"purple\",\n \" with rainbows!!! \", \"rainbow\", \"\"\n);\n \nsend_command(\"chin\");"},{"action":"command","command":"scratch","prefix_suffix":true},{"action":"function","fn":"onLoad"}],"text":"cnote example"},{"type":"trigger","name":"example trigger","enabled":true,"id":4,"matching":"regexp","whole_words":false,"case_sensitive":false,"text":"^Example (trigger|sample) with cnote\\.$","actions":[{"action":"gag"},{"action":"script","script":"var wildcard = args[1];\nvar fg1 = \"blue\";\ncnote(\n \"This is a \", fg1, \"yellow\",\n wildcard, \"white\", \"darkorange\",\n \"with cnote.\", \"rainbow\", \"\"\n);"}]}]}