tpoles

MultiFunction2.01

Sep 4th, 2020 (edited)
1,477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.25 KB | None | 0 0
  1. on=query[0];tw=query[2];th=query[4];fo=query[6];fi=query[8];si=query[10];se=query[12];ei=query[14];ni=query[16];te=query[18];el=query[20];twe=query[22];Te=query[100];
  2.  
  3. if(on!=Te)
  4. {function StOn(on) {Replace=on.replace("@","");Output=Replace.toLowerCase();return Output}}
  5. else
  6. {function StOn(on) {Output="";return Output}};
  7.  
  8. if(tw!=Te)
  9. {function StTw(tw) {Replace=tw.replace("@","");Output=Replace.toLowerCase();return Output}}
  10. else
  11. {function StTw(tw) {Output="";return Output}};
  12.  
  13. if(th!=Te)
  14. {function StTh(th) {Replace=th.replace("@","");Output=Replace.toLowerCase();return Output}}
  15. else
  16. {function StTh(th) {Output="";return Output}};
  17.  
  18. if(fo!=Te)
  19. {function StFo(fo) {Replace=fo.replace("@","");Output=Replace.toLowerCase();return Output}}
  20. else
  21. {function StFo(fo) {Output="";return Output}};
  22.  
  23. if(fi!=Te)
  24. {function StFi(fi) {Replace=fi.replace("@","");Output=Replace.toLowerCase();return Output}}
  25. else
  26. {function StFi(fi) {Output="";return Output}};
  27.  
  28. if(si!=Te)
  29. {function StSi(si) {Replace=si.replace("@","");Output=Replace.toLowerCase();return Output}}
  30. else
  31. {function StSi(si) {Output="";return Output}};
  32.  
  33. if(se!=Te)
  34. {function StSe(se) {Replace=se.replace("@","");Output=Replace.toLowerCase();return Output}}
  35. else
  36. {function StSe(se) {Output="";return Output}};
  37.  
  38. if(ei!=Te)
  39. {function StEi(ei) {Replace=ei.replace("@","");Output=Replace.toLowerCase();return Output}}
  40. else
  41. {function StEi(ei) {Output="";return Output}};
  42.  
  43. if(ni!=Te)
  44. {function StNi(ni) {Replace=ni.replace("@","");Output=Replace.toLowerCase();return Output}}
  45. else
  46. {function StNi(ni) {Output="";return Output}};
  47.  
  48. if(te!=Te)
  49. {function StTe(te) {Replace=te.replace("@","");Output=Replace.toLowerCase();return Output}}
  50. else
  51. {function StTe(te) {Output="";return Output}};
  52.  
  53. if(el!=Te)
  54. {function StEl(el) {Replace=el.replace("@","");Output=Replace.toLowerCase();return Output}}
  55. else
  56. {function StEl(el) {Output="";return Output}};
  57.  
  58. if(twe!=Te)
  59. {function StTwe(twe) {Replace=twe.replace("@","");Output=Replace.toLowerCase();return Output}}
  60. else
  61. {function StTwe(twe) {Output="";return Output}};
  62.  
  63. YN1=query[1];
  64. YN2=query[3];
  65. YN3=query[5];
  66. YN4=query[7];
  67. YN5=query[9];
  68. YN6=query[11];
  69. YN7=query[13];
  70. YN8=query[15];
  71. YN9=query[17];
  72. YN10=query[19];
  73. YN11=query[21];
  74. YN12=query[23];
  75.  
  76. a=StOn(on);
  77. b=StTw(tw);
  78. c=StTh(th);
  79. d=StFo(fo);
  80. e=StFi(fi);
  81. f=StSi(si);
  82. g=StSe(se);
  83. h=StEi(ei);
  84. j=StNi(ni);
  85. k=StTe(te);
  86. l=StEl(el);
  87. m=StTwe(twe);
  88.  
  89. a1="";b1="";c1="";d1="";e1="";f1="";g1="";h1="";j1="";k1="";l1="";m1="";
  90.  
  91. for(i=0;i<=Names.length&&a!=Names[i];i=Math.floor(i+2)){a1+=0};
  92. for(i=0;i<=Names.length&&b!=Names[i];i=Math.floor(i+2)){b1+=0};
  93. for(i=0;i<=Names.length&&c!=Names[i];i=Math.floor(i+2)){c1+=0};
  94. for(i=0;i<=Names.length&&d!=Names[i];i=Math.floor(i+2)){d1+=0};
  95. for(i=0;i<=Names.length&&e!=Names[i];i=Math.floor(i+2)){e1+=0};
  96. for(i=0;i<=Names.length&&f!=Names[i];i=Math.floor(i+2)){f1+=0};
  97. for(i=0;i<=Names.length&&g!=Names[i];i=Math.floor(i+2)){g1+=0};
  98. for(i=0;i<=Names.length&&h!=Names[i];i=Math.floor(i+2)){h1+=0};
  99. for(i=0;i<=Names.length&&j!=Names[i];i=Math.floor(i+2)){j1+=0};
  100. for(i=0;i<=Names.length&&k!=Names[i];i=Math.floor(i+2)){k1+=0};
  101. for(i=0;i<=Names.length&&l!=Names[i];i=Math.floor(i+2)){l1+=0};
  102. for(i=0;i<=Names.length&&m!=Names[i];i=Math.floor(i+2)){m1+=0};
  103.  
  104. if(a1.length==Math.floor(Names.length/2+1)){a2=a}else{a2=Names[Math.floor(a1.length*2+1)]};
  105. if(b1.length==Math.floor(Names.length/2+1)){b2=b}else{b2=Names[Math.floor(b1.length*2+1)]};
  106. if(c1.length==Math.floor(Names.length/2+1)){c2=c}else{c2=Names[Math.floor(c1.length*2+1)]};
  107. if(d1.length==Math.floor(Names.length/2+1)){d2=d}else{d2=Names[Math.floor(d1.length*2+1)]};
  108. if(e1.length==Math.floor(Names.length/2+1)){e2=e}else{e2=Names[Math.floor(e1.length*2+1)]};
  109. if(f1.length==Math.floor(Names.length/2+1)){f2=f}else{f2=Names[Math.floor(f1.length*2+1)]};
  110. if(g1.length==Math.floor(Names.length/2+1)){g2=g}else{g2=Names[Math.floor(g1.length*2+1)]};
  111. if(h1.length==Math.floor(Names.length/2+1)){h2=h}else{h2=Names[Math.floor(h1.length*2+1)]};
  112. if(j1.length==Math.floor(Names.length/2+1)){j2=j}else{j2=Names[Math.floor(j1.length*2+1)]};
  113. if(k1.length==Math.floor(Names.length/2+1)){k2=k}else{k2=Names[Math.floor(k1.length*2+1)]};
  114. if(l1.length==Math.floor(Names.length/2+1)){l2=l}else{l2=Names[Math.floor(l1.length*2+1)]};
  115. if(m1.length==Math.floor(Names.length/2+1)){m2=m}else{m2=Names[Math.floor(m1.length*2+1)]};
  116.  
  117. Str="";
  118. Str2="";
  119. ctStr=0;
  120. if(YN1=="1"){ctStr+=1};
  121. if(YN2=="1"){ctStr+=1};
  122. if(YN3=="1"){ctStr+=1};
  123. if(YN4=="1"){ctStr+=1};
  124. if(YN5=="1"){ctStr+=1};
  125. if(YN6=="1"){ctStr+=1};
  126. if(YN7=="1"){ctStr+=1};
  127. if(YN8=="1"){ctStr+=1};
  128. if(YN9=="1"){ctStr+=1};
  129. if(YN10=="1"){ctStr+=1};
  130. if(YN11=="1"){ctStr+=1};
  131. if(YN12=="1"){ctStr+=1};
  132. ct1=ctStr/2;
  133. ct2=0;
  134.  
  135. MaxMulti=6;
  136.  
  137. if(YN1=="1"){Str+="/"+a;ct2+=1;};
  138. if(YN2=="1"){if(ctStr<MaxMulti){Str+="/"+b}else{if(ct2<ct1){Str+="/"+b;ct2+=1;}else{Str2+="/"+b}}};
  139. if(YN3=="1"){if(ctStr<MaxMulti){Str+="/"+c}else{if(ct2<ct1){Str+="/"+c;ct2+=1;}else{Str2+="/"+c}}};
  140. if(YN4=="1"){if(ctStr<MaxMulti){Str+="/"+d}else{if(ct2<ct1){Str+="/"+d;ct2+=1;}else{Str2+="/"+d}}};
  141. if(YN5=="1"){if(ctStr<MaxMulti){Str+="/"+e}else{if(ct2<ct1){Str+="/"+e;ct2+=1;}else{Str2+="/"+e}}};
  142. if(YN6=="1"){if(ctStr<MaxMulti){Str+="/"+f}else{if(ct2<ct1){Str+="/"+f;ct2+=1;}else{Str2+="/"+f}}};
  143. if(YN7=="1"){if(ctStr<MaxMulti){Str+="/"+g}else{if(ct2<ct1){Str+="/"+g;ct2+=1;}else{Str2+="/"+g}}};
  144. if(YN8=="1"){if(ctStr<MaxMulti){Str+="/"+h}else{if(ct2<ct1){Str+="/"+h;ct2+=1;}else{Str2+="/"+h}}};
  145. if(YN9=="1"){if(ctStr<MaxMulti){Str+="/"+j}else{if(ct2<ct1){Str+="/"+j;ct2+=1;}else{Str2+="/"+j}}};
  146. if(YN10=="1"){if(ctStr<MaxMulti){Str+="/"+k}else{if(ct2<ct1){Str+="/"+k;ct2+=1;}else{Str2+="/"+k}}};
  147. if(YN11=="1"){if(ctStr<MaxMulti){Str+="/"+l}else{if(ct2<ct1){Str+="/"+l;ct2+=1;}else{Str2+="/"+l}}};
  148. if(YN12=="1"){if(ctStr<MaxMulti){Str+="/"+m}else{if(ct2<ct1){Str+="/"+m}else{Str2+="/"+m}}};
  149.  
  150. if(Str==""){Multilink=". There's no multi at the moment!"}
  151. else{if(Str2==""){Multilink=". You can check the multi here: https://multistre.am/"+channel+Str}else{Multilink=". You can check the multis here: https://multistre.am/"+channel+Str+" and https://multistre.am/"+channel+Str2}};
  152.  
  153. FinalMessage=a2+", "+b2+", "+c2+", "+d2+", "+e2+", "+f2+", "+g2+", "+h2+", "+j2+", "+k2+", "+l2+" and "+m2+Multilink;
  154. if(m=="")
  155. FinalMessage=a2+", "+b2+", "+c2+", "+d2+", "+e2+", "+f2+", "+g2+", "+h2+", "+j2+", "+k2+" and "+l2+Multilink;
  156. if(l=="")
  157. FinalMessage=a2+", "+b2+", "+c2+", "+d2+", "+e2+", "+f2+", "+g2+", "+h2+", "+j2+" and "+k2+Multilink;
  158. if(k=="")
  159. FinalMessage=a2+", "+b2+", "+c2+", "+d2+", "+e2+", "+f2+", "+g2+", "+h2+" and "+j2+Multilink;
  160. if(j=="")
  161. FinalMessage=a2+", "+b2+", "+c2+", "+d2+", "+e2+", "+f2+", "+g2+" and "+h2+Multilink;
  162. if(h=="")
  163. FinalMessage=a2+", "+b2+", "+c2+", "+d2+", "+e2+", "+f2+" and "+g2+Multilink;
  164. if(g=="")
  165. {FinalMessage=a2+", "+b2+", "+c2+", "+d2+", "+e2+" and "+f2+Multilink};
  166. if(f=="")
  167. {FinalMessage=a2+", "+b2+", "+c2+", "+d2+" and "+e2+Multilink};
  168. if(e=="")
  169. {FinalMessage=a2+", "+b2+", "+c2+" and "+d2+Multilink};
  170. if(d=="")
  171. {FinalMessage=a2+", "+b2+" and "+c2+Multilink};
  172. if(c=="")
  173. {FinalMessage=a2+" and "+b2+Multilink};
  174. if(b=="")
  175. {FinalMessage=a2+Multilink};
  176. if(a=="")
  177. {FinalMessage="his hands! There's no multi at the moment, but you can see his hands occasionally on the stream!"};
  178.  
  179. FinalMessage
Add Comment
Please, Sign In to add comment