Jump to content

Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

open game/char.h

Add:

 

void			CostumeBonusTransfer(DWORD cell1, DWORD cell2);


open game/char.cpp

Add:

 

void CHARACTER::CostumeBonusTransfer(DWORD cell1, DWORD cell2)
{
	int CostumeTransferBonusItemVnum = 76025; // costume bonus transfer item vnum
	if ((GetExchange() || IsOpenSafebox() || GetShopOwner()) || IsCubeOpen() || IsDead())
	{
		ChatPacket(CHAT_TYPE_INFO, "Alisveris durumunda kostum bonusu aktarilamaz !");
		return;
	}

	LPITEM costume1 = GetInventoryItem(cell1);
	LPITEM costume2 = GetInventoryItem(cell2);
	if (!costume1){
		ChatPacket(CHAT_TYPE_INFO, "Kostum bulunamadi hata !");
		return;
	}
	
	if (costume1->GetType() != ITEM_COSTUME || costume1->GetType() == ITEM_COSTUME && costume1->GetSubType() != ARMOR_BODY)
	{
		ChatPacket(CHAT_TYPE_INFO, "Bu islem sadece zirh kostumune yapilabilir!");
		return;
	}
	
	if (!costume2){
		ChatPacket(CHAT_TYPE_INFO, "Kostum bulunamadi hata!");
		return;
	}
	
	if (costume2->GetType() != ITEM_COSTUME || costume2->GetType() == ITEM_COSTUME && costume2->GetSubType() != ARMOR_BODY)
	{
		ChatPacket(CHAT_TYPE_INFO, "Sadece kostumun bonusu aktarilabilir !");
		return;
	}
	
	if (CountSpecifyItem(CostumeTransferBonusItemVnum) < 1){
		ChatPacket(CHAT_TYPE_INFO, "Bonus transfer esyasi bulunamadi");
		return;
	}
	
	if (costume2->GetAttributeCount() < 1){
		ChatPacket(CHAT_TYPE_INFO, "Bonusu olmayan bir kostumun efsunu aktarilamaz!");
		return;
	}
	
	
	RemoveSpecifyItem(CostumeTransferBonusItemVnum, 1);
	costume1->ClearAttribute();
	for (int i = 0; i < costume2->GetAttributeCount(); i++){
		costume1->SetForceAttribute(i, costume2->GetAttributeType(i), costume2->GetAttributeValue(i));
	}
	
	costume2->RemoveFromCharacter();
	
	ChatPacket(CHAT_TYPE_INFO, "Kostum bonus aktarimi basarili");
}

open cmd.cpp:

Search:

 

ACMD(do_block_chat);


Add:

 

ACMD(do_costume_bonus_transfer);

open cmd_gm.cpp

Search:

 

ACMD(do_block_chat)
{
	// GM이 아니거나 block_chat_privilege가 없는 사람은 명령어 사용 불가
	if (ch && (ch->GetGMLevel() < GM_HIGH_WIZARD && ch->GetQuestFlag("chat_privilege.block") <= 0))
	{
		ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("그런 명령어는 없습니다"));
		return;
	}

	char arg1[256];
	argument = one_argument(argument, arg1, sizeof(arg1));

	if (!*arg1)
	{
		if (ch)
			ch->ChatPacket(CHAT_TYPE_INFO, "Usage: block_chat <name> <time> (0 to off)");

		return;
	}

	const char* name = arg1;
	long lBlockDuration = parse_time_str(argument);

	if (lBlockDuration < 0)
	{
		if (ch)
		{
			ch->ChatPacket(CHAT_TYPE_INFO, "잘못된 형식의 시간입니다. h, m, s를 붙여서 지정해 주십시오.");
			ch->ChatPacket(CHAT_TYPE_INFO, "예) 10s, 10m, 1m 30s");
		}
		return;
	}

	sys_log(0, "BLOCK CHAT %s %d", name, lBlockDuration);

	LPCHARACTER tch = CHARACTER_MANAGER::instance().FindPC(name);

	if (!tch)
	{
		CCI * pkCCI = P2P_MANAGER::instance().Find(name);

		if (pkCCI)
		{
			TPacketGGBlockChat p;

			p.bHeader = HEADER_GG_BLOCK_CHAT;
			strlcpy(p.szName, name, sizeof(p.szName));
			p.lBlockDuration = lBlockDuration;
			P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGBlockChat));
		}
		else
		{
			TPacketBlockChat p;

			strlcpy(p.szName, name, sizeof(p.szName));
			p.lDuration = lBlockDuration;
			db_clientdesc->DBPacket(HEADER_GD_BLOCK_CHAT, ch ? ch->GetDesc()->GetHandle() : 0, &p, sizeof(p));
		}

		if (ch)
			ch->ChatPacket(CHAT_TYPE_INFO, "Chat block requested.");

		return;
	}

	if (tch && ch != tch)
		tch->AddAffect(AFFECT_BLOCK_CHAT, POINT_NONE, 0, AFF_NONE, lBlockDuration, 0, true);
}



Add:

 

ACMD(do_costume_bonus_transfer)
{
	char arg1[256], arg2[256];
	DWORD cell1, cell2;
	two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2));

	if (!*arg1 || !*arg2)
		return;
	str_to_number(cell1, arg1);
	str_to_number(cell2, arg2);

	if (cell1 < 0 || cell1 > INVENTORY_MAX_NUM || cell2 < 0 || cell2 > INVENTORY_MAX_NUM || cell1 == cell2)
		return;

	ch->CostumeBonusTransfer(cell1, cell2);
}






open root

create uibonustransfer.py

add:

 

import ui
import player
import event
import uiToolTip
import exception
import item
import uiCommon
import mouseModule
import chat
import net

class BonusTransfer(ui.ScriptWindow):

	def __init__(self):
		ui.ScriptWindow.__init__(self)
		self.buttons, self.grids, self.costumes = {}, {}, {300 : {},303 : {},}
		self.__Load()

		self.tooltipItem = uiToolTip.ItemToolTip()
		self.tooltipItem.Hide()
		
	def __del__(self):
		ui.ScriptWindow.__del__(self)
		self.Close()

	def __Load_LoadScript(self, fileName):
		try:
			pyScriptLoader = ui.PythonScriptLoader()
			pyScriptLoader.LoadScriptFile(self, fileName)
		except:
			import exception
			exception.Abort("BonusTransfer.__Load_LoadScript")

	def __Load_BindObject(self):
		try:
			self.titleBar = self.GetChild("TitleBar")
			self.grids[300] = self.GetChild("Costume1")
			self.grids[303] = self.GetChild("Costume2")
			self.grids[2] = self.GetChild("Costume3")
			self.grids[3] = self.GetChild("Item")
			self.buttons[0] = self.GetChild("Button1")
			self.buttons[1] = self.GetChild("Button2")
		except:
			import exception
			exception.Abort("BonusTransfer.__Load_BindObject")
			
		self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))
		self.grids[300].SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
		self.grids[300].SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))	
		self.grids[300].SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
		self.grids[300].SetUnselectItemSlotEvent(ui.__mem_func__(self.UnselectItemSlot))
		self.grids[303].SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
		self.grids[303].SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))	
		self.grids[303].SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
		self.grids[303].SetUnselectItemSlotEvent(ui.__mem_func__(self.UnselectItemSlot))
		self.grids[2].SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
		self.grids[2].SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
		self.grids[3].SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
		self.grids[3].SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))	
		self.grids[3].SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
		self.grids[3].SetUnselectItemSlotEvent(ui.__mem_func__(self.UnselectItemSlot))				
		self.buttons[0].SetEvent(self.TransferDialog)
		self.buttons[1].SetEvent(self.Close)

	def __Load(self):
		self.__Load_LoadScript("uiscript/bonustransfer.py")
		self.__Load_BindObject()
			
	def OnPressEscapeKey(self):
		self.Close()
		return TRUE
		
	def Shows(self):
		ui.ScriptWindow.Show(self)

	def Close(self):
		self.Hide()
		return TRUE		
	
	def TransferDialog(self):
		self.ConfirmEkran = uiCommon.QuestionDialog()
		self.ConfirmEkran.SetText("Kostüm bonusu aktarılsın mı ?")
		self.ConfirmEkran.SetAcceptEvent(self.Transfer)
		self.ConfirmEkran.SetCancelEvent(self.NoTransfer)
		self.ConfirmEkran.Open()

	def Transfer(self):
		self.ConfirmEkran.Close()
		if self.costumes[300][0] is None or self.costumes[303][0] is None:
			return
		self.grids[3].ClearSlot(3)
		self.grids[3].RefreshSlot()
		self.grids[303].ClearSlot(303)
		self.grids[303].RefreshSlot()
		net.SendChatPacket("/costume_bonus_transfer "+str(self.costumes[300][0])+" "+str(self.costumes[303][0]))
		self.Close()
		
	def NoTransfer(self):
		self.ConfirmEkran.Close()

	def OverInItem(self, index):
		target = 303
		if index == 400:
			itemVnum = player.GetItemIndex(self.costumes[300][0])
			if self.costumes[303][0] is None:
				target = 300
			stones = [player.GetItemMetinSocket(self.costumes[target][0], i) for i in xrange(player.METIN_SOCKET_MAX_NUM)]	
			attr = [player.GetItemAttribute(self.costumes[target][0], i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)]
			self.tooltipItem.SetControledToolTip(itemVnum, stones, attr)
		else:
			if self.costumes[index] is None:
				return
			self.tooltipItem.SetInventoryItem(self.costumes[index][0])
		
	def OverOutItem(self):
		if self.tooltipItem:
			self.tooltipItem.HideToolTip()
			
	def SelectEmptySlot(self, selectedSlotPos):
		if mouseModule.mouseController.isAttached():
			attachedSlotType = mouseModule.mouseController.GetAttachedType()
			attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
			itemVnum = player.GetItemIndex(attachedSlotPos)
			itemCount = player.GetItemCount(attachedSlotPos)
			item.SelectItem(itemVnum)
			itemType = item.GetItemType()	
			itemSubType = item.GetItemSubType()			
			if selectedSlotPos == 301:
				selectedSlotPos = 300
			if selectedSlotPos == 304:
				selectedSlotPos = 303
			if selectedSlotPos == 403:
				if itemVnum == 76025: # costume bonus transfer item kod
					self.grids[3].SetItemSlot(403, itemVnum, itemCount)	
				else:
					return
					mouseModule.mouseController.DeattachObject()				
			if player.SLOT_TYPE_INVENTORY == attachedSlotType:
				if itemType != item.ITEM_TYPE_COSTUME:
					mouseModule.mouseController.DeattachObject()
					return
				elif itemType == item.ITEM_TYPE_COSTUME and itemSubType == 0:
					pass				
				if attachedSlotPos in self.costumes:
					mouseModule.mouseController.DeattachObject()				
					return
				self.grids[selectedSlotPos].SetItemSlot(selectedSlotPos, itemVnum)
				self.grids[selectedSlotPos].RefreshSlot()
				self.costumes[selectedSlotPos][0] = attachedSlotPos
				if selectedSlotPos == 300:
					self.grids[2].SetItemSlot(400, itemVnum)
						
			mouseModule.mouseController.DeattachObject()	
			self.OverOutItem()

	def UnselectItemSlot(self, selectedSlotPos):
		isAttached = mouseModule.mouseController.isAttached()
		if not isAttached:
			self.costumes[selectedSlotPos][0] = 0
			self.grids[selectedSlotPos].ClearSlot(selectedSlotPos)
			self.grids[selectedSlotPos].RefreshSlot()
		if selectedSlotPos == 300:
			self.grids[2].ClearSlot(400)
			self.grids[2].RefreshSlot()		

open game.py

Search:

 

"MyShopPriceList"		: self.__PrivateShop_PriceList,


Add:

 

"kostumekran"			: self.OpenBonusTransferWindow,

game.py endline add:

 

	def OpenBonusTransferWindow(self):
		import uibonustransfer
		self.BonusTransfers = uibonustransfer.BonusTransfer()
		self.BonusTransfers.Show()

open uiscript

create bonustransfer.py

Add:

 

window = {
	"name" : "Bonusessssssss",
	"style" : ("movable", "float",),	
	"x":(SCREEN_WIDTH - 188+8+8) / 2,
	"y":(SCREEN_HEIGHT - 335) / 2,	
	"width" : 188+8+8,
	"height" : 335+42,
	
	"children" :
	(
		{
			"name" : "Board",
			"type" : "board",
			"style" : ("attach",),

			"x" : 0,
			"y" : 0,

			"width" : 188+8+8,
			"height" : 335+42,

			"children" :
			(	
				{
					"name" : "TitleBar",
					"type" : "titlebar",
					"style" : ("attach",),
					"x" : 8,
					"y" : 8,
					"width" : 188+8+8-16,
					"color" : "gray",
					"children" :
					(
						{ 
							"name":"TitleName",
							"type":"text",
							"x":0,
							"y":4, 
							"text" : "Bonus Transfer", 
							"horizontal_align":"center",
							"text_horizontal_align":"center" 
						},
					),
				},
				{
					"name" : "Background",
					"type" : "image",
					"x" : 8,
					"y" : 28,
					"image" : "comb1.tga",
					"children" :
					(
						{
							"name" : "Costume1",
							"type" : "grid_table",
							"x" : 28,
							"y" : 67,
							"x_count" : 1,
							"y_count" : 3,
							"x_step" : 32,
							"y_step" : 32,
							"start_index" : 300,
						},
						{
							"name" : "Costume2",
							"type" : "grid_table",
							"x" : 128,
							"y" : 67,
							"x_count" : 1,
							"y_count" : 3,
							"x_step" : 32,
							"y_step" : 32,
							"start_index" : 303,			
						},
						{
							"name" : "Costume3",
							"type" : "grid_table",
							"x" : 80,
							"y" : 185,
							"x_count" : 1,
							"y_count" : 3,
							"x_step" : 32,
							"y_step" : 32,
							"start_index" : 400,			
						},	
						{
							"name" : "Item",
							"type" : "grid_table",
							"x" : 80,
							"y" : 14,
							"x_count" : 1,
							"y_count" : 1,
							"x_step" : 32,
							"y_step" : 32,
							"start_index" : 403,			
						},						
					),
				},
						
				{
					"name" : "Button1",
					"type" : "button",
					"x" : 34,
					"y" : 342,			
					"text" : "Aktar",
					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},
				{
					"name" : "Button2",
					"type" : "button",
					"x" : 34+70,
					"y" : 342,			
					"text" : "İptal",
					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},
			),
		},
	),
}

Lua:

 

quest costumbonus begin
	state start begin
		when 20087.chat."Bonus Transfer" begin
		cmdchat("kostumekran")
		setskin(NOWINDOW)
		end
	end
end



uiscript add:

comb1.tga

This is the hidden content, please

  • Metin2 Dev 42
  • Lmao 1
  • Good 7
  • Love 4
  • Love 24
Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/
Share on other sites

  • Active Member

http://www.mpcforum.pl/topic/1443548-transfer-bonusów-kostiumów/

It isn't your code in cpp, I published it 2 months ago on polish forum. :rolleyes: I'm so disappointed, I thought that only in Poland people steal everything what they can. You made little changes in code, but it's still looks too similar to my code. 

Jr3nbq6.png

qp3Zpqu.png

:rolleyes:

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 5
Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-53853
Share on other sites

comb1.tga

This is the hidden content, please

Thanks men

http://www.mpcforum.pl/topic/1443548-transfer-bonusów-kostiumów/

It isn't your code in cpp, I published it 2 months ago on polish forum. :rolleyes: I'm so disappointed, I thought that only in Poland people steal everything what they can. You made little changes in code, but it's still looks too similar to my code. 

Jr3nbq6.png

qp3Zpqu.png

:rolleyes:

I did not say you belong to me

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 2
Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-53918
Share on other sites

I have problem, i cant put item in slot...in char.cpp i m use   int CostumeTransferBonusItemVnum = 70065; 

but ingame :

                           Untitled.thumb.png.5b72d7a000c06ff038615

Open

uibonustransfer.py

 

Search:

 

itemVnum == 76025: # costume bonus transfer item kod
Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-54116
Share on other sites

  • Honorable Member

Here is a dict about official file which is containing some informations(function names, function arguments, imports etc.):

uiItemCombination = {
	'class': [
		{
			'class': [],
			'func': [
				{'args': ['self', 'selectedSlotPos'], 'defaults': [], 'name': 'SelectItemSlot'},
				{'args': ['self', 'slotIndex'], 'defaults': [], 'name': 'OverInItem'},
				{'args': ['self'], 'defaults': [], 'name': 'OnDialogAcceptEvent'},
				{'args': ['self', 'slotType', 'slotIndex'], 'defaults': [], 'name': 'AttachToCombinationSlot'},
				{'args': ['self'], 'defaults': [], 'name': 'Accept'},
				{'args': ['self'], 'defaults': [], 'name': 'Destroy'},
				{'args': ['self', 'slotIndex'], 'defaults': [], 'name': 'GetItemSubTypeByCombSlot'},
				{'args': ['self'], 'defaults': [], 'name': '__init__'},
				{'args': ['self'], 'defaults': [], 'name': 'OnUpdate'},
				{'args': ['self'], 'defaults': [], 'name': 'OnDialogCloseEvent'},
				{'args': ['self', 'selectedSlotPos'], 'defaults': [], 'name': 'RemoveItemSlot'},
				{'args': ['self'], 'defaults': [], 'name': 'ClearSlot'},
				{'args': ['self'], 'defaults': [], 'name': 'IsFilledAllSlots'},
				{'args': ['self'], 'defaults': [], 'name': '__ShowResultToolTip'},
				{'args': ['self', 'selectedSlotPos'], 'defaults': [], 'name': 'SelectEmptySlot'},
				{'args': ['self', 'slotIndex'], 'defaults': [], 'name': 'CantAttachToCombSlot'},
				{'args': ['self'], 'defaults': [], 'name': 'ChangeBackgroundImage'},
				{'args': ['self'], 'defaults': [], 'name': '__LoadWindow'},
				{'args': ['self', 'slotIndex'], 'defaults': [], 'name': '__ShowToolTip'},
				{'args': ['self'], 'defaults': [], 'name': '__del__'},
				{'args': ['self', 'selectedSlotPos'], 'defaults': [], 'name': 'UseItemSlot'},
				{'args': ['self'], 'defaults': [], 'name': 'OnPressEscapeKey'},
				{'args': ['self', 'inven'], 'defaults': [], 'name': 'SetInven'},
				{'args': ['self'], 'defaults': [], 'name': 'OnTop'},
				{'args': ['self', 'interface'], 'defaults': [], 'name': 'BindInterface'},
				{'args': ['self', 'selectedSlotPos', 'attachedSlotType', 'attachedSlotPos'], 'defaults': [], 'name': 'CanAttachSlot'},
				{'args': ['self', 'selectSlot', 'slotType', 'slotIndex'], 'defaults': [], 'name': 'AttachItemToSelectSlot'},
				{'args': ['self', 'tooltip'], 'defaults': [], 'name': 'SetItemToolTip'},
				{'args': ['self', 'wndInven'], 'defaults': [], 'name': 'SetInvenWindow'},
				{'args': ['self'], 'defaults': [], 'name': 'OverOutItem'},
				{'args': ['self'], 'defaults': [], 'name': 'Close'},
				{'args': ['self'], 'defaults': [], 'name': 'SetResultItem'},
				{'args': ['self'], 'defaults': [], 'name': 'Open'},
				{'args': ['self'], 'defaults': [], 'name': 'RefreshCantMouseEventSlot'}
			],
			'import': [],
			'var': [
				{'name': '__module__', 'type': 'str', 'value': 'uiItemCombination'},
				{'name': '__doc__', 'type': 'NoneType', 'value': None},
				{'name': '__qualname__', 'type': 'str', 'value': 'ItemCombinationWindow'}
			]
		}
	],
	'func': [],
	'import': ['chatm2g', 'app', 'uiPrivateShopBuilder', 'uiPickMoney', 'm2netm2g', 'playerm2g2', 'uiRefine', 'constInfo', 'grp', 'uiToolTip', 'uiAttachMetin', 'mouseModule', 'uiScriptLocale', 'localeInfo', 'uiCommon', 'snd', '__builtin__', 'ime', 'wndMgr', 'item', 'ui'],
	'var': [
		{'name': '__package__', 'type': 'NoneType', 'value': None},
		{'name': '__doc__', 'type': 'NoneType', 'value': None},
		{'name': 'USE_WINDOW_LIMIT_RANGE', 'type': 'int', 'value': 500},
		{'name': '__test__', 'type': 'dict', 'value': {}},
		{'name': '__name__', 'type': 'str', 'value': 'uiItemCombination'}
	]
}

Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-54134
Share on other sites

oke now i can put item, but when i try transfer costume nothing happened ingame...and i get syser:

1010 13:57:11076 :: CPythonPlayer::SetSkillLevel(SlotIndex=8, SkillLevel=54)
1010 13:58:19444 :: Traceback (most recent call last):

1010 13:58:19444 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:19445 ::   File "ui.py", line 87, in __call__

1010 13:58:19445 ::   File "ui.py", line 78, in __call__

1010 13:58:19446 ::   File "uibonustransfer.py", line 111, in OverInItem

1010 13:58:19446 :: KeyError
1010 13:58:19446 :: : 
1010 13:58:19446 :: 403
1010 13:58:19446 :: 

1010 13:58:21744 :: Traceback (most recent call last):

1010 13:58:21744 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:21744 ::   File "ui.py", line 87, in __call__

1010 13:58:21745 ::   File "ui.py", line 78, in __call__

1010 13:58:21745 ::   File "uibonustransfer.py", line 113, in OverInItem

1010 13:58:21746 :: KeyError
1010 13:58:21746 :: : 
1010 13:58:21746 :: 0
1010 13:58:21746 :: 

1010 13:58:23961 :: Traceback (most recent call last):

1010 13:58:23961 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:23961 ::   File "ui.py", line 87, in __call__

1010 13:58:23961 ::   File "ui.py", line 78, in __call__

1010 13:58:23962 ::   File "uibonustransfer.py", line 113, in OverInItem

1010 13:58:23962 :: KeyError
1010 13:58:23962 :: : 
1010 13:58:23962 :: 0
1010 13:58:23962 :: 

1010 13:58:24361 :: Traceback (most recent call last):

1010 13:58:24361 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:24361 ::   File "ui.py", line 87, in __call__

1010 13:58:24361 ::   File "ui.py", line 78, in __call__

1010 13:58:24362 ::   File "uibonustransfer.py", line 109, in OverInItem

1010 13:58:24362 :: AttributeError
1010 13:58:24362 :: : 
1010 13:58:24362 :: 'ItemToolTip' object has no attribute 'SetControledToolTip'
1010 13:58:24362 :: 

1010 13:58:24578 :: Traceback (most recent call last):

1010 13:58:24578 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:24578 ::   File "ui.py", line 87, in __call__

1010 13:58:24578 ::   File "ui.py", line 78, in __call__

1010 13:58:24579 ::   File "uibonustransfer.py", line 109, in OverInItem

1010 13:58:24579 :: AttributeError
1010 13:58:24579 :: : 
1010 13:58:24579 :: 'ItemToolTip' object has no attribute 'SetControledToolTip'
1010 13:58:24579 :: 

1010 13:58:26910 :: Traceback (most recent call last):

1010 13:58:26910 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:26911 ::   File "ui.py", line 87, in __call__

1010 13:58:26911 ::   File "ui.py", line 78, in __call__

1010 13:58:26912 ::   File "uibonustransfer.py", line 109, in OverInItem

1010 13:58:26912 :: AttributeError
1010 13:58:26912 :: : 
1010 13:58:26912 :: 'ItemToolTip' object has no attribute 'SetControledToolTip'
1010 13:58:26912 :: 

Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-54154
Share on other sites

Works for me.

But for one thing, this tutorial missed some thing in cmd.cpp

We need to add the new command to the list.

search:
struct command_info cmd_info[] =

add to the list:

{ "costume_bonus_transfer",        do_costume_bonus_transfer,            0,            POS_DEAD,    GM_PLAYER    }, 

 

And second, it has a little bug ingame. If we move the mouse to the bottom slot, it should display the new opt. But it doesnt:

1010 14:47:07249 ::   File "ui.py", line 1489, in OnOverInItem

1010 14:47:07263 ::   File "ui.py", line 87, in __call__

1010 14:47:07264 ::   File "ui.py", line 78, in __call__

1010 14:47:07264 ::   File "uibonustransfer.py", line 111, in OverInItem

1010 14:47:07264 :: KeyError
1010 14:47:07264 :: : 
1010 14:47:07264 :: 403
1010 14:47:07264 :: 

1010 14:47:08513 :: Traceback (most recent call last):

1010 14:47:08513 ::   File "ui.py", line 1489, in OnOverInItem

1010 14:47:08513 ::   File "ui.py", line 87, in __call__

1010 14:47:08514 ::   File "ui.py", line 78, in __call__

1010 14:47:08514 ::   File "uibonustransfer.py", line 111, in OverInItem

1010 14:47:08514 :: KeyError
1010 14:47:08514 :: : 
1010 14:47:08514 :: 403
1010 14:47:08514 :: 

1010 14:47:13601 :: Traceback (most recent call last):

1010 14:47:13601 ::   File "ui.py", line 1489, in OnOverInItem

1010 14:47:13601 ::   File "ui.py", line 87, in __call__

1010 14:47:13602 ::   File "ui.py", line 78, in __call__

1010 14:47:13602 ::   File "uibonustransfer.py", line 111, in OverInItem

 

  • Good 1
Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-54159
Share on other sites

Works for me.

But for one thing, this tutorial missed some thing in cmd.cpp

We need to add the new command to the list.

search:
struct command_info cmd_info[] =

add to the list:

{ "costume_bonus_transfer",        do_costume_bonus_transfer,            0,            POS_DEAD,    GM_PLAYER    }, 

 

And second, it has a little bug ingame. If we move the mouse to the bottom slot, it should display the new opt. But it doesnt:

1010 14:47:07249 ::   File "ui.py", line 1489, in OnOverInItem

1010 14:47:07263 ::   File "ui.py", line 87, in __call__

1010 14:47:07264 ::   File "ui.py", line 78, in __call__

1010 14:47:07264 ::   File "uibonustransfer.py", line 111, in OverInItem

1010 14:47:07264 :: KeyError
1010 14:47:07264 :: : 
1010 14:47:07264 :: 403
1010 14:47:07264 :: 

1010 14:47:08513 :: Traceback (most recent call last):

1010 14:47:08513 ::   File "ui.py", line 1489, in OnOverInItem

1010 14:47:08513 ::   File "ui.py", line 87, in __call__

1010 14:47:08514 ::   File "ui.py", line 78, in __call__

1010 14:47:08514 ::   File "uibonustransfer.py", line 111, in OverInItem

1010 14:47:08514 :: KeyError
1010 14:47:08514 :: : 
1010 14:47:08514 :: 403
1010 14:47:08514 :: 

1010 14:47:13601 :: Traceback (most recent call last):

1010 14:47:13601 ::   File "ui.py", line 1489, in OnOverInItem

1010 14:47:13601 ::   File "ui.py", line 87, in __call__

1010 14:47:13602 ::   File "ui.py", line 78, in __call__

1010 14:47:13602 ::   File "uibonustransfer.py", line 111, in OverInItem

 

why i get this syser because i m sure i add all correctly?

Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-54163
Share on other sites

Did you add that line what i've wrote to cmd.cpp?

{ "costume_bonus_transfer",        do_costume_bonus_transfer,            0,            POS_DEAD,    GM_PLAYER    }, 

Edited by TheSLZ
  • Love 1
Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-54167
Share on other sites

Did you add that line what i've wrote to cmd.cpp?

{ "costume_bonus_transfer",        do_costume_bonus_transfer,            0,            POS_DEAD,    GM_PLAYER    }, 

ahhh sry i forget it...thanks alot, now it work...but only now must fix this client syser

some files miss in uitooltip.py i think

Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-54168
Share on other sites

1010 13:58:19444 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:19445 ::   File "ui.py", line 87, in __call__

1010 13:58:19445 ::   File "ui.py", line 78, in __call__

1010 13:58:19446 ::   File "uibonustransfer.py", line 111, in OverInItem

1010 13:58:19446 :: KeyError
1010 13:58:19446 :: : 
1010 13:58:19446 :: 403
1010 13:58:19446 :: 

1010 13:58:21744 :: Traceback (most recent call last):

1010 13:58:21744 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:21744 ::   File "ui.py", line 87, in __call__

1010 13:58:21745 ::   File "ui.py", line 78, in __call__

1010 13:58:21745 ::   File "uibonustransfer.py", line 113, in OverInItem

1010 13:58:21746 :: KeyError
1010 13:58:21746 :: : 
1010 13:58:21746 :: 0
1010 13:58:21746 :: 

1010 13:58:23961 :: Traceback (most recent call last):

1010 13:58:23961 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:23961 ::   File "ui.py", line 87, in __call__

1010 13:58:23961 ::   File "ui.py", line 78, in __call__

1010 13:58:23962 ::   File "uibonustransfer.py", line 113, in OverInItem

1010 13:58:23962 :: KeyError
1010 13:58:23962 :: : 
1010 13:58:23962 :: 0
1010 13:58:23962 :: 

1010 13:58:24361 :: Traceback (most recent call last):

1010 13:58:24361 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:24361 ::   File "ui.py", line 87, in __call__

1010 13:58:24361 ::   File "ui.py", line 78, in __call__

1010 13:58:24362 ::   File "uibonustransfer.py", line 109, in OverInItem

1010 13:58:24362 :: AttributeError
1010 13:58:24362 :: : 
1010 13:58:24362 :: 'ItemToolTip' object has no attribute 'SetControledToolTip'
1010 13:58:24362 :: 

1010 13:58:24578 :: Traceback (most recent call last):

1010 13:58:24578 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:24578 ::   File "ui.py", line 87, in __call__

1010 13:58:24578 ::   File "ui.py", line 78, in __call__

1010 13:58:24579 ::   File "uibonustransfer.py", line 109, in OverInItem

1010 13:58:24579 :: AttributeError
1010 13:58:24579 :: : 
1010 13:58:24579 :: 'ItemToolTip' object has no attribute 'SetControledToolTip'
1010 13:58:24579 :: 

1010 13:58:26910 :: Traceback (most recent call last):

1010 13:58:26910 ::   File "ui.py", line 1493, in OnOverInItem

1010 13:58:26911 ::   File "ui.py", line 87, in __call__

1010 13:58:26911 ::   File "ui.py", line 78, in __call__

1010 13:58:26912 ::   File "uibonustransfer.py", line 109, in OverInItem

1010 13:58:26912 :: AttributeError
1010 13:58:26912 :: : 
1010 13:58:26912 :: 'ItemToolTip' object has no attribute 'SetControledToolTip'
1010 13:58:26912 :: 

 

error help meeeeee

  • Love 1
Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-54432
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

1125 03:47:22933 ::   File "game.py", line 2189, in BINARY_ServerCommand_Run

1125 03:47:22933 ::   File "stringCommander.py", line 63, in Run

1125 03:47:22934 ::   File "stringCommander.py", line 31, in __call__

1125 03:47:22934 ::   File "stringCommander.py", line 11, in __call__

1125 03:47:22934 ::   File "game.py", line 2626, in OpenBonusTransferWindow

1125 03:47:22935 ::   File "system.py", line 140, in __pack_import

1125 03:47:22935 ::   File "
1125 03:47:22935 :: <string>
1125 03:47:22935 :: ", line 
1125 03:47:22935 :: 164
1125 03:47:22935 :: 

1125 03:47:22935 ::     
1125 03:47:22935 :: self.grids[2].RefreshSlot()    
1125 03:47:22935 :: 

1125 03:47:22935 ::     
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 ::  
1125 03:47:22935 :: ^

1125 03:47:22935 :: SyntaxError
1125 03:47:22935 :: : 
1125 03:47:22935 :: invalid syntax
1125 03:47:22935 :: 

1125 03:47:22935 :: Unknown Server Command kostumekran | kostumekran
 

Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-56965
Share on other sites

  • 7 years later...

CONTRIBUTION: 

This system work fine, but is limited to costume_body, not working with costume hair. For fix it and accept with all type of costume:

In char.cpp, search:

if (costume1->GetType() != ITEM_COSTUME || costume1->GetType() == ITEM_COSTUME && costume1->GetSubType() != ARMOR_BODY)
    {
        ChatPacket(CHAT_TYPE_INFO, "Bu islem sadece zirh kostumune yapilabilir!");
        return;
    }

Replace to:

    if (costume1->GetType() != ITEM_COSTUME)
    {
    ChatPacket(CHAT_TYPE_INFO, "Bu islem sadece zirh kostumune yapilabilir!");
    return;
    }

Search:

 

   if (costume2->GetType() != ITEM_COSTUME || costume2->GetType() == ITEM_COSTUME && costume2->GetSubType() != ARMOR_BODY)
    {
        ChatPacket(CHAT_TYPE_INFO, "Sadece kostumun bonusu aktarilabilir !");
        return;
    }

Replace to:

    if (costume2->GetType() != ITEM_COSTUME)
    {
    ChatPacket(CHAT_TYPE_INFO, "Sadece kostumun bonusu aktarilabilir !");
    return;
    }

Is it!

Sorry my english, not is my native language.

Edited by cherabomba
Link to comment
https://metin2.dev/topic/8846-costume-bonus-transfer/#findComment-158735
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.