Exemplo n.º 1
0
import socket, sys
import language as lang

ans = [4348, 2107, 5776, 2038, 3737, 496, 1729, 1458, 3360, 3863, 1984, 4809, 2155]

if langCode == 'n':
    newLang = str(input("magyar : 0\nEnglish: 1\nEnter your language's number/Add meg a nyelved számát: "))
    langf = open('gorclientOldDesign.py', 'r+')
    if newLang == '0':
        langf.write("# -*-coding:utf8;-*-\nlangCode = '0w'\n")
        langCode = "0w"
    elif newLang == '1':
        langf.write("# -*-coding:utf8;-*-\nlangCode = '1w'\n")
        langCode = "1w"

yuwin, opwin, nowin, winstr5, winstr10, even, ansNev, guessnumpre1, guessnumpre2, guessnumprex, gnwin1, gnnowin0, gnnowin1, internal, help = lang.lang(langCode)
noconn = internal[1]
wait = internal[6]
badn = internal[7]
cora = internal[13]
yourn = internal[9]
opn = internal[10]
youra = internal[11]
opa = internal[12]

HOST = 'krimanpi.duckdns.org'
PORT = 3737

try:
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((HOST, PORT))
Exemplo n.º 2
0
from discord.ext import commands
from core.classes import Cog_Extension
import requests
import json
from datetime import datetime
from operator import itemgetter
import discord
from discord_slash.utils.manage_commands import create_option, create_choice
from discord_slash import cog_ext,SlashContext
from language import language as lang

lang = lang()
lang = lang.langpref()['worldState']

class worldState(Cog_Extension):
  tag = "Warframe"

  def timeConv(self,expiry):
    h = int(expiry[11:13]) + 8
    if h >= 24:
      h -=24
    m = expiry[14:16]
    m = ("0" if len(m) == 1 else "") + m
    s = expiry[17:19]
    s = ("0" if len(s) == 1 else "") + s
    return(str(h)+":"+m)
  
  @commands.command(name='POE',aliases=lang['poe.aliases'],brief=lang['poe.brief'],description=lang['poe.description'])
  async def eidolontime(self,ctx):
    html = requests.get('https://api.warframestat.us/pc/cetusCycle').text
    data = json.loads(html)
Exemplo n.º 3
0
                                    #
blank = widht / 36 * ' '            #
gor = '\n' + blank + '           █▀▀█ █▀▀█ █▀▄▀█ █▀▀   █▀▀█ █▀▀    █▀▀█ █  █ █   █▀▀ █▀▀\n' + blank + '           █ ▄▄ █▄▄█ █ ▀ █ █▀▀   █  █ █▀▀    █▄▄▀ █  █ █   █▀▀ ▀▀█\n' + blank + '           █▄▄█ ▀  ▀ ▀   ▀ ▀▀▀   ▀▀▀▀ ▀      █  █  ▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀\n'


if langCode == 'n':
    newLang = str(input("magyar : 0\nEnglish: 1\nEnter your language's number/Add meg a nyelved számát: "))
    langf = open('gorclient.py', 'r+')
    if newLang == '0':
        langf.write("# -*-coding:utf8;-*-\nlangCode = '0l'")
        langCode = "0l"
    elif newLang == '1':
        langf.write("# -*-coding:utf8;-*-\nlangCode = '1l'")
        langCode = "1l"

yuwin, opwin, nowin, winstr5, winstr10, even, newAns, guessnumpre1, guessnumpre2, guessnumprex, gnwin1, gnnowin0, gnnowin1, help, internal = lang.lang(langCode)

even1, even2, even3, even4, even5 = even[0], even[1], even[2], even[3], even[4]
guessnumprex1, guessnumprex2, guessnumprex3, guessnumprex4 = guessnumprex[0], guessnumprex[1], guessnumprex[2], guessnumprex[3],
noconn = internal[3]
# SOCKET
HOST = 'krimanpi.duckdns.org'
PORT = 3737
try:
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((HOST, PORT))
    print s.recv(4096) # servermsg
except socket.error:
    print internal[28]
#####################################################