Jump to content

Sonitex

Premium
  • Posts

    522
  • Joined

  • Days Won

    12
  • Feedback

    100%

Posts posted by Sonitex

  1. Did anyone else experience a problem with expansions dissapearing after like 10 minutes of players inactivity? It gets saved in database succesfully, but then if a player logs off, expansions will dissapear and you will have to unlock them once again. Records in database do not get deleted, but they do reset once the player unlocks 1st expansion for the 2nd time.

    Edit: Issue was laying in ClientManagerPlayer.cpp ;) 

  2. Heya everyone,

    when you try to edit your private shop and add items that have ANTI_SELL flag, their price will not be shown. This feature was meant for NPC shops only, but they forgot to add a check.

     

     

    205751FsLKbab.png.cc1628d2a7dc5fbc545080

     

    In uitooltip.py search for "def AppendSellingPrice" and edit it like the following:

    	def AppendSellingPrice(self, price, isPrivateShopBuilder = False):
    		if item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL) and not isPrivateShopBuilder:
    			self.AppendTextLine(localeInfo.TOOLTIP_ANTI_SELL, self.DISABLE_COLOR)
    			self.AppendSpace(5)
    		else:
    			self.AppendTextLine(localeInfo.TOOLTIP_SELLPRICE % (localeInfo.NumberToMoneyString(price)), self.GetPriceColor(price))
    			self.AppendSpace(5)

    Then in "def SetPrivateShopBuilderItem" search for "self.AppendSellingPrice(shop.GetPrivateShopItemPrice(invenType, invenPos))" and replace it with:

    self.AppendSellingPrice(shop.GetPrivateShopItemPrice(invenType, invenPos), True)

     

    Not a game-breaking bug, but I still wanted to share it with you. It was already fixed by YMIR in their lastest patches(not sure when) so I chose their way of fixing it.

     

    • Love 12
  3. game.py

    	def AnswerPartyInvite(self, answer):
    
    		if not self.partyInviteQuestionDialog:
    			return
    
    		partyLeaderVID = self.partyInviteQuestionDialog.partyLeaderVID
    
    		#distance = player.GetCharacterDistance(partyLeaderVID)
    		#if distance < 0.0 or distance > 5000:
    			#answer = FALSE
    
    		net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)
    
    		self.partyInviteQuestionDialog.Close()
    		self.partyInviteQuestionDialog = None

     

  4. 	def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString="", custumAffectString2="", leftTime=0):
    
    		slotType = self.GetMetinSocketType(metinSlotData)
    		itemIndex = self.GetMetinItemIndex(metinSlotData)
    
    		if 0 == slotType:
    			return
    
    		self.AppendSpace(5)
    
    		slotImage = ui.ImageBox()
    		slotImage.SetParent(self)
    		slotImage.Show()
    
    		## Name
    		nameTextLine = ui.TextLine()
    		nameTextLine.SetParent(self)
    		nameTextLine.SetFontName(self.defFontName)
    		nameTextLine.SetPackedFontColor(self.NORMAL_COLOR)
    		nameTextLine.SetOutline()
    		nameTextLine.SetFeather()
    		nameTextLine.Show()			
    
    		self.childrenList.append(nameTextLine)
    
    		if player.METIN_SOCKET_TYPE_SILVER == slotType:
    			slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_silver.sub")
    		elif player.METIN_SOCKET_TYPE_GOLD == slotType:
    			slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_gold.sub")
    
    		self.childrenList.append(slotImage)
    		
    		if localeInfo.IsARABIC():
    			slotImage.SetPosition(self.toolTipWidth - slotImage.GetWidth() - 9, self.toolTipHeight-1)
    			nameTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 2)
    		else:
    			slotImage.SetPosition(9, self.toolTipHeight-1)
    			nameTextLine.SetPosition(50, self.toolTipHeight + 2)
    
    		metinImage = ui.ImageBox()
    		metinImage.SetParent(self)
    		metinImage.Show()
    		self.childrenList.append(metinImage)
    
    		if itemIndex:
    
    			item.SelectItem(itemIndex)
    
    			## Image
    			try:
    				metinImage.LoadImage(item.GetIconImageFileName())
    			except:
    				dbg.TraceError("ItemToolTip.__AppendMetinSocketData() - Failed to find image file %d:%s" % 
    					(itemIndex, item.GetIconImageFileName())
    				)
    
    			nameTextLine.SetText(item.GetItemName())
    			
    			## Affect		
    			affectTextLine = ui.TextLine()
    			affectTextLine.SetParent(self)
    			affectTextLine.SetFontName(self.defFontName)
    			affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
    			affectTextLine.SetOutline()
    			affectTextLine.SetFeather()
    			affectTextLine.Show()
    
    			affectTextLine1 = ui.TextLine()
    			affectTextLine1.SetParent(self)
    			affectTextLine1.SetFontName(self.defFontName)
    			affectTextLine1.SetPackedFontColor(self.POSITIVE_COLOR)
    			affectTextLine1.SetOutline()
    			affectTextLine1.SetFeather()
    			affectTextLine1.Show()			
    				
    			if localeInfo.IsARABIC():
    				metinImage.SetPosition(self.toolTipWidth - metinImage.GetWidth() - 10, self.toolTipHeight)
    				affectTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 16 + 2)
    			else:
    				metinImage.SetPosition(10, self.toolTipHeight)
    				affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2)
    				
    			if localeInfo.IsARABIC():
    				metinImage.SetPosition(self.toolTipWidth - metinImage.GetWidth() - 10, self.toolTipHeight)
    				affectTextLine1.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 31 + 2)
    			else:
    				metinImage.SetPosition(10, self.toolTipHeight)
    				affectTextLine1.SetPosition(50, self.toolTipHeight + 31 + 2)
    							
    			if custumAffectString:
    				affectTextLine.SetText(custumAffectString)
    			elif itemIndex!=constInfo.ERROR_METIN_STONE:
    				affectType, affectValue = item.GetAffect(0)
    				affectString = self.__GetAffectString(affectType, affectValue)
    				if affectString:
    					affectTextLine.SetText(affectString)
    			else:
    				affectTextLine.SetText(localeInfo.TOOLTIP_APPLY_NOAFFECT)
    				
    			if itemIndex!=constInfo.ERROR_METIN_STONE:
    				affectType1, affectValue1 = item.GetAffect(1)
    				affectString1 = self.__GetAffectString(affectType1, affectValue1)
    				if affectString1:
    					affectTextLine1.SetText(affectString1)
    			
    			self.childrenList.append(affectTextLine)
    			self.childrenList.append(affectTextLine1)			
    
    			if custumAffectString2:
    				affectTextLine = ui.TextLine()
    				affectTextLine.SetParent(self)
    				affectTextLine.SetFontName(self.defFontName)
    				affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
    				affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2)
    				affectTextLine.SetOutline()
    				affectTextLine.SetFeather()
    				affectTextLine.Show()
    				affectTextLine.SetText(custumAffectString2)
    				self.childrenList.append(affectTextLine)
    				self.toolTipHeight += 16 + 2
    
    			if 0 != leftTime:
    				timeText = (localeInfo.LEFT_TIME + " : " + localeInfo.SecondToDHM(leftTime))
    
    				timeTextLine = ui.TextLine()
    				timeTextLine.SetParent(self)
    				timeTextLine.SetFontName(self.defFontName)
    				timeTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
    				timeTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2)
    				timeTextLine.SetOutline()
    				timeTextLine.SetFeather()
    				timeTextLine.Show()
    				timeTextLine.SetText(timeText)
    				self.childrenList.append(timeTextLine)
    				self.toolTipHeight += 16 + 2
    
    		else:
    			nameTextLine.SetText(localeInfo.TOOLTIP_SOCKET_EMPTY)
    
    		self.toolTipHeight += 40
    		self.ResizeToolTip()

    You'll need this too ;) It is for the refine & attach stone windows.

    • Love 2
  5. This could help you:

    "녀석들은 이곳 성지에 있을 자격을 잃었다. 모두 성지에서 물러나거라~~[ENTER][ENTER] 10초 후에 모두 마을로 이동하게 됩니다.";
    "You do not have any rights to be here.[ENTER]This is a Holy Place: Away with you! [ENTER][ENTER] You will be back in your village in 10 seconds.";

     

  6. I don't think you will reach succes with this kind of method. Client doesn't remember the settings after next use, unless it reads them from somewhere and then sets them.

    You have to connect the settings with another client file, for example metin2.cfg and make the system read them from there, then you will always have them saved. Try to use source, there is a tutorial for fog setting ~ on/off type and adapt it to your needs.

    Good luck! ;)

    • Love 1
  7.  

    1st Question: You can either set it in source at char create function or by quest on first login

    2nd Question:

    Constants.cpp

    TJobInitialPoints JobInitialPoints[JOB_MAX_NUM] = 
    /*
       {
       int st, ht, dx, iq;
       int max_hp, max_sp;
       int hp_per_ht, sp_per_iq;
       int hp_per_lv_begin, hp_per_lv_end;
       int sp_per_lv_begin, sp_per_lv_end;
       int max_stamina;
       int stamina_per_con;
       int stamina_per_lv_begin, stamina_per_lv_end;
       }
     */
    {
    	{6, 4, 3, 3, 600, 200, 40, 20, 36, 44, 18, 22, 800, 5, 1, 3}, // WARRIOR
    	{4, 3, 6, 3, 650, 200, 40, 20, 36, 44, 18, 22, 800, 5, 1, 3}, // ASSASSIN
    	{5, 3, 3, 5, 650, 200, 40, 20, 36, 44, 18, 22, 800, 5, 1, 3}, // SURA
    	{3, 4, 3, 6, 700, 200, 40, 20, 36, 44, 18, 22, 800, 5, 1, 3}, // SHAMAN
    	{6, 6, 2, 2, 600, 200, 40, 20, 36, 44, 18, 22, 800, 5, 1, 3}, // WOLF
    };

     

×
×
  • 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.