Napster Posted September 19, 2014 Author Posted September 19, 2014 (edited) upgrade_extended_vending_item.sql for r17704 check your folder Sql-files/upgrades/upgrade_extended_vending_item.sql my patch include sql file ALTER TABLE `vendings` ADD COLUMN `extended_vending_item` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `title`; Edited September 19, 2014 by Napster Quote
Elsa Mist Posted September 19, 2014 Posted September 19, 2014 already check it... and this is my Sql-files/upgrades/upgrade_extended_vending_item.sql ALTER TABLE `vendings` ADD COLUMN `extended_vending_item` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `title`; same like ur patch... im really lost... Quote
Radian Posted September 20, 2014 Posted September 20, 2014 @Elsa Mist regarding on your error i encounter that kind of error. what i did was this line if( Sql_Query( mmysql_handle, "INSERT INTO `%s`(`id`,`account_id`,`char_id`,`sex`,`map`,`x`,`y`,`title`,`autotrade`, `body_direction`, `head_direction`, `sit`) " "VALUES( %d, %d, %d, '%c', '%s', %d, %d, '%s', %d, '%d', '%d', '%d' );", vendings_db, sd->vender_id, sd->status.account_id, sd->status.char_id, sd->status.sex == 0 ? 'F' : 'M', map[sd->bl.m].name, sd->bl.x, sd->bl.y, message_sql, sd->state.autotrade, sd->ud.dir, sd->head_dir, pc_issit(sd) ) != SQL_SUCCESS ){ i didn't change it. and i didn't applied this things. `extended_vending_item` smallint(5) unsigned NOT NULL DEFAULT '0'. or this, ALTER TABLE `vendings` ADD COLUMN `extended_vending_item` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `sit`; Quote
Elsa Mist Posted September 21, 2014 Posted September 21, 2014 (edited) @Nepster its me again.. Ive got one problem, i cant buy zeny and cash. even my zeny and cash is more than selling prize it still say that im dont have enough items. i have try with my GM & normal account still not enough items. kindly, see image below on chat box. FYI, for zeny and cash i change the item ID is it ok? because ID 30000 & 30001 is already use by my costume. its okay now, im manage to solve it... hehehe btw @napster,,,, thank you so much forthis patch,,,, love u more... Edited September 21, 2014 by Elsa Mist Quote
Napster Posted September 21, 2014 Author Posted September 21, 2014 (edited) @Elsa Mist i have test for this no problem i think your checking if you change ID 30000 & 30001 is already 1. check item db ...\db\import-tmpl\item_db.txt // Vending system 30000,Zeny,Zeny,3,,10,10,,,,,,,,,,,,,{},{},{} <-- change you want item id 30001,Cash,Cash,3,,10,10,,,,,,,,,,,,,{},{},{} <-- change you want item id 2. check battle conf ...\battle\feature.conf // Item ID for Zeny. Set to 0 if you don't want use Zeny. item_zeny: 30000 <-- change you want item id // Item ID for Cash. Set to 0 if you don't want use Cash. item_cash: 30001 <-- change you want item id 3. check you data file ...\data\idnum2itemdisplaynametable.txt // Vending system 30000#Zeny# <-- change you want item id 30001#Cash# <-- change you want item id Edited September 21, 2014 by Napster 1 Quote
Darkpurple Posted October 25, 2014 Posted October 25, 2014 (edited) It did not support autotrade in last git... When server restart....all turned it to Zeny Trading.. I noticed that COLUMN `extended_vending_item` will be set to "0" when the server restarted.... Edited October 26, 2014 by Darkpurple Quote
Napster Posted October 26, 2014 Author Posted October 26, 2014 Update fix bug : ExtendedVendingSystem_1.9.2thank you for report Quote
Darkpurple Posted October 26, 2014 Posted October 26, 2014 (edited) It removed this part?? Index: db/item_vending.txt =================================================================== --- db/item_vending.txt (revision 0) +++ db/item_vending.txt (working copy) @@ -0,0 +1,12 @@ +// Specific items for Vending System +// Format: ItemID +// Max items is equal MAX_INVENTORY ( 100 by default ) + +// TCG Card +7227 +// Mithril Coin +674 +// Silver Coin +675 +// Bronze Coin +673 \ No newline at end of file And why changed this part : Old: for( i = 0; i < count; i++ ) { short amount = *(uint16*)(data + 4*i + 0); short idx = *(uint16*)(data + 4*i + 2); + const char *item_name; + double rev = 0.; idx -= 2; + /** + * Extended Vending system [Lilith] + **/ + if(battle_config.ex_vending_info){ + item_name = itemdb_jname(vsd->status.cart[idx].nameid); + rev = ((double)vsd->vending[vend_list[i]].value * (double)amount); + } + // vending item pc_additem(sd, &vsd->status.cart[idx], amount, LOG_TYPE_VENDING); vsd->vending[vend_list[i]].amount -= amount; @@ -252,11 +346,20 @@ //print buyer's name if( battle_config.buyer_name ) { char temp[256]; - sprintf(temp, msg_txt(sd,265), sd->status.name); + if(battle_config.ex_vending_info) // Extended Vending system [Lilith] + sprintf(temp, msg_txt(sd,1597), sd->status.name, item_name, amount, (int)(rev -= rev * (battle_config.vending_tax/10000.)), vsd->vend_loot?itemdb_jname(vsd->vend_loot):"Zeny"); + else + sprintf(temp, msg_txt(sd,265), sd->status.name); clif_disp_onlyself(vsd,temp,strlen(temp)); } } to new: for( i = 0; i < count; i++ ) { short amount = *(uint16*)(data + 4*i + 0); @@ -250,11 +337,23 @@ //print buyer's name if( battle_config.buyer_name ) { char temp[256]; - sprintf(temp, msg_txt(sd,265), sd->status.name); + if(battle_config.ex_vending_info) {// Extended Vending system [Lilith] + const char *item_name = itemdb_jname(vsd->status.cart[idx].nameid); + double rev = ((double)vsd->vending[vend_list[i]].value * (double)amount); + + sprintf(temp, msg_txt(sd,1597), sd->status.name, item_name, amount, (int)(rev -= rev * (battle_config.vending_tax/10000.)), vsd->vend_loot?itemdb_jname(vsd->vend_loot):"Zeny"); + } else + sprintf(temp, msg_txt(sd,265), sd->status.name); clif_disp_onlyself(vsd,temp,strlen(temp)); } } should I use the new one? or the old one is okay(well) to use? What is different? Edited October 26, 2014 by Darkpurple Quote
Napster Posted October 26, 2014 Author Posted October 26, 2014 opps! forgot sorry i will update again +++ db/item_vending.txt (working copy)@@ -0,0 +1,12 @@+// Specific items for Vending System+// Format: ItemID+// Max items is equal MAX_INVENTORY ( 100 by default )++// TCG Card+7227+// Mithril Coin+674+// Silver Coin+675+// Bronze Coin+673\ No newline at end of file and this fix warning for linux bugreport by Lelouch vi Britannia //print buyer's name if( battle_config.buyer_name ) { char temp[256]; - sprintf(temp, msg_txt(sd,265), sd->status.name); + if(battle_config.ex_vending_info) {// Extended Vending system [Lilith] + const char *item_name = itemdb_jname(vsd->status.cart[idx].nameid); + double rev = ((double)vsd->vending[vend_list[i]].value * (double)amount); + + sprintf(temp, msg_txt(sd,1597), sd->status.name, item_name, amount, (int)(rev -= rev * (battle_config.vending_tax/10000.)), vsd->vend_loot?itemdb_jname(vsd->vend_loot):"Zeny"); + } else + sprintf(temp, msg_txt(sd,265), sd->status.name); clif_disp_onlyself(vsd,temp,strlen(temp)); } } Quote
Darkpurple Posted October 26, 2014 Posted October 26, 2014 opps! forgot sorry i will update again +++ db/item_vending.txt (working copy)@@ -0,0 +1,12 @@ +// Specific items for Vending System +// Format: ItemID +// Max items is equal MAX_INVENTORY ( 100 by default ) + +// TCG Card +7227 +// Mithril Coin +674 +// Silver Coin +675 +// Bronze Coin +673 \ No newline at end of file and this fix warning for linux bugreport by Lelouch vi Britannia //print buyer's name if( battle_config.buyer_name ) { char temp[256]; - sprintf(temp, msg_txt(sd,265), sd->status.name); + if(battle_config.ex_vending_info) {// Extended Vending system [Lilith] + const char *item_name = itemdb_jname(vsd->status.cart[idx].nameid); + double rev = ((double)vsd->vending[vend_list[i]].value * (double)amount); + + sprintf(temp, msg_txt(sd,1597), sd->status.name, item_name, amount, (int)(rev -= rev * (battle_config.vending_tax/10000.)), vsd->vend_loot?itemdb_jname(vsd->vend_loot):"Zeny"); + } else + sprintf(temp, msg_txt(sd,265), sd->status.name); clif_disp_onlyself(vsd,temp,strlen(temp)); } } If I am window OS user should I change it ? Or keep the old one is okay? Quote
exchisu Posted December 22, 2014 Posted December 22, 2014 @Napster Hi bud, i have an error, when ill try to Shop the Msg appear... with all the items i try and nothing.. 733: Item '%s' has not yet saved to your cart. Please re-log in order to correctly save your Vending information. anybody can help me with this Quote
Darkpurple Posted December 22, 2014 Posted December 22, 2014 @Napster Hi bud, i have an error, when ill try to Shop the Msg appear... with all the items i try and nothing.. 733: Item '%s' has not yet saved to your cart. Please re-log in order to correctly save your Vending information. anybody can help me with this re-log Quote
mR L Posted January 3, 2015 Posted January 3, 2015 @napsterplease detail how to use this file .patchwhere i'm to place this file .patchsorry, i'm newbie, please detail to use this vending system Quote
trizzy Posted January 4, 2015 Posted January 4, 2015 can i have tutorial step by step? thanks in advance! Quote
VladimirCastro Posted January 18, 2015 Posted January 18, 2015 not working with the latest rathena Quote
Darkpurple Posted January 24, 2015 Posted January 24, 2015 It seem that rathena changed some structure in vending.c since here: https://github.com/rathena/rathena/commit/7fcacb64c44f4305352d55dc12390aaaa8882997 So that this diff does not working on last Git rathena. We need to hope that napster if had time to fixed it... 1 Quote
cawogeek Posted January 25, 2015 Posted January 25, 2015 It seem that rathena changed some structure in vending.c since here: https://github.com/rathena/rathena/commit/7fcacb64c44f4305352d55dc12390aaaa8882997 So that this diff does not working on last Git rathena. We need to hope that napster if had time to fixed it... Just to follow up his post. Quote
Archetype Saber Posted January 26, 2015 Posted January 26, 2015 try to install the codes manually, Quote
Darkpurple Posted January 27, 2015 Posted January 27, 2015 try 1.9.3 for last gits & svn Welcome Back, NICE!!:) Also I saw some interesting topics in hercules: http://hercules.ws/board/topic/8192-restock-system/ and http://hercules.ws/board/topic/8213-warp-hit-delay/ Quote
VladimirCastro Posted January 28, 2015 Posted January 28, 2015 try 1.9.3 for last gits & svn i tried both manualy and patch i get this error. Quote
trizzy Posted January 28, 2015 Posted January 28, 2015 try 1.9.3 for last gits & svn i tried both manualy and patch i get this error. Same Prob Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.