Jump to content
  • 0
Sign in to follow this  
nikki1200

TCG Shop NPC

Question

11 answers to this question

Recommended Posts

  • 0

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 :D

Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

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;}

Share this post


Link to post
Share on other sites
  • 0

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 by nikki1200

Share this post


Link to post
Share on other sites
  • 0

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, 

Share this post


Link to post
Share on other sites
  • 0

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? 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.