fiction 14 Posted February 24, 2019 Hi to all, In herc, what is the way to manipualte custom shops via npcshopdelitem, npcshopadditem, etc? For example, in rathena, when i use shops that the currency is an item, i use itemshop, like this... - itemshop asdfas -1,7828,13036:100,13411:100 and then i call that shop via callshop "asdfas",0; How can i do that here in herc? Greetings.- Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted February 24, 2019 https://annieruru.blogspot.com/2019/01/compare-dynamic-shop-between-rathena.html Quote Share this post Link to post Share on other sites
0 fiction 14 Posted February 25, 2019 In case that i use SQL Queries to fill the entry, how can i do here?. In rathena i use query sqls to fill my menu and the shop, and then order alphabetically. For example: OnInit: .@mob_db$ = "mob_db"; .@item_db$ = "item_db"; .@total = query_sql( "SELECT DISTINCT LEFT( `name_japanese`, 1 ) AS alphabets FROM `"+ .@item_db$ +"` RIGHT JOIN `"+ .@mob_db$ +"` ON `"+ .@item_db$ +"`.`id` = `"+ .@mob_db$ +"`.`dropcardid` WHERE `type` = 6 AND `mexp` = 0 GROUP BY `name_japanese` ORDER BY alphabets;", .alphabet$ ); for ( .@i = 0; .@i < .@total; .@i++ ) { .alphabet_menu$ = .alphabet_menu$ + .alphabet$[.@i] +" Cards:"; .@nb = query_sql( "SELECT `"+ .@item_db$ +"`.`id` FROM `"+ .@item_db$ +"` RIGHT JOIN `"+ .@mob_db$ +"` ON `"+ .@item_db$ +"`.`id` = `"+ .@mob_db$ +"`.`dropcardid` WHERE ~(`MODE`) & 32 AND `type` = 6 AND `mexp` = 0 AND LEFT( `name_japanese`, 1 ) = '"+ .alphabet$[.@i] +"' GROUP BY `name_japanese` ORDER BY `name_japanese` LIMIT 128;", .@id ); for ( .@j = 0; .@j < .@nb; .@j++ ) npcshopadditem "card_mob#"+ .alphabet$[.@i], .@id[.@j], 3; } freeloop 0; end; } // Shop Normal Cards - itemshop card_mob#A -1,30004,1515:1 - itemshop card_mob#B -1,30004,1515:1 - itemshop card_mob#C -1,30004,1515:1 - ietmshop card_mob#D -1,30004,1515:1 ... Quote Share this post Link to post Share on other sites
0 4144 364 Posted February 25, 2019 at first itemshop not exists in client or packets, this is some kind of fake shop in rathena, probably limited market (bargarian shop) or cash shop. For shop with data synced to sql table automatically you can use market shop type, see https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L310 or search in npc folder shop types what you want. If you asking how fill shop with all existing items in db, you can use one of trader shop type and add items by sql queries. Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted February 25, 2019 @4144 Hercules has our own dynamic shop system, implement right after Hercules founded by your definition, yes, we also has our own fake shop in hercules @fiction that's my script by the way ... you see my name in rathena repo Quote Share this post Link to post Share on other sites
0 4144 364 Posted February 25, 2019 I mean in client no itemshop. Exists normal shop. cash shop, market (aka bargarian) and barter. Herc using all of them in some way in official or custom way. But here no shop with name item shop. Checked source, itemshop using really cash shop. 1 AnnieRuru reacted to this Quote Share this post Link to post Share on other sites
0 fiction 14 Posted February 25, 2019 Thank you @AnnieRuru, @4144 and yes, indeed is part of your script, but i made some modification (I hope you do not mind hehe), because i don't want to trade in Zeny, i want to trade in custom items. I'll try to re-read the documentation of herc and try to adapt it. Quote Share this post Link to post Share on other sites
0 4144 364 Posted February 25, 2019 For this you can use trader with type NST_CUSTOM. See in docs or npc folder (it using cash shop on client too( If you using 2019 clients you also can use barter shop. See here information about barter shops Quote Share this post Link to post Share on other sites
Hi to all,
In herc, what is the way to manipualte custom shops via npcshopdelitem, npcshopadditem, etc?
For example, in rathena, when i use shops that the currency is an item, i use itemshop, like this...
- itemshop asdfas -1,7828,13036:100,13411:100
and then i call that shop via callshop "asdfas",0;
How can i do that here in herc?
Greetings.-
Share this post
Link to post
Share on other sites