Bitte melden Sie sich an, um diesen Link zu sehen.
Go to file root/introcreate.py
Zitat von DevGamesLook for:Alles anzeigenBitte melden Sie sich an, um diesen Anhang zu sehen. Add this before:
Bitte melden Sie sich an, um diesen Anhang zu sehen.Code
- HAIR_DATA = (
- [ 1, 2, 3, 4, 5, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, ], ## Warrior
- [ 1, 2, 3, 4, 5, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, ], ## Assassin
- [ 1, 2, 3, 4, 5, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, ], ## Sura
- [ 1, 2, 3, 4, 5, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, ], ## Shaman
- )
Look for:
Bitte melden Sie sich an, um diesen Anhang zu sehen. Replace with:Alles anzeigenCode
- ###########################################################
- if -1 != self.reservingRaceIndex:
- if app.GetTime() - self.reservingStartTime >= 1.5:
- chrSlot=self.stream.GetCharacterSlot()
- textName = self.editCharacterName.GetText()
- raceIndex = self.reservingRaceIndex
- shapeIndex = self.reservingShapeIndex
- startStat = self.START_STAT[self.reservingRaceIndex]
- statCon = self.stat[0] - startStat[0]
- statInt = self.stat[1] - startStat[1]
- statStr = self.stat[2] - startStat[2]
- statDex = self.stat[3] - startStat[3]
- net.SendCreateCharacterPacket(chrSlot, textName, raceIndex, shapeIndex, statCon, statInt, statStr, statDex)
- self.reservingRaceIndex = -1
- ###########################################################
Bitte melden Sie sich an, um diesen Anhang zu sehen.Alles anzeigenCode
- ###########################################################
- if -1 != self.reservingRaceIndex:
- if app.GetTime() - self.reservingStartTime >= 1.5:
- chrSlot=self.stream.GetCharacterSlot()
- textName = self.editCharacterName.GetText()
- raceIndex = self.reservingRaceIndex
- shapeIndex = self.reservingShapeIndex
- hairIndex = self.HAIR_DATA[chr.RaceToJob(self.reservingRaceIndex)][self.hairIndex]#New hair
- startStat = self.START_STAT[self.reservingRaceIndex]
- statCon = self.stat[0] - startStat[0]
- statInt = self.stat[1] - startStat[1]
- statStr = self.stat[2] - startStat[2]
- statDex = self.stat[3] - startStat[3]
- net.SendCreateCharacterPacket(chrSlot, textName, raceIndex, shapeIndex, hairIndex, statCon, statInt, statStr, statDex) #New hair
- self.reservingRaceIndex = -1
- ###########################################################
Look for:Bitte melden Sie sich an, um diesen Anhang zu sehen. Add this after:
Bitte melden Sie sich an, um diesen Anhang zu sehen.Alles anzeigenCode
- def IncreaseHair(self):
- chr_id = self.__GetSlotChrID(self.gender, self.slot)
- chr.SelectInstance(chr_id)
- if(self.hairIndex >= len(self.HAIR_DATA[chr.RaceToJob(chr.GetRace())]) - 1):
- return
- self.hairIndex += 1
- chr.SetHair(self.HAIR_DATA[chr.RaceToJob(chr.GetRace())][self.hairIndex])
- self.hairNumber.SetText(str(self.hairIndex))
- chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
- chr.SetLoopMotion(chr.MOTION_INTRO_WAIT)
- def DecreaseHair(self):
- chr_id = self.__GetSlotChrID(self.gender, self.slot)
- chr.SelectInstance(chr_id)
- if(self.hairIndex == 0):
- return
- self.hairIndex -= 1
- self.hairNumber.SetText(str(self.hairIndex))
- chr.SetHair(self.HAIR_DATA[chr.RaceToJob(chr.GetRace())][self.hairIndex])
- chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
- chr.SetLoopMotion(chr.MOTION_INTRO_WAIT)
Look for:
Bitte melden Sie sich an, um diesen Anhang zu sehen. Add this after:
Bitte melden Sie sich an, um diesen Anhang zu sehen.
Look for:
Bitte melden Sie sich an, um diesen Anhang zu sehen. Add this after:Code
- getChild("hth_button").ShowToolTip = lambda arg=self.STAT_CON: self.OverInStatButton(arg)
- getChild("hth_button").HideToolTip = lambda arg=self.STAT_CON: self.OverOutStatButton()
- getChild("int_button").ShowToolTip = lambda arg=self.STAT_INT: self.OverInStatButton(arg)
- getChild("int_button").HideToolTip = lambda arg=self.STAT_INT: self.OverOutStatButton()
- getChild("str_button").ShowToolTip = lambda arg=self.STAT_STR: self.OverInStatButton(arg)
- getChild("str_button").HideToolTip = lambda arg=self.STAT_STR: self.OverOutStatButton()
- getChild("dex_button").ShowToolTip = lambda arg=self.STAT_DEX: self.OverInStatButton(arg)
- getChild("dex_button").HideToolTip = lambda arg=self.STAT_DEX: self.OverOutStatButton()
Bitte melden Sie sich an, um diesen Anhang zu sehen.
Look for:
Add this after:
Look for:Add this bellow:
Alles anzeigenCode
- if(self.hairIndex > 0):
- for i in xrange(SLOT_COUNT):
- chr.SelectInstance(self.__GetSlotChrID(0, i))
- chr.SetHair(0)
- self.hairIndex = 0
- self.hairNumber.SetText(str(self.hairIndex))
- for i in xrange(SLOT_COUNT):
- chr.SelectInstance(self.__GetSlotChrID(1, i))
- chr.SetHair(0)
- self.hairIndex = 0
- self.hairNumber.SetText(str(self.hairIndex))
Look for:Add this bellow:
Alles anzeigenCode
- if(self.hairIndex > 0):
- for i in xrange(SLOT_COUNT):
- chr.SelectInstance(self.__GetSlotChrID(0, i))
- chr.SetHair(0)
- self.hairIndex = 0
- self.hairNumber.SetText(self.hairIndex)
- for i in xrange(SLOT_COUNT):
- chr.SelectInstance(self.__GetSlotChrID(1, i))
- chr.SetHair(0)
- self.hairIndex = 0
- self.hairNumber.SetText(self.hairIndex)
Go to file locale/xx/ui/createcharacterwindow.py
Look for:
Add this after:Alles anzeigenCode
On this 2 functions:Alles anzeigenCode
- {
- "name" : "increase_hair",
- "type" : "button",
- "x" : 81,
- "y" : 239 + TEMPORARY_HEIGHT + 25,
- "default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
- "over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
- "down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
- },
- {
- "name" : "hair_number",
- "type" : "text",
- "x" : 110,
- "y" : 239 + TEMPORARY_HEIGHT + 25,
- "text" : "0",
- },
- {
- "name" : "character_hairstyle",
- "type" : "text",
- "x" : 43,
- "y" : 293,
- "text" : "HairStyle",
- "text_horizontal_align" : "center",
- },
- {
- "name" : "decrease_hair",
- "type" : "button",
- "x" : 139,
- "y" : 239 + TEMPORARY_HEIGHT + 25,
- "default_image" : "d:/ymir work/ui/game/windows/btn_minus_up.sub",
- "over_image" : "d:/ymir work/ui/game/windows/btn_minus_over.sub",
- "down_image" : "d:/ymir work/ui/game/windows/btn_minus_down.sub",
- },
Look for:
Change with:
Go to UserInterface/Packet.h
Look for:
Replace with:Alles anzeigenCode
Alles anzeigenCode
Go to UserInterface/PythonNetworkStreamPhaseSelect.cpp
Look for:
Replace with:Alles anzeigenCode
- bool CPythonNetworkStream::SendCreateCharacterPacket (BYTE index, const char *name, BYTE job, BYTE shape, BYTE byCON, BYTE byINT, BYTE bySTR, BYTE byDEX)
- {
- TPacketCGCreateCharacter createCharacterPacket;
- createCharacterPacket.header = HEADER_CG_PLAYER_CREATE;
- createCharacterPacket.index = index;
- strncpy (createCharacterPacket.name, name, CHARACTER_NAME_MAX_LEN);
- createCharacterPacket.job = job;
- createCharacterPacket.shape = shape;
- createCharacterPacket.CON = byCON;
- createCharacterPacket.INT = byINT;
- createCharacterPacket.STR = bySTR;
- createCharacterPacket.DEX = byDEX;
Alles anzeigenCode
- bool CPythonNetworkStream::SendCreateCharacterPacket(BYTE index, const char *name, BYTE job, BYTE shape,WORD wHair, BYTE byCON, BYTE byINT, BYTE bySTR, BYTE byDEX)
- {
- TPacketCGCreateCharacter createCharacterPacket;
- createCharacterPacket.header = HEADER_CG_PLAYER_CREATE;
- createCharacterPacket.index = index;
- strncpy(createCharacterPacket.name, name, CHARACTER_NAME_MAX_LEN);
- createCharacterPacket.job = job;
- createCharacterPacket.shape = shape;
- createCharacterPacket.hair = wHair;
- createCharacterPacket.CON = byCON;
- createCharacterPacket.INT = byINT;
- createCharacterPacket.STR = bySTR;
- createCharacterPacket.DEX = byDEX;
Go to UserInterface/PythonNetworkStream.h
Look for:
Replace with:
Go to UserInterface/PythonNetworkStreamModule.cpp
Look for:
Replace with:Alles anzeigenCode
- PyObject *netSendCreateCharacterPacket (PyObject *poSelf, PyObject *poArgs)
- {
- int index;
- if (!PyTuple_GetInteger (poArgs, 0, &index)) {
- return Py_BuildException();
- }
- char *name;
- if (!PyTuple_GetString (poArgs, 1, &name)) {
- return Py_BuildException();
- }
- int job;
- if (!PyTuple_GetInteger (poArgs, 2, &job)) {
- return Py_BuildException();
- }
- int shape;
- if (!PyTuple_GetInteger (poArgs, 3, &shape)) {
- return Py_BuildException();
- }
- int stat1;
- if (!PyTuple_GetInteger (poArgs, 4, &stat1)) {
- return Py_BuildException();
- }
- int stat2;
- if (!PyTuple_GetInteger (poArgs, 5, &stat2)) {
- return Py_BuildException();
- }
- int stat3;
- if (!PyTuple_GetInteger (poArgs, 6, &stat3)) {
- return Py_BuildException();
- }
- int stat4;
- if (!PyTuple_GetInteger (poArgs, 7, &stat4)) {
- return Py_BuildException();
- }
- if (index < 0 && index > 3) {
- return Py_BuildException();
- }
- CPythonNetworkStream &rkNetStream = CPythonNetworkStream::Instance();
- rkNetStream.SendCreateCharacterPacket ((BYTE) index, name, (BYTE) job, (BYTE) shape, stat1, stat2, stat3, stat4);
- return Py_BuildNone();
- }
Alles anzeigenCode
- PyObject* netSendCreateCharacterPacket(PyObject* poSelf, PyObject* poArgs)
- {
- int index;
- if (!PyTuple_GetInteger(poArgs, 0, &index))
- return Py_BuildException();
- char* name;
- if (!PyTuple_GetString(poArgs, 1, &name))
- return Py_BuildException();
- int job;
- if (!PyTuple_GetInteger(poArgs, 2, &job))
- return Py_BuildException();
- int shape;
- if (!PyTuple_GetInteger(poArgs, 3, &shape))
- return Py_BuildException();
- int hair;
- if (!PyTuple_GetInteger(poArgs, 4, &hair))
- return Py_BuildException();
- int stat1;
- if (!PyTuple_GetInteger(poArgs, 5, &stat1))
- return Py_BuildException();
- int stat2;
- if (!PyTuple_GetInteger(poArgs, 6, &stat2))
- return Py_BuildException();
- int stat3;
- if (!PyTuple_GetInteger(poArgs, 7, &stat3))
- return Py_BuildException();
- int stat4;
- if (!PyTuple_GetInteger(poArgs, 8, &stat4))
- return Py_BuildException();
- if (index<0 && index>3)
- return Py_BuildException();
- CPythonNetworkStream& rkNetStream=CPythonNetworkStream::Instance();
- rkNetStream.SendCreateCharacterPacket((BYTE)index, name, (BYTE)job, (BYTE)shape, (WORD)hair, stat1, stat2, stat3, stat4);
- return Py_BuildNone();
- }
Go to game/src/Packet.h
Look for:
Replace with:Alles anzeigenCode
Alles anzeigenCode
Go to db/src/ClientManagerPlayer.cpp
Inside:
This is default query. Please check your query of your source and adjust according.
Look for:
Replace with:Alles anzeigenCode
- queryLen = snprintf(queryStr, sizeof(queryStr),
- "INSERT INTO player%s "
- "(id, account_id, name, level, st, ht, dx, iq, "
- "job, voice, dir, x, y, z, "
- "hp, mp, random_hp, random_sp, stat_point, stamina, part_base, part_main, part_hair, gold, playtime, "
- "skill_level, quickslot) "
- "VALUES(0, %u, '%s', %d, %d, %d, %d, %d, "
- "%d, %d, %d, %d, %d, %d, %d, "
- "%d, %d, %d, %d, %d, %d, %d, 0, %d, 0, ",
- GetTablePostfix(),
- packet->account_id, packet->player_table.name, packet->player_table.level, packet->player_table.st, packet->player_table.ht, packet->player_table.dx, packet->player_table.iq,
- packet->player_table.job, packet->player_table.voice, packet->player_table.dir, packet->player_table.x, packet->player_table.y, packet->player_table.z,
- packet->player_table.hp, packet->player_table.sp, packet->player_table.sRandomHP, packet->player_table.sRandomSP, packet->player_table.stat_point, packet->player_table.stamina, packet->player_table.part_base, packet->player_table.part_base, packet->player_table.gold);
- sys_log(0, "PlayerCreate accountid %d name %s level %d gold %d, st %d ht %d job %d",
- packet->account_id,
- packet->player_table.name,
- packet->player_table.level,
- packet->player_table.gold,
- packet->player_table.st,
- packet->player_table.ht,
- packet->player_table.job);
Alles anzeigenCode
- queryLen = snprintf(queryStr, sizeof(queryStr), "INSERT INTO player%s "
- "(id, account_id, name, level, st, ht, dx, iq, "
- "job, voice, dir, x, y, z, "
- "hp, mp, random_hp, random_sp, stat_point, stamina, part_base, part_main, part_hair, gold, playtime, "
- "skill_level, quickslot) "
- "VALUES(0, %u, '%s', %d, %d, %d, %d, %d, "
- "%d, %d, %d, %d, %d, %d, %d, "
- "%d, %d, %d, %d, %d, %d, %d, %d, %d, 0, ",
- GetTablePostfix(),
- packet->account_id, packet->player_table.name, packet->player_table.level, packet->player_table.st, packet->player_table.ht, packet->player_table.dx, packet->player_table.iq,
- packet->player_table.job, packet->player_table.voice, packet->player_table.dir, packet->player_table.x, packet->player_table.y, packet->player_table.z,
- packet->player_table.hp, packet->player_table.sp, packet->player_table.sRandomHP, packet->player_table.sRandomSP, packet->player_table.stat_point, packet->player_table.stamina, packet->player_table.part_base, packet->player_table.part_base, packet->player_table.parts[PART_HAIR], packet->player_table.gold);
- sys_log(0, "PlayerCreate accountid %d name %s level %d gold %d, st %d ht %d job %d hair %d",
- packet->account_id, packet->player_table.name, packet->player_table.level, packet->player_table.gold, packet->player_table.st, packet->player_table.ht, packet->player_table.job,
- packet->player_table.parts[PART_HAIR]);
Look for:Add after:
Go to game/src/input_login.cpp
Look for:
Replace with:
Look for:Add after:
Look for:
Replace with:Code
Look for:Code
- void CInputLogin::CharacterCreate(LPDESC d, const char * data)
- {
- struct command_player_create * pinfo = (struct command_player_create *) data;
- TPlayerCreatePacket player_create_packet;
- sys_log(0, "PlayerCreate: name %s pos %d job %d shape %d hair %d",
- pinfo->name, pinfo->index, pinfo->job, pinfo->shape,
- pinfo->hair);
Replace with:
Source:
Zitat von DevGamestlthings.net