Jump to content

Search the Community

Showing results for tags 'anagrama lua'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • A Cidade OTBR
    • OTServ Brasil
    • Atendimento
    • Taverna
  • Projetos Open Source
    • Canary
    • OTClient Redemption
    • MyAAC
  • OpenTibia
    • Notícias e Discussões
    • Suporte - Dúvidas, Bugs, Erros
    • Downloads
    • Tutoriais
    • Show-Off
  • Outros
    • Design

Found 1 result

  1. [LUA] Gerador de Anagramas

    Eu sei que é um script simples, mas como consegui fazer de forma simplificado estou postando aqui. function anagrama(word) local char = {} for i = 1, word:len() do char[i] = 1 end while true do local str = "" for k, v in pairs(char) do str = word:sub(v, v) .. str end print(str) for k, v in pairs(char) do if char[k] < #char then char[k] = char[k] + 1 break else if k == #char then return else for index = 1, k do char[index] = 1 end end end end end end anagrama("ABC")
×