Compartilhe
Ver o tópico anteriorIr em baixoVer o tópico seguinte
avatar
MEMBRO

MEMBRO
Mensagens : 62
Data de inscrição : 01/08/2016
Idade : 18
Localização : Türkiye
Ver perfil do usuáriohttp://www.lidemice.com

Importante 1.370 Login.mp3 & Login Messages (def loginPlayer)

em Sab Maio 06, 2017 4:09 pm
Código:
    def loginPlayer(this, playerName, password, startRoom):
        playerName = "Souris" if playerName == "" else playerName
        if password == "":
            playerName = this.server.checkAlreadyExistingGuest("*" + (playerName[0].isdigit() or len(playerName) > 12 or len(playerName) < 3 or "Souris" if "+" in playerName else playerName))

        if not this.canLogin[0] and not this.canLogin[1]:
            this.transport.loseConnection()
            return

        if not this.isGuest and playerName in this.server.userPermaBanCache:
            this.sendPacket(Identifiers.old.send.Player_Ban_Login, [])
            this.transport.loseConnection()
            return

        if not this.isGuest and playerName in this.server.userTempBanCache:
            banInfo = this.server.getTempBanInfo(playerName)
            timeCalc = TFMUtils.getHoursDiff(int(banInfo[0]))
            if timeCalc <= 0:
                this.server.removeTempBan(playerName)
            else:
                this.sendPacket(Identifiers.old.send.Player_Ban_Login, [timeCalc * 3600000, str(banInfo[1])])
                this.transport.loseConnection()
                return

        if this.server.checkConnectedAccount(playerName):
            this.sendPacket(Identifiers.send.Login_Result, chr(1))
        else:
            vipTime, letters, gifts, messages = 0, "", "", ""
            if not this.isGuest:
                this.Cursor.execute("select * from users where Username = ? and Password = ?", [playerName, password])
                rs = this.Cursor.fetchone()
                if rs:    
                    this.privLevel = rs["PrivLevel"]
                    this.playerID = rs["PlayerID"]
                    this.TitleNumber = rs["TitleNumber"]
                    this.firstCount = rs["FirstCount"]
                    this.cheeseCount = rs["CheeseCount"]
                    this.shamanCheeses = rs["ShamanCheeses"]
                    this.shopCheeses = rs["ShopCheeses"]
                    this.shopFraises = rs["ShopFraises"]
                    this.shamanSaves = rs["ShamanSaves"]
                    this.hardModeSaves = rs["HardModeSaves"]
                    this.divineModeSaves = rs["DivineModeSaves"]
                    this.bootcampCount = rs["BootcampCount"]
                    this.shamanType = rs["ShamanType"]
                    this.shopItems = rs["ShopItems"]
                    this.shamanItems = rs["ShamanItems"]
                    this.clothes = rs["Clothes"].split("|")
                    this.playerLook = rs["Look"]
                    this.shamanLook = rs["ShamanLook"]
                    this.MouseColor = rs["MouseColor"]
                    this.ShamanColor = rs["ShamanColor"]
                    this.regDate = rs["RegDate"]
                    this.shopBadges = rs["Badges"].split(",")
                    this.cheeseTitleList = rs["CheeseTitleList"].split(",")
                    this.firstTitleList = rs["FirstTitleList"].split(",")
                    this.shamanTitleList = rs["ShamanTitleList"].split(",")
                    this.shopTitleList = rs["ShopTitleList"].split(",")
                    this.bootcampTitleList = rs["BootcampTitleList"].split(",")
                    this.hardModeTitleList = rs["HardModeTitleList"].split(",")
                    this.divineModeTitleList = rs["DivineModeTitleList"].split(",")
                    this.specialTitleList = rs["SpecialTitleList"].split(",")
                    this.banHours = rs["BanHours"]
                    level = rs["ShamanLevel"].split("/")
                    this.shamanLevel = int(level[0])
                    this.shamanExp = int(level[1])
                    this.shamanExpNext = int(level[2])                    
                    for skill in rs["Skills"].split(";"):
                        values = skill.split(":")
                        if len(values) >= 2:
                            this.playerSkills[int(values[0])] = int(values[1])
                    this.lastOn = rs["LastOn"]
                    this.friendsList = rs["FriendsList"].split(",")
                    this.ignoredsList = rs["IgnoredsList"].split(",")
                    this.gender = rs["Gender"]
                    this.lastDivorceTimer = rs["LastDivorceTimer"]
                    this.marriage = rs["Marriage"]
                    
                    tribeInfo = rs["TribeInfo"].split("#")
                    if len(tribeInfo) == 3:
                        this.tribeCode = int(tribeInfo[0])
                        this.tribeRank = int(tribeInfo[1])
                        this.tribeJoined = int(tribeInfo[2])
                        this.tribeData = this.server.getTribeInfo(this.tribeCode)
                        this.tribeName = this.tribeData[0]
                        
                    this.survivorStats = map(int, rs["SurvivorStats"].split(","))
                    this.racingStats = map(int, rs["RacingStats"].split(","))
                    this.nowCoins = rs["NowCoins"]
                    this.nowTokens = rs["NowTokens"]                    
                    for consumable in rs["Consumables"].split(";"):
                        values = consumable.split(":")
                        if len(values) >= 2:
                            this.playerConsumables[int(values[0])] = int(values[1])                            
                    this.equipedConsumables = rs["EquipedConsumables"].split("|")
                    letters = rs["Letters"]
                    this.pet = rs["Pet"]
                    this.petEnd = 0 if this.pet == 0 else TFMUtils.getTime() + rs["PetEnd"]
                    this.shamanBadges = rs["ShamanBadges"].split(",")
                    this.equipedShamanBadge = rs["EquipedShamanBadge"]
                    totem = this.server.getTotemData(playerName)
                    if len(totem) == 2: this.STotem = [int(totem[0]), totem[1]]
                    gifts = rs["Gifts"]
                    message = rs["Messages"]
                    vipTime = rs["VipTime"]
                    this.custom = rs["customItens"].split(",")
                else:
                    reactor.callLater(5, lambda: this.sendPacket(Identifiers.send.Login_Result, chr(2)))
                    return

            if this.privLevel == -1:
                this.sendPacket(Identifiers.old.send.Player_Ban_Login, [0, "Account Locked."])
                this.transport.loseConnection()
                return

            this.server.lastPlayerCode += 1
            this.Username = playerName
            this.playerCode = this.server.lastPlayerCode
            this.Cursor.execute("insert into LoginLog select ?, ? where not exists (select 1 from LoginLog where Username = ? and IP = ?)", [playerName, this.ipAddress, playerName, this.ipAddress])


            this.clothes = filter(None, this.clothes)
            this.shopBadges = filter(None, this.shopBadges)
            this.custom = filter(None, this.custom)
            this.shamanBadges = filter(None, this.shamanBadges)
            this.shopTitleList = filter(None, this.shopTitleList)
            this.firstTitleList = filter(None, this.firstTitleList)
            this.cheeseTitleList = filter(None, this.cheeseTitleList)
            this.shamanTitleList = filter(None, this.shamanTitleList)
            this.specialTitleList = filter(None, this.specialTitleList)
            this.bootcampTitleList = filter(None, this.bootcampTitleList)
            this.hardModeTitleList = filter(None, this.hardModeTitleList)
            this.divineModeTitleList = filter(None, this.divineModeTitleList)

            for name in ["cheese", "first", "shaman", "shop", "bootcamp", "hardmode", "divinemode"]:
                this.checkAndRebuildTitleList(name)

            this.sendCompleteTitleList()
            this.shopModule.checkAndRebuildBadges()
            
            for title in this.titleList:
                if str(title).split(".")[0] == str(this.TitleNumber):
                    this.TitleStars = int(str(title).split(".")[1])
                    break

            this.isMute = playerName in this.server.userMuteCache
            this.server.players[this.Username] = this
            this.skillModule.sendShamanSkills()
            this.skillModule.sendExp(this.shamanLevel, this.shamanExp, this.shamanExpNext)
            this.sendLogin()
            this.sendPlayerIdentification()
            this.shopModule.sendShamanItems()
            if this.shamanSaves >= 500:
                this.sendShamanType(this.shamanType, (this.shamanSaves >= 2500 and this.hardModeSaves >= 1000))

            this.server.checkPromotionsEnd()
            this.sendTimeStamp()
            this.sendPromotions()
            this.sendPacket(Identifiers.send.Email_Confirmed, chr(1))
            
            if this.privLevel == 2:
                this.checkVip(vipTime)

            this.tribulle.sendPlayerInfo()
            this.tribulle.sendFriendsList(None)
            this.tribulle.sendIgnoredsList()
            this.tribulle.sendTribe(False)

            for client in this.server.players.values():
                if this.Username in client.friendsList and client.Username in this.friendsList:
                    client.tribulle.sendFriendConnected(this.Username)

            if not this.tribeName == "":
                this.tribulle.sendTribeMemberConnected()

            if this.privLevel >= 1:
                this.sendPacket(Identifiers.old.send.Music, ["http://lidemice.esy.es/mp3/login.mp3"])
                this.sendMessage("<N>〤 LideMice'ye Hoşgeldin<PT><N>.")
                this.sendMessage("<N>〤 Komutların: <PT>/ranking /müzikdinle /radyodinle /help<N>.")
                this.sendMessage("<N> Artık<PT> Envanter <N> eşyalarını<PT>village.<N>'deki <PT>NPC<N>'lerden alabilirsiniz.")
                this.sendMessage("<N>〤 Badges: <PT>Tüm rozetleri almak için /freebadges<N>.")
                this.sendMessage("<N>〤 isim Rengi:<PT> İsim rengini belirlemek için /namecor (RENK)<N>.")
                this.sendMessage("<N>〤 Title:<PT> Etkinlik Titleleri için /unvanlar<N>.")
                this.sendMessage("<N>〤 /lidemice <PT>: Özel titleleri almak için.<br>")
                this.sendMessage("<N>〤 /param <PT>: Paranıza bakabilirsiniz.<br>")
                this.sendMessage("<N>〤 /election <PT>: Sende aday olabilirsin!<br>")
                this.sendMessage("<N>〤 /yetki <PT>: Nasıl yetkili olunur ?.<br>")
                message = "<p align='center'><J>YARDIM</p><br><br><p align='left'>"
                message += '<img src="http://1.bp.blogspot.com/-9SA6gXmkKgI/VvkVQy_urKI/AAAAAAAAAaE/47hD2A55HUEXK3QxNSgYZQmH-1QZvJrUA/s1600/Cac8W.png" align="left">'              
                message += " <VP>Oyun İçi Komutlar:<br>"
                message += " <r>*Listenin devamı yakında gelecektir.<br><br>"
                message += "<J>/mod <BL>: Çevrimiçi yetkilileri gösterir.<br>"
                message += "<J>/ekip <BL>: Ekipteki kişileri görmenizi sağlar.<br>"
                message += "<J>/renkler <BL>: Oyun içi özel renklerin komutlarını gösterir.<br>"
                message += "<J>/unvanlar <BL>: Unvan listesini açar.<br>"
                message += "<J>/radyodinle <BL>: Radyo listesini açar.<br>"
                message += "<J>/cevrimici <BL>: Oyundaki çevrimiçi kişi sayısını gösterir.<br>"
                message += "<J>/unvanlar <BL>: Etkinlik severler için titleler.<br>"
                message += "<J>/yetki <BL>: Nasıl yetkili olunur ?<br>"
                message += "<J>/lidemice <BL>: Özel titleleri almak için.<br>"
                message += "<J>/ok <BL>: Oyuncu özel konuşma komutları.<br>"
                message += "<J>/vk <BL>: Vip özel konuşma komutları.<br>"
                message += "<J>/election <BL>: Sende aday ol!<br>"
                message += "</font></p>"
                this.sendLogMessage(message.replace("&#", "&#").replace("<", "<"))
                message = "<p align='center'><J>Yenilikler</p><br><br><p align='left'>"
                message += '<img src="http://i.hizliresim.com/m33E22.jpg" align="right">'  
 
            if this.privLevel >= 4:
                this.sendStaffLogin(False)
                
            this.sendInventoryConsumables()
            this.checkLetters(letters)
            this.shopModule.checkGiftsAndMessages(gifts, messages)

            if not startRoom == "" and not startRoom == "1":
                this.enterRoom(this.server.checkRoom(startRoom, this.Langue))
            else:
                this.enterRoom(this.server.recommendRoom(this.Langue))
                
            this.resSkillsTimer = reactor.callLater(600, setattr, this, "canResSkill", True)


`~ SUKELACİ ~`


Última edição por Sukelaci em Ter Maio 09, 2017 1:55 am, editado 2 vez(es)
avatar
ADMINISTRADOR

ADMINISTRADOR
Mensagens : 963
Data de inscrição : 25/12/2014
Idade : 19
Localização : Ontário, Canadá
Ver perfil do usuáriohttps://www.aulamice.org/

Importante Re: 1.370 Login.mp3 & Login Messages (def loginPlayer)

em Dom Maio 07, 2017 7:58 am
Para melhorar, coloque o código:
 
Código:
AQUI DENTRO



Ferramenta:

_________________
Oi Convidado, eu sou o Nikopark dono dessa bagaça, prazer em conhece-ló.
Minha empresa de host: www.sendweb.host
Minha empresa de hardware: www.sendweb.host

Meus contatos pessoais estão em meu perfil.
avatar
MEMBRO

MEMBRO
Mensagens : 62
Data de inscrição : 01/08/2016
Idade : 18
Localização : Türkiye
Ver perfil do usuáriohttp://www.lidemice.com

Importante Re: 1.370 Login.mp3 & Login Messages (def loginPlayer)

em Dom Maio 07, 2017 8:04 am
@NikoPark Thanks. Smile
avatar
MEMBRO

MEMBRO
Mensagens : 103
Data de inscrição : 01/04/2015
Idade : 15
Ver perfil do usuáriohttp://s1.miceup.top

Importante Re: 1.370 Login.mp3 & Login Messages (def loginPlayer)

em Dom Maio 07, 2017 9:07 pm
Coloque meus créditos pela Layout de entrada.
avatar
MODERADOR

MODERADOR
Mensagens : 138
Data de inscrição : 19/01/2015
Ver perfil do usuáriohttp://www.nowmice.top

Importante Re: 1.370 Login.mp3 & Login Messages (def loginPlayer)

em Seg Maio 08, 2017 10:27 pm
Se for pra pedir para por os créditos, estamos lascados...
avatar
NOVATO

NOVATO
Mensagens : 3
Data de inscrição : 04/04/2015
Idade : 17
Localização : Bahia
Ver perfil do usuáriohttp://www.transforatinho.me

Importante Re: 1.370 Login.mp3 & Login Messages (def loginPlayer)

em Sex Maio 26, 2017 12:47 am
ctrl c, ctrl v
Conteúdo patrocinado

Importante Re: 1.370 Login.mp3 & Login Messages (def loginPlayer)

Ver o tópico anteriorVoltar ao TopoVer o tópico seguinte
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum