Feelmyspells Posted May 10, 2008 Posted May 10, 2008 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! Quote
Hax0r Posted May 10, 2008 Posted May 10, 2008 Nice and easy to understand tutorial! +1 from me. Just noticed that it's not ur own tutorial! thnx anyway Quote
Feelmyspells Posted May 10, 2008 Author Posted May 10, 2008 Ty very much for your karma,really appreciate it. The guide is from l2j forums. Quote
sanjose Posted June 27, 2008 Posted June 27, 2008 Thank you very much, I used to edit the xml files, but this way seems easier, Will give it a try thanks Quote
Hilltop Posted June 28, 2008 Posted June 28, 2008 pretty easy to understand, thanks for the share dude. Quote
down Posted June 29, 2008 Posted June 29, 2008 Thank u very much . It's very cool . And very easy to understand too. So thx again dude.. I'm using it atm :) Quote
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.
Note: Your post will require moderator approval before it will be visible.