Cydh Posted July 27, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted July 27, 2014 (edited) Just a simple modification to enable/disable Discount or Overcharge on specified NPC Shop. Maybe the idea was brought from Shop System and my old commit about "disable" discount for point & item shop. It just simple touch, add optional flag at very last of NPC shop line. -%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}{,<flag>} <map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}{,<flag>} <map name>,<x>,<y>,<facing>%TAB%marketshop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>:<quantity>{,<itemid>:<price>:<quantity>...}{,<flag>} If the flag isn't set, it doesn't bother any default NPC. Flag 0x1 = Disable Discount 0x2 = Disable Overcharge If unset, Discount and Overcharge are enabled (if available) Examples Discount & Overcharge are disabled here prontera,147,167,6 shop Shop 1 872,2102:-1,2104:-1,501:-1,3 Overcharge is disabled prontera,147,164,6 shop Shop 2 872,2102:-1,2104:-1,501:-1,2 Discount is disabled prontera,147,161,6 shop Shop 3 872,2102:-1,2104:-1,501:-1,1 When file is loaded with that flag, you will get this Info Download discount_flag-rA-20180713-ec1d6d28.diff for rAthena Git Hash: ec1d6d28 (20180713) Edited July 16, 2018 by Cydh 2 2 Quote Link to comment Share on other sites More sharing options...
Pneuma Posted July 27, 2014 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 846 Reputation: 138 Joined: 02/26/14 Last Seen: March 7, 2018 Share Posted July 27, 2014 Just a simple modification to enable/disable Discount or Overcharge on specified NPC Shop. Maybe the idea was brought from Shop System and my old commit about "disable" discount for point & item shop. It just simple touch, add optional flag at very last of NPC shop line. -%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}{,<flag>} <map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}{,<flag>} If the flag isn't set, it doesn't bother any default NPC. Flag 1 = Disable Discount 2 = Disable Overcharge Examples Discount & Overcharge are disabled here prontera,147,167,6 shop Shop 1 872,2102:-1,2104:-1,501:-1,3 Overcharge is disabled prontera,147,164,6 shop Shop 2 872,2102:-1,2104:-1,501:-1,2 Discount is disabled prontera,147,161,6 shop Shop 3 872,2102:-1,2104:-1,501:-1,1 When file is loaded with that flag, you will get this Info Screenshot_30.png Download Ahh sorry, from now, I think I just throw my modification on my fork (under PServeRO account), it'll easier for me to update some mode later. https://github.com/pservero/rathena/compare/custom/shop_flag Diff: https://github.com/pservero/rathena/compare/custom/shop_flag.diff This is a very nice release but I think it would be better as a default feature in rA Quote Link to comment Share on other sites More sharing options...
Reducto Posted July 27, 2014 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Share Posted July 27, 2014 (edited) Just a simple modification to enable/disable Discount or Overcharge on specified NPC Shop. Maybe the idea was brought from Shop System and my old commit about "disable" discount for point & item shop. It just simple touch, add optional flag at very last of NPC shop line. -%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}{,<flag>} <map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}{,<flag>} If the flag isn't set, it doesn't bother any default NPC. Flag 1 = Disable Discount 2 = Disable Overcharge Examples Discount & Overcharge are disabled here prontera,147,167,6 shop Shop 1 872,2102:-1,2104:-1,501:-1,3 Overcharge is disabled prontera,147,164,6 shop Shop 2 872,2102:-1,2104:-1,501:-1,2 Discount is disabled prontera,147,161,6 shop Shop 3 872,2102:-1,2104:-1,501:-1,1 When file is loaded with that flag, you will get this Info Screenshot_30.png Download Ahh sorry, from now, I think I just throw my modification on my fork (under PServeRO account), it'll easier for me to update some mode later. https://github.com/pservero/rathena/compare/custom/shop_flag Diff: https://github.com/pservero/rathena/compare/custom/shop_flag.diff Cyd, can you also release for eA? please Edited July 27, 2014 by Reducto Quote Link to comment Share on other sites More sharing options...
Cydh Posted July 28, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Author Share Posted July 28, 2014 This is a very nice release but I think it would be better as a default feature in rA Then open a new post on Source Discussion and hear what people say. Cyd, can you also release for eA? please hmm, try patch it manually yourself, it should be easy. Quote Link to comment Share on other sites More sharing options...
Reducto Posted July 29, 2014 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Share Posted July 29, 2014 This is a very nice release but I think it would be better as a default feature in rA Then open a new post on Source Discussion and hear what people say. Cyd, can you also release for eA? please hmm, try patch it manually yourself, it should be easy. Hello, I tried to patch it manually. But, there are a lot of errors while compiling. Please make a patch for eA. Quote Link to comment Share on other sites More sharing options...
simplexjay2 Posted September 25, 2014 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 224 Reputation: 4 Joined: 02/09/12 Last Seen: April 20, 2024 Share Posted September 25, 2014 Svn 17704 erro Error 1 error C2065: 'nameid2' : undeclared identifier c:\users\admin\desktop\rathena\src\map\npc.c 2462 1 map-server_sql Quote Link to comment Share on other sites More sharing options...
Altimage Posted September 27, 2014 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 96 Reputation: 1 Joined: 03/07/12 Last Seen: January 19, 2023 Share Posted September 27, 2014 Work in cashshop ?? prontera,147,161,6 cashshop Shop 3 872,2102:-1,2104:-1,501:-1,1 Quote Link to comment Share on other sites More sharing options...
synchronize Posted November 2, 2014 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 1 Reputation: 0 Joined: 11/19/12 Last Seen: November 6, 2014 Share Posted November 2, 2014 thank you. please help error 1>c:\users\pc\desktop\server\rathena-master\src\map\clif.c(1784): error C2065: 'SHOP' : undeclared identifier 1>c:\users\pc\desktop\server\rathena-master\src\map\clif.c(1817): error C2065: 'SHOP' : undeclared identifier 1>c:\users\pc\desktop\server\rathena-master\src\map\npc.c(1606): error C2065: 'SHOP' : undeclared identifier 1>c:\users\pc\desktop\server\rathena-master\src\map\npc.c(1606): error C2065: 'SHOP' : undeclared identifier 1>c:\users\pc\desktop\server\rathena-master\src\map\npc.c(1831): error C2065: 'SHOP' : undeclared identifier 1>c:\users\pc\desktop\server\rathena-master\src\map\npc.c(1831): error C2065: 'SHOP' : undeclared identifier Quote Link to comment Share on other sites More sharing options...
Dori Posted January 1, 2015 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 332 Reputation: 15 Joined: 12/11/11 Last Seen: August 8, 2017 Share Posted January 1, 2015 (edited) Errors During Recompile: clif.c: In function 'clif_buylist': clif.c:1784: error: 'SHOP' undeclared (first use in this function) clif.c:1784: error: (Each undeclared identifier is reported only once clif.c:1784: error: for each function it appears in.) clif.c: In function 'clif_selllist': clif.c:1819: error: 'SHOP' undeclared (first use in this function) make[1]: Leaving directory `/home/.........../src/map' make[1]: *** [obj/clif.o] Error 1 make: *** [map] Error 2 Edited January 1, 2015 by Phenex Quote Link to comment Share on other sites More sharing options...
Cydh Posted January 1, 2015 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Author Share Posted January 1, 2015 change SHOP to NPCTYPE_SHOP Quote Link to comment Share on other sites More sharing options...
Cydh Posted July 16, 2018 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Author Share Posted July 16, 2018 Updated for rAthena Git Hash: ec1d6d28 (20180713) 1 Quote Link to comment Share on other sites More sharing options...
inwnutza69 Posted August 27, 2018 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 04/19/16 Last Seen: March 30, 2023 Share Posted August 27, 2018 [Info]: Shop at 'npc/Baphomet-RO/Scripts_Shop/Shop Armor.txt#L114' Discount: YES, Overcharge: YES. [Info]: Shop at 'npc/Baphomet-RO/Scripts_Shop/Shop Armor.txt#L115' Discount: YES, Overcharge: NO. [Info]: Shop at 'npc/Baphomet-RO/Scripts_Shop/Shop Armor.txt#L116' Discount: YES, Overcharge: NO. prontera,147,167,6 shop Shop 1 872,2102:-1,2104:-1,501:-1,3 prontera,147,164,6 shop Shop 2 872,2102:-1,2104:-1,501:-1,2 prontera,147,162,6 shop Shop 3 872,2102:-1,2104:-1,501:-1,1 I set this value, but Discount NO Discount NO not working Quote Link to comment Share on other sites More sharing options...
pedroppb Posted June 16, 2019 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 3 Reputation: 0 Joined: 11/22/12 Last Seen: May 3, 2024 Share Posted June 16, 2019 (edited) CXX clif.cpp clif.cpp: In function 'void clif_selllist(map_session_data*, npc_data*)': clif.cpp:2013:19: error: declaration of 'npc_data* nd' shadows a parameter struct npc_data *nd; ^~ make[1]: *** [obj/clif.o] Error 1 any fix? i think this make your diff failhttps://github.com/rathena/rathena/commit/3e1105b0cf8380b4e4646800305b59c3de0f96ea#diff-c5d5e782db2344e04a7089b24ba6c962 lol i fixed, On 6/17/2019 at 4:05 AM, pedroppb said: CXX clif.cpp clif.cpp: In function 'void clif_selllist(map_session_data*, npc_data*)': clif.cpp:2013:19: error: declaration of 'npc_data* nd' shadows a parameter struct npc_data *nd; ^~ make[1]: *** [obj/clif.o] Error 1 any fix? i think this make your diff failhttps://github.com/rathena/rathena/commit/3e1105b0cf8380b4e4646800305b59c3de0f96ea#diff-c5d5e782db2344e04a7089b24ba6c962 lol i fixed by accident, in clif.cpp diff change the void to void clif_selllist(struct map_session_data *sd, struct npc_data *nd) but after updates rathena puts "struct npc_data *nd" inside making the diff finish with this code void clif_selllist(struct map_session_data *sd, struct npc_data *nd) { int fd,i,c=0,val; struct npc_data *nd; and giving error when compiles, because "struct npc_data *nd" is inside, and parameter, i just removed the line inside. tested and work 100% Edited June 16, 2019 by pedroppb Quote Link to comment Share on other sites More sharing options...
Ice Bear Posted June 30, 2020 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 166 Reputation: 27 Joined: 11/20/11 Last Seen: Tuesday at 12:35 AM Share Posted June 30, 2020 (edited) doesnt work anymore because of the update in npc_shop_discount() **** BUT MANAGE TO FIX JUST COMMENT THAT ONE old : bool npc_shop_discount(enum npc_subtype type, bool discount) { new : bool npc_shop_discount( struct npc_data* nd ){ manage to fix i guess just comment out this one. //nd->u.shop.discount = is_discount > 0; << THIS ONE Edited June 30, 2020 by Ice Bear 1 Quote Link to comment Share on other sites More sharing options...
kalabasa Posted January 11, 2021 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Share Posted January 11, 2021 (edited) Error C2082 redefinition of formal parameter 'nd' map-server c:\users\user\documents\ra\rathena\src\map\clif.cpp 2153 Error C2065 'discount': undeclared identifier map-server c:\users\user\documents\ra\rathena\src\map\npc.cpp 3166 Error C2059 syntax error: '}' map-server c:\users\user\documents\ra\rathena\src\map\npc.cpp 3168 Error C2143 syntax error: missing ';' before '}' map-server c:\users\user\documents\ra\rathena\src\map\npc.cpp 3168 Error C2143 syntax error: missing ';' before '{' map-server c:\users\user\documents\ra\rathena\src\map\npc.cpp 3176 Error C2447 '{': missing function header (old-style formal list?) map-server c:\users\user\documents\ra\rathena\src\map\npc.cpp 3176 Error C2065 'npc_convertlabel_db': undeclared identifier map-server c:\users\user\documents\ra\rathena\src\map\npc.cpp 3338 Edited January 11, 2021 by kalabasa Quote Link to comment Share on other sites More sharing options...
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.