Advertisement
Eshka

eshOS version 3.0

Dec 12th, 2013
1,439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.47 KB | None | 0 0
  1. system.disableChatCommandDisplay("m", true)
  2. system.disableChatCommandDisplay("clear", true)
  3. tfm.exec.disableAutoNewGame(true)
  4. tfm.exec.disableAutoShaman(true)
  5. tfm.exec.newGame("@4459589")
  6. version = "3.0"
  7. tfm.exec.setUIMapName("<VP>eshOS "..version.." por Eshkation, Bugs/Feedback é aceito! <p")
  8. -- Tables para o EventLoop
  9. n = 0
  10. hora = false
  11. atualizar = false
  12. efeitos = false
  13. tempo = os.date("Hoje é %A, de %B")
  14. messeger = {""}
  15. msn = false
  16.  
  17. --
  18. ui.addTextArea(700, "<B><R><a href='event:on'><font size='9'>O</a></B>", nil, 400, 293, 14, 14, 0, 0, 1.1);
  19. --
  20.  
  21. COLOR = "<VP>"
  22. bordColor = 0x2ECF73
  23.  
  24. function guiColor()
  25. if COLOR == "<VI>" then
  26. bordColor = 0xC53DFF
  27. end
  28. if COLOR == "<VP>" then
  29. bordColor = 0x2ECF73
  30. end
  31. if COLOR == "<N>" then
  32. bordColor = 0xC2C2DA
  33. end
  34. if COLOR == "<CH>" then
  35. bordColor = 0x98E2EB
  36. end
  37. if COLOR == "<ROSE>" then
  38. bordColor = 0xED67EA
  39. end
  40. if COLOR == "<J>" then
  41. bordColor = 0xFFFF00
  42. end
  43. if COLOR == "<R>" then
  44. bordColor = 0xCB546B
  45. end
  46. if COLOR == "<V>" then
  47. bordColor = 0x009D9D
  48. end
  49. end
  50.  
  51.  
  52. function areaTrabalho()
  53. ui.addTextArea(1, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>What you want to do?</font>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  54. ui.addTextArea(2, "<a href='event:tfm'>TFM</a>", nil, 190, 150, 28, 20, 1, bordColor, 1.1);
  55. ui.addTextArea(3, "<a href='event:atualizar'>UPD</a>", nil, 240, 150, 28, 20, 1, bordColor, 1.1);
  56. ui.addTextArea(4, "<a href='event:hora'>TIM</a>", nil, 290, 150, 28, 20, 1, bordColor, 1.1);
  57. ui.addTextArea(5, "<a href='event:cor'>COL</a>", nil, 340, 150, 30, 20, 1, bordColor, 1.1);
  58. ui.addTextArea(6, "<a href='event:status'>STS</a>", nil, 390, 150, 30, 20, 1, bordColor, 1.1);
  59. ui.addTextArea(7, "<a href='event:mp3'>MP3</a>", nil, 440, 150, 30, 20, 1, bordColor, 1.1);
  60. ui.addTextArea(8, "<a href='event:efeitodetela'>SCR</a>", nil, 490, 150, 30, 20, 1, bordColor, 1.1);
  61. ui.addTextArea(9, "<a href='event:msn'>MSN</a>", nil, 540, 150, 30, 20, 1, bordColor, 1.1);
  62. ui.addTextArea(10, "<a href='event:help'>HLP</a>", nil, 590, 150, 30, 20, 1, bordColor, 1.1);
  63. end
  64.  
  65. function removeText()
  66. for i = 60, 1, -1 do
  67. ui.removeTextArea(i)
  68. end
  69. end
  70.  
  71. function eventTextAreaCallback(textAreaId, playerName, callback)
  72. if (callback=="on") then
  73. ui.addTextArea(1, "<P align='center'>"..COLOR.."<b><font size='20'>eshOS</P></b><BR><font size='14'>O eshOS was started successfully!<BR>Attention, everything that is done on your computer will be shown to all players, if you want to play alone empty your tribe house.<BR><BR><a href='event:iniciar'>Start</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  74. end
  75.  
  76. if(callback=="off") then
  77. atualizar = false
  78. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Really want to exit?</font><BR><BR><BR><BR><font size='17'><a href='event:sim'>YES</a>      <a href='event:iniciar'>NO</a>", nil, 179, 75, 455, 208, 1, 1, 1.1);
  79. ui.addTextArea(700, "<B><R><a href='event:on'><font size='9'>O</a></B>", nil, 400, 293, 14, 14, 0, 0, 1.1);
  80. end
  81. if(callback=="sim") then
  82. ui.addTextArea(700, "<B><VP><a href='event:off'><font size='9'>O</a></B>", nil, 400, 293, 14, 14, 0, 0, 1.1);
  83. for i = 600, 1, -1 do
  84. ui.removeTextArea(i)
  85. end
  86. end
  87.  
  88. if (callback=="help") then
  89. removeText()
  90. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='15'>Understand the acronyms!</font><BR><BR><font size='10'><B>TFM</B> - Transformice<BR><B>ATU</B> - Check if there are any new update <BR><B>TIM</B> - Date and Time!<BR><B>COL</B> - Change the gui color of eshOS!<BR><B>STS</B> - See your status!<BR><B>MP3</B> - Song search!<BR><B>SCR</B> - Rest mode!<BR><B>MSN</B> - Send messages! use !m [text] to send a message, and use the mouse scroll to down the messages.<BR><a href='event:iniciar'>Back</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  91. end
  92.  
  93. if (callback=="iniciar") then
  94. areaTrabalho()
  95. ui.removeTextArea(101)
  96. ui.removeTextArea(102)
  97. ui.removeTextArea(103)
  98. efeitos = false
  99. hora = false
  100. msn = false
  101. end
  102.  
  103. if (callback=="tfm") then
  104. ui.addTextArea(101, "<P align='center'><font size='20'><b>eshOS - Fatal Error</B></P><font size='13'>An error was encountered while attempting to perform the operation TFM_ESHOS.EXE<BR>   If the error continues please follow the instructions below:<BR>1. Uninstall the last programs that you installed <BR>2. Check if your computer has enough memory to perform the operation <BR>3. Restart you computer <BR>Error 1: Out of memory.</font>", nil, 179, 75, 455, 208, 130, 130, 1);
  105. removeText()
  106. end
  107.  
  108. if (callback=="msn") then
  109. removeText()
  110. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Messeger!</font><BR><BR><p aling='left'><font size='10'>"..messeger[1].."<BR><a href='event:iniciar'>Back</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  111.  
  112. msn = true
  113. end
  114.  
  115. if (callback=="atualizar") then
  116. atualizar = true
  117. removeText()
  118. end
  119.  
  120. if(callback=="hora")then
  121. hora = true
  122. removeText()
  123. end
  124.  
  125. if(callback=="cor")then
  126. removeText()
  127. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Change the eshOS color!</font><BR><BR><font size='10'><BR><VP><a href='event:corverde'>GREEN</a><BR><VI><a href='event:corRoxo'>PURPLE</a><BR><N><a href='event:corbranca'>WHITE</a><BR><CH><a href='event:corazul'>LIGHT BLUE</a><BR><ROSE><a href='event:corrosa'>PINK</a><BR><J><a href='event:coramarelo'>YELLOW</a><BR><R><a href='event:corvermelho'>RED</a><BR><V><a href='event:corazul2'>BLUE</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  128. guiColor()
  129. end
  130. if(callback=="corverde")then
  131. COLOR = "<VP>"
  132. guiColor()
  133. areaTrabalho()
  134. ui.removeTextArea(101)
  135. ui.removeTextArea(102)
  136. end
  137. if(callback=="corRoxo")then
  138. COLOR = "<VI>"
  139. guiColor()
  140. areaTrabalho()
  141. ui.removeTextArea(101)
  142. ui.removeTextArea(102)
  143. end
  144. if(callback=="corbranca")then
  145. COLOR = "<N>"
  146. guiColor()
  147. areaTrabalho()
  148. ui.removeTextArea(101)
  149. ui.removeTextArea(102)
  150. end
  151. if(callback=="corazul")then
  152. COLOR = "<CH>"
  153. guiColor()
  154. areaTrabalho()
  155. ui.removeTextArea(101)
  156. ui.removeTextArea(102)
  157. end
  158. if(callback=="corrosa")then
  159. COLOR = "<ROSE>"
  160. guiColor()
  161. areaTrabalho()
  162. ui.removeTextArea(101)
  163. ui.removeTextArea(102)
  164. end
  165. if(callback=="coramarelo")then
  166. COLOR = "<J>"
  167. guiColor()
  168. areaTrabalho()
  169. ui.removeTextArea(101)
  170. ui.removeTextArea(102)
  171. end
  172. if(callback=="corvermelho")then
  173. COLOR = "<R>"
  174. guiColor()
  175. areaTrabalho()
  176. ui.removeTextArea(101)
  177. ui.removeTextArea(102)
  178. end
  179. if(callback=="corazul2")then
  180. COLOR = "<V>"
  181. guiColor()
  182. areaTrabalho()
  183. ui.removeTextArea(101)
  184. ui.removeTextArea(102)
  185. end
  186.  
  187. if(callback=="status")then
  188. removeText()
  189. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Player Stats</font><BR><BR><font size='10'><B>Name:</B> "..playerName.."<BR><B>Tribe:</B> "..tfm.get.room.playerList[playerName].tribeName.."<BR><B>Cfm stats</B> : <A href='en.cheese.formice.com/mouse/"..playerName.."'>HERE</a><BR><BR><a href='event:iniciar'>Back</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  190. end
  191. if(callback=="mp3")then
  192. removeText()
  193. ui.addPopup(0, 2, "Type the music name here !", playerName, 303, 156, 200,20)
  194. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='15'>Search a song!</font> <BR><BR><BR><BR><BR><BR><a href='event:iniciar'>Back</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  195. end
  196. if(callback=="efeitodetela")then
  197. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='15'>Rest Mode!</font> <BR><BR><BR><BR><a href='event:iniciar'>Back</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  198. efeitos = true
  199. removeText()
  200. end
  201. end
  202.  
  203. function eventPopupAnswer(popupId, playerName, answer)
  204. if popupId == 0 then
  205. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='15'>Search a song!</font> <BR><BR><a href='beemp3s.org/index.php?q="..answer.."'>Start the search</a><BR><BR><a href='event:iniciar'>Back</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  206. end
  207. end
  208.  
  209. function eventLoop()
  210.  
  211. if atualizar == true then
  212. n = n+1
  213. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Checking updates..</font><BR><BR><font size='17'>"..n.."%", nil, 179, 75, 455, 208, 1, 1, 0.3);
  214. end
  215.  
  216. if n == 100 then
  217. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>UPDATED!</font><BR><BR><font size='15'><a href='event:iniciar'>Back</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  218. atualizar = false
  219. n = 0
  220. end
  221.  
  222. if hora == true then
  223. tempo = os.date("Hoje é %A, de %B")
  224. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Current time(Portugal time)</font><BR><BR><font size='17'>"..tempo.."<BR><BR><font size='15'><a href='event:iniciar'>Back</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  225. end
  226.  
  227. if efeitos == true then
  228. for i=20,1,-1 do
  229. tfm.exec.displayParticle(math.random(0, 30), math.random(200,600), math.random(100,290),0,0,0,0,nil)
  230. end
  231. end
  232. end
  233.  
  234.  
  235. function eventChatCommand(playerName, message)
  236.    if (message:sub(0,1) == [[m]]) then
  237.       table.insert(messeger,1,messeger[1].."<b>["..playerName.."]</b> "..message:sub(3).."<BR>")
  238. end
  239. if msn == true then
  240. ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Messeger!</font><BR><BR><p aling='left'><font size='10'>"..messeger[1].."<BR><a href='event:iniciar'>Back</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
  241. end
  242.    if (message=="clear") then
  243.    for i = 5000,1,-1 do
  244.       table.remove(messeger,1)
  245.       table.insert(messeger,1,"")
  246. end
  247. end
  248. end
  249.  
  250. guiColor()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement