indik 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. # indik
  2. if Enable_scalepic = 1:
  3. !0=reverse, 1=100%, 2=value. copy from 1.2.5, modify by illume
  4. if ARGS[1] < 1: ARGS[1] = 1
  5. if ARGS[1] > 100: ARGS[1] = 100
  6. ! scalewidth default = 120px
  7. if Enable_scalewidth > 1:
  8. max_width = Enable_scalewidth-1
  9. else
  10. max_width = 120
  11. end
  12. if Enable_scaleheight > 1:
  13. _height = Enable_scaleheight-1
  14. else
  15. _height = 15
  16. end
  17. _width = ARGS[1] * max_width / 100
  18. if ARGS[1] < 30: $_color = iif(ARGS[0] > 0,'green','red')
  19. if ARGS[1] >= 30 and ARGS[1] < 70 and ARGS[0] = 0: $_color = 'blue'
  20. ! reverse colors
  21. if ARGS[1] >= 30 and ARGS[1] < 50 and ARGS[0] > 0: $_color = 'yellow'
  22. if ARGS[1] >= 50 and ARGS[1] < 70 and ARGS[0] > 0: $_color = 'orange'
  23. ! ---
  24. if ARGS[1] >= 70: $_color = iif(ARGS[0]> 0,'red','green')
  25. $result = ' <img src="images/system/icon/'+$_color+'.png" height='+_height+' width=' + _width + '><img src="images/system/icon/blank.png" height='+_height+' width=' + (max_width-_width) + '> <font color='+$_color+'>'+ARGS[2]+'</font> '
  26. $ind = $result
  27. killvar 'max_width'
  28. killvar '_width'
  29. killvar '_height'
  30. killvar '$_color'
  31. else
  32. if cheatStatusBars = 1:
  33. i = 2
  34. else
  35. i = 3
  36. end
  37. if Enable_statfsize > 0 and Enable_statfsize < i:i = Enable_statfsize
  38. a = ARGS[1]
  39. a1 = ARGS[2]
  40. if a > 100:a = 100
  41. if a < 0:a = 0
  42. if $ARGS[0] = '1':
  43. if Enable_Android = 1:
  44. if a >= 65:
  45. $ind = '<font color="green"><<a1>></font>'
  46. elseif a >= 35:
  47. $ind = '<font color="blue"><<a1>></font>'
  48. else
  49. $ind = '<font color="red"><<a1>></font>'
  50. end
  51. else
  52. j = a/5
  53. $ind = '<font face="courier new" size = <<i>>> </font>'
  54. indik_counter = 0
  55. :indik
  56. if indik_counter < j:
  57. $ind += '<font face="courier new" size = <<i>>>█</font>'
  58. indik_counter += 1
  59. jump 'indik'
  60. elseif indik_counter < 20:
  61. $ind += '<font face="courier new" size = <<i>>>_</font>'
  62. indik_counter += 1
  63. jump 'indik'
  64. end
  65. killvar 'indik_counter'
  66. killvar 'j'
  67. $ind += '<font face="courier new" size = <<i>>> </font>'
  68. if a >= 85:
  69. $ind = '<font color="green">' + $ind + '<<a1>></font>'
  70. elseif a >= 70:
  71. $ind = '<font color=#b3b300>' + $ind + '<<a1>></font>'
  72. elseif a >= 50:
  73. $ind = '<font color=#00CED1>' + $ind + '<<a1>></font>'
  74. elseif a >= 20:
  75. $ind = '<font color="blue">' + $ind + '<<a1>></font>'
  76. elseif a >= 10:
  77. $ind = '<font color=#ff6600>' + $ind + '<<a1>></font>'
  78. else
  79. $ind = '<font color="red">' + $ind + '<<a1>></font>'
  80. end
  81. end
  82. end
  83. if $ARGS[0] = '2':
  84. if Enable_Android = 1:
  85. if a >= 85:
  86. $ind = '<font color="red"><<a1>></font>'
  87. elseif a >= 65:
  88. $ind = '<font color="orange"><<a1>></font>'
  89. elseif a >= 45:
  90. $ind = '<font color="yellow"><<a1>></font>'
  91. elseif a >= 25:
  92. $ind = '<font color="green"><<a1>></font>'
  93. else
  94. $ind = '<font color="blue"><<a1>></font>'
  95. end
  96. else
  97. j = a/5
  98. $ind = '<font face="courier new" size = <<i>>> </font>'
  99. indik_counter = 0
  100. :indik2
  101. if indik_counter < j:
  102. $ind += '<font face="courier new" size = <<i>>>█</font>'
  103. indik_counter += 1
  104. jump 'indik2'
  105. elseif indik_counter < 20:
  106. $ind += '<font face="courier new" size = <<i>>>_</font>'
  107. indik_counter += 1
  108. jump 'indik2'
  109. end
  110. killvar 'indik_counter'
  111. killvar 'j'
  112. $ind += '<font face="courier new" size = <<i>>> </font>'
  113. if a >= 90:
  114. $ind = '<font color=#ff0000>' + $ind + '</font>'
  115. elseif a >= 80:
  116. $ind = '<font color=#ff1a1a>' + $ind + '</font>'
  117. elseif a >= 70:
  118. $ind = '<font color=#ff3333>' + $ind + '</font>'
  119. elseif a >= 60:
  120. $ind = '<font color=#ff4d4d>' + $ind + '</font>'
  121. elseif a >= 50:
  122. $ind = '<font color=#ff6666>' + $ind + '</font>'
  123. elseif a >= 40:
  124. $ind = '<font color=#ff8080>' + $ind + '</font>'
  125. elseif a >= 30:
  126. $ind = '<font color=#e68080>' + $ind + '</font>'
  127. elseif a >= 20:
  128. $ind = '<font color=#cc8080>' + $ind + '</font>'
  129. elseif a >= 10:
  130. $ind = '<font color=#b38080>' + $ind + '</font>'
  131. else
  132. $ind = '<font color=#998080>' + $ind + '</font>'
  133. end
  134. end
  135. end
  136. if $ARGS[0] = '3':
  137. if Enable_Android = 1:
  138. if a >= 65:
  139. $ind = '<font color="green"><<a1>></font>'
  140. elseif a >= 35:
  141. $ind = '<font color="blue"><<a1>></font>'
  142. else
  143. $ind = '<font color="red"><<a1>></font>'
  144. end
  145. else
  146. j = a/5
  147. $ind = '<font face="courier new" size = <<i>>> </font>'
  148. indik_counter = 0
  149. :indik3
  150. if j < 10:
  151. if indik_counter < j:
  152. $ind += '<font face="courier new" size = <<i>>>_</font>'
  153. indik_counter += 1
  154. jump 'indik3'
  155. elseif indik_counter < 10:
  156. $ind += '<font face="courier new" size = <<i>>>█</font>'
  157. indik_counter += 1
  158. jump 'indik3'
  159. elseif indik_counter < 20:
  160. $ind += '<font face="courier new" size = <<i>>>_</font>'
  161. indik_counter += 1
  162. jump 'indik3'
  163. end
  164. elseif j > 10:
  165. if indik_counter < 10:
  166. $ind += '<font face="courier new" size = <<i>>>_</font>'
  167. indik_counter += 1
  168. jump 'indik3'
  169. elseif indik_counter < j:
  170. $ind += '<font face="courier new" size = <<i>>>█</font>'
  171. indik_counter += 1
  172. jump 'indik3'
  173. elseif indik_counter < 20:
  174. $ind += '<font face="courier new" size = <<i>>>_</font>'
  175. indik_counter += 1
  176. jump 'indik3'
  177. end
  178. else
  179. if indik_counter < 9:
  180. $ind += '<font face="courier new" size = <<i>>>_</font>'
  181. indik_counter += 1
  182. jump 'indik3'
  183. elseif indik_counter = 9 or indik_counter = 10:
  184. $ind += '<font face="courier new" size = <<i>>>▓</font>'
  185. indik_counter += 1
  186. jump 'indik3'
  187. elseif indik_counter < 20:
  188. $ind += '<font face="courier new" size = <<i>>>_</font>'
  189. indik_counter += 1
  190. jump 'indik3'
  191. end
  192. end
  193. killvar 'indik_counter'
  194. killvar 'j'
  195. $ind += '<font face="courier new" size = <<i>>> </font>'
  196. a1 = pcs_dom-sub
  197. if a < 10:
  198. $ind = '<font color=#b3b300>' + $ind + '<<a1>></font>'
  199. elseif a < 30:
  200. $ind = '<font color=#00CED1>' + $ind + '<<a1>></font>'
  201. elseif a <= 70:
  202. $ind = '<font color="blue">' + $ind + '<<a1>></font>'
  203. elseif a <= 90:
  204. $ind = '<font color=#00CED1>' + $ind + '<<a1>></font>'
  205. else
  206. $ind = '<font color=#b3b300>' + $ind + '<<a1>></font>'
  207. end
  208. end
  209. end
  210. end
  211. --- indik ---------------------------------