Jump to content

[GUIDE]Adding/removing items from shops.


Recommended Posts

CREDITS TO:Naikon2Remember

 

The guide explains the difference between Multisell Shops and Merchant Shops,and learn you how to add or remove an item.

 

Merchant Shops.

 

For this one the SQL database is used. I use Navicat, a GUI (Graphic User Interface) for MySQL. You can use whatever appz you like, I recommend this one.

 

Note: Any SQL side modifications must be made with the Server Down. Why? Well some modifications may cause server errors, others will only take place after you will restart the server. I don't know of any SQL side modification that took place with the Server Online.

 

1. Let's take a merchant... Trader Lector of the Talking Island Village.

 

2. While ingame Shift + Click the NPC and look for NPC Template to get NPC ID... Trader Lector is 7001.

 

Note: Every NPC wich is L2Merchant type has a buylist for every shop menu... for example Trader Lector has 2 buylists, one for Fighters and one for Mystics.

 

3. We first have to find out what buylist ID has the NPC, so we go in merchant_shopids and search for the npc_id 7001 wich is Trader Lector... luckily NPC 7001 has shop_id 1 (Fighter Equip) and 2 (Mystic Equip). We'll use the shop_id 1 for Fighter Equip.

 

4. Now that we found the shop_id, we go into into merchant_buylists and for our purpose lets sort ascending the shop_id column to see it more clearly. Better isn't it? We see that is has 54 items by looking at the order column. You can modify the order if you like but I won't. We now minimize the Table window (if u'r using Navicat).

 

5. Let's look for something to add to the shop... a weapon. We go into the weapons table and let's see... we're going to put a Claymore to the shop, that is item_id 70.

 

6. Now that we have the item_id let's add the item to the shop. We Maximize the merchant_buylists window (again if you are using Navicat), and we make a new row (Insert Record button for Navicat users), now in the item_id column we put the number 70 that's the Claymore, next is the price column... we'll price it ... let's say 1,2kk so that is the number 1200000, now in the shop_id we put the number 1 that is the shop_id for Fighter Equip of Trader Lector, and in the order column we put the number 55 because the last item had the order 54 in the shop.

 

7. Now that you added the item, start the server and checkout Trader Lector's Shop... you see? It has a Claymore! Congratz! You learned how to add an item to a shop.

 

Note: If you would like to make a custom shop you first have to find an unused shop_id then when you modify the html text of the NPC you do something like this:

 

<a action="bypass -h npc_%objectId%_Buy 1">Buy Something</a>

 

The 1 in there is the shop_id... so if you make a custom shop and it has... let's say the shop_id 999 you would make it look like this:

 

<a action="bypass -h npc_%objectId%_Buy 999">Buy Something</a>

 

Multisell Shops

 

Now let's talk about the Multisell shops... they are a bit harder for guys who didn't play with html or other stuff but it's fairly easy for you other guys.

 

Multisell shops are made in XML (EXtensible Markup Language), it uses tags like HTML, only you make your own tags in XML and use a DTD to translate them to HTML... well... you don't need to learn XML to make any modifications to the shops... I'll just explain them a little bit.

 

Let's take a multisell shop from the Pet Exchange shop... one thing that it's cool about multisell shops is that you actually "exchange" rather than "buy", but since Adena has an item_id too, you can even "buy".

 

So the XML for the Pet Exchange Shop looks like this :

 

<?xml version='1.0' encoding='utf-8'?>

 

<!-- Tickets for pet collars Exchange -->

 

<list>

 

<!-- Baby cougar chime for Pet Exchange Ticket: Cougar -->

<item id="1">

<ingredient id="7584" count="1" enchant="0"/>

<production id="6649" count="1" enchant="0"/>

</item>

 

<!-- Baby buffalo Panpipe for Pet Exchange Ticket: Buffalo -->

<item id="2">

<ingredient id="7583" count="1" enchant="0"/>

<production id="6648" count="1" enchant="0"/>

</item>

 

<!-- Baby Kookaburra Ocarina for Pet Exchange Ticket: Kookaburra -->

<item id="3">

<ingredient id="7585" count="1" enchant="0"/>

<production id="6650" count="1" enchant="0"/>

</item>

 

</list>

 

... now at first it may look complicated but it's not realy.

 

The line :

 

<?xml version='1.0' encoding='utf-8'?>

 

must be at the begining of any XML you make... it defines the version and character encoding of the XML language.

 

The lines like :

 

<!-- Tickets for pet collars Exchange -->

 

are comments... they will have no effect on the function of the XML whatsoever. The comments are for the editors eyes only. They have opening "<!--" and closing "-->" tags. You can add these as many as you like, they will have no effect on anything.

 

Now we begin the list of items in the shop:

 

<list>

 

it's kinda like the order column in SQL.

 

Now we put the items in order:

 

<item id="1">

 

Note that this tag is not the item_id in the SQL database, it's only the order of the items in the shop ... so if I will make it <item id="5575"> that's the item_id for Ancient Adena, I will not get the item in the shop, that will be only the 5575th item.

 

Now we tell the server what item will be needed to buy from the shop:

 

<ingredient id="7584" count="1" enchant="0"/>

 

so... to get the Baby Cougar Chime we need the Pet Exchange Ticket: Baby Cougar that is item_id 7584 in the database. We tell him how many of those items we need count="1" that means we need 1 item. If we will turn it into count="5" that will mean that we will need 5 tickets for that item. And enchant="0", that's pretty self-explanatory. It would be nice for events to exchange a sword with no enchant plus one extra rare item to an enchanted sword... let's say +1 .... that would be enchant="1".

 

Now we tell what item we get if we have the ticket:

 

<production id="6649" count="1" enchant="0"/>

 

item_id 6649 is the Baby Cougar Chime, again we tell him how many we will get if we bring the ticked and if it's enchanted.

 

Now we close the item in the shop:

 

</item>

 

so if you begin <item id="1"> you have to close it after telling the server what you will need for the exchange and what you will get.

 

After you add all the items you have to close the list to have a valid XML Multisell Shop:

 

</list>

 

To turn it into a buy shop you have to make the ingredient id 57 wich is Adena.

 

To add it to a NPC you add the line :

 

<a action="bypass -h npc_%objectId%_multisell 1">Exchange/Buy Something</a>

 

where the "1" in there is the id of the multisell XML in the /data/multisell folder...

 

I hope you enjoyed my little guide... but I had some friends that just started in l2j and wanted to know these things so I thought that other newbies will want to know these things.

 

For removing ... that's just simple... DELETE!

 

 

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share



  • Posts

    • With regards to developing an Online business Site, or a Web based business plan, you require an assistant that is engaged and experienced in giving associations the best in master Internet business website architecture Arrangements. With a group of specialists under one roof's, EDA will likely offer every one of you of the fundamental plan, improvement and search promoting administrations ought to have been productive on the web. Our full-administration approach permits us to ensure your general achievement. EDA is one of the quickest developing ecommerce seo agency in USA.
    • Vanganth's ChampionNPC system works????i try to set it,but not works.. list like this: ChampionNpcList={1020010;1036010;25.5}{1020017;1036017;25.5}{1020039;1036039;25.5}{1020049;1036049;25.5}{1020059;1036059;25.5}{1020064;1036064;25.5}{1020071;1036071;25.5}{1020077;1036077;25.5}{1020082;1036082;25.5}{1020090;1036090;25.5}{1020102;1036102;25.5}{1020115;1036115;25.5}  all npcs were created.but seems this sytem not works.
    • The problem is that admins like you can never appreciate the hard work some people do so you can open your w/e pvp custom super duper server without having to think of very important issues that they solved for you. aCis is not playable in last revision, but in my opinion aCis should still cost more than lucera. Development is slow, but efficient and on the right path.   I understand that you're mad because you had to pay developers to fix your aCis files for you, but this is your fault in the first place for not doing the necessary research before deciding which files to use.   Also L2Unity is still p2w which is outdated, with minimal effort to differentiate its features from what vanilla lucera offers. Not to mention they still use interlude client and never moved to Classic which is a must in 2023. I wouldn't call that the best IL server by any means.
    • Updated   Healer Rogue [Interlude] Preview Album Hera with Effect [Interlude] Preview Album Ice Boss [Interlude] Preview Album Ifrit [Interlude] Preview Album Illusion Dove [Interlude] Preview Album Knight Fighter [Interlude] Preview Album Khimerian [Interlude] Preview Album Knight Horse [Interlude] Preview Album
    • Hi.   I'm trying to change systemmsg to show me landed and resisted debufs /buffs but can't find the line of it someone can tell me whiche exactly it is ? I found only ss1 resisted your fear xxx but seems crazy if i have to put all extra lines manually for every debuff    2.  I want have information on screen about war kills /dead from war  Like clan member (name ) killed war  And your clan mate (name of clan mate )died from war  Is there something like that ? I have to use with h5 systemmsg 
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock