Advertisement
KananGamer

[TFM-LUA] Cochicho fake

Sep 16th, 2019
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.05 KB | None | 0 0
  1. local target = "Tigrounette#0001"
  2.  
  3. local chat = {
  4.     {"eae", "tranquilo?"};
  5.     {"Noob!"};
  6.     {"is this conversa fake?"};
  7.     {"provável"};
  8. }
  9.  
  10. local config = {
  11.     firstmessage = true;
  12.     community = "br";
  13.     room = "Sala";
  14. }
  15.  
  16. function format_username(username)
  17.     local user, tag = username:gmatch('(.-)#[0-9]+$')():lower():gsub('%a', string.upper, 1), username:gmatch('#([0-9]+)$')();
  18.     return ("%s<font size='10' color='#60608f'>#%s</font>"):format(user, tostring(tag));
  19. end
  20.  
  21. local colored_target = format_username(target);
  22. local final_chat = ''
  23.  
  24. for id, messages in next, chat do
  25.     for _, message in next, messages do
  26.         if (config.firstmessage and id % 2 == 1) or (not config.firstmessage and id % 2 == 0) then
  27.             final_chat = final_chat .. "\n" .. ("<font size='12'><CS>&lt; [<a href='event:nothing'>%s</a>] %s"):format(colored_target, tostring(message))
  28.         else
  29.             final_chat = final_chat .. "\n" .. ("<font family='Verdana' size='12'><CEP>&gt; [%s] [<a href='event:nothing'><CE>%s</CE></a>] %s"):format(config.community, colored_target, tostring(message))
  30.         end
  31.     end
  32. end
  33.  
  34. for index, value in next, {'AutoShaman', 'AutoNewGame', 'AutoTimeLeft', 'PhysicalConsumables', 'AfkDeath', 'MortCommand', 'DebugCommand'} do
  35.     tfm.exec['disable' .. value]()
  36. end
  37.  
  38. tfm.exec.newGame('<C><P D="x_transformice/x_interface/4.jpg,0,200;" /><Z><S><S L="155" X="351" H="17" Y="-255" T="0" P="0,0,0.3,0.2,0,0,0,0" /><S L="36" X="282" H="113" Y="-303" T="0" P="0,0,0.3,0.2,0,0,0,0" /><S L="36" H="113" X="410" Y="-304" T="0" P="0,0,0.3,0.2,0,0,0,0" /><S L="155" H="17" X="348" Y="-352" T="0" P="0,0,0.3,0.2,0,0,0,0" /><S L="3000" o="6a7495" H="41" X="400" Y="180" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="141" X="398" /></D><O /></Z></C>');
  39.  
  40. ui.addTextArea(1, "<BL><font size='12'>@" .. target .. final_chat, nil, 100, 205, 380, 190, 1, 1, 0, true)
  41. ui.addTextArea(2, "<font size='12'><CEP><a href='event:nothing'>>@" .. colored_target, nil, 9, 225, 96, 18, 1, 1, 0, true)
  42. ui.addTextArea(3, "<a href='event:a'><font size='12'><V>#".. config.room .."</a>", nil, 5, 208, 0, 0, 1, 1, 0, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement