Jump to content

VegaS

Banned
  • Posts

    363
  • Joined

  • Last visited

  • Days Won

    40
  • Feedback

    0%

Posts posted by VegaS

  1. SourceClient - Eterlib/IME.cpp

     

    Search:

    m_bEnablePaste = false;

    and replaces with:

    m_bEnablePaste = true;

    Search and delete:

    if (!__IsWritable(c))
            return;

     

    And search in ui.py / root:

    def OnKeyDown(self, key):

    and add it below:

            if app.DIK_V == key:
                if app.IsPressed(app.DIK_LCONTROL):
                    ime.PasteTextFromClipBoard()

     

    • Love 4
  2. On 24.11.2015, 13:35:22, wedxp123 said:

    Não da para modificar pelo Client?

    What do you change the client to create the character? Client accept any format of characters in the input box.

    But the game can not send packet source account creation once it is entered a character string format.Unless you activate a variable what I said above.

    Please explain what you want to do with these characters, you want to block or what? And I pray in English.

     

     

    You can do several variables, kind of python like a :

     

            if len(name) == "test" or len(name) == "test" or len(name) == "test" or len(name) == "test" or len(name) == "test":    
                self.PopupMessage(locale.CREATE_FAILURE, self.EnableWindow)
                return FALSE

  3. Add in ui.py

     

    class ListBoxEx(Window):
    	class Item(Window):
    		def __init__(self):
    			Window.__init__(self)
    
    		def __del__(self):
    			Window.__del__(self)
    
    		def SetParent(self, parent):
    			Window.SetParent(self, parent)
    			self.parent=proxy(parent)
    
    		def OnMouseLeftButtonDown(self):
    			self.parent.SelectItem(self)
    
    		def OnRender(self):
    			if self.parent.GetSelectedItem()==self:
    				self.OnSelectedRender()
    
    		def OnSelectedRender(self):
    			x, y = self.GetGlobalPosition()
    			grp.SetColor(grp.GenerateColor(0.0, 0.0, 0.7, 0.7))
    			grp.RenderBar(x, y, self.GetWidth(), self.GetHeight())
    			
    	class Item2(Window):
    		def __init__(self):
    			Window.__init__(self)
    
    		def __del__(self):
    			Window.__del__(self)
    
    		def SetParent(self, parent):
    			Window.SetParent(self, parent)
    			self.parent=proxy(parent)
    
    		def OnMouseLeftButtonDown(self):
    			self.parent.SelectItem(self)
    
    		def OnRender(self):
    			if self.parent.GetSelectedItem()==self:
    				self.OnSelectedRender()
    
    		def OnSelectedRender(self):
    			x, y = self.GetGlobalPosition()
    			x += 6
    			y += 5
    			grp.SetColor(grp.GenerateColor(0.0, 0.0, 0.7, 0.7))
    			grp.RenderBar(x, y, self.GetWidth(), self.GetHeight())
    
    	def __init__(self):
    		Window.__init__(self)
    
    		self.viewItemCount=10
    		self.basePos=0
    		self.itemHeight=16
    		self.itemStep=20
    		self.selItem=0
    		self.itemList=[]
    		self.onSelectItemEvent = lambda *arg: None
    
    		if localeInfo.IsARABIC():
    			self.itemWidth=130
    		else:
    			self.itemWidth=100
    
    		self.scrollBar=None
    		self.__UpdateSize()
    
    	def __del__(self):
    		Window.__del__(self)
    
    	def __UpdateSize(self):
    		height=self.itemStep*self.__GetViewItemCount()
    
    		self.SetSize(self.itemWidth, height)
    
    	def IsEmpty(self):
    		if len(self.itemList)==0:
    			return 1
    		return 0
    
    	def SetItemStep(self, itemStep):
    		self.itemStep=itemStep
    		self.__UpdateSize()
    
    	def SetItemSize(self, itemWidth, itemHeight):
    		self.itemWidth=itemWidth
    		self.itemHeight=itemHeight
    		self.__UpdateSize()
    
    	def SetViewItemCount(self, viewItemCount):
    		self.viewItemCount=viewItemCount
    
    	def SetSelectEvent(self, event):
    		self.onSelectItemEvent = event
    
    	def SetBasePos(self, basePos):
    		for oldItem in self.itemList[self.basePos:self.basePos+self.viewItemCount]:
    			oldItem.Hide()
    
    		self.basePos=basePos
    
    		pos=basePos
    		for newItem in self.itemList[self.basePos:self.basePos+self.viewItemCount]:
    			(x, y)=self.GetItemViewCoord(pos, newItem.GetWidth())
    			newItem.SetPosition(x, y)
    			newItem.Show()
    			pos+=1
    
    	def GetItemIndex(self, argItem):
    		return self.itemList.index(argItem)
    
    	def GetSelectedItem(self):
    		return self.selItem
    
    	def SelectIndex(self, index):
    
    		if index >= len(self.itemList) or index < 0:
    			self.selItem = None
    			return
    
    		try:
    			self.selItem=self.itemList[index]
    		except:
    			pass
    
    	def SelectItem(self, selItem):
    		self.selItem=selItem
    		self.onSelectItemEvent(selItem)
    
    	def RemoveAllItems(self):
    		self.selItem=None
    		self.itemList=[]
    
    		if self.scrollBar:
    			self.scrollBar.SetPos(0)
    
    	def RemoveItem(self, delItem):
    		if delItem==self.selItem:
    			self.selItem=None
    
    		self.itemList.remove(delItem)
    
    	def AppendItem(self, newItem):
    		newItem.SetParent(self)
    		newItem.SetSize(self.itemWidth, self.itemHeight)
    
    		pos=len(self.itemList)
    		if self.__IsInViewRange(pos):
    			(x, y)=self.GetItemViewCoord(pos, newItem.GetWidth())
    			newItem.SetPosition(x, y)
    			newItem.Show()
    		else:
    			newItem.Hide()
    
    		self.itemList.append(newItem)
    
    	def SetScrollBar(self, scrollBar):
    		scrollBar.SetScrollEvent(__mem_func__(self.__OnScroll))
    		self.scrollBar=scrollBar
    
    	def __OnScroll(self):
    		self.SetBasePos(int(self.scrollBar.GetPos()*self.__GetScrollLen()))
    
    	def __GetScrollLen(self):
    		scrollLen=self.__GetItemCount()-self.__GetViewItemCount()
    		if scrollLen<0:
    			return 0
    
    		return scrollLen
    
    	def __GetViewItemCount(self):
    		return self.viewItemCount
    
    	def __GetItemCount(self):
    		return len(self.itemList)
    
    	def GetItemViewCoord(self, pos, itemWidth):
    		if localeInfo.IsARABIC():
    			return (self.GetWidth()-itemWidth-10, (pos-self.basePos)*self.itemStep)
    		else:
    			return (0, (pos-self.basePos)*self.itemStep)
    
    	def __IsInViewRange(self, pos):
    		if pos<self.basePos:
    			return 0
    		if pos>=self.basePos+self.viewItemCount:
    			return 0
    		return 1

     

  4. Since eternexus etc. can not find certain characters unpack eg 01.¼º / ³ª¹ "and then be renamed locations and made new ones.

    Go folder property / property and creates a file named * list *

    Add it in him

    http://pastebin.com/ee7RJ35v

    Then delete everything you have in the folder list and eventually out of this.

    This is the hidden content, please
    !aDo5GBrRjDJz-5rVyeukVAqKECAN-M1CNDmot3RNRyI

    Password Archive: property_vegas_work

    • Metin2 Dev 62
    • Dislove 1
    • Not Good 2
    • Sad 2
    • Good 12
    • Love 1
    • Love 33
  5. I would like to invert the function on the mob_drop_item Level_limit...

    It's possbile?

    Thanks :P

     

    game/item_manager_read_tables.cpp

     

    		if ( strType == "limit" )
    		{
    			if ( !loader.GetTokenInteger("level_limit", &iLevelLimit) )
    			{
    				sys_err("ReadmonsterDropItemGroup : Syntax error %s : no level_limit, node %s", c_pszFileName, stName.c_str());
    				loader.SetParentNode();
    				return false;
    			}
    		}
    		else
    		{
    			iLevelLimit = 0;
    		}
    

     

    bool ITEM_MANAGER::ReadMonsterDropItemGroup(const char * c_pszFileName)
    {
    	CTextFileLoader loader;
    
    	if (!loader.Load(c_pszFileName))
    		return false;
    
    	for (DWORD i = 0; i < loader.GetChildNodeCount(); ++i)
    	{
    		std::string stName("");
    
    		loader.GetCurrentNodeName(&stName);
    
    		if (strncmp (stName.c_str(), "kr_", 3) == 0)
    		{
    			if (LC_IsYMIR())
    			{
    				stName.assign(stName, 3, stName.size() - 3);
    			}
    			else
    			{
    				continue;
    			}
    		}
    
    		loader.SetChildNode(i);
    
    		int iMobVnum = 0;
    		int iKillDrop = 0;
    		int iLevelLimit = 0;
    
    		std::string strType("");
    
    		if (!loader.GetTokenString("type", &strType))
    		{
    			sys_err("ReadMonsterDropItemGroup : Syntax error %s : no type (kill|drop), node %s", c_pszFileName, stName.c_str());
    			loader.SetParentNode();
    			return false;
    		}
    
    		if (!loader.GetTokenInteger("mob", &iMobVnum))
    		{
    			sys_err("ReadMonsterDropItemGroup : Syntax error %s : no mob vnum, node %s", c_pszFileName, stName.c_str());
    			loader.SetParentNode();
    			return false;
    		}
    
    		if (strType == "kill")
    		{
    			if (!loader.GetTokenInteger("kill_drop", &iKillDrop))
    			{
    				sys_err("ReadMonsterDropItemGroup : Syntax error %s : no kill drop count, node %s", c_pszFileName, stName.c_str());
    				loader.SetParentNode();
    				return false;
    			}
    		}
    		else
    		{
    			iKillDrop = 1;
    		}
    
    		if ( strType == "limit" )
    		{
    			if ( !loader.GetTokenInteger("level_limit", &iLevelLimit) )
    			{
    				sys_err("ReadmonsterDropItemGroup : Syntax error %s : no level_limit, node %s", c_pszFileName, stName.c_str());
    				loader.SetParentNode();
    				return false;
    			}
    		}
    		else
    		{
    			iLevelLimit = 0;
    		}
    
    		sys_log(0,"MOB_ITEM_GROUP %s [%s] %d %d", stName.c_str(), strType.c_str(), iMobVnum, iKillDrop);
    
    		if (iKillDrop == 0)
    		{
    			loader.SetParentNode();
    			continue;
    		}
    
    		TTokenVector* pTok = NULL;
    
    		if (strType == "kill")
    		{
    			CMobItemGroup * pkGroup = M2_NEW CMobItemGroup(iMobVnum, iKillDrop, stName);
    
    			for (int k = 1; k < 256; ++k)
    			{
    				char buf[4];
    				snprintf(buf, sizeof(buf), "%d", k);
    
    				if (loader.GetTokenVector(buf, &pTok))
    				{
    					//sys_log(1, "               %s %s", pTok->at(0).c_str(), pTok->at(1).c_str());
    					std::string& name = pTok->at(0);
    					DWORD dwVnum = 0;
    
    					if (!GetVnumByOriginalName(name.c_str(), dwVnum))
    					{
    						str_to_number(dwVnum, name.c_str());
    						if (!ITEM_MANAGER::instance().GetTable(dwVnum))
    						{
    							sys_err("ReadMonsterDropItemGroup : there is no item %s : node %s : vnum %d", name.c_str(), stName.c_str(), dwVnum);
    							return false;
    						}
    					}
    
    					int iCount = 0;
    					str_to_number(iCount, pTok->at(1).c_str());
    
    					if (iCount<1)
    					{
    						sys_err("ReadMonsterDropItemGroup : there is no count for item %s : node %s : vnum %d, count %d", name.c_str(), stName.c_str(), dwVnum, iCount);
    						return false;
    					}
    
    					int iPartPct = 0;
    					str_to_number(iPartPct, pTok->at(2).c_str());
    
    					if (iPartPct == 0)
    					{
    						sys_err("ReadMonsterDropItemGroup : there is no drop percent for item %s : node %s : vnum %d, count %d, pct %d", name.c_str(), stName.c_str(), iPartPct);
    						return false;
    					}
    
    					int iRarePct = 0;
    					str_to_number(iRarePct, pTok->at(3).c_str());
    					iRarePct = MINMAX(0, iRarePct, 100);
    
    					sys_log(0,"        %s count %d rare %d", name.c_str(), iCount, iRarePct);
    					pkGroup->AddItem(dwVnum, iCount, iPartPct, iRarePct);
    					continue;
    				}
    
    				break;
    			}
    			m_map_pkMobItemGroup.insert(std::map<DWORD, CMobItemGroup*>::value_type(iMobVnum, pkGroup));
    
    		}
    		else if (strType == "drop")
    		{
    			CDropItemGroup* pkGroup;
    			bool bNew = true;
    			itertype(m_map_pkDropItemGroup) it = m_map_pkDropItemGroup.find (iMobVnum);
    			if (it == m_map_pkDropItemGroup.end())
    			{
    				pkGroup = M2_NEW CDropItemGroup(0, iMobVnum, stName);
    			}
    			else
    			{
    				bNew = false;
    				CDropItemGroup* pkGroup = it->second;
    			}
    
    			for (int k = 1; k < 256; ++k)
    			{
    				char buf[4];
    				snprintf(buf, sizeof(buf), "%d", k);
    
    				if (loader.GetTokenVector(buf, &pTok))
    				{
    					std::string& name = pTok->at(0);
    					DWORD dwVnum = 0;
    
    					if (!GetVnumByOriginalName(name.c_str(), dwVnum))
    					{
    						str_to_number(dwVnum, name.c_str());
    						if (!ITEM_MANAGER::instance().GetTable(dwVnum))
    						{
    							sys_err("ReadDropItemGroup : there is no item %s : node %s", name.c_str(), stName.c_str());
    							M2_DELETE(pkGroup);
    
    							return false;
    						}
    					}
    
    					int iCount = 0;
    					str_to_number(iCount, pTok->at(1).c_str());
    
    					if (iCount < 1)
    					{
    						sys_err("ReadMonsterDropItemGroup : there is no count for item %s : node %s", name.c_str(), stName.c_str());
    						M2_DELETE(pkGroup);
    
    						return false;
    					}
    
    					float fPercent = atof(pTok->at(2).c_str());
    
    					DWORD dwPct = (DWORD)(10000.0f * fPercent);
    
    					sys_log(0,"        name %s pct %d count %d", name.c_str(), dwPct, iCount);
    					pkGroup->AddItem(dwVnum, dwPct, iCount);
    
    					continue;
    				}
    
    				break;
    			}
    			if (bNew)
    				m_map_pkDropItemGroup.insert(std::map<DWORD, CDropItemGroup*>::value_type(iMobVnum, pkGroup));
    
    		}
    		else if ( strType == "limit" )
    		{
    			CLevelItemGroup* pkLevelItemGroup = M2_NEW CLevelItemGroup(iLevelLimit);
    
    			for ( int k=1; k < 256; k++ )
    			{
    				char buf[4];
    				snprintf(buf, sizeof(buf), "%d", k);
    
    				if ( loader.GetTokenVector(buf, &pTok) )
    				{
    					std::string& name = pTok->at(0);
    					DWORD dwItemVnum = 0;
    
    					if (false == GetVnumByOriginalName(name.c_str(), dwItemVnum))
    					{
    						str_to_number(dwItemVnum, name.c_str());
    						if ( !ITEM_MANAGER::instance().GetTable(dwItemVnum) )
    						{
    							M2_DELETE(pkLevelItemGroup);
    							return false;
    						}
    					}
    
    					int iCount = 0;
    					str_to_number(iCount, pTok->at(1).c_str());
    
    					if (iCount < 1)
    					{
    						M2_DELETE(pkLevelItemGroup);
    						return false;
    					}
    
    					float fPct = atof(pTok->at(2).c_str());
    					DWORD dwPct = (DWORD)(10000.0f * fPct);
    
    					pkLevelItemGroup->AddItem(dwItemVnum, dwPct, iCount);
    
    					continue;
    				}
    
    				break;
    			}
    
    			m_map_pkLevelItemGroup.insert(std::map<DWORD, CLevelItemGroup*>::value_type(iMobVnum, pkLevelItemGroup));
    		}
    		else if (strType == "thiefgloves")
    		{
    			CBuyerThiefGlovesItemGroup* pkGroup = M2_NEW CBuyerThiefGlovesItemGroup(0, iMobVnum, stName);
    
    			for (int k = 1; k < 256; ++k)
    			{
    				char buf[4];
    				snprintf(buf, sizeof(buf), "%d", k);
    
    				if (loader.GetTokenVector(buf, &pTok))
    				{
    					std::string& name = pTok->at(0);
    					DWORD dwVnum = 0;
    
    					if (!GetVnumByOriginalName(name.c_str(), dwVnum))
    					{
    						str_to_number(dwVnum, name.c_str());
    						if (!ITEM_MANAGER::instance().GetTable(dwVnum))
    						{
    							sys_err("ReadDropItemGroup : there is no item %s : node %s", name.c_str(), stName.c_str());
    							M2_DELETE(pkGroup);
    
    							return false;
    						}
    					}
    
    					int iCount = 0;
    					str_to_number(iCount, pTok->at(1).c_str());
    
    					if (iCount < 1)
    					{
    						sys_err("ReadMonsterDropItemGroup : there is no count for item %s : node %s", name.c_str(), stName.c_str());
    						M2_DELETE(pkGroup);
    
    						return false;
    					}
    
    					float fPercent = atof(pTok->at(2).c_str());
    
    					DWORD dwPct = (DWORD)(10000.0f * fPercent);
    
    					sys_log(0,"        name %s pct %d count %d", name.c_str(), dwPct, iCount);
    					pkGroup->AddItem(dwVnum, dwPct, iCount);
    
    					continue;
    				}
    
    				break;
    			}
    
    			m_map_pkGloveItemGroup.insert(std::map<DWORD, CBuyerThiefGlovesItemGroup*>::value_type(iMobVnum, pkGroup));
    		}
    		else
    		{
    			sys_err("ReadMonsterDropItemGroup : Syntax error %s : invalid type %s (kill|drop), node %s", c_pszFileName, strType.c_str(), stName.c_str());
    			loader.SetParentNode();
    			return false;
    		}
    
    		loader.SetParentNode();
    	}
    
    	return true;
    }

     

  6. 1018 00:03:52166 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR

    Open the folder metin2_map_c1 / a1 / b1 etc.. and delete files. : (Example: pack/OutdoorC1/metin2_map_c1)

    -monsterareainfo.txt

    -monsterarrange.txt

    File and replaces it:

    regen.txt137 B
    This is the hidden content, please
    !C8OrC3inLD46kJdkf1qYyU5-e58h40bryYpfszZ12Wo
    #Edit (Link download reupload) : 
    This is the hidden content, please

     

    1017 23:48:59422 ::   File "game.py", line 1292, in OnKeyUp
    
    1017 23:48:59423 :: TypeError
    1017 23:48:59423 :: : 
    1017 23:48:59423 :: 'NoneType' object has no attribute '__getitem__'
    1017 23:48:59423 :: 

    Open the file and search function game.py (OnKeyUp) and replace it with :

    	def OnKeyUp(self, key):
    		try:
    			self.onClickKeyDict[key]()
    		except KeyError:
    			pass
    		except:
    			raise
    
    		return TRUE

    Or you have problem in other etc..

    1017 23:41:06096 :: Unknown Server Command QuestGetMapIndex 65 | QuestGetMapIndex
    1017 23:41:06096 :: Unknown Server Command gm_login | gm_login
    1017 23:41:06155 :: Unknown Server Command QuestMessage TheGuildHouseisunderconstruction.Pleasetryitlater. | QuestMessage
    1017 23:41:06214 :: Unknown Server Command QuestGetQID 48 | QuestGetQID
    1017 23:45:51181 :: Unknown Server Command QuestGetMapIndex 66 | QuestGetMapIndex
    1017 23:45:51181 :: Unknown Server Command gm_login | gm_login
    1017 23:45:51202 :: Unknown Server Command QuestMessage TheGuildHouseisunderconstruction.Pleasetryitlater. | QuestMessage
    1017 23:45:51246 :: Unknown Server Command QuestGetQID 48 | QuestGetQID etc..

    The server sends a custom that does not recognize and is not implemented at all or wrong in the client, use the search tool WinSCP / filezila etc. and search phrases that start with cmdchat or getcurrentquestindex ()) in quest folder / object and delete those quests that you do not use. I guess it's not your serverfiles and other customer-different etc, or do not have good systems implemented or what you wanted better.

    • Metin2 Dev 5
    • Smile Tear 1
    • Good 1
    • Love 6
  7. Now it should work perfectly without any problem.

    https://metin2.download/picture/gKQoffuO98KTL234oRLKPkj8811HbJyt/.jpg 

    quest make_shoes_metin2dev begin
    	state start begin
    		when login with pc.level >= 19 begin			
    			setstate(vegas_quest_start)
    		end
    	end
    	state vegas_quest_start begin
    		when letter begin
    			send_letter("Proteger os Pés")
    		end
    		when button or info begin
    			say_title("Proteger os Pés")
    			say("Precisas de proteger os teus pés?")
    			say("Mata duas Se-Rangs e vais conseguir uma")
    			say("boa recompensa.")
    			say("")
    			say_reward("Voce matou x"..pc.getqf("vegas_SeRang").." Se-Rangs até agora.")
    		end
    		when 393.kill begin
    			pc.setqf("vegas_SeRang", pc.getqf("vegas_SeRang")+1)
    			if pc.getqf("vegas_SeRang")==2 then
    				setstate(vegas_end)
    			end
    		end
    	end
    	state vegas_end begin
    		when letter begin
    			send_letter("Proteger os Pés - Completo ")
    		end
    		when button or info begin
    			say_title("Parabéns!")
    			say("Pelo teu esforço vou proteger")
    			say("os teus pés")
    			    say_reward("Sapatos em Madeira+7")
    			    say_reward("5.000 Yang")
    			    say_reward("150000 Experiencia")
    				pc.change_money(5000)
    				pc.give_exp2(150000)
    				pc.give_item2(15047, 1)
    			set_state(vegas_quest_completo)
    		end
    	end	
    	state vegas_quest_completo begin
    	end
    end

     

    • Love 1
  8. etc_drop_item.txt - which is in game/share/locale/xx

     

    https://metin2.download/picture/e8VbryFBb40LdD91218FNxYlq9OFk1uA/.png

    https://metin2.download/picture/akANO2W2Qotq1uWK0H8Zf7sfHR5TaTg5/.png 

     

    If you want to change structure open item_manager_read_tables.cpp

     

    bool ITEM_MANAGER::ReadEtcDropItemFile(const char * c_pszFileName)
    {
    	FILE * fp = fopen(c_pszFileName, "r");
    
    	if (!fp)
    	{
    		sys_err("Cannot open %s", c_pszFileName);
    		return false;
    	}
    
    	char buf[512];
    
    	int lines = 0;
    
    	while (fgets(buf, 512, fp))
    	{
    		++lines;
    
    		if (!*buf || *buf == '\n')
    			continue;
    
    		char szItemName[256];
    		float fProb = 0.0f;
    
    		strlcpy(szItemName, buf, sizeof(szItemName));
    		char * cpTab = strrchr(szItemName, '\t');
    
    		if (!cpTab)
    			continue;
    
    		*cpTab = '\0';
    		fProb = atof(cpTab + 1);
    
    		if (!*szItemName || fProb == 0.0f)
    			continue;
    
    		DWORD dwItemVnum;
    
    		if (!ITEM_MANAGER::instance().GetVnumByOriginalName(szItemName, dwItemVnum))
    		{
    			sys_err("No such an item (name: %s)", szItemName);
    			fclose(fp);
    			return false;
    		}
    
    		m_map_dwEtcItemDropProb[dwItemVnum] = (DWORD) (fProb * 10000.0f);
    		sys_log(0, "ETC_DROP_ITEM: %s prob %f", szItemName, fProb);
    	}
    
    	fclose(fp);
    	return true;
    }

     

    • Love 1
  9. https://metin2.download/picture/AMRGNZ7R89X91h9yh4Rg0aeUMnZ3nv2F/.jpg 

     

    Change is nothing unless you use a good virtualization code.

     

    And besides all works * .py, * .pyc * .mix and Ymir work as root it works, why verification is done on the client root folder location at all on D: / from your computer. To put a antifly eg * Ymir put the folder in the location work * D: / and it will work.

    Check correct location D: / is:

    bool PackInitialize(const char * c_pszFolder)
    {
    	NANOBEGIN
    	string block_folder;
    	
    	block_folder == "D:\\ymir work";
    	
    	struct stat st;
    	if( stat( "D:\\ymir work", & st ) == 0 )
    	{
    		LogBoxf("Something is wrong delete the file from D (ymir work)");
    		return true;
    	}	

     

    • Metin2 Dev 1
    • Love 3
  10. length.h

     

    	LOGIN_MAX_LEN			= 30,

    pachet.h

    typedef struct command_login3
    {
    	BYTE	header;
    	char	login[LOGIN_MAX_LEN + 1];
    	char	passwd[PASSWD_MAX_LEN + 1];
    	DWORD	adwClientKey[4];
    } TPacketCGLogin3;

    input_login.cpp

    void CInputLogin::Login(LPDESC d, const char * data)
    {
    	TPacketCGLogin * pinfo = (TPacketCGLogin *) data;
    
    	char login[LOGIN_MAX_LEN + 1];
    	trim_and_lower(pinfo->login, login, sizeof(login));

    input_auth.cpp

    	char login[LOGIN_MAX_LEN + 1];
    	trim_and_lower(pinfo->login, login, sizeof(login));
    	char szLogin[LOGIN_MAX_LEN * 2 + 1];
    	DBManager::instance().EscapeString(szLogin, sizeof(szLogin), login, strlen(login));
    	char returnID[LOGIN_MAX_LEN + 1] = {0};
    	strncpy(tempInfo2.login, returnID, LOGIN_MAX_LEN);

    input.cpp

    					std::string msg = stBuf.substr(3, LOGIN_MAX_LEN);

    input_teen.cpp

    db.h

    	char        szLogin[LOGIN_MAX_LEN+1];

     

     

    Client: Source

     

    packet.h

     

    	ID_MAX_NUM = 30,
    typedef struct command_login3
    {
        BYTE	header;
        char	name[ID_MAX_NUM + 1];
        char	pwd[PASS_MAX_NUM + 1];
        DWORD	adwClientKey[4];
    } TPacketCGLogin3;

    AccountConnector.cpp

    			strncpy(LoginPacket.name, m_strID.c_str(), ID_MAX_NUM);
    			strncpy(LoginPacket.pwd, m_strPassword.c_str(), PASS_MAX_NUM);
    			LoginPacket.name[ID_MAX_NUM] = '\0';
    			LoginPacket.pwd[PASS_MAX_NUM] = '\0';

    And navicat design table account :D

    Loginwindow.py

    "name" : "ID_EditLine",
    
    "input_limit" : 16,

    Change how you want :)

     

    Accept special characters in your password and login id :

    https://metin2.download/picture/T9I8t6X0247VLB2GH6I63D7GsN3DuAng/.png

     

    • Love 2
  11. My version :D

     

    Checking level + race + other items

     

    https://metin2.download/picture/XnGNYPCTq3Wtm2TmqhtLh1UpRM1quI4m/.png

     

    quest item_give begin
    	state start begin
    		when levelup begin
    			local table_vegas =
    				{   --Level -- Warrior -- Ninja -- Sura -- Shaman 
    				   [9] = {11219, 11419, 11619, 11819},
    					[18] = {11229, 11429, 11629, 11829},
    					[26] = {11239, 11439, 11639, 11839},
    					[34] = {11249, 11449, 11649, 11849},
    					[42] = {11259, 11459, 11659, 11859},
    					[48] = {11269, 11469, 11669, 11869},
    					[54] = {11279, 11479, 11679, 11879},
    					[61] = {11289, 11489, 11689, 11889},
    				}
    			pc.give_item2(table_vegas[pc.get_level()][pc.get_job()+1])
    		end
    	end
    end

     

    • Metin2 Dev 1
  12. Thank you for this topic, but let me to improve it a little bit more complex.

     

    It works perfectly. :D

    Source/Client/GameLib/ItemData.cpp

    // Search this

    		case USE_PUT_INTO_RING_SOCKET:
    			return DEF_STR(USE_PUT_INTO_RING_SOCKET);

    // And add above this

    		case USE_COSTUME_CHANGE_ATTRIBUTE:
    			return DEF_STR(USE_COSTUME_CHANGE_ATTRIBUTE);
    		case USE_COSTUME_ADD_ATTRIBUTE:
    			return DEF_STR(USE_COSTUME_ADD_ATTRIBUTE);

    Tools/Dump_Proto (txt)

     

    itemdata.h  add 

    USE_COSTUME_CHANGE_ATTRIBUTE 

    USE_COSTUME_ADD_ATTRIBUTE

    // Search this

    "USE_PUT_INTO_RING_SOCKET"

    // And put this

    ,"USE_COSTUME_CHANGE_ATTRIBUTE", "USE_COSTUME_ADD_ATTRIBUTE"

    Now Source/Server/common - item_length:

    // Search this

    	USE_PUT_INTO_RING_SOCKET,

    // And add above this

    	USE_COSTUME_CHANGE_ATTRIBUTE,
    	USE_COSTUME_ADD_ATTRIBUTE,

    Source/Server/game - char_item.cpp:

    // Search this
    					case USE_TUNING:
    					case USE_DETACHMENT:
    						{
    							LPITEM item2;
    
    							if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
    								return false;
    
    							if (item2->IsExchanging())
    								return false;
    	
    							if (item2->IsEquipped())
                                    return false;
    
    							if (item2->GetVnum() >= 28330 && item2->GetVnum() <= 28343) // ??+3
    							{
    								ChatPacket(CHAT_TYPE_INFO, LC_TEXT("+3 ??? ? ????? ??? ? ????"));
    								return false;
    							}
    
    							if (item->GetValue(0) == ACCE_CLEAN_ATTR)
    							{
    								CleanAcceAttr(item, item2);
    							}
    
    							if (item2->GetVnum() >= 28430 && item2->GetVnum() <= 28443)  // ??+4
    							{
    								if (item->GetVnum() == 71056) // ?????
    								{
    									RefineItem(item, item2);
    								}
    								else
    								{
    									ChatPacket(CHAT_TYPE_INFO, LC_TEXT("??? ? ????? ??? ? ????"));
    								}
    							}
    							else
    							{
    								RefineItem(item, item2);
    							}
    						}
    						break;

    // And paste above this

    					// COSTUMEATTR
    					case USE_COSTUME_CHANGE_ATTRIBUTE:
    					case USE_COSTUME_ADD_ATTRIBUTE:
    						{
    							LPITEM item2;
    							if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
    								return false;
    
    							if (item2->IsExchanging())
    								return false;
    
    							if (item2->IsEquipped())
    								return false;
    
    							if (ITEM_WEAPON == item2->GetType() || ITEM_ARMOR  == item2->GetType() ||
    									 COSTUME_HAIR == item2->GetSubType() || COSTUME_ACCE == item2->GetSubType())
    							{
    								ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can use these bonuses only costumes."));
    								return false;
    							}
    
    							switch (item->GetSubType())
    							{
    								case USE_COSTUME_ADD_ATTRIBUTE:
    									if (item2->GetAttributeSetIndex() == -1)
    									{
    										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("??? ??? ? ?? ??????."));
    										return false;
    									}
    
    									if (item2->GetAttributeCount() < 1)
    									{
    										char buf[21];
    										snprintf(buf, sizeof(buf), "%u", item2->GetID());
    
    										item2->AddAttribute();
    										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You have successfully added bonus."));
    										item->SetCount(item->GetCount() - 1);
    									}
    									else
    									{
    										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can add just a bonus outfit."));
    										break;
    									}
    									break;
    
    								case USE_COSTUME_CHANGE_ATTRIBUTE:
    									if (item2->GetAttributeSetIndex() == -1)
    									{
    										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("??? ??? ? ?? ??????."));
    									return false;
    									}
    
    									if (item2->GetAttributeCount() == 0)
    									{
    										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This suit does not own any bonus."));
    										return false;
    									}
    
    									item2->ClearAttribute();
    									item2->AlterToMagicItem();
    									item->SetCount(item->GetCount() - 1);
    									ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You just changed the bonus."));
    									break;
    							}
    						}
    						break;

    Source/Server/game - item.cpp:

    // Search this

    			case ITEM_COSTUME:
    			case ITEM_ARMOR:
    				if (GetSubType() == ARMOR_BODY)
    				{
    					iSecondPct = 10;
    					iThirdPct = 2;
    				}
    				else
    				{
    					iSecondPct = 10;
    					iThirdPct = 1;
    				}
    				break;

    // And paste with this

    			case ITEM_COSTUME:
    				iSecondPct = 50;
    				iThirdPct = 40;
    				break;
    
    			case ITEM_ARMOR:
    				if (GetSubType() == ARMOR_BODY)
    				{
    					iSecondPct = 10;
    					iThirdPct = 2;
    				}
    				else
    				{
    					iSecondPct = 10;
    					iThirdPct = 1;
    				}
    				break;

    // Now search

    			case ITEM_COSTUME:
    			case ITEM_ARMOR:
    				if (GetSubType() == ARMOR_BODY)
    				{
    					iSecondPct = 20;
    					iThirdPct = 10;
    				}
    				else
    				{
    					iSecondPct = 10;
    					iThirdPct = 5;
    				}
    				break;

    // And paste with this

    			case ITEM_COSTUME:
    				iSecondPct = 50;
    				iThirdPct = 40;
    				break;
    
    			case ITEM_ARMOR:
    				if (GetSubType() == ARMOR_BODY)
    				{
    					iSecondPct = 20;
    					iThirdPct = 10;
    				}
    				else
    				{
    					iSecondPct = 10;
    					iThirdPct = 5;
    				}
    				break;

     

     

    Now client (uiinventory.py/root):

    # Search this

    USE_TYPE_TUPLE = ("USE_CLEAN_SOCKET", "USE_CHANGE_ATTRIBUTE", "USE_ADD_ATTRIBUTE", "USE_ADD_ATTRIBUTE2", "USE_ADD_ACCESSORY_SOCKET", "USE_PUT_INTO_ACCESSORY_SOCKET", "USE_PUT_INTO_BELT_SOCKET", "USE_PUT_INTO_RING_SOCKET")
    

    # And paste with this

    USE_TYPE_TUPLE = ("USE_CLEAN_SOCKET", "USE_CHANGE_ATTRIBUTE", "USE_ADD_ATTRIBUTE", "USE_ADD_ATTRIBUTE2", "USE_ADD_ACCESSORY_SOCKET", "USE_PUT_INTO_ACCESSORY_SOCKET", "USE_PUT_INTO_BELT_SOCKET", "USE_PUT_INTO_RING_SOCKET", "USE_COSTUME_CHANGE_ATTRIBUTE", "USE_COSTUME_ADD_ATTRIBUTE")

    locale/xx/itemdesc.txt:

     

    79998	Bonus spell Your description
    79999	Changing spell  Your description

    locale/xx/item_list.txt

    79998	ETC	icon/item/79998.tga
    79999	ETC	icon/item/79999.tga

    Item_proto.txt:

    79998	????	ITEM_USE	USE_COSTUME_CHANGE_ATTRIBUTE	1	ANTI_DROP | ANTI_SELL | ANTI_GIVE | ANTI_MYSHOP	ITEM_STACKABLE | LOG	NONE	NONE	0	0	0	0	0	LIMIT_NONE	0	LIMIT_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0
    79999	????	ITEM_USE	USE_COSTUME_ADD_ATTRIBUTE	1	ANTI_DROP | ANTI_SELL | ANTI_GIVE | ANTI_MYSHOP	ITEM_STACKABLE | LOG	NONE	NONE	0	0	0	0	0	LIMIT_NONE	0	LIMIT_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0
    

    item_names.txt:

    79998	Bonus spell
    79999	Changing spell

     

    Link download: 

    This is the hidden content, please

     

    Password archive: vegas_metin2dev.org

    • Metin2 Dev 23
    • Eyes 1
    • Not Good 1
    • Confused 1
    • Good 5
    • Love 2
    • Love 21
  13. Tell us exactly what it is that we can realize. But I do like the screen shoot an example:

     

    Open game.py and copy this:

     

    SCREENSHOT_CWDSAVE = FALSE
    SCREENSHOT_DIR = None
    
    if localeInfo.IsEUROPE():
    	SCREENSHOT_CWDSAVE = TRUE
    
    if localeInfo.IsCIBN10():
    	SCREENSHOT_CWDSAVE = FALSE
    	SCREENSHOT_DIR = "YT2W"

    and adds that overall this game.py you copied the file where is your system after import.

    Gender in test.py

    And then add to your button function:

     

    	def YourFunctionButton(self):
    		print "save screen"
    
    		# SCREENSHOT_CWDSAVE
    		if SCREENSHOT_CWDSAVE:
    			if not os.path.exists(os.getcwd()+os.sep+"screenshot"):
    				os.mkdir(os.getcwd()+os.sep+"screenshot")
    
    			(succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"screenshot"+os.sep)
    		elif SCREENSHOT_DIR:
    			(succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
    		else:
    			(succeeded, name) = grp.SaveScreenShot()
    		# END_OF_SCREENSHOT_CWDSAVE
    
    		if succeeded:
    			pass
    			"""
    			chat.AppendChat(chat.CHAT_TYPE_INFO, name + localeInfo.SCREENSHOT_SAVE1)
    			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE2)
    			"""
    		else:
    			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)

    Then add in the beginning:

    import os
    import grp
    import chat

    And now ready to do a picture in the window of another system.

     

    If you could tell me what you want to bring game.py functions in other systems / windows put I would help.

  14. Open game.py and search function:

     

    	def OnKeyUp(self, key):

    and replace all function with:

     

    	def OnKeyUp(self, key):#TRY NOW FIXX
    		try:
    			self.onClickKeyDict[key]()
    		except KeyError:
    			pass
    		except:
    			raise
    
    		return TRUE

    If you already have this function as onClickKeyDict check all your functions are other undefined genre:

     

    		onPressKeyDict[app.DIK_F6]	= lambda : self.asdasdasdas()

    and you have this function is not defined nor where or better

    asdasdasdas

     

    • Love 1
  15. Your problem lies in the xy coordinates teleport you now.
    What can help us to realize better it is to tell us if you just teleport you order or you tried to change the coordinates of teleportation?
    Default to you in this folder are the coordinates xy 256000 665600 is trying to change that in your quest teleportation system with tens + -.

    Gender quest: 2704.7399 to beam your structure now depends as to the quest to teleport the kingdoms etc.

    Your system is not to blame as I said coordinates which are becoming teleport for that right now we tested five seconds and just hold the same problem. But I solved changing coordinates x y.

    It operates 100%


    I apologize for my English marsh.

    • Love 1
  16. Edit functions in game.py:

    BINARY_NEW_AddAffect/BINARY_NEW_RemoveAffect with:

     

    	# Solved
    	def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
    		self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
    
    	def BINARY_NEW_RemoveAffect(self, type, pointIdx):
    		self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
    	# Solved

     

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.