DragonBlack94 2 Posted April 21, 2021 Share Posted April 21, 2021 Hi guys I have a question, I would like to smuggle the chests (open with the key). If I drag sapphire key example onto the sapphire chest, they swap places without opening. type chest: 23 type key: 18 Need a quest? or do you need to add a function in the source? If you know how to solve it, please explain the process or ask me a quest to get them to open. I will thank you from my heart!!!! Link to comment Share on other sites More sharing options...
Denizeri24 35 Posted April 21, 2021 Share Posted April 21, 2021 Check Value0 in item_proto.txt; KEY : item type --> ITEM_TREASURE_KEY --> Value0 : 50 CHEST : item type --> ITEM_TREASURE_BOX --> Value0 : 50 Value0 must be same value with chest.. NOTE : just check gold key ( vnum : 50008 ) and gold chest ( vnum : 50006 ) Link to comment Share on other sites More sharing options...
DragonBlack94 2 Posted April 21, 2021 Author Share Posted April 21, 2021 So I copied the value / types of the items 50006/50008, but if I drag the golden key on the chest it tells me that "the key seems to be wrong" instead WITH THE SAME VALUE the sapphire chest / key does not give me any function (yes swap places in the inventory. Link to comment Share on other sites More sharing options...
Denizeri24 35 Posted April 21, 2021 Share Posted April 21, 2021 33 minutes ago, DragonBlack94 said: So I copied the value / types of the items 50006/50008, but if I drag the golden key on the chest it tells me that "the key seems to be wrong" instead WITH THE SAME VALUE the sapphire chest / key does not give me any function (yes swap places in the inventory. send your item_proto.txt and chest + key vnums.. Link to comment Share on other sites More sharing options...
DragonBlack94 2 Posted April 21, 2021 Author Share Posted April 21, 2021 Chest: INSERT INTO `item_proto` VALUES ('50134', 0xC0CCC6C4C0C720BBF3C0DA, 0x4D6973746572696F736F204261756C65207A61666669726F, '20', '0', '0', '1', '0', '0', '0', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '50152', '0', '0', '0', '0', '0', '-1', '-1', '-1', '-1', '-1', '-1', '0', '0', '0'); Key: INSERT INTO `item_proto` VALUES ('50152', 0xC0CCC6C4C0C720BBF3C0DA, 0x436869617665207A61666669726F, '21', '0', '0', '1', '0', '0', '0', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '50134', '0', '0', '0', '0', '0', '-1', '-1', '-1', '-1', '-1', '-1', '0', '0', '0'); Need anything else? Link to comment Share on other sites More sharing options...
Denizeri24 35 Posted April 21, 2021 Share Posted April 21, 2021 29 minutes ago, DragonBlack94 said: Chest: INSERT INTO `item_proto` VALUES ('50134', 0xC0CCC6C4C0C720BBF3C0DA, 0x4D6973746572696F736F204261756C65207A61666669726F, '20', '0', '0', '1', '0', '0', '0', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '50152', '0', '0', '0', '0', '0', '-1', '-1', '-1', '-1', '-1', '-1', '0', '0', '0'); Key: INSERT INTO `item_proto` VALUES ('50152', 0xC0CCC6C4C0C720BBF3C0DA, 0x436869617665207A61666669726F, '21', '0', '0', '1', '0', '0', '0', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '50134', '0', '0', '0', '0', '0', '-1', '-1', '-1', '-1', '-1', '-1', '0', '0', '0'); Need anything else? man, you dont have item_proto.txt? probably your files using txt's.. check your usr/game/cores/db folder.. Link to comment Share on other sites More sharing options...
LordZiege 279 Posted April 21, 2021 Share Posted April 21, 2021 38 minutes ago, DragonBlack94 said: Chest: INSERT INTO `item_proto` VALUES ('50134', 0xC0CCC6C4C0C720BBF3C0DA, 0x4D6973746572696F736F204261756C65207A61666669726F, '20', '0', '0', '1', '0', '0', '0', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '50152', '0', '0', '0', '0', '0', '-1', '-1', '-1', '-1', '-1', '-1', '0', '0', '0'); Key: INSERT INTO `item_proto` VALUES ('50152', 0xC0CCC6C4C0C720BBF3C0DA, 0x436869617665207A61666669726F, '21', '0', '0', '1', '0', '0', '0', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '50134', '0', '0', '0', '0', '0', '-1', '-1', '-1', '-1', '-1', '-1', '0', '0', '0'); Need anything else? You should use the same value in value0 and not the value of the chest/key wtf. Learn to read exactly. 1 hour ago, Denizeri24 said: Check Value0 in item_proto.txt; KEY : item type --> ITEM_TREASURE_KEY --> Value0 : 50 CHEST : item type --> ITEM_TREASURE_BOX --> Value0 : 50 Value0 must be same value with chest.. NOTE : just check gold key ( vnum : 50008 ) and gold chest ( vnum : 50006 ) He descriped it completly correctly. Link to comment Share on other sites More sharing options...
DragonBlack94 2 Posted April 21, 2021 Author Share Posted April 21, 2021 I tried to insert for example value 50 to both items but the result does not change. (value 0) 16 minutes ago, LordZiege said: You should use the same value in value0 and not the value of the chest/key wtf. Learn to read exactly. He descriped it completly correctly. I put those values in (value0) by copying them from the gold chest / key. But as I said I also tried to put the same value (50) the result does not change. Link to comment Share on other sites More sharing options...
LordZiege 279 Posted April 21, 2021 Share Posted April 21, 2021 You added special_item_group part for the chest? otherwise it wont work. Link to comment Share on other sites More sharing options...
DragonBlack94 2 Posted April 21, 2021 Author Share Posted April 21, 2021 11 minutes ago, LordZiege said: You added special_item_group part for the chest? otherwise it wont work. Yes, I did if I click on the trunk it opens normally, but if I drag the key on it they swap places in the inventory without any function. type chest: 23 type key: 18 if instead I copy the type of the chest / golden key the chest does not open and if I drag the key above they move from slot without any function Link to comment Share on other sites More sharing options...
LordZiege 279 Posted April 21, 2021 Share Posted April 21, 2021 (edited) Chest item type needs to be ITEM_TREASURE_BOX (for sql 20) Key item type needs to be ITEM_TREASURE_KEY (for sql 21) Edited April 21, 2021 by LordZiege Link to comment Share on other sites More sharing options...
Denizeri24 35 Posted April 21, 2021 Share Posted April 21, 2021 21 minutes ago, LordZiege said: Chest item type needs to be ITEM_TREASURE_BOX (for sql 20) Key item type needs to be ITEM_TREASURE_KEY (for sql 21) actually, he have a another problem; he can't open gold chest with gold key xd try debug your codes with gdb; char_item.cpp; case ITEM_TREASURE_KEY --> if (item->GetValue(0) == item2->GetValue(0)) Link to comment Share on other sites More sharing options...
LordZiege 279 Posted April 21, 2021 Share Posted April 21, 2021 (edited) 29 minutes ago, Denizeri24 said: actually, he have a another problem; he can't open gold chest with gold key xd try debug your codes with gdb; char_item.cpp; case ITEM_TREASURE_KEY --> if (item->GetValue(0) == item2->GetValue(0)) Nvm, i didnt saw the video. Woukd be nice if he post complete querys of his chests, also golden one and the keys for them. And also his full part of case ITEM_TREASURE_KEY from char_item Edited April 21, 2021 by LordZiege Link to comment Share on other sites More sharing options...
DragonBlack94 2 Posted April 23, 2021 Author Share Posted April 23, 2021 I solved it by creating a quest even though I wanted to give the function like the gold and silver chests. To speed up I did the quest with the type 18 on both the key and the chest. Thank you all very much for helping me. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now