nikki1200 1 Posted October 27, 2013 Hi Everyone, Seeking for your assistance to have TCG Shop NPC. My script wont work T_T Please advise, Thanks, Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted October 28, 2013 (edited) Try changing : prontera,150,150,0 script Dynamic Shop 100,{ callshop "dynamicshop",1; npcshopattach "dynamicshop"; to : prontera,150,150,0 script Dynamic Shop 100,{ setarray .Restricted$[0], "Job_Merchant_High","Job_Whitesmith","Job_Creator","Job_Merchant","Job_Blacksmith","Job_Alchemist","Job_Baby_Merchant","Job_Baby_Blacksmith","Job_Baby_Alchemist"; for ( set .@a, 0; .@a < getarraysize(.Restricted$); set .@a, .@a + 1 ) if ( BaseClass == .Restricted$[.@a] ) end; callshop "dynamicshop",1; npcshopattach "dynamicshop"; If you are using a renewal base server then you should add those 3rd job with discount skill Edited October 28, 2013 by Patskie 1 nikki1200 reacted to this Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted October 27, 2013 Why dont you modify Quest NPC and replace all the required item into TCG? Quote Share this post Link to post Share on other sites
0 Nameless2you 97 Posted October 27, 2013 Or post your version so we can help you improve/fix it. That way you can see what was wrong and improve your scripting skills. Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted October 27, 2013 I've made a lot of posts regarding this : - shop dynamicshop -1,501:20prontera,150,150,0 script Dynamic Shop 100,{ callshop "dynamicshop",1; npcshopattach "dynamicshop"; end; OnBuyItem: for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) { for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) { if ( @bought_nameid[.@k] == .items[.@j] ) { if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) { if ( countitem(.currency) < .items[.@j+1] || countitem(.currency) < ( .items[.@j+1] * @bought_quantity[.@k] ) ) dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item."; else { delitem .currency, .items[.@j+1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; } } else dispbottom "You cannot carry out more items with you"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: set .currency, 7227; // TCG is used to buy items setarray .items, 4001,5,7227,100; // Usage : <item id>,<price> npcshopitem "dynamicshop",0,0; for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 ) npcshopadditem "dynamicshop",.items[.@i],.items[.@i+1]; end;} Quote Share this post Link to post Share on other sites
0 nikki1200 1 Posted October 27, 2013 Hi Sir sevenzz23 do you have quest npc script? can't find it here. Quote Share this post Link to post Share on other sites
0 nikki1200 1 Posted October 27, 2013 (edited) Hi Patskie, On your script you can discount the price if you have discount skills. can i get the script that will disable the discount on this NPC? Please advise, Thanks, Edited October 28, 2013 by nikki1200 Quote Share this post Link to post Share on other sites
0 nikki1200 1 Posted October 28, 2013 Hi Sir sevenzz23, I already tried it in my TCG SHOP and it's working however when i try to create another NPC for quest shop(the same code in TCG SHOP) it will duplicate only the item in TCG SHOP on my newly create quest shop NPC, i dont know why it's happen. can you help me on this one? Please advise, Thanks, Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted October 28, 2013 A dynamic shop is like an npc vendor which means that i think there is no possibility to remove the discount on the prices if a certain player have a discount skill. Alternative solution you can do is to restrict all merchant related classes to buy on that dynamic shop? Quote Share this post Link to post Share on other sites
0 nikki1200 1 Posted October 28, 2013 oh i see.. but how can i do that? do you have any idea? Please advise, Thanks Quote Share this post Link to post Share on other sites
0 nikki1200 1 Posted October 28, 2013 Hi All, Thanks for helping me, i already resolve the issue. Thanks Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted January 26, 2014 How to make two or more dynamic shop? I'm getting error when duplicating the script. Quote Share this post Link to post Share on other sites
Hi Everyone,
Seeking for your assistance to have TCG Shop NPC. My script wont work T_T
Please advise,
Thanks,
Share this post
Link to post
Share on other sites