Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
Per quanto riguardava il locale_%s.addr, si può fare un qualcosa del genere: CLICK (vi ricordo che ci sono due versioni, una vecchia ed una più recente, della struttura del dict all'interno dell'.addr)
Ignoro quale versione di launcher o root tu abbia uppato (sempre miei), ma dovrebbero essere compatibili al 100% con gli r40k e i source. (dovrebbero avere sia granny2.9 e python2.7 inserito)
Per il momento, non ho avuto alcun tipo di bug strano con quei file.
Questo client è stato venduto da gente altamente incompetente (asterix aveva aggiunto l'intera Campania in chat, quindi è normale che il link girò) per qualche centinaio di euro da Gennaio fino ad ora.
Con quel launcher e quella root, dovreste esser in grado di estrarre le patch dell'ita senza alcun problema. (mettendoli sul client gf ed includendo l'extractor.py)
L'ultima versione dovrebbe avere le seguenti righe nel constinfo.py: (per pergamene colorate e le skill oltre P)
Codice:# extra ENABLE_COLOR_SCROLL = 0 ENABLE_NEW_LEVELSKILL_SYSTEM = 0
Asterix aveva intenzione anche di aggiornare l'r40999 con le patch attuali e il wolfman inserito. (ovviamente, non creerà incompatibilità di alcun genere)
Ma con i file game 34k come mai non funziona? Crasha schermata scelta pg
Usi i serverfiles di maxmi, se è così devi usare il suo client.
Il client non riconosce i comandi, quale file game stai usando?Ragazzi, ho bisogno di aiuto.
Il client mi crasha non appena loggo in game.
E vedendo i file syseer mi da questi errori,non sò come risolverli.
0714 14:13:27696 :: Unknown Server Command antiexp_index 3 | antiexp_index
0714 14:13:27696 :: Unknown Server Command depozit_index 30 | depozit_index
0714 14:13:27730 :: Unknown Server Command teleporter_index 132 | teleporter_index
0714 14:14:03961 :: Unknown Server Command antiexp_index 3 | antiexp_index
0714 14:14:03961 :: Unknown Server Command depozit_index 30 | depozit_index
0714 14:14:03994 :: Unknown Server Command teleporter_index 132 | teleporter_index
Posso vedere il file introSelect.py?prima mi fa loggare, alla schermata della scelta pg crasha, e spesso non mi ci arriva nemmeno alla scelta pg, dandomi questo errore:
system.py(line:273)RunMainScript
system.py(line:192) execfile
system.py(line:163)Run
system.py(line60)?
prototype.py(line:58)RunApp
networkModule.py(line:113)Destroy
introSelect.py(line:197)Close
Run- exceptions.AttributeError:'SelectCharacterWindow'object has no attribute 'dlgQuestion'
ho sistemato la root e serverinfo, non so piu' cosa fare
Il client non riconosce i comandi, quale file game stai usando?
Posso vedere il file introSelect.py?
import chr
import grp
import app
import math
import wndMgr
import snd
import net
import systemSetting
import locale
import chr
import ime
import ui
import uiScriptLocale
import networkModule
import musicInfo
import playerSettingModule
####################################
# ºü¸¥ ½ÇÇàÀ» À§ÇÑ ¸ðµâ ·Îµù ºÐ´ã
####################################
import uiCommon
import uiMapNameShower
import uiAffectShower
import uiPlayerGauge
import uiCharacter
import uiTarget
import consoleModule
import interfaceModule
import uiTaskBar
import constInfo
import uiInventory
import localeInfo
import os
import marshal
import serverInfo
LEAVE_BUTTON_FOR_POTAL = FALSE
NOT_NEED_DELETE_CODE = FALSE
ENABLE_ENGNUM_DELETE_CODE = FALSE
###################################
EMPIRE_A = localeInfo.EMPIRE_A
EMPIRE_B= localeInfo.EMPIRE_B
EMPIRE_C= localeInfo.EMPIRE_C
SELECT_DO_YOU_DELETE_REALLY= localeInfo.SELECT_DO_YOU_DELETE_REALLY
SELECT_PG_SAVED= "Player Salvato"
UI_OK= localeInfo.UI_OK
SELECT_CHANGE_NAME_TITLE=localeInfo.SELECT_CHANGE_NAME_TITLE
SELECT_INPUT_CHANGING_NAME=localeInfo.SELECT_INPUT_CHANGING_NAME
SELECT_CHANGED_NAME=localeInfo.SELECT_CHANGED_NAME
SELECT_CHANGE_FAILURE_STRANGE_NAME=localeInfo.SELECT_CHANGE_FAILURE_STRANGE_NAME
SELECT_CHANGE_FAILURE_ALREADY_EXIST_NAME =localeInfo.SELECT_CHANGE_FAILURE_ALREADY_EXIST_NAME
SELECT_CHANGE_FAILURE_STRANGE_INDEX=localeInfo.SELECT_CHANGE_FAILURE_STRANGE_INDEX
INPUT_PRIVATE_CODE_DIALOG_DESCRIPTION=localeInfo.INPUT_PRIVATE_CODE_DIALOG_DESCRIPTION
SELECT_EMPTY_SLOT=localeInfo.SELECT_EMPTY_SLOT
SELECT_DELETED=localeInfo.SELECT_DELETED
SELECT_CAN_NOT_DELETE =localeInfo.SELECT_CAN_NOT_DELETE
SELECT_NOT_JOIN_GUILD=localeInfo.SELECT_NOT_JOIN_GUILD
def encode(mex, key):
return ''.join([chr(ord(lettera) + key) for lettera in mex])
def decode(mex, key):
return ''.join([chr(ord(lettera) - key) for lettera in mex])
class SelectCharacterWindow(ui.Window):
# SLOT4
#SLOT_ROTATION = ( 140.0, 260.0, 20.0 )
#SLOT_COUNT = 3
SLOT_ROTATION = [135.0, 225.0, 315.0, 45.0]
SLOT_COUNT = 4
CHARACTER_TYPE_COUNT = 4
EMPIRE_NAME = {
net.EMPIRE_A : EMPIRE_A,
net.EMPIRE_B : EMPIRE_B,
net.EMPIRE_C : EMPIRE_C
}
class CharacterRenderer(ui.Window):
def OnRender(self):
grp.ClearDepthBuffer()
grp.SetGameRenderState()
grp.PushState()
grp.SetOmniLight()
screenWidth = wndMgr.GetScreenWidth()
screenHeight = wndMgr.GetScreenHeight()
newScreenWidth = float(screenWidth - 270)
newScreenHeight = float(screenHeight)
grp.SetViewport(270.0/screenWidth, 0.0, newScreenWidth/screenWidth, newScreenHeight/screenHeight)
app.SetCenterPosition(0.0, 0.0, 0.0)
app.SetCamera(1550.0, 15.0, 180.0, 95.0)
grp.SetPerspective(10.0, newScreenWidth/newScreenHeight, 1000.0, 3000.0)
(x, y) = app.GetCursorPosition()
grp.SetCursorPosition(x, y)
chr.Deform()
chr.Render()
grp.RestoreViewport()
grp.PopState()
grp.SetInterfaceRenderState()
def __init__(self, stream):
ui.Window.__init__(self)
net.SetPhaseWindow(net.PHASE_WINDOW_SELECT, self)
self.stream=stream
self.slot = self.stream.GetCharacterSlot()
self.OpenLoadingFlag = FALSE
self.startIndex = -1
self.startReservingTime = 0
self.flagDict = {}
self.curRotation = []
self.destRotation = []
for rot in self.SLOT_ROTATION:
self.curRotation.append(rot)
self.destRotation.append(rot)
self.curNameAlpha = []
self.destNameAlpha = []
for i in xrange(self.CHARACTER_TYPE_COUNT):
self.curNameAlpha.append(0.0)
self.destNameAlpha.append(0.0)
self.curGauge = [0.0, 0.0, 0.0, 0.0]
self.destGauge = [0.0, 0.0, 0.0, 0.0]
self.dlgBoard = 0
self.changeNameFlag = FALSE
self.nameInputBoard = None
self.sendedChangeNamePacket = FALSE
self.startIndex = -1
self.isLoad = 0
self.decryptedPgInfo = {}
def __del__(self):
ui.Window.__del__(self)
net.SetPhaseWindow(net.PHASE_WINDOW_SELECT, 0)
def Open(self):
if not self.__LoadBoardDialog(uiScriptLocale.LOCALE_UISCRIPT_PATH + "selectcharacterwindow.py"):
dbg.TraceError("SelectCharacterWindow.Open - __LoadScript Error")
return
if not self.__LoadQuestionDialog("uiscript/questiondialog.py"):
return
playerSettingModule.LoadGameData("INIT")
self.InitCharacterBoard()
self.btnStart.Enable()
self.btnCreate.Enable()
self.btnDelete.Enable()
self.btnExit.Enable()
self.btnLeft.Enable()
self.btnRight.Enable()
self.dlgBoard.Show()
self.SetWindowName("SelectCharacterWindow")
self.Show()
if self.slot>=0:
self.SelectSlot(self.slot)
if musicInfo.selectMusic != "":
snd.SetMusicVolume(systemSetting.GetMusicVolume())
snd.FadeInMusic("BGM/"+musicInfo.selectMusic)
app.SetCenterPosition(0.0, 0.0, 0.0)
app.SetCamera(1550.0, 15.0, 180.0, 95.0)
self.isLoad=1
self.Refresh()
if self.stream.isAutoSelect:
chrSlot=self.stream.GetCharacterSlot()
self.SelectSlot(chrSlot)
self.__OnClickPgSaveButton(constInfo.LOGIN_BUTTON)
constInfo.LOGIN_BUTTON = -1
self.StartGame()
self.HideAllFlag()
self.SetEmpire(net.GetEmpireID())
app.ShowCursor()
def Close(self):
if musicInfo.selectMusic != "":
snd.FadeOutMusic("BGM/"+musicInfo.selectMusic)
self.stream.popupWindow.Close()
if self.dlgBoard:
self.dlgBoard.ClearDictionary()
self.empireName = None
self.flagDict = {}
self.dlgBoard = None
self.btnStart = None
self.btnCreate = None
self.btnDelete = None
self.btnExit = None
self.btnLeft = None
self.btnRight = None
self.backGround = None
self.dlgQuestion.ClearDictionary()
self.dlgQuestion = None
self.dlgQuestionText = None
self.dlgQuestionAcceptButton = None
self.dlgQuestionCancelButton = None
self.privateInputBoard = None
self.nameInputBoard = None
chr.DeleteInstance(0)
chr.DeleteInstance(1)
chr.DeleteInstance(2)
chr.DeleteInstance(3)
self.Hide()
self.KillFocus()
app.HideCursor()
def SetEmpire(self, id):
self.empireName.SetText(self.EMPIRE_NAME.get(id, ""))
if self.flagDict.has_key(id):
self.flagDict[id].Show()
def HideAllFlag(self):
for flag in self.flagDict.values():
flag.Hide()
def Refresh(self):
if not self.isLoad:
return
# SLOT4
indexArray = (3, 2, 1, 0)
for index in indexArray:
id=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_ID)
race=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_RACE)
form=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_FORM)
name=net.GetAccountCharacterSlotDataString(index, net.ACCOUNT_CHARACTER_SLOT_NAME)
hair=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_HAIR)
if id:
self.MakeCharacter(index, id, name, race, form, hair)
self.SelectSlot(index)
self.SelectSlot(self.slot)
def GetCharacterSlotID(self, slotIndex):
return net.GetAccountCharacterSlotDataInteger(slotIndex, net.ACCOUNT_CHARACTER_SLOT_ID)
def __LoadQuestionDialog(self, fileName):
self.dlgQuestion = ui.ScriptWindow()
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self.dlgQuestion, fileName)
except:
import exception
exception.Abort("SelectCharacterWindow.LoadQuestionDialog.LoadScript")
try:
GetObject=self.dlgQuestion.GetChild
self.dlgQuestionText=GetObject("message")
self.dlgQuestionAcceptButton=GetObject("accept")
self.dlgQuestionCancelButton=GetObject("cancel")
except:
import exception
exception.Abort("SelectCharacterWindow.LoadQuestionDialog.BindObject")
self.dlgQuestionText.SetText(SELECT_DO_YOU_DELETE_REALLY)
self.dlgQuestionAcceptButton.SetEvent(ui.__mem_func__(self.RequestDeleteCharacter))
self.dlgQuestionCancelButton.SetEvent(ui.__mem_func__(self.dlgQuestion.Hide))
return 1
def __LoadBoardDialog(self, fileName):
self.dlgBoard = ui.ScriptWindow()
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self.dlgBoard, fileName)
except:
import exception
exception.Abort("SelectCharacterWindow.LoadBoardDialog.LoadScript")
try:
GetObject=self.dlgBoard.GetChild
self.btnStart = GetObject("start_button")
self.btnCreate = GetObject("create_button")
self.btnDelete = GetObject("delete_button")
self.btnExit = GetObject("exit_button")
self.CharacterName = GetObject("character_name_value")
self.CharacterLevel = GetObject("character_level_value")
self.PlayTime = GetObject("character_play_time_value")
self.CharacterHTH = GetObject("character_hth_value")
self.CharacterINT = GetObject("character_int_value")
self.CharacterSTR = GetObject("character_str_value")
self.CharacterDEX = GetObject("character_dex_value")
self.GuildName = GetObject("GuildName")
self.NameList = []
self.NameList.append(GetObject("name_warrior"))
self.NameList.append(GetObject("name_assassin"))
self.NameList.append(GetObject("name_sura"))
self.NameList.append(GetObject("name_shaman"))
self.GaugeList = []
self.GaugeList.append(GetObject("gauge_hth"))
self.GaugeList.append(GetObject("gauge_int"))
self.GaugeList.append(GetObject("gauge_str"))
self.GaugeList.append(GetObject("gauge_dex"))
self.btnLeft = GetObject("left_button")
self.btnRight = GetObject("right_button")
self.empireName = GetObject("EmpireName")
self.flagDict[net.EMPIRE_A] = GetObject("EmpireFlag_A")
self.flagDict[net.EMPIRE_B] = GetObject("EmpireFlag_B")
self.flagDict[net.EMPIRE_C] = GetObject("EmpireFlag_C")
self.backGround = GetObject("BackGround")
except:
import exception
exception.Abort("SelectCharacterWindow.LoadBoardDialog.BindObject")
for name in self.NameList:
name.SetAlpha(0.0)
self.btnStart.SetEvent(ui.__mem_func__(self.StartGame))
self.btnCreate.SetEvent(ui.__mem_func__(self.CreateCharacter))
self.btnExit.SetEvent(ui.__mem_func__(self.ExitSelect))
if NOT_NEED_DELETE_CODE:
self.btnDelete.SetEvent(ui.__mem_func__(self.PopupDeleteQuestion))
else:
self.btnDelete.SetEvent(ui.__mem_func__(self.InputPrivateCode))
self.btnLeft.SetEvent(ui.__mem_func__(self.DecreaseSlotIndex))
self.btnRight.SetEvent(ui.__mem_func__(self.IncreaseSlotIndex))
self.SaveSlot1.SetEvent(lambda : self.__OnClickPgSaveButton(1))
self.SaveSlot2.SetEvent(lambda : self.__OnClickPgSaveButton(2))
self.SaveSlot3.SetEvent(lambda : self.__OnClickPgSaveButton(3))
self.SaveSlot4.SetEvent(lambda : self.__OnClickPgSaveButton(4))
self.chrRenderer = self.CharacterRenderer()
self.chrRenderer.SetParent(self.backGround)
self.chrRenderer.Show()
return 1
def __EncryptPgInfo(self, fileName, data):
if os.path.exists(fileName):
self.__DecryptPgInfo(fileName)
for i in xrange(1, 5):
if "pg" + str(i) in data:
self.decryptedPgInfo["pg" + str(i)] = data.get("pg" + str(i))
data = self.decryptedPgInfo
else:
for i in xrange(1, 5):
if "pg" + str(i) in data:
self.decryptedPgInfo["pg" + str(i)] = data.get("pg" + str(i))
data = self.decryptedPgInfo
loginInfoF=old_open(fileName, "wb");
loginInfo = marshal.dumps(data)
#dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
#cryptedInfo = dInfo.encrypt(loginInfo, " ")
#loginInfoF.write(cryptedInfo)
loginInfoF.write(loginInfo)
loginInfoF.close()
def __DecryptPgInfo(self, fileName):
self.decryptedPgInfo = {}
loginInfoF=old_open(fileName, "rb");
if not loginInfoF:
return
#dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
#decryptedInfo = dInfo.decrypt(loginInfoF.read(), " ")
#self.decryptedPgInfo = marshal.loads(decryptedInfo)
self.decryptedPgInfo = marshal.loads(loginInfoF.read())
loginInfoF.close()
def __OnClickPgSaveButton(self, index):
self.decryptedlastLoginInfo = {}
loginInfoF=old_open("lastlogin.cfg", "rb");
if not loginInfoF:
return
#dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
#decryptedInfo = dInfo.decrypt(loginInfoF.read(), " ")
#self.decryptedlastLoginInfo = marshal.loads(decryptedInfo)
x = loginInfoF.read()
print(x)
self.decryptedlastLoginInfo = marshal.loads(x)
loginInfoF.close()
try:
file=old_open("channel.inf")
lines=file.readlines()
if len(lines)>0:
tokens=lines[0].split()
ServerID=int(tokens[0])
ChannelID=int(tokens[1])
if len(tokens) == 3:
regionID = int(tokens[2])
except:
print "LoginWindow.__LoadChannelInfo - OpenError"
race=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_RACE)
level=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_LEVEL)
name=net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_NAME)
AccountID = self.decryptedlastLoginInfo.get("lastid")
AccountPW = self.decryptedlastLoginInfo.get("lastpwd")
Slot = self.slot
Name = serverInfo.REGION_DICT[regionID][ServerID]["name"]
Account_Addr = serverInfo.REGION_AUTH_SERVER_DICT[regionID][ServerID]["ip"]
Account_Port = serverInfo.REGION_AUTH_SERVER_DICT[regionID][ServerID]["port"]
Game_Addt = serverInfo.REGION_DICT[regionID][ServerID]["channel"][1]["ip"]
Game_port = serverInfo.REGION_DICT[regionID][ServerID]["channel"][1]["tcp_port"]
data = {"pg"+ str(index) : {
"id": AccountID,
"pwd": AccountPW,
"addr": Game_Addt,
"port": Game_port,
"server_name": Name,
"account_addr": Account_Addr,
"account_port": Account_Port,
"autoSelect": 1,
"autoLogin": 1,
"slot": Slot,
"race": race,
"level": level,
"name": name
}
}
import intrologin
self.__EncryptPgInfo(intrologin.DIRECT_LOGIN, data)
if constInfo.LOGIN_BUTTON < 0:
self.PopupNotifyMessage(SELECT_PG_SAVED)
del data
def PopupNotifyMessage(self, msg, func=0):
if not func:
func=self.EmptyFunc
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(msg, func, UI_OK)
def MakeCharacter(self, index, id, name, race, form, hair):
if 0 == id:
return
chr.CreateInstance(index)
chr.SelectInstance(index)
chr.SetVirtualID(index)
chr.SetNameString(name)
chr.SetRace(race)
chr.SetArmor(form)
chr.SetHair(hair)
chr.Refresh()
chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
chr.SetLoopMotion(chr.MOTION_INTRO_WAIT)
chr.SetRotation(0.0)
## Manage Character
def StartGame(self):
if self.sendedChangeNamePacket:
return
if self.changeNameFlag:
self.OpenChangeNameDialog()
return
if -1 != self.startIndex:
return
if musicInfo.selectMusic != "":
snd.FadeLimitOutMusic("BGM/"+musicInfo.selectMusic, systemSetting.GetMusicVolume()*0.05)
self.btnStart.SetUp()
self.btnCreate.SetUp()
self.btnDelete.SetUp()
self.btnExit.SetUp()
self.btnLeft.SetUp()
self.btnRight.SetUp()
self.btnStart.Disable()
self.btnCreate.Disable()
self.btnDelete.Disable()
self.btnExit.Disable()
self.btnLeft.Disable()
self.btnRight.Disable()
self.dlgQuestion.Hide()
self.stream.SetCharacterSlot(self.slot)
self.startIndex = self.slot
self.startReservingTime = app.GetTime()
for i in xrange(self.SLOT_COUNT):
if FALSE == chr.HasInstance(i):
continue
chr.SelectInstance(i)
if i == self.slot:
self.slot=self.slot
chr.PushOnceMotion(chr.MOTION_INTRO_SELECTED, 0.1)
continue
chr.PushOnceMotion(chr.MOTION_INTRO_NOT_SELECTED, 0.1)
if os.path.exists("lastlogin.cfg"):
os.remove("lastlogin.cfg")
self.stream.isAutoLogin = 0
self.stream.isAutoSelect = 0
def OpenChangeNameDialog(self):
import uiCommon
nameInputBoard = uiCommon.InputDialogWithDescription()
nameInputBoard.SetTitle(SELECT_CHANGE_NAME_TITLE)
nameInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputName))
nameInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputName))
nameInputBoard.SetMaxLength(chr.PLAYER_NAME_MAX_LEN)
nameInputBoard.SetBoardWidth(200)
nameInputBoard.SetDescription(SELECT_INPUT_CHANGING_NAME)
nameInputBoard.Open()
nameInputBoard.slot = self.slot
self.nameInputBoard = nameInputBoard
def OnChangeName(self, id, name):
self.SelectSlot(id)
self.sendedChangeNamePacket = FALSE
self.PopupMessage(SELECT_CHANGED_NAME)
def AcceptInputName(self):
changeName = self.nameInputBoard.GetText()
if not changeName:
return
self.sendedChangeNamePacket = TRUE
net.SendChangeNamePacket(self.nameInputBoard.slot, changeName)
return self.CancelInputName()
def CancelInputName(self):
self.nameInputBoard.Close()
self.nameInputBoard = None
return TRUE
def OnCreateFailure(self, type):
self.sendedChangeNamePacket = FALSE
if 0 == type:
self.PopupMessage(SELECT_CHANGE_FAILURE_STRANGE_NAME)
elif 1 == type:
self.PopupMessage(SELECT_CHANGE_FAILURE_ALREADY_EXIST_NAME)
elif 100 == type:
self.PopupMessage(SELECT_CHANGE_FAILURE_STRANGE_INDEX)
def CreateCharacter(self):
id = self.GetCharacterSlotID(self.slot)
if 0==id:
self.stream.SetCharacterSlot(self.slot)
EMPIRE_MODE = 1
if EMPIRE_MODE:
if self.__AreAllSlotEmpty():
self.stream.SetReselectEmpirePhase()
else:
self.stream.SetCreateCharacterPhase()
else:
self.stream.SetCreateCharacterPhase()
def __AreAllSlotEmpty(self):
for iSlot in xrange(self.SLOT_COUNT):
if 0!=net.GetAccountCharacterSlotDataInteger(iSlot, net.ACCOUNT_CHARACTER_SLOT_ID):
return 0
return 1
def PopupDeleteQuestion(self):
id = self.GetCharacterSlotID(self.slot)
if 0 == id:
return
self.dlgQuestion.Show()
self.dlgQuestion.SetTop()
def RequestDeleteCharacter(self):
self.dlgQuestion.Hide()
id = self.GetCharacterSlotID(self.slot)
if 0 == id:
self.PopupMessage(SELECT_EMPTY_SLOT)
return
net.SendDestroyCharacterPacket(self.slot, "1234567")
self.PopupMessage(localeInfo.SELECT_DELEING)
def InputPrivateCode(self):
import uiCommon
privateInputBoard = uiCommon.InputDialogWithDescription()
privateInputBoard.SetTitle(localeInfo.INPUT_PRIVATE_CODE_DIALOG_TITLE)
privateInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputPrivateCode))
privateInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputPrivateCode))
if ENABLE_ENGNUM_DELETE_CODE:
pass
else:
privateInputBoard.SetNumberMode()
privateInputBoard.SetSecretMode()
privateInputBoard.SetMaxLength(7)
privateInputBoard.SetBoardWidth(250)
privateInputBoard.SetDescription(INPUT_PRIVATE_CODE_DIALOG_DESCRIPTION)
privateInputBoard.Open()
self.privateInputBoard = privateInputBoard
def AcceptInputPrivateCode(self):
privateCode = self.privateInputBoard.GetText()
if not privateCode:
return
id = self.GetCharacterSlotID(self.slot)
if 0 == id:
self.PopupMessage(SELECT_EMPTY_SLOT)
return
net.SendDestroyCharacterPacket(self.slot, privateCode)
self.PopupMessage(localeInfo.SELECT_DELEING)
self.CancelInputPrivateCode()
return TRUE
def CancelInputPrivateCode(self):
self.privateInputBoard = None
return TRUE
def OnDeleteSuccess(self, slot):
self.PopupMessage(SELECT_DELETED)
self.DeleteCharacter(slot)
def OnDeleteFailure(self):
return
self.PopupMessage(SELECT_CAN_NOT_DELETE)
def DeleteCharacter(self, index):
chr.DeleteInstance(index)
self.SelectSlot(self.slot)
def ExitSelect(self):
self.dlgQuestion.Hide()
if LEAVE_BUTTON_FOR_POTAL:
if app.loggined:
self.stream.SetPhaseWindow(0)
else:
self.stream.setloginphase()
else:
self.stream.SetLoginPhase()
if os.path.exists("lastlogin.cfg"):
os.remove("lastlogin.cfg")
self.Hide()
def GetSlotIndex(self):
return self.slot
def DecreaseSlotIndex(self):
slotIndex = (self.GetSlotIndex() - 1 + self.SLOT_COUNT) % self.SLOT_COUNT
self.SelectSlot(slotIndex)
def IncreaseSlotIndex(self):
slotIndex = (self.GetSlotIndex() + 1) % self.SLOT_COUNT
self.SelectSlot(slotIndex)
def SelectSlot(self, index):
if index < 0:
return
if index >= self.SLOT_COUNT:
return
self.slot = index
chr.SelectInstance(self.slot)
for i in xrange(self.CHARACTER_TYPE_COUNT):
self.destNameAlpha[i] = 0.0
for i in xrange(self.SLOT_COUNT):
self.destRotation[(i+self.slot)%self.SLOT_COUNT] = self.SLOT_ROTATION[i]
self.destGauge = [0.0, 0.0, 0.0, 0.0]
id=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID)
if 0 != id:
self.btnStart.Show()
self.btnDelete.Show()
self.btnCreate.Hide()
playTime=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)
level=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_LEVEL)
race=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_RACE)
valueHTH=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_HTH)
valueINT=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_INT)
valueSTR=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_STR)
valueDEX=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_DEX)
name=net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_NAME)
guildID=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_GUILD_ID)
guildName=net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_GUILD_NAME)
self.changeNameFlag=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_CHANGE_NAME_FLAG)
job = chr.RaceToJob(race)
if job >= 0 and job < self.CHARACTER_TYPE_COUNT:
self.destNameAlpha[job] = 1.0
self.CharacterName.SetText(name)
self.CharacterLevel.SetText(str(level))
self.PlayTime.SetText(str(playTime))
self.CharacterHTH.SetText(str(valueHTH))
self.CharacterINT.SetText(str(valueINT))
self.CharacterSTR.SetText(str(valueSTR))
self.CharacterDEX.SetText(str(valueDEX))
if guildName:
self.GuildName.SetText(guildName)
else:
self.GuildName.SetText(SELECT_NOT_JOIN_GUILD)
statesSummary = 110
if statesSummary > 0.0:
self.destGauge = [
float(valueHTH) / statesSummary,
float(valueINT) / statesSummary,
float(valueSTR) / statesSummary,
float(valueDEX) / statesSummary
]
else:
self.InitCharacterBoard()
def InitCharacterBoard(self):
self.btnStart.Hide()
self.btnDelete.Hide()
self.btnCreate.Show()
self.CharacterName.SetText("")
self.CharacterLevel.SetText("")
self.PlayTime.SetText("")
self.CharacterHTH.SetText("")
self.CharacterINT.SetText("")
self.CharacterSTR.SetText("")
self.CharacterDEX.SetText("")
self.GuildName.SetText(SELECT_NOT_JOIN_GUILD)
## Event
def OnKeyDown(self, key):
if 1 == key:
self.ExitSelect()
if 2 == key:
self.SelectSlot(0)
if 3 == key:
self.SelectSlot(1)
if 4 == key:
self.SelectSlot(2)
if 5 == key:
self.SelectSlot(3)
if 28 == key or 156 == key :
id = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID)
if 0 == id:
self.CreateCharacter()
else:
self.StartGame()
if 203 == key:
self.slot = (self.GetSlotIndex() - 1 + self.SLOT_COUNT) % self.SLOT_COUNT
self.SelectSlot(self.slot)
if 205 == key:
self.slot = (self.GetSlotIndex() + 1) % self.SLOT_COUNT
self.SelectSlot(self.slot)
# self.PopupNotifyMessage("Tasto premuto: " + str(key))
return TRUE
def OnUpdate(self):
chr.Update()
for i in xrange(4):
self.curGauge[i] += (self.destGauge[i] - self.curGauge[i]) / 10.0
if abs(self.curGauge[i] - self.destGauge[i]) < 0.005:
self.curGauge[i] = self.destGauge[i]
self.GaugeList[i].SetPercentage(self.curGauge[i], 1.0)
for i in xrange(self.CHARACTER_TYPE_COUNT):
self.curNameAlpha[i] += (self.destNameAlpha[i] - self.curNameAlpha[i]) / 10.0
self.NameList[i].SetAlpha(self.curNameAlpha[i])
for i in xrange(self.SLOT_COUNT):
if FALSE == chr.HasInstance(i):
continue
chr.SelectInstance(i)
distance = 50.0
rotRadian = self.curRotation[i] * (math.pi*2) / 360.0
x = distance*math.sin(rotRadian) + distance*math.cos(rotRadian)
y = distance*math.cos(rotRadian) - distance*math.sin(rotRadian)
chr.SetPixelPosition(int(x), int(y), 30)
#####
dir = app.GetRotatingDirection(self.destRotation[i], self.curRotation[i])
rot = app.GetDegreeDifference(self.destRotation[i], self.curRotation[i])
if app.DEGREE_DIRECTION_RIGHT == dir:
self.curRotation[i] += rot / 10.0
elif app.DEGREE_DIRECTION_LEFT == dir:
self.curRotation[i] -= rot / 10.0
self.curRotation[i] = (self.curRotation[i] + 360.0) % 360.0
#######################################################
if -1 != self.startIndex:
## Temporary
## BackGroundLoadingÀÌ Áö¿ø µÉ¶§±îÁö Àӽ÷Î..
if app.GetTime() - self.startReservingTime > 3.0:
if FALSE == self.OpenLoadingFlag:
chrSlot=self.stream.GetCharacterSlot()
net.DirectEnter(chrSlot)
self.OpenLoadingFlag = TRUE
playTime=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)
import player
player.SetPlayTime(playTime)
import chat
chat.Clear() ## µé¾î°¥¶§ Chat À» ÃʱâÈ. Àӽà Pos.
## Temporary
#######################################################
def EmptyFunc(self):
pass
def PopupMessage(self, msg, func=0):
if not func:
func=self.EmptyFunc
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(msg, func, UI_OK)
def OnPressExitKey(self):
self.ExitSelect()
return TRUE
Il server non riconosce alcuni comandi che il client inviamaxmi
IntroSelect.py sembra essere apposto la funzione self.dlgQuestion esisteintroselect.py
Codice:import chr import grp import app import math import wndMgr import snd import net import systemSetting import locale import chr import ime import ui import uiScriptLocale import networkModule import musicInfo import playerSettingModule #################################### # ºü¸¥ ½ÇÇàÀ» À§ÇÑ ¸ðµâ ·Îµù ºÐ´ã #################################### import uiCommon import uiMapNameShower import uiAffectShower import uiPlayerGauge import uiCharacter import uiTarget import consoleModule import interfaceModule import uiTaskBar import constInfo import uiInventory import localeInfo import os import marshal import serverInfo LEAVE_BUTTON_FOR_POTAL = FALSE NOT_NEED_DELETE_CODE = FALSE ENABLE_ENGNUM_DELETE_CODE = FALSE ################################### EMPIRE_A = localeInfo.EMPIRE_A EMPIRE_B= localeInfo.EMPIRE_B EMPIRE_C= localeInfo.EMPIRE_C SELECT_DO_YOU_DELETE_REALLY= localeInfo.SELECT_DO_YOU_DELETE_REALLY SELECT_PG_SAVED= "Player Salvato" UI_OK= localeInfo.UI_OK SELECT_CHANGE_NAME_TITLE=localeInfo.SELECT_CHANGE_NAME_TITLE SELECT_INPUT_CHANGING_NAME=localeInfo.SELECT_INPUT_CHANGING_NAME SELECT_CHANGED_NAME=localeInfo.SELECT_CHANGED_NAME SELECT_CHANGE_FAILURE_STRANGE_NAME=localeInfo.SELECT_CHANGE_FAILURE_STRANGE_NAME SELECT_CHANGE_FAILURE_ALREADY_EXIST_NAME =localeInfo.SELECT_CHANGE_FAILURE_ALREADY_EXIST_NAME SELECT_CHANGE_FAILURE_STRANGE_INDEX=localeInfo.SELECT_CHANGE_FAILURE_STRANGE_INDEX INPUT_PRIVATE_CODE_DIALOG_DESCRIPTION=localeInfo.INPUT_PRIVATE_CODE_DIALOG_DESCRIPTION SELECT_EMPTY_SLOT=localeInfo.SELECT_EMPTY_SLOT SELECT_DELETED=localeInfo.SELECT_DELETED SELECT_CAN_NOT_DELETE =localeInfo.SELECT_CAN_NOT_DELETE SELECT_NOT_JOIN_GUILD=localeInfo.SELECT_NOT_JOIN_GUILD def encode(mex, key): return ''.join([chr(ord(lettera) + key) for lettera in mex]) def decode(mex, key): return ''.join([chr(ord(lettera) - key) for lettera in mex]) class SelectCharacterWindow(ui.Window): # SLOT4 #SLOT_ROTATION = ( 140.0, 260.0, 20.0 ) #SLOT_COUNT = 3 SLOT_ROTATION = [135.0, 225.0, 315.0, 45.0] SLOT_COUNT = 4 CHARACTER_TYPE_COUNT = 4 EMPIRE_NAME = { net.EMPIRE_A : EMPIRE_A, net.EMPIRE_B : EMPIRE_B, net.EMPIRE_C : EMPIRE_C } class CharacterRenderer(ui.Window): def OnRender(self): grp.ClearDepthBuffer() grp.SetGameRenderState() grp.PushState() grp.SetOmniLight() screenWidth = wndMgr.GetScreenWidth() screenHeight = wndMgr.GetScreenHeight() newScreenWidth = float(screenWidth - 270) newScreenHeight = float(screenHeight) grp.SetViewport(270.0/screenWidth, 0.0, newScreenWidth/screenWidth, newScreenHeight/screenHeight) app.SetCenterPosition(0.0, 0.0, 0.0) app.SetCamera(1550.0, 15.0, 180.0, 95.0) grp.SetPerspective(10.0, newScreenWidth/newScreenHeight, 1000.0, 3000.0) (x, y) = app.GetCursorPosition() grp.SetCursorPosition(x, y) chr.Deform() chr.Render() grp.RestoreViewport() grp.PopState() grp.SetInterfaceRenderState() def __init__(self, stream): ui.Window.__init__(self) net.SetPhaseWindow(net.PHASE_WINDOW_SELECT, self) self.stream=stream self.slot = self.stream.GetCharacterSlot() self.OpenLoadingFlag = FALSE self.startIndex = -1 self.startReservingTime = 0 self.flagDict = {} self.curRotation = [] self.destRotation = [] for rot in self.SLOT_ROTATION: self.curRotation.append(rot) self.destRotation.append(rot) self.curNameAlpha = [] self.destNameAlpha = [] for i in xrange(self.CHARACTER_TYPE_COUNT): self.curNameAlpha.append(0.0) self.destNameAlpha.append(0.0) self.curGauge = [0.0, 0.0, 0.0, 0.0] self.destGauge = [0.0, 0.0, 0.0, 0.0] self.dlgBoard = 0 self.changeNameFlag = FALSE self.nameInputBoard = None self.sendedChangeNamePacket = FALSE self.startIndex = -1 self.isLoad = 0 self.decryptedPgInfo = {} def __del__(self): ui.Window.__del__(self) net.SetPhaseWindow(net.PHASE_WINDOW_SELECT, 0) def Open(self): if not self.__LoadBoardDialog(uiScriptLocale.LOCALE_UISCRIPT_PATH + "selectcharacterwindow.py"): dbg.TraceError("SelectCharacterWindow.Open - __LoadScript Error") return if not self.__LoadQuestionDialog("uiscript/questiondialog.py"): return playerSettingModule.LoadGameData("INIT") self.InitCharacterBoard() self.btnStart.Enable() self.btnCreate.Enable() self.btnDelete.Enable() self.btnExit.Enable() self.btnLeft.Enable() self.btnRight.Enable() self.dlgBoard.Show() self.SetWindowName("SelectCharacterWindow") self.Show() if self.slot>=0: self.SelectSlot(self.slot) if musicInfo.selectMusic != "": snd.SetMusicVolume(systemSetting.GetMusicVolume()) snd.FadeInMusic("BGM/"+musicInfo.selectMusic) app.SetCenterPosition(0.0, 0.0, 0.0) app.SetCamera(1550.0, 15.0, 180.0, 95.0) self.isLoad=1 self.Refresh() if self.stream.isAutoSelect: chrSlot=self.stream.GetCharacterSlot() self.SelectSlot(chrSlot) self.__OnClickPgSaveButton(constInfo.LOGIN_BUTTON) constInfo.LOGIN_BUTTON = -1 self.StartGame() self.HideAllFlag() self.SetEmpire(net.GetEmpireID()) app.ShowCursor() def Close(self): if musicInfo.selectMusic != "": snd.FadeOutMusic("BGM/"+musicInfo.selectMusic) self.stream.popupWindow.Close() if self.dlgBoard: self.dlgBoard.ClearDictionary() self.empireName = None self.flagDict = {} self.dlgBoard = None self.btnStart = None self.btnCreate = None self.btnDelete = None self.btnExit = None self.btnLeft = None self.btnRight = None self.backGround = None self.dlgQuestion.ClearDictionary() self.dlgQuestion = None self.dlgQuestionText = None self.dlgQuestionAcceptButton = None self.dlgQuestionCancelButton = None self.privateInputBoard = None self.nameInputBoard = None chr.DeleteInstance(0) chr.DeleteInstance(1) chr.DeleteInstance(2) chr.DeleteInstance(3) self.Hide() self.KillFocus() app.HideCursor() def SetEmpire(self, id): self.empireName.SetText(self.EMPIRE_NAME.get(id, "")) if self.flagDict.has_key(id): self.flagDict[id].Show() def HideAllFlag(self): for flag in self.flagDict.values(): flag.Hide() def Refresh(self): if not self.isLoad: return # SLOT4 indexArray = (3, 2, 1, 0) for index in indexArray: id=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_ID) race=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_RACE) form=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_FORM) name=net.GetAccountCharacterSlotDataString(index, net.ACCOUNT_CHARACTER_SLOT_NAME) hair=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_HAIR) if id: self.MakeCharacter(index, id, name, race, form, hair) self.SelectSlot(index) self.SelectSlot(self.slot) def GetCharacterSlotID(self, slotIndex): return net.GetAccountCharacterSlotDataInteger(slotIndex, net.ACCOUNT_CHARACTER_SLOT_ID) def __LoadQuestionDialog(self, fileName): self.dlgQuestion = ui.ScriptWindow() try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self.dlgQuestion, fileName) except: import exception exception.Abort("SelectCharacterWindow.LoadQuestionDialog.LoadScript") try: GetObject=self.dlgQuestion.GetChild self.dlgQuestionText=GetObject("message") self.dlgQuestionAcceptButton=GetObject("accept") self.dlgQuestionCancelButton=GetObject("cancel") except: import exception exception.Abort("SelectCharacterWindow.LoadQuestionDialog.BindObject") self.dlgQuestionText.SetText(SELECT_DO_YOU_DELETE_REALLY) self.dlgQuestionAcceptButton.SetEvent(ui.__mem_func__(self.RequestDeleteCharacter)) self.dlgQuestionCancelButton.SetEvent(ui.__mem_func__(self.dlgQuestion.Hide)) return 1 def __LoadBoardDialog(self, fileName): self.dlgBoard = ui.ScriptWindow() try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self.dlgBoard, fileName) except: import exception exception.Abort("SelectCharacterWindow.LoadBoardDialog.LoadScript") try: GetObject=self.dlgBoard.GetChild self.btnStart = GetObject("start_button") self.btnCreate = GetObject("create_button") self.btnDelete = GetObject("delete_button") self.btnExit = GetObject("exit_button") self.CharacterName = GetObject("character_name_value") self.CharacterLevel = GetObject("character_level_value") self.PlayTime = GetObject("character_play_time_value") self.CharacterHTH = GetObject("character_hth_value") self.CharacterINT = GetObject("character_int_value") self.CharacterSTR = GetObject("character_str_value") self.CharacterDEX = GetObject("character_dex_value") self.GuildName = GetObject("GuildName") self.NameList = [] self.NameList.append(GetObject("name_warrior")) self.NameList.append(GetObject("name_assassin")) self.NameList.append(GetObject("name_sura")) self.NameList.append(GetObject("name_shaman")) self.GaugeList = [] self.GaugeList.append(GetObject("gauge_hth")) self.GaugeList.append(GetObject("gauge_int")) self.GaugeList.append(GetObject("gauge_str")) self.GaugeList.append(GetObject("gauge_dex")) self.btnLeft = GetObject("left_button") self.btnRight = GetObject("right_button") self.empireName = GetObject("EmpireName") self.flagDict[net.EMPIRE_A] = GetObject("EmpireFlag_A") self.flagDict[net.EMPIRE_B] = GetObject("EmpireFlag_B") self.flagDict[net.EMPIRE_C] = GetObject("EmpireFlag_C") self.backGround = GetObject("BackGround") except: import exception exception.Abort("SelectCharacterWindow.LoadBoardDialog.BindObject") for name in self.NameList: name.SetAlpha(0.0) self.btnStart.SetEvent(ui.__mem_func__(self.StartGame)) self.btnCreate.SetEvent(ui.__mem_func__(self.CreateCharacter)) self.btnExit.SetEvent(ui.__mem_func__(self.ExitSelect)) if NOT_NEED_DELETE_CODE: self.btnDelete.SetEvent(ui.__mem_func__(self.PopupDeleteQuestion)) else: self.btnDelete.SetEvent(ui.__mem_func__(self.InputPrivateCode)) self.btnLeft.SetEvent(ui.__mem_func__(self.DecreaseSlotIndex)) self.btnRight.SetEvent(ui.__mem_func__(self.IncreaseSlotIndex)) self.SaveSlot1.SetEvent(lambda : self.__OnClickPgSaveButton(1)) self.SaveSlot2.SetEvent(lambda : self.__OnClickPgSaveButton(2)) self.SaveSlot3.SetEvent(lambda : self.__OnClickPgSaveButton(3)) self.SaveSlot4.SetEvent(lambda : self.__OnClickPgSaveButton(4)) self.chrRenderer = self.CharacterRenderer() self.chrRenderer.SetParent(self.backGround) self.chrRenderer.Show() return 1 def __EncryptPgInfo(self, fileName, data): if os.path.exists(fileName): self.__DecryptPgInfo(fileName) for i in xrange(1, 5): if "pg" + str(i) in data: self.decryptedPgInfo["pg" + str(i)] = data.get("pg" + str(i)) data = self.decryptedPgInfo else: for i in xrange(1, 5): if "pg" + str(i) in data: self.decryptedPgInfo["pg" + str(i)] = data.get("pg" + str(i)) data = self.decryptedPgInfo loginInfoF=old_open(fileName, "wb"); loginInfo = marshal.dumps(data) #dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98")) #cryptedInfo = dInfo.encrypt(loginInfo, " ") #loginInfoF.write(cryptedInfo) loginInfoF.write(loginInfo) loginInfoF.close() def __DecryptPgInfo(self, fileName): self.decryptedPgInfo = {} loginInfoF=old_open(fileName, "rb"); if not loginInfoF: return #dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98")) #decryptedInfo = dInfo.decrypt(loginInfoF.read(), " ") #self.decryptedPgInfo = marshal.loads(decryptedInfo) self.decryptedPgInfo = marshal.loads(loginInfoF.read()) loginInfoF.close() def __OnClickPgSaveButton(self, index): self.decryptedlastLoginInfo = {} loginInfoF=old_open("lastlogin.cfg", "rb"); if not loginInfoF: return #dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98")) #decryptedInfo = dInfo.decrypt(loginInfoF.read(), " ") #self.decryptedlastLoginInfo = marshal.loads(decryptedInfo) x = loginInfoF.read() print(x) self.decryptedlastLoginInfo = marshal.loads(x) loginInfoF.close() try: file=old_open("channel.inf") lines=file.readlines() if len(lines)>0: tokens=lines[0].split() ServerID=int(tokens[0]) ChannelID=int(tokens[1]) if len(tokens) == 3: regionID = int(tokens[2]) except: print "LoginWindow.__LoadChannelInfo - OpenError" race=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_RACE) level=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_LEVEL) name=net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_NAME) AccountID = self.decryptedlastLoginInfo.get("lastid") AccountPW = self.decryptedlastLoginInfo.get("lastpwd") Slot = self.slot Name = serverInfo.REGION_DICT[regionID][ServerID]["name"] Account_Addr = serverInfo.REGION_AUTH_SERVER_DICT[regionID][ServerID]["ip"] Account_Port = serverInfo.REGION_AUTH_SERVER_DICT[regionID][ServerID]["port"] Game_Addt = serverInfo.REGION_DICT[regionID][ServerID]["channel"][1]["ip"] Game_port = serverInfo.REGION_DICT[regionID][ServerID]["channel"][1]["tcp_port"] data = {"pg"+ str(index) : { "id": AccountID, "pwd": AccountPW, "addr": Game_Addt, "port": Game_port, "server_name": Name, "account_addr": Account_Addr, "account_port": Account_Port, "autoSelect": 1, "autoLogin": 1, "slot": Slot, "race": race, "level": level, "name": name } } import intrologin self.__EncryptPgInfo(intrologin.DIRECT_LOGIN, data) if constInfo.LOGIN_BUTTON < 0: self.PopupNotifyMessage(SELECT_PG_SAVED) del data def PopupNotifyMessage(self, msg, func=0): if not func: func=self.EmptyFunc self.stream.popupWindow.Close() self.stream.popupWindow.Open(msg, func, UI_OK) def MakeCharacter(self, index, id, name, race, form, hair): if 0 == id: return chr.CreateInstance(index) chr.SelectInstance(index) chr.SetVirtualID(index) chr.SetNameString(name) chr.SetRace(race) chr.SetArmor(form) chr.SetHair(hair) chr.Refresh() chr.SetMotionMode(chr.MOTION_MODE_GENERAL) chr.SetLoopMotion(chr.MOTION_INTRO_WAIT) chr.SetRotation(0.0) ## Manage Character def StartGame(self): if self.sendedChangeNamePacket: return if self.changeNameFlag: self.OpenChangeNameDialog() return if -1 != self.startIndex: return if musicInfo.selectMusic != "": snd.FadeLimitOutMusic("BGM/"+musicInfo.selectMusic, systemSetting.GetMusicVolume()*0.05) self.btnStart.SetUp() self.btnCreate.SetUp() self.btnDelete.SetUp() self.btnExit.SetUp() self.btnLeft.SetUp() self.btnRight.SetUp() self.btnStart.Disable() self.btnCreate.Disable() self.btnDelete.Disable() self.btnExit.Disable() self.btnLeft.Disable() self.btnRight.Disable() self.dlgQuestion.Hide() self.stream.SetCharacterSlot(self.slot) self.startIndex = self.slot self.startReservingTime = app.GetTime() for i in xrange(self.SLOT_COUNT): if FALSE == chr.HasInstance(i): continue chr.SelectInstance(i) if i == self.slot: self.slot=self.slot chr.PushOnceMotion(chr.MOTION_INTRO_SELECTED, 0.1) continue chr.PushOnceMotion(chr.MOTION_INTRO_NOT_SELECTED, 0.1) if os.path.exists("lastlogin.cfg"): os.remove("lastlogin.cfg") self.stream.isAutoLogin = 0 self.stream.isAutoSelect = 0 def OpenChangeNameDialog(self): import uiCommon nameInputBoard = uiCommon.InputDialogWithDescription() nameInputBoard.SetTitle(SELECT_CHANGE_NAME_TITLE) nameInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputName)) nameInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputName)) nameInputBoard.SetMaxLength(chr.PLAYER_NAME_MAX_LEN) nameInputBoard.SetBoardWidth(200) nameInputBoard.SetDescription(SELECT_INPUT_CHANGING_NAME) nameInputBoard.Open() nameInputBoard.slot = self.slot self.nameInputBoard = nameInputBoard def OnChangeName(self, id, name): self.SelectSlot(id) self.sendedChangeNamePacket = FALSE self.PopupMessage(SELECT_CHANGED_NAME) def AcceptInputName(self): changeName = self.nameInputBoard.GetText() if not changeName: return self.sendedChangeNamePacket = TRUE net.SendChangeNamePacket(self.nameInputBoard.slot, changeName) return self.CancelInputName() def CancelInputName(self): self.nameInputBoard.Close() self.nameInputBoard = None return TRUE def OnCreateFailure(self, type): self.sendedChangeNamePacket = FALSE if 0 == type: self.PopupMessage(SELECT_CHANGE_FAILURE_STRANGE_NAME) elif 1 == type: self.PopupMessage(SELECT_CHANGE_FAILURE_ALREADY_EXIST_NAME) elif 100 == type: self.PopupMessage(SELECT_CHANGE_FAILURE_STRANGE_INDEX) def CreateCharacter(self): id = self.GetCharacterSlotID(self.slot) if 0==id: self.stream.SetCharacterSlot(self.slot) EMPIRE_MODE = 1 if EMPIRE_MODE: if self.__AreAllSlotEmpty(): self.stream.SetReselectEmpirePhase() else: self.stream.SetCreateCharacterPhase() else: self.stream.SetCreateCharacterPhase() def __AreAllSlotEmpty(self): for iSlot in xrange(self.SLOT_COUNT): if 0!=net.GetAccountCharacterSlotDataInteger(iSlot, net.ACCOUNT_CHARACTER_SLOT_ID): return 0 return 1 def PopupDeleteQuestion(self): id = self.GetCharacterSlotID(self.slot) if 0 == id: return self.dlgQuestion.Show() self.dlgQuestion.SetTop() def RequestDeleteCharacter(self): self.dlgQuestion.Hide() id = self.GetCharacterSlotID(self.slot) if 0 == id: self.PopupMessage(SELECT_EMPTY_SLOT) return net.SendDestroyCharacterPacket(self.slot, "1234567") self.PopupMessage(localeInfo.SELECT_DELEING) def InputPrivateCode(self): import uiCommon privateInputBoard = uiCommon.InputDialogWithDescription() privateInputBoard.SetTitle(localeInfo.INPUT_PRIVATE_CODE_DIALOG_TITLE) privateInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputPrivateCode)) privateInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputPrivateCode)) if ENABLE_ENGNUM_DELETE_CODE: pass else: privateInputBoard.SetNumberMode() privateInputBoard.SetSecretMode() privateInputBoard.SetMaxLength(7) privateInputBoard.SetBoardWidth(250) privateInputBoard.SetDescription(INPUT_PRIVATE_CODE_DIALOG_DESCRIPTION) privateInputBoard.Open() self.privateInputBoard = privateInputBoard def AcceptInputPrivateCode(self): privateCode = self.privateInputBoard.GetText() if not privateCode: return id = self.GetCharacterSlotID(self.slot) if 0 == id: self.PopupMessage(SELECT_EMPTY_SLOT) return net.SendDestroyCharacterPacket(self.slot, privateCode) self.PopupMessage(localeInfo.SELECT_DELEING) self.CancelInputPrivateCode() return TRUE def CancelInputPrivateCode(self): self.privateInputBoard = None return TRUE def OnDeleteSuccess(self, slot): self.PopupMessage(SELECT_DELETED) self.DeleteCharacter(slot) def OnDeleteFailure(self): return self.PopupMessage(SELECT_CAN_NOT_DELETE) def DeleteCharacter(self, index): chr.DeleteInstance(index) self.SelectSlot(self.slot) def ExitSelect(self): self.dlgQuestion.Hide() if LEAVE_BUTTON_FOR_POTAL: if app.loggined: self.stream.SetPhaseWindow(0) else: self.stream.setloginphase() else: self.stream.SetLoginPhase() if os.path.exists("lastlogin.cfg"): os.remove("lastlogin.cfg") self.Hide() def GetSlotIndex(self): return self.slot def DecreaseSlotIndex(self): slotIndex = (self.GetSlotIndex() - 1 + self.SLOT_COUNT) % self.SLOT_COUNT self.SelectSlot(slotIndex) def IncreaseSlotIndex(self): slotIndex = (self.GetSlotIndex() + 1) % self.SLOT_COUNT self.SelectSlot(slotIndex) def SelectSlot(self, index): if index < 0: return if index >= self.SLOT_COUNT: return self.slot = index chr.SelectInstance(self.slot) for i in xrange(self.CHARACTER_TYPE_COUNT): self.destNameAlpha[i] = 0.0 for i in xrange(self.SLOT_COUNT): self.destRotation[(i+self.slot)%self.SLOT_COUNT] = self.SLOT_ROTATION[i] self.destGauge = [0.0, 0.0, 0.0, 0.0] id=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID) if 0 != id: self.btnStart.Show() self.btnDelete.Show() self.btnCreate.Hide() playTime=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME) level=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_LEVEL) race=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_RACE) valueHTH=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_HTH) valueINT=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_INT) valueSTR=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_STR) valueDEX=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_DEX) name=net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_NAME) guildID=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_GUILD_ID) guildName=net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_GUILD_NAME) self.changeNameFlag=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_CHANGE_NAME_FLAG) job = chr.RaceToJob(race) if job >= 0 and job < self.CHARACTER_TYPE_COUNT: self.destNameAlpha[job] = 1.0 self.CharacterName.SetText(name) self.CharacterLevel.SetText(str(level)) self.PlayTime.SetText(str(playTime)) self.CharacterHTH.SetText(str(valueHTH)) self.CharacterINT.SetText(str(valueINT)) self.CharacterSTR.SetText(str(valueSTR)) self.CharacterDEX.SetText(str(valueDEX)) if guildName: self.GuildName.SetText(guildName) else: self.GuildName.SetText(SELECT_NOT_JOIN_GUILD) statesSummary = 110 if statesSummary > 0.0: self.destGauge = [ float(valueHTH) / statesSummary, float(valueINT) / statesSummary, float(valueSTR) / statesSummary, float(valueDEX) / statesSummary ] else: self.InitCharacterBoard() def InitCharacterBoard(self): self.btnStart.Hide() self.btnDelete.Hide() self.btnCreate.Show() self.CharacterName.SetText("") self.CharacterLevel.SetText("") self.PlayTime.SetText("") self.CharacterHTH.SetText("") self.CharacterINT.SetText("") self.CharacterSTR.SetText("") self.CharacterDEX.SetText("") self.GuildName.SetText(SELECT_NOT_JOIN_GUILD) ## Event def OnKeyDown(self, key): if 1 == key: self.ExitSelect() if 2 == key: self.SelectSlot(0) if 3 == key: self.SelectSlot(1) if 4 == key: self.SelectSlot(2) if 5 == key: self.SelectSlot(3) if 28 == key or 156 == key : id = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID) if 0 == id: self.CreateCharacter() else: self.StartGame() if 203 == key: self.slot = (self.GetSlotIndex() - 1 + self.SLOT_COUNT) % self.SLOT_COUNT self.SelectSlot(self.slot) if 205 == key: self.slot = (self.GetSlotIndex() + 1) % self.SLOT_COUNT self.SelectSlot(self.slot) # self.PopupNotifyMessage("Tasto premuto: " + str(key)) return TRUE def OnUpdate(self): chr.Update() for i in xrange(4): self.curGauge[i] += (self.destGauge[i] - self.curGauge[i]) / 10.0 if abs(self.curGauge[i] - self.destGauge[i]) < 0.005: self.curGauge[i] = self.destGauge[i] self.GaugeList[i].SetPercentage(self.curGauge[i], 1.0) for i in xrange(self.CHARACTER_TYPE_COUNT): self.curNameAlpha[i] += (self.destNameAlpha[i] - self.curNameAlpha[i]) / 10.0 self.NameList[i].SetAlpha(self.curNameAlpha[i]) for i in xrange(self.SLOT_COUNT): if FALSE == chr.HasInstance(i): continue chr.SelectInstance(i) distance = 50.0 rotRadian = self.curRotation[i] * (math.pi*2) / 360.0 x = distance*math.sin(rotRadian) + distance*math.cos(rotRadian) y = distance*math.cos(rotRadian) - distance*math.sin(rotRadian) chr.SetPixelPosition(int(x), int(y), 30) ##### dir = app.GetRotatingDirection(self.destRotation[i], self.curRotation[i]) rot = app.GetDegreeDifference(self.destRotation[i], self.curRotation[i]) if app.DEGREE_DIRECTION_RIGHT == dir: self.curRotation[i] += rot / 10.0 elif app.DEGREE_DIRECTION_LEFT == dir: self.curRotation[i] -= rot / 10.0 self.curRotation[i] = (self.curRotation[i] + 360.0) % 360.0 ####################################################### if -1 != self.startIndex: ## Temporary ## BackGroundLoadingÀÌ Áö¿ø µÉ¶§±îÁö Àӽ÷Î.. if app.GetTime() - self.startReservingTime > 3.0: if FALSE == self.OpenLoadingFlag: chrSlot=self.stream.GetCharacterSlot() net.DirectEnter(chrSlot) self.OpenLoadingFlag = TRUE playTime=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME) import player player.SetPlayTime(playTime) import chat chat.Clear() ## µé¾î°¥¶§ Chat À» ÃʱâÈ. Àӽà Pos. ## Temporary ####################################################### def EmptyFunc(self): pass def PopupMessage(self, msg, func=0): if not func: func=self.EmptyFunc self.stream.popupWindow.Close() self.stream.popupWindow.Open(msg, func, UI_OK) def OnPressExitKey(self): self.ExitSelect() return TRUE
quindi che dovrei fare?Il server non riconosce alcuni comandi che il client invia
Il client fa /antiexp_index 3 ma il server non lo legge
I file del tuo client ha l'invio del comando quindi penso che avessi voluto implementare l'anello antiexp dalla source ma senza modificare la source del server
IntroSelect.py sembra essere apposto la funzione self.dlgQuestion esiste
Potrebbe essere un errore del system.py\prototype.py\networkModule.py che richiama la funzione
Farmi vedere i file che ti ho dettoquei
quindi che dovrei fare?
Può essere montato solo sui r40xxx ovvero vanilla_core, game by blackyuko. Sui 34k o 2k devi avere un .exe diversoalla fine, dopo tutte ste 28 pagine di bug trovati, di fix vari,ecc ecc... è un client vergine che vale? che può essere montato sotto qualsiasi rev?