Jump to content

[Sistema]Pvp [Python&lua]


Guest Rαgnorαk
 Share

Recommended Posts

Guest Rαgnorαk

Descompacta mos o "root" e abrimos o arquivo game.py

 

Procura mos

 

MyShopPriceList

 

Por debaixo adicionas:

 

"demirvidgame" : self.demirvidgame,
"demirvid" : self.demirvid,
"demirstartgame" : self.demirstartgame,
"demirongame" : self.demirongame,
"demirendgame" : self.demirendgame,
"demirwsgame" : self.demirwsgame,
"demirwsvidgame" : self.demirwsgame,
"demirgogame" : self.demirgogame,
"demirgovidgame" : self.demirgogame,
"demirwingame" : self.demirwingame,

 

Ficará assim:

image.jpg

 

Agora procura mos:

 

# END_OF_WEDDING

 

Debaixo adiciona mos:

 

def demirvidgame(self, id):
import constInfo
constInfo.demirvidgame = int(id)

def demirongame(self):
constInfo.INPUT_IGNORE = 1

def demirendgame(self):
constInfo.INPUT_IGNORE = 0

def demirstartgame(self):
net.SendQuestInputStringPacket(str(constInfo.demir startgame))

def demirvid(self, id):
constInfo.demirvid = int(id)

def OpenQuestWindow(self, skin, idx):
if constInfo.INPUT_IGNORE == 1:
return
else:
self.interface.OpenQuestWindow(skin, idx)

def demirwsgame(self):
net.SendChatPacket("(demirwsgame)")
return

def demirgogame(self):
net.SendChatPacket("(demirgogame)")
return

def demirwingame(self):
net.SendChatPacket("(demirwingame)")
return

 

Ficará assim:

image.jpg

 

Agora guardamos e fechamos

e abrimos o constinfo.py

e adiciona mos isto:

 

demirvidgame = 0
demirstartgame = 0
demirvid = 0
INPUT_IGNORE = 0

 

Ficará assim:

image.jpg

 

Guardamos e fecha mos

Agora abrimos o arquivo playersettingmodule.py

 

Procura mos por:

 

(fish)

 

E adiciona mos:

 

chrmgr.RegisterEffect(chrmgr.EFFECT_EMOTICON+12, "", "d:/ymir work/akiragame/demirgogame.mse")
net.RegisterEmoticonString("(demirgogame)")


chrmgr.RegisterEffect(chrmgr.EFFECT_EMOTICON+13, "", "d:/ymir work/akiragame/demirwsgame.mse")
net.RegisterEmoticonString("(demirwsgame)")

chrmgr.RegisterEffect(chrmgr.EFFECT_EMOTICON+14, "", "d:/ymir work/akiragame/demirwingame.mse")
net.RegisterEmoticonString("(demirwingame)")

 

Ficará assim:

image.jpg

 

Guardamos e fecha mos:

Agora abrimos o uitarget.py

 

Debaixo de

 

import constInfo

 

Adiciona mos:

 

import event

 

Agora procura mos:

 

self.buttonDict[localeinfo.TARGET_BUTTON_AVENGE].SetEvent(ui.__mem_func__(self.OnPVP))

 

Debaixo adiciona mos:

 

Este é para os clientes 40k

 

self.buttonDict[localeinfo.TARGET_BUTTON_FIGHT].SetEvent(ui.__mem_func__(self.demirwsgame))
self.buttonDict[localeinfo.TARGET_BUTTON_ACCEPT_FIGHT].SetEvent(ui.__mem_func__(self.demirgogame))
self.buttonDict[localeinfo.TARGET_BUTTON_AVENGE].SetEvent(ui.__mem_func__(self.demirgogame))

 

Este é para os clientes 34k

 

self.buttonDict[locale.TARGET_BUTTON_FIGHT].SetEvent(ui.__mem_func__(self.demirwsgame))
self.buttonDict[locale.TARGET_BUTTON_ACCEPT_FIGHT].SetEvent(ui.__mem_func__(self.demirgogame))
self.buttonDict[locale.TARGET_BUTTON_AVENGE].SetEvent(ui.__mem_func__(self.demirgogame))

 

E ficará assim:

image.jpg

 

Agora procura mos por:

 

def OnPVP(self)

 

Debaixo adiciona mos:

 

def demirwsgame(self):
net.SendChatPacket("/pvp %d" % (self.vid))
constInfo.demirstartgame = self.vid
event.QuestButtonClick(constInfo.demirvidgame)

def demirgogame(self):
constInfo.demirstartgame = self.vid
event.QuestButtonClick(constInfo.demirvid)

 

Ficará assim:

image.jpg

 

Guardamos e fechamos

 

Agora abrimos o uichat.py

 

Procura mos por:

 

def __SendChatPacket(self, text, type)

 

E debaixo adiciona mos:

 

demirgame = ["(demirgogame)","(demirwsgame)","(demirwingame)"]
for x in xrange(len(demirgame)):
if(text.find(demirgame[x]) != -1):
return

 

E ficará assim:

image.jpg

 

Agora compacta mos o root

e abrimos o index

e adiciona mos:

 

*
demirgame_pvpsystem
*

 

Download no final

 

Agora a parte do servidor:

Abrimos o questlib.lua e adiciona mos:

 

function setvarchar(name, var)
local laenge = string.len (var)
local setchar = 0
local save_name = 0
local letter = 0
while laenge > setchar do
setchar = setchar + 1
letter = string.sub (var, setchar, setchar)
letter = string.byte(letter, 1)
save_name = ""..name.."_char_"..setchar..""
pc.setqf(save_name, letter)
end
local save_laenge=""..name.."laenge"
pc.setqf(save_laenge, laenge)
end


function getvarchar(name)
local save_laenge = ""..name.."laenge"
local laenge = pc.getqf(save_laenge)
local save_name = 0
local var = ""
local letter = 0
local getchar = 0
while laenge > getchar do
getchar = getchar + 1
save_name = ""..name.."_char_"..getchar..""
letter = pc.getqf(save_name)
if letter!=0 then
letter = string.char(letter)
else
letter = ""
end
var = ""..var..""..letter..""
end
return var
end

 

E tem de ficar assim:

photolua.png

 

Agora abrimos o questfuncions e adiciona mos:

 

setvarchar
getvarchar

 

Downloads:

 

Mega

 

Scan do conteúdo

MD5 a10f481457bc9fffc4bfb468c8834516

SHA1 59b08cf20fe5b80634c0b3e2d0fdc50fabc337d8

SHA256 de02a320dea30c7690179d0d6b9e265035f1d08002156fa3748974380536c539

 

Video

Link to comment
Share on other sites

Guest NewWars

Estava a pensar em fazer um sistema tal e qual a esse, mas como ja existe um publico e bom pelo que parece, poupa-me trabalho!

 

Bom post

 

 

Cumprimentos.

Link to comment
Share on other sites

  • 2 months later...

Algumas correcções ao tutorial:

 

def demirstartgame(self):

net.SendQuestInputStringPacket(str(constInfo.demir startgame))

 

Correcto:

 

def demirstartgame(self):

net.SendQuestInputStringPacket(str(constInfo.demirstartgame))

 

procuramos por

 

self.buttonDict[localeinfo.TARGET_BUTTON_AVENGE].SetEvent(ui.__mem_func__(self.OnPVP))

 

Debaixo adiciona mos:

 

Este é para os clientes 40k

 

 

self.buttonDict[localeinfo.TARGET_BUTTON_FIGHT].SetEvent(ui.__mem_func__(self.demirwsgame))
self.buttonDict[localeinfo.TARGET_BUTTON_ACCEPT_FIGHT].SetEvent(ui.__mem_func__(self.demirgogame))
self.buttonDict[localeinfo.TARGET_BUTTON_AVENGE].SetEvent(ui.__mem_func__(self.demirgogame))

Correcto:

Procurar :

 

self.buttonDict[localeInfo.TARGET_BUTTON_FIGHT].SetEvent(ui.__mem_func__(self.OnPVP))

self.buttonDict[localeInfo.TARGET_BUTTON_ACCEPT_FIGHT].SetEvent(ui.__mem_func__(self.OnPVP))

self.buttonDict[localeInfo.TARGET_BUTTON_AVENGE].SetEvent(ui.__mem_func__(self.OnPVP))

 

E substituir por:

 

self.buttonDict[localeInfo.TARGET_BUTTON_FIGHT].SetEvent(ui.__mem_func__(self.demirwsgame))

self.buttonDict[localeInfo.TARGET_BUTTON_ACCEPT_FIGHT].SetEvent(ui.__mem_func__(self.demirgogame))

self.buttonDict[localeInfo.TARGET_BUTTON_AVENGE].SetEvent(ui.__mem_func__(self.demirgogame))

 

Agora procura mos por:

 

def OnPVP(self)

 

Debaixo adiciona mos:

 

def demirwsgame(self):
net.SendChatPacket("/pvp %d" % (self.vid))
constInfo.demirstartgame = self.vid
event.QuestButtonClick(constInfo.demirvidgame)

def demirgogame(self):
constInfo.demirstartgame = self.vid
event.QuestButtonClick(constInfo.demirvid)

Correcto:

 

 

Agora procura mos por:

 

 

def OnPVP(self):

net.SendChatPacket("/pvp %d" % (self.vid))

 

 

 

 

 

E substituirmos por:

 

 

def demirwsgame(self):
net.SendChatPacket("/pvp %d" % (self.vid))
constInfo.demirstartgame = self.vid
event.QuestButtonClick(constInfo.demirvidgame)

def demirgogame(self):
constInfo.demirstartgame = self.vid
event.QuestButtonClick(constInfo.demirvid)

Legendas:

Letras a vermelho = Onde ouve erro no tutorial

Letras a Verde = Onde ouve a correcção ao tutorial.

Cumprimentos Dynamic Things

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 4 years later...
  • 5 months later...
Em 21/06/2015 em 16:17, Convidado Rαgnorαk disse:

Descompacta mos o "root" e abrimos o arquivo game.py

 

Procura mos

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Por debaixo adicionas:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Ficará assim:

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

Agora procura mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Debaixo adiciona mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Ficará assim:

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

Agora guardamos e fechamos

e abrimos o constinfo.py

e adiciona mos isto:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Ficará assim:

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

Guardamos e fecha mos

Agora abrimos o arquivo playersettingmodule.py

 

Procura mos por:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

E adiciona mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Ficará assim:

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

Guardamos e fecha mos:

Agora abrimos o uitarget.py

 

Debaixo de

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Adiciona mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Agora procura mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Debaixo adiciona mos:

 

Este é para os clientes 40k

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Este é para os clientes 34k

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

E ficará assim:

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

Agora procura mos por:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Debaixo adiciona mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Ficará assim:

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

Guardamos e fechamos

 

Agora abrimos o uichat.py

 

Procura mos por:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

E debaixo adiciona mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

E ficará assim:

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

Agora compacta mos o root

e abrimos o index

e adiciona mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Download no final

 

Agora a parte do servidor:

Abrimos o questlib.lua e adiciona mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

E tem de ficar assim:

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

Agora abrimos o questfuncions e adiciona mos:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.
 

 

 

Downloads:

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

Scan do conteúdo

 

 

 

 

 

MD5 a10f481457bc9fffc4bfb468c8834516

 

 

 

SHA1 59b08cf20fe5b80634c0b3e2d0fdc50fabc337d8

 

 

 

SHA256 de02a320dea30c7690179d0d6b9e265035f1d08002156fa3748974380536c539

 

 

 

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

 

 

Video

 

Sistema top, obrigado pela partilha

Link to comment
Share on other sites

  • 2 months later...
  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...