Advertisement
Hpassospi

popop

Jan 7th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.75 KB | None | 0 0
  1. bot = {
  2.         admin = "Hpassos",
  3.     name = "Tribo",
  4.     level = "Tópico irregular",
  5.     joinDate = "+300",
  6.     tribe = "Hpassos",
  7.     lang = "BR",
  8.     says = "<font color='#F0A78E'>> [%s] [<font color='#E88F4F'><a href='event:profil'>%s</a></font>] %s</font>",
  9.     saysMod = "<font color='#ED67EA'>• [~Modération] %s</font>",
  10.     saysInfo = "<font color='#6C77C1'>%s</font>",
  11.     saysError = "<font color='#CB546B'>%s</font>",
  12.     stats = {
  13.         ["sham"] = 555, ["shamHard"] = 000, ["shamCheese"] = 1000, ["mouseFirst"] = 4650, ["mouseCheese"] = 789456123, ["mouseBootcamp"] = 3589778
  14.     },
  15.     titles = {
  16.         "Tópico Irregular", "Bot Oficial", "Rasoco"
  17.     },
  18.         msg = {
  19.         ["welcome"] = "Bem-vindo ao cafofo da tribo Tópico irregular! Duvidas? Procure Hpassos! Para saber os comandos, digite: !comd",
  20.         ["mg"] = "Não temos mini-games no momento, estamos planejando...",
  21.         ["adm"] = "Administrador da tribo online: Rasoco e Hpassos",
  22.         ["comd"] = "!r - exibe as regras | adm - exibe os administradores online | mg - exibe os mini-games",
  23.         ["r"] = "Sem spam, flood, insultos. Respeite todos e não abuse dos poderes.",
  24.         ["ca"] = "say | mod | info | error",
  25.         },
  26.         commandsAdmin = {
  27.         ["say"] = "", ["mod"] = "", ["info"] = "", ["error"] = ""
  28.         }
  29. }
  30.  
  31. function notify(message, name, type)
  32.         if type == 0 then -- Normal.
  33.                 ui.addTextArea(0, string.format(bot.says, bot.lang, bot.name, message), name, 5, 374, 480, 50, 0x1C3C41, 0x1C3C41, 0.9, true)
  34.         elseif type == 1 then -- Modération.
  35.                 ui.addTextArea(0, string.format(bot.saysMod, message), name, 5, 374, 480, 50, 0x1C3C41, 0x1C3C41, 0.9, true)
  36.         elseif type == 2 then -- information.
  37.                 ui.addTextArea(0, string.format(bot.saysInfo, message), name, 5, 374, 480, 50, 0x1C3C41, 0x1C3C41, 0.9, true)
  38.         else -- Error
  39.                 ui.addTextArea(0, string.format(bot.saysError, message), name, 5, 374, 480, 50, 0x1C3C41, 0x1C3C41, 0.9, true)
  40.         end
  41.                
  42.         tfm.exec.displayParticle(15, 505, 380, 0, 0, 0, 0, name)
  43. end
  44.  
  45. function main()
  46.         for command, text in pairs(bot.msg) do
  47.                 system.disableChatCommandDisplay(command, true)
  48.         end
  49.        
  50.         for command, text in pairs(bot.commandsAdmin) do
  51.                 system.disableChatCommandDisplay(command, true)
  52.         end
  53.        
  54.         notify(bot.msg.welcome, nil, 0)
  55. end
  56.  
  57. function eventNewPlayer(name)
  58.         notify(bot.msg.welcome, name)
  59. end
  60.  
  61. function eventChatCommand(name, command)
  62.         if bot.msg[command] then
  63.                 notify(bot.msg[command], name, 0)
  64.         elseif command:sub(0, 3) == "say" and name == bot.admin then
  65.                 notify(command:sub(5), nil, 0)
  66.         elseif command:sub(0, 3) == "mod" and name == bot.admin then
  67.                 notify(command:sub(5), nil, 1)
  68.         elseif command:sub(0, 4) == "info" and name == bot.admin then
  69.                 notify(command:sub(6), nil, 2)
  70.         elseif command:sub(0, 5) == "error" and name == bot.admin then
  71.                 notify(command:sub(7), nil, 3)
  72.         else
  73.                 notify("Este comando não existe. Para ver todos os comandos, digite: !comd", name, 3)
  74.         end
  75. end
  76.  
  77. function openBotProfile()
  78.         barre = "<p align='center'><font color='#11181C'>_________________________________________</font><br><font color='#608599'>&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯&#773;¯¯¯¯¯¯¯¯¯¯¯¯</b>"
  79.        
  80.         local name = "<font size=\"25\" color=\"#C2C2DA\" face=\"Soopafresh\" border=\"#000000\" border-size=\"3px\">~" .. bot.name .. "</font><br>" .. barre .. "</p>"
  81.         local niveau = "<p align=\"left\"><font color=\"#C2C2DA\">  Nome da Tribo : <font color=\"#BABD2F\">" .. bot.level .. "</font><br>"
  82.         local date = "  Membros : <font color=\"#6C77C1\">" .. bot.joinDate .. "</font><br>"
  83.         local titre = "  ~Tribo : <font color=\"#009D9D\">«" .. bot.titles[2] .. "»</font><br>"
  84.         local tribu = "  Líder(es) : <font color=\"#BABD2F\">" .. bot.tribe .. "</font><br><br>"
  85.         local cham = "  Shaman</font><font color=\"#6C77C1\"><br>"
  86.         local chamSaves = "    • Ratos salvos com sucesso : " .. bot.stats.sham .. " / <font color=\"#009D9D\">" .. bot.stats.shamHard .. "</font><br>"
  87.         local chamCheese = "    • Queijos coletados pessoalmente : " .. bot.stats.shamCheese .. "<br><br>"
  88.         local souris = "<font color=\"#C2C2DA\">  Rato</font><br>"
  89.         local sourisFirst = "<font color=\"#6C77C1\">    • Queijos coletados em primeiro : " .. bot.stats.mouseFirst .."<br>"
  90.         local sourisCheese = "    • Queijos coletados : " .. bot.stats.mouseCheese .. "<br>"
  91.         local sourisBoots = "    • Bootcamp : " .. bot.stats.mouseBootcamp .. "</font><br><br>"
  92.         local titres = "<font color=\"#C2C2DA\">  Títulos desbloqueados: </font><br>"
  93.         local titre1 = "<font color=\"#6C77C1\">    • «" .. bot.titles[1] .. "»<br>"
  94.         local titre2 = "<font color=\"#6C77C1\">    • «" .. bot.titles[2] .. "»<br>"
  95.         local titre3 = "<font color=\"#6C77C1\">    • «" .. bot.titles[3] .. "»<br>"
  96.        
  97.         profil = name .. niveau .. date .. titre .. tribu .. cham .. chamSaves .. chamCheese .. souris .. sourisFirst .. sourisCheese .. sourisBoots .. titres .. titre1 .. titre2 .. titre3
  98.  
  99.         ui.addPopup(0, 0, profil, nil, 250, 45, 300, true)
  100. end
  101.  
  102. function eventTextAreaCallback(id, name, callback)
  103.         if callback == "profil" then
  104.             openBotProfile()
  105.         end
  106. end
  107.  
  108. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement