Premium masodikbela 1359 Posted August 20, 2015 Author Premium Share Posted August 20, 2015 You have to set the "gold items" in igshop_settings.lua. (igshop_gold_items) By default its the gold/silver ingots (and gold nugget). Then you have to pull the gold items to the sell grids. Or watch the preview video, its near to it's end. The one and only UI programming guideline Link to comment Share on other sites More sharing options...
Terkea 13 Posted August 20, 2015 Share Posted August 20, 2015 someone help me? Link to comment Share on other sites More sharing options...
skill178 19 Posted August 20, 2015 Share Posted August 20, 2015 (edited) https://metin2.download/picture/51hC5D1jgOb9ON8xTJxtc3fcwHXvKwuI/.png goodd nice Edited August 31, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Terkea 13 Posted August 20, 2015 Share Posted August 20, 2015 you tested the system? can buy items with yang? Link to comment Share on other sites More sharing options...
ItamisCZ 8 Posted August 20, 2015 Share Posted August 20, 2015 I have a problem. Client sysser: 0820 17:59:47279 :: Cannot find item by 1440503453 0820 18:01:31107 :: Traceback (most recent call last): 0820 18:01:31107 :: File "ui.py", line 1490, in OnOverInItem 0820 18:01:31108 :: File "ui.py", line 87, in __call__ 0820 18:01:31108 :: File "ui.py", line 78, in __call__ 0820 18:01:31108 :: File "igshop.py", line 2475, in OverInItemPreview 0820 18:01:31109 :: File "uiToolTip.py", line 904, in AddItemData 0820 18:01:31109 :: File "uiToolTip.py", line 1585, in __AppendMetinSlotInfo 0820 18:01:31109 :: File "uiToolTip.py", line 1596, in __AppendMetinSlotInfo_IsEmptySlotList 0820 18:01:31109 :: IndexError 0820 18:01:31110 :: : 0820 18:01:31110 :: list index out of range 0820 18:01:31110 :: 0820 18:03:14027 :: Traceback (most recent call last): 0820 18:03:14027 :: File "ui.py", line 1490, in OnOverInItem 0820 18:03:14027 :: File "ui.py", line 87, in __call__ 0820 18:03:14027 :: File "ui.py", line 78, in __call__ 0820 18:03:14028 :: File "igshop.py", line 2475, in OverInItemPreview 0820 18:03:14028 :: File "uiToolTip.py", line 904, in AddItemData 0820 18:03:14029 :: File "uiToolTip.py", line 1589, in __AppendMetinSlotInfo 0820 18:03:14029 :: IndexError 0820 18:03:14029 :: : 0820 18:03:14029 :: list index out of range 0820 18:03:14029 :: 0820 18:04:20075 :: Traceback (most recent call last): 0820 18:04:20075 :: File "ui.py", line 1490, in OnOverInItem 0820 18:04:20076 :: File "ui.py", line 87, in __call__ 0820 18:04:20076 :: File "ui.py", line 78, in __call__ 0820 18:04:20076 :: File "igshop.py", line 2475, in OverInItemPreview 0820 18:04:20076 :: File "uiToolTip.py", line 904, in AddItemData 0820 18:04:20077 :: File "uiToolTip.py", line 1589, in __AppendMetinSlotInfo 0820 18:04:20077 :: IndexError 0820 18:04:20077 :: : 0820 18:04:20077 :: list index out of range 0820 18:04:20077 :: 0820 18:04:22357 :: Traceback (most recent call last): 0820 18:04:22357 :: File "ui.py", line 1490, in OnOverInItem 0820 18:04:22357 :: File "ui.py", line 87, in __call__ 0820 18:04:22358 :: File "ui.py", line 78, in __call__ 0820 18:04:22358 :: File "igshop.py", line 2475, in OverInItemPreview 0820 18:04:22358 :: File "uiToolTip.py", line 904, in AddItemData 0820 18:04:22359 :: File "uiToolTip.py", line 1589, in __AppendMetinSlotInfo 0820 18:04:22359 :: IndexError 0820 18:04:22359 :: : 0820 18:04:22359 :: list index out of range 0820 18:04:22359 :: 0820 18:04:26882 :: Traceback (most recent call last): 0820 18:04:26882 :: File "ui.py", line 1490, in OnOverInItem 0820 18:04:26883 :: File "ui.py", line 87, in __call__ 0820 18:04:26883 :: File "ui.py", line 78, in __call__ 0820 18:04:26883 :: File "igshop.py", line 2475, in OverInItemPreview 0820 18:04:26883 :: File "uiToolTip.py", line 904, in AddItemData 0820 18:04:26884 :: File "uiToolTip.py", line 1589, in __AppendMetinSlotInfo 0820 18:04:26884 :: IndexError 0820 18:04:26884 :: : 0820 18:04:26884 :: list index out of range 0820 18:04:26884 :: 0820 18:04:28046 :: Traceback (most recent call last): 0820 18:04:28046 :: File "ui.py", line 1490, in OnOverInItem 0820 18:04:28046 :: File "ui.py", line 87, in __call__ 0820 18:04:28047 :: File "ui.py", line 78, in __call__ 0820 18:04:28048 :: File "igshop.py", line 2480, in OverInItemWants 0820 18:04:28048 :: File "uiToolTip.py", line 904, in AddItemData 0820 18:04:28048 :: File "uiToolTip.py", line 1589, in __AppendMetinSlotInfo 0820 18:04:28049 :: IndexError 0820 18:04:28049 :: : 0820 18:04:28049 :: list index out of range 0820 18:04:28049 :: 0820 18:04:29168 :: Traceback (most recent call last): 0820 18:04:29168 :: File "ui.py", line 1490, in OnOverInItem 0820 18:04:29178 :: File "ui.py", line 87, in __call__ 0820 18:04:29185 :: File "ui.py", line 78, in __call__ 0820 18:04:29189 :: File "igshop.py", line 2475, in OverInItemPreview 0820 18:04:29191 :: File "uiToolTip.py", line 904, in AddItemData 0820 18:04:29191 :: File "uiToolTip.py", line 1589, in __AppendMetinSlotInfo 0820 18:04:29191 :: IndexError 0820 18:04:29191 :: : 0820 18:04:29191 :: list index out of range 0820 18:04:29191 :: 0820 18:04:41527 :: Traceback (most recent call last): 0820 18:04:41527 :: File "ui.py", line 1490, in OnOverInItem 0820 18:04:41528 :: File "ui.py", line 87, in __call__ 0820 18:04:41528 :: File "ui.py", line 78, in __call__ 0820 18:04:41528 :: File "igshop.py", line 2475, in OverInItemPreview 0820 18:04:41529 :: File "uiToolTip.py", line 904, in AddItemData 0820 18:04:41529 :: File "uiToolTip.py", line 1585, in __AppendMetinSlotInfo 0820 18:04:41529 :: File "uiToolTip.py", line 1596, in __AppendMetinSlotInfo_IsEmptySlotList 0820 18:04:41530 :: IndexError 0820 18:04:41530 :: : 0820 18:04:41530 :: list index out of range 0820 18:04:41530 :: Link to comment Share on other sites More sharing options...
skill178 19 Posted August 20, 2015 Share Posted August 20, 2015 (edited) New error gold" https://metin2.download/picture/7IY64rVRb7OOsQZGosAZEk3RnPS7GDc4/.png Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium masodikbela 1359 Posted August 20, 2015 Author Premium Share Posted August 20, 2015 Guys please, I told about 3 times that the system reads the gold from its database, not from the inventory. It means that you have to put money into it. You can do it with gold items (for e.g. with vnum 80007, but you can define it in the igshop_settings.lua).ItamisCZ: Could you tell me how this appeared? I mean I see that its from the igshop's OverInItemPreview function, but it shouldn't give error. Anyway, I'm going to look after it. The one and only UI programming guideline Link to comment Share on other sites More sharing options...
ItamisCZ 8 Posted August 20, 2015 Share Posted August 20, 2015 (edited) Guys please, I told about 3 times that the system reads the gold from its database, not from the inventory. It means that you have to put money into it. You can do it with gold items (for e.g. with vnum 80007, but you can define it in the igshop_settings.lua).ItamisCZ: Could you tell me how this appeared? I mean I see that its from the igshop's OverInItemPreview function, but it shouldn't give error. Anyway, I'm going to look after it. I add a picture where the problem occurred.Actually, if you hover your mouse on weapon / armor (etc ..) so it doesn't show its attributes. Edited August 20, 2015 by ItamisCZ Link to comment Share on other sites More sharing options...
Terkea 13 Posted August 20, 2015 Share Posted August 20, 2015 (edited) Guys please, I told about 3 times that the system reads the gold from its database, not from the inventory. It means that you have to put money into it. You can do it with gold items (for e.g. with vnum 80007, but you can define it in the igshop_settings.lua).ItamisCZ: Could you tell me how this appeared? I mean I see that its from the igshop's OverInItemPreview function, but it shouldn't give error. Anyway, I'm going to look after it. dosent work https://metin2.download/picture/hC2yVrxcqu8c8m2Xw2LchypzVnv5gkPv/.jpg Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Link to comment Share on other sites More sharing options...
ItamisCZ 8 Posted August 20, 2015 Share Posted August 20, 2015 Guys please, I told about 3 times that the system reads the gold from its database, not from the inventory. It means that you have to put money into it. You can do it with gold items (for e.g. with vnum 80007, but you can define it in the igshop_settings.lua).ItamisCZ: Could you tell me how this appeared? I mean I see that its from the igshop's OverInItemPreview function, but it shouldn't give error. Anyway, I'm going to look after it. I add a picture where the problem occurred.Actually, if you hover your mouse on weapon / armor (etc ..) so it doesn't show its attributes. Do you know how to fix? :/I tried again to add but still the same error. Link to comment Share on other sites More sharing options...
Premium masodikbela 1359 Posted August 20, 2015 Author Premium Share Posted August 20, 2015 (edited) Guys please, I told about 3 times that the system reads the gold from its database, not from the inventory. It means that you have to put money into it. You can do it with gold items (for e.g. with vnum 80007, but you can define it in the igshop_settings.lua).ItamisCZ: Could you tell me how this appeared? I mean I see that its from the igshop's OverInItemPreview function, but it shouldn't give error. Anyway, I'm going to look after it. I add a picture where the problem occurred.Actually, if you hover your mouse on weapon / armor (etc ..) so it doesn't show its attributes. Do you know how to fix? :/I tried again to add but still the same error. Hmm... very interesting, for me it shows the tooltip: Could you give me your uitooltip.py? Maybe its different from mine. Guys please, I told about 3 times that the system reads the gold from its database, not from the inventory. It means that you have to put money into it. You can do it with gold items (for e.g. with vnum 80007, but you can define it in the igshop_settings.lua).ItamisCZ: Could you tell me how this appeared? I mean I see that its from the igshop's OverInItemPreview function, but it shouldn't give error. Anyway, I'm going to look after it. dosent work https://metin2.download/picture/hC2yVrxcqu8c8m2Xw2LchypzVnv5gkPv/.jpg Are you sure? https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal 1 The one and only UI programming guideline Link to comment Share on other sites More sharing options...
ItamisCZ 8 Posted August 20, 2015 Share Posted August 20, 2015 (edited) Guys please, I told about 3 times that the system reads the gold from its database, not from the inventory. It means that you have to put money into it. You can do it with gold items (for e.g. with vnum 80007, but you can define it in the igshop_settings.lua).ItamisCZ: Could you tell me how this appeared? I mean I see that its from the igshop's OverInItemPreview function, but it shouldn't give error. Anyway, I'm going to look after it. I add a picture where the problem occurred.Actually, if you hover your mouse on weapon / armor (etc ..) so it doesn't show its attributes. Do you know how to fix? :/I tried again to add but still the same error. Hmm... very interesting, for me it shows the tooltip: Could you give me your uitooltip.py? Maybe its different from mine. Of course. Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium masodikbela 1359 Posted August 20, 2015 Author Premium Share Posted August 20, 2015 Could you upload it to somewhere? Since the forum was updated, it doesn't like the files The one and only UI programming guideline Link to comment Share on other sites More sharing options...
ItamisCZ 8 Posted August 20, 2015 Share Posted August 20, 2015 Could you upload it to somewhere? Since the forum was updated, it doesn't like the files Okey. This is the hidden content, please Sign In or Sign Up 4 1 1 1 Link to comment Share on other sites More sharing options...
skill178 19 Posted August 20, 2015 Share Posted August 20, 2015 SYSERR: May 26 21:53:35 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/mb_igshop:941: bad argument #1 to `getn' (table expected, got number)SYSERR: May 26 21:53:35 :: WriteRunningStateToSyserr: LUA_ERROR: quest mb_igshop.start click Link to comment Share on other sites More sharing options...
Premium masodikbela 1359 Posted August 20, 2015 Author Premium Share Posted August 20, 2015 Could you upload it to somewhere? Since the forum was updated, it doesn't like the files Okey. This is the hidden content, please Sign In or Sign Up How much is your maximum stone? If its more than 3, the problem is there. SYSERR: May 26 21:53:35 :: RunState: LUA_ERROR: locale/mexico/quest/object/state/mb_igshop:941: bad argument #1 to `getn' (table expected, got number)SYSERR: May 26 21:53:35 :: WriteRunningStateToSyserr: LUA_ERROR: quest mb_igshop.start click Try to edit this: function get_itemsfromowner(owner) local igshoplist = {} local file = io.open(igshop_path.."data/"..owner.."/itemlist.txt", "r") if file == nil then syschat(loadLang(53)) return 0 end for item in file:lines() do table.insert(igshoplist,item) end return igshoplist or 0 end To this: function get_itemsfromowner(owner) local igshoplist = {} local file = io.open(igshop_path.."data/"..owner.."/itemlist.txt", "r") if file == nil then syschat(loadLang(53)) return 0 end for item in file:lines() do table.insert(igshoplist,item) end return igshoplist or {} end (If its working it was a nice mistake from me) 1 The one and only UI programming guideline Link to comment Share on other sites More sharing options...
ItamisCZ 8 Posted August 20, 2015 Share Posted August 20, 2015 Could you upload it to somewhere? Since the forum was updated, it doesn't like the files Okey. This is the hidden content, please Sign In or Sign Up How much is your maximum stone? If its more than 3, the problem is there. 4. Thus, where do I adjust when I have 4? Link to comment Share on other sites More sharing options...
Premium masodikbela 1359 Posted August 20, 2015 Author Premium Share Posted August 20, 2015 Could you upload it to somewhere? Since the forum was updated, it doesn't like the files Okey. This is the hidden content, please Sign In or Sign Up How much is your maximum stone? If its more than 3, the problem is there. 4. Thus, where do I adjust when I have 4? Is not that simple since the serverside only able to handle 3 one, and its a bit difficulty to modify all of the .txt struct. I will try to figure out a good solution tomorrow, but at least I will try to make a little "how-to". The one and only UI programming guideline Link to comment Share on other sites More sharing options...
ItamisCZ 8 Posted August 20, 2015 Share Posted August 20, 2015 Could you upload it to somewhere? Since the forum was updated, it doesn't like the files Okey. This is the hidden content, please Sign In or Sign Up How much is your maximum stone? If its more than 3, the problem is there. 4. Thus, where do I adjust when I have 4? Is not that simple since the serverside only able to handle 3 one, and its a bit difficulty to modify all of the .txt struct. I will try to figure out a good solution tomorrow, but at least I will try to make a little "how-to". Okay. Thank you very much for your help. Link to comment Share on other sites More sharing options...
Premium DarkFire 12 Posted August 20, 2015 Premium Share Posted August 20, 2015 Hi , i have a problem with client -> it stay at loading bar.... in syserror i have this : 0821 01:32:34054 :: File "networkModule.py", line 237, in SetGamePhase 0821 01:32:34055 :: File "system.py", line 130, in __pack_import 0821 01:32:34055 :: File " 0821 01:32:34055 :: <string> 0821 01:32:34055 :: ", line 0821 01:32:34055 :: 81 0821 01:32:34055 :: 0821 01:32:34055 :: 0821 01:32:34055 :: self.InGameShop = None 0821 01:32:34055 :: 0821 01:32:34055 :: 0821 01:32:34055 :: 0821 01:32:34055 :: 0821 01:32:34055 :: ^ 0821 01:32:34055 :: IndentationError 0821 01:32:34055 :: : 0821 01:32:34055 :: expected an indented block 0821 01:32:34055 :: Link to comment Share on other sites More sharing options...
Premium masodikbela 1359 Posted August 20, 2015 Author Premium Share Posted August 20, 2015 I think you missed some tabs in the game.py. Try to check the 81th line. (Or maybe it contains spaces instead of tabs) 1 The one and only UI programming guideline Link to comment Share on other sites More sharing options...
Premium DarkFire 12 Posted August 20, 2015 Premium Share Posted August 20, 2015 (edited) Now work fine , thx https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
ItamisCZ 8 Posted August 21, 2015 Share Posted August 21, 2015 Could you upload it to somewhere? Since the forum was updated, it doesn't like the files Okey. This is the hidden content, please Sign In or Sign Up How much is your maximum stone? If its more than 3, the problem is there. 4. Thus, where do I adjust when I have 4? Is not that simple since the serverside only able to handle 3 one, and its a bit difficulty to modify all of the .txt struct. I will try to figure out a good solution tomorrow, but at least I will try to make a little "how-to". Okay. Thank you very much for your help. I gave the maximum 3 stones. Now everything goes as it should. I decided that rather let those 3 stones. But seriously, thank you for your help. Link to comment Share on other sites More sharing options...
Night 366 Posted August 24, 2015 Share Posted August 24, 2015 (edited) btw there is another comment about the coding : int attr1; int value1; int attr2; int value2; int attr3; int value3; int attr4; int value4; int attr5; int value5; int attr6; int value6; int attr7; int value7; int socket1; int socket2; int socket3; basicly this is a bit too much, dont you think so? int attr1, value1, attr2, value2, attr3, value3, attr4, value4, attr5, value5, attr6, value6, attr7, value7, socket1, socket2, socket3; this looks a bit better. and this is ugly as well : if (lua_isnumber(L, 3) && lua_isnumber(L, 4) && lua_isnumber(L, 5) && lua_isnumber(L, 6) && lua_isnumber(L, 7) && lua_isnumber(L, 8) && lua_isnumber(L, 9) && lua_isnumber(L, 10) && lua_isnumber(L, 11) && lua_isnumber(L, 12) && lua_isnumber(L, 13) && lua_isnumber(L, 14) && lua_isnumber(L, 15) && lua_isnumber(L, 16) && lua_isnumber(L, 17) && lua_isnumber(L, 18) && lua_isnumber(L, 19)) you could just do it like this : thx to @martysama0134 for the size_t idea and the multi lua_isnumber check. bool isValid = true; for (size_t i = 3; i < 20; i++) { if (!lua_isnumber(L, i)) { isValid = false; break; } } if (!isValid) { lua_pushboolean(L, false); return 1; } else { attr1 = (int)lua_tonumber(L, 3); value1 = (int)lua_tonumber(L, 4); attr2 = (int)lua_tonumber(L, 5); value2 = (int)lua_tonumber(L, 6); attr3 = (int)lua_tonumber(L, 7); value3 = (int)lua_tonumber(L, 8); attr4 = (int)lua_tonumber(L, 9); value4 = (int)lua_tonumber(L, 10); attr5 = (int)lua_tonumber(L, 11); value5 = (int)lua_tonumber(L, 12); attr6 = (int)lua_tonumber(L, 13); value6 = (int)lua_tonumber(L, 14); attr7 = (int)lua_tonumber(L, 15); value7 = (int)lua_tonumber(L, 16); socket1 = (int)lua_tonumber(L, 17); socket2 = (int)lua_tonumber(L, 18); socket3 = (int)lua_tonumber(L, 19); item->SetForceAttribute(0, attr1, value1); item->SetForceAttribute(1, attr2, value2); item->SetForceAttribute(2, attr3, value3); item->SetForceAttribute(3, attr4, value4); item->SetForceAttribute(4, attr5, value5); item->SetForceAttribute(5, attr6, value6); item->SetForceAttribute(6, attr7, value7); item->SetSocket(0, socket1); item->SetSocket(1, socket2); item->SetSocket(2, socket3); lua_pushboolean(L, true); return 1; } } if someone want to comment about the first "{" then yes it is not realy needed but some compilers might throw a warning about it + it is just in order to avoid any problem , please do not forget to close it , just add a "}" after this : lua_pushboolean(L, true); return 1; (there is https://metin2.download/picture/5NiVRJT5M3QkD3olPArB2oTzxj0Ht5cT/.png in notpad++ use it to check if there is no problem (vs2013 should help you in a better way) , , sorry about the link , i just could not use bbcode like usual (damn ipb4.x)) and here you can use an enum (not that effictive it wont change anything) : attr1 = (int)lua_tonumber(L, 3); value1 = (int)lua_tonumber(L, 4); ... btw , the c-type cast here : (int)lua_tonumber(L, 3) is basicly always useless. except if you wanted to shut the compiler (it is bcz the convertion for a double to an int means that the program is going to trancate the double (lua_tonumber) (in other words the double is going to lose all the number after the "." for ex. 4.5 to int is 4 ...etc) good luck. Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
skill178 19 Posted August 24, 2015 Share Posted August 24, 2015 anyone can edit to use the yang inventory and items 2 things!? Link to comment Share on other sites More sharing options...
Recommended Posts