Styck Styck  • 13.02.14 17:16

[Tutorial] Como colocar mapa 777 na sua source. Empty [Tutorial] Como colocar mapa 777 na sua source. 13.02.14 17:16

Como colocar mapa 777 na sua Source!

Olá meus ratinhos da Power Pixel ! Hoje vou ensinar como colocar mapa 777 na sua source! se voce fizer em video, coloque os creditos ;D

1º - Vá na sua db > mapeditor > e crie uma tabela.

  
Atenção: tem de ser igual... senão = vai BUGAR!

Codigo da xml {mapxml}:

Código:

Código:
<C
><P Ca="" L="3200" S="1" F="0" /><Z><S><S Y="220" T="7" H="100" P="0,0,0.1,0.2,10,0,0,0" L="206" X="328" /><S Y="266" T="7" X="437" P="0,0,0.1,0.2,-50,0,0,0" L="120" H="100" /><S Y="362" T="5" H="150" P="0,0,0.3,0.2,30,0,0,0" L="220" X="558" /><S Y="394" T="6" H="50" P="0,0,0.3,0.2,10,0,0,0" L="250" X="788" /><S Y="320" T="9" X="1159" P="0,0,,,,0,0,0" L="2000" H="200" /><S Y="398" T="6" H="210" P="0,0,0.3,0.2,30,0,0,0" L="400" X="404" N="" /><S Y="281" T="6" H="320" P="0,0,0.3,0.2,20,0,0,0" L="200" X="157" N="" /><S Y="257" T="6" H="320" P="0,0,0.3,0.2,0,0,0,0" L="120" X="59" N="" /><S Y="312" T="10" H="250" P="0,0,0.3,0,0,0,0,0" L="30" X="2877" /><S Y="372" T="5" H="133" P="0,0,0.3,0.2,-20,0,0,0" L="91" X="3231" /><S Y="253" T="6" X="132" P="0,0,0.3,0.2,10,0,0,0" L="180" H="40" N="" /><S Y="273" T="6" X="3271" P="0,0,0.3,0.2,-40,0,0,0" L="164" H="300" /><S Y="349" T="5" H="150" P="0,0,0.3,0.2,0,0,0,0" L="100" X="2969" /><S Y="320" T="9" H="200" P="0,0,,,,0,0,0" L="900" X="2609" /><S Y="314" T="6" H="250" P="0,0,0.3,0.2,0,0,0,0" L="164" X="3140" /><S Y="326" T="6" X="3044" P="0,0,0.3,0.2,-30,0,0,0" L="164" H="220" N="" /><S Y="316" T="6" H="55" P="0,0,0.3,0.2,-10,0,0,0" L="129" X="3136" /></S><D><DS Y="83" X="57" /><P Y="348" T="2" X="202" P="1,0" /><P Y="98" T="0" X="28" P="1,0" /><P Y="120" T="5" X="149" P="0,0" /><P Y="258" T="6" X="227" P="0,0" /><P Y="178" T="4" X="358" P="0,0" /><P Y="180" T="6" X="378" P="0,0" /><P Y="168" T="2" X="310" P="0,0" /><P Y="358" T="78" X="702" P="0,0" /><P Y="325" T="78" X="621" P="0,0" /><P Y="281" T="79" X="567" P="0,0" /><P Y="373" T="79" X="824" P="0,0" /><P Y="410" T="79" X="959" P="0,0" /><P Y="413" T="79" X="1491" P="0,0" /><P Y="567" T="1" X="1099" P="0,0" /><T Y="190" X="3082" /><P Y="289" T="1" X="3203" P="0,0" /><P Y="414" T="1" X="3101" P="1,0" /><P Y="229" T="5" X="3017" P="0,0" /><P Y="190" T="3" X="3186" P="0,0" /><P Y="187" T="46" X="2877" P="0,0" /><P Y="401" T="12" X="2832" P="0,0" /><P Y="402" T="12" X="2984" P="0,0" /><P Y="365" T="12" X="2959" P="0,0" /><P Y="298" T="20" P="0,0" X="2626" C="48230c" /><P Y="323" T="20" P="0,0" X="2627" C="48230c" /><P Y="358" T="20" P="0,0" X="2629" C="48230c" /><P Y="387" T="20" P="0,0" X="2630" C="48230c" /><P Y="409" T="20" P="0,0" X="2631" C="48230c" /><P Y="435" T="20" P="0,0" X="2627" C="48230c" /><P Y="354" T="20" X="1932" P="0,0" C="48230c" /><P Y="377" T="20" X="1931" P="0,0" C="48230c" /><P Y="409" T="20" X="1930" P="0,0" C="48230c" /><P Y="444" T="20" X="1929" P="0,0" C="48230c" /><P Y="343" T="32" X="1373" P="0,0" /><P Y="356" T="32" X="1372" P="0,0" /><P Y="372" T="32" X="1375" P="0,0" /><P Y="385" T="32" X="1380" P="0,0" /><P Y="398" T="32" X="1378" P="0,0" /><P Y="411" T="32" X="1374" P="0,0" /><P Y="424" T="32" X="1368" P="0,0" /><P Y="432" T="32" X="1368" P="0,0" /><P Y="526" T="6" X="1636" P="0,0" /><P Y="528" T="6" X="2403" P="0,0" /><P Y="419" T="2" X="1223" P="0,0" /><P Y="426" T="2" X="1834" P="0,0" /><P Y="421" T="2" X="2256" P="0,0" /><P Y="428" T="2" X="2750" P="0,0" /><P Y="427" T="5" X="2538" P="0,0" /><P Y="336" T="5" X="2127" P="0,0" /><P Y="353" T="5" X="2115" P="0,0" /><P Y="368" T="5" X="2117" P="0,0" /><P Y="382" T="5" X="2123" P="0,0" /><P Y="400" T="5" X="2139" P="0,0" /><P Y="413" T="5" X="2140" P="0,0" /><P Y="431" T="5" X="2143" P="0,0" /><P Y="423" T="5" X="1758" P="0,0" /><P Y="430" T="5" X="1398" P="0,0" /><P Y="419" T="5" X="1203" P="0,0" /><P Y="71" T="43" X="2573" P="0,0" /><P Y="105" T="78" X="111" P="0,0" /><F Y="94" X="57" /><P Y="395" T="84" X="829" P="0,0" /><P Y="425" T="84" X="1009" P="0,0" /><P Y="421" T="83" X="1280" P="0,0" /><P Y="425" T="86" P="0,0" X="1451" C="bb5631" /><P Y="417" T="82" X="1540" P="0,0" /><P Y="189" T="82" X="410" P="1,0" /><P Y="420" T="85" P="0,0" X="1699" C="4b8e72" /><P Y="422" T="85" P="0,0" X="2469" C="4b8e72" /><P Y="422" T="87" X="2034" P="0,0" /><P Y="423" T="87" X="2902" P="0,0" /><P Y="425" T="86" P="0,0" X="2699" C="bb5631" /><P Y="231" T="82" X="2989" P="0,0" /><P Y="421" T="88" X="2798" P="0,0" /><P Y="426" T="88" X="2009" P="0,0" /><P Y="268" T="88" X="526" P="0,0" /><P Y="197" T="80" X="3137" P="0,1" /><P Y="216" T="6" X="3130" P="0,0" /><P Y="426" T="80" X="2197" P="0,0" /></D><O /></Z></C>



Agora feche e salve a Db....

Depois vá na source e procure por:


Código:


Código:
 elif event.startswith("map ")


Substitue:


Código:


Código:
elif event.startswith("map ") or event.startswith("np "):
 if not self.room.votingMode:
 if self.privilegeLevel==10 or self.privilegeLevel==6 or self.privilegeLevel==5 or self.privilegeLevel==3:
 if EVENTCOUNT >= 2:
 mapnumber = event.split(" ", 1)[1]
 if mapnumber.startswith("@"):
 mapnumber = mapnumber.replace("@","")
 if mapnumber.isdigit():
 dbcur.execute('select * from mapeditor where code = ?', [mapnumber])
 rrf = dbcur.fetchone()
 if rrf is None:
 if self.Langue=="FR":
 self.sendData("\x06" + "\x14",["Carte introuvable."])
 elif self.Langue=="BR":
 self.sendData("\x06" + "\x14",["Este mapa é inválido."])
 elif self.Langue=="RU":
 self.sendData("\x06" + "\x14",["?????? ???????? ???."])
 elif self.Langue=="TR":
 self.sendData("\x06" + "\x14",["Bu harita geçersiz."])
 elif self.Langue=="CN":
 self.sendData("\x06" + "\x14",["????."])
 elif self.Langue=="EN":
 self.sendData("\x06" + "\x14",["Map not found."])
 else:
 self.sendData("\x06" + "\x14",["Map not found."])
 else:
 self.isDead = True
 self.sendPlayerDied(self.playerCode, self.score)
 self.room.worldChangeSpecific(mapnumber, True)
 else:
 if self.Langue=="FR":
 self.sendData("\x06" + "\x14",["Carte introuvable."])
 elif self.Langue=="BR":
 self.sendData("\x06" + "\x14",["Este mapa é inválido."])
 elif self.Langue=="RU":
 self.sendData("\x06" + "\x14",["?????? ???????? ???."])
 elif self.Langue=="TR":
 self.sendData("\x06" + "\x14",["Bu harita geçersiz."])
 elif self.Langue=="CN":
 self.sendData("\x06" + "\x14",["????."])
 elif self.Langue=="EN":
 self.sendData("\x06" + "\x14",["Map not found."])
 else:
 self.sendData("\x06" + "\x14",["Map not found."])
 else:
 if mapnumber.isdigit():
 self.isDead = True
 self.sendPlayerDied(self.playerCode, self.score)
 self.room.worldChangeSpecific(mapnumber)

Por isto:


Código:



Código:
elif event.startswith("map ") or event.startswith("np "):
 if not self.room.votingMode:
 if self.privilegeLevel==10 or self.privilegeLevel==6 or self.privilegeLevel==5 or self.privilegeLevel==3:
 if EVENTCOUNT >= 2:
 mapnumber = event.split(" ", 1)[1]
 #print mapnumber
 if str(mapnumber) == "666":
 #print 'gmail'
 mapnumber = "@666"
 if str(mapnumber) == "777":
 #print 'gmail'
 mapnumber = "@777"
 if mapnumber.startswith("@"):
 mapnumber = mapnumber.replace("@","")
 if mapnumber.isdigit():
 dbcur.execute('select * from mapeditor where code = ?', [mapnumber])
 rrf = dbcur.fetchone()
 if rrf is None:
 if self.Langue=="FR":
 self.sendData("\x06" + "\x14",["Carte introuvable."])
 else:
 self.sendData("\x06" + "\x14",["<R>Mapa não encontrado."])
 else:
 self.isDead = True
 self.sendPlayerDied(self.playerCode, self.score)
 self.room.worldChangeSpecific(mapnumber, True)
 else:
 if self.Langue=="FR":
 self.sendData("\x06" + "\x14",["Carte introuvable."])
 else:
 self.sendData("\x06" + "\x14",["<R>Mapa não encontrado."])
 else:
 if mapnumber.isdigit():
 self.isDead = True
 self.sendPlayerDied(self.playerCode, self.score)
 self.room.worldChangeSpecific(mapnumber)

Agora procure por:


Código:

Código:
def sendNewPartyCustomMap(self, mapcode, mapxml, mapname, mapperma):
Provavelmente irá aparece algo deste género:
 

Código:
 def sendNewPartyCustomMap(self, mapcode, mapxml, mapname, mapperma):
 mapperma = str(mapperma)
 mapxml = str(mapxml)
 mapname = str(mapname)
 mapcode = '@' + str(mapcode)
 self.sendData("\x05" + "\x05",[mapcode, self.room.getPlayerCount(), self.room.CodePartieEnCours, "", mapxml+"\x02"+mapname+"\x02"+mapperma])

Substitua por:


Código:

Código:
def sendNewPartyCustomMap(self, mapcode, mapxml, mapname, mapperma):
 mapperma = str(mapperma)
 mapxml = str(mapxml)
 mapname = str(mapname)
 mapcode = '@' + str(mapcode)
 if str(mapcode) == "@666":
 self.sendData("\x05" + "\x05",["@Halloween", self.room.getPlayerCount(), self.room.CodePartieEnCours, "", mapxml+"\x02"+mapname+"\x02"+mapperma])
 elif str(mapcode) == "@777":
 self.sendData("\x05" + "\x05",["@Poisson", self.room.getPlayerCount(), self.room.CodePartieEnCours, "", mapxml+"\x02"+mapname+"\x02"+mapperma])
 else:
 #self.sendData("\x05" + "\x05",["@"+mapisc+"", self.room.getPlayerCount(), self.room.CodePartieEnCours, "", mapxml+"\x02"+mapname+"\x02"+mapperma])

É isso aí galera, eu espero que ajude muitos usuários, e até a próxima.
Permissões neste sub-fórum
Não podes responder a tópicos

BH Servers

Recomendamos a BH Servers com proteção DDOS gratuita em Cloud Server de alta performance. Entrega imediata.