Stealth
-
Posts
1,178 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Posts posted by Stealth
-
-
How to make a multisell
I. What is a multisell.
II. Making a multisell with code explaination.
III. Connecting it with npcs.
IV. Possible Errors and what to avoid.
I. What is a multisell.
A multisell is simply an xml (Extensible Markup Language) file which contains information about items , prices etc. Making a multisell is very easy and helps you create an easy and quick multisell buylist to add on a GMShop or in a custom npc.The best thing is that you can change the items wanted to buy an item eg. instead of giving adena you can change it to give ancient adena , gold bars and stuff like these.
II. Making a multisell with code explaination.
Before you make a multisell you need to have the items id's that you want to add to the multisell , the prices , and a basic knowledge of how xml and html/htm files work.First make a simple text file
How to start
You always start a multisell with the word
<list>
this means that you make a new list a buylist.
How to add an item
Of course multisells are associated with items , thats why we make them because they are very flexible to add and manage items.
Creating and adding an item is very easy so lets get to the point. After adding the
<list>
word we will make a new item make an item by adding this code
<item id="1">
The number "1" in this code means that it will be the first item added on the list , after that you go to 2 , 3 , 4 , 5 etc.. so that no item has the same id two times cause this will output an error in gameserver.
Next we need to add the ingredients that the player needs to give in order to get the item.
<ingredient id="57" count="10000"/>
The id of the ingredient item is set to 57 which is adena and the player needs to give 10000 adena as written in count.We can now move move to the production item the item which the player takes by giving 10000 adena or you can add a second or third ingredient using the code above.
The production item is as I said before the item that the player takes when he gives the ingredient item. So here's some code about it.
<production id="1" count="2"/>
This code means that the player will get two items (see count value) with the id=1 (which i think is a sword , thats why i said before you need to have the id of the ingredients/production items to make a multisell). After you add the production item you can either add another production item or finish this item.
To finish an item you need to use this code
</item>
After that you can add a second item or move on and finish the list.
Finishing a multisell
To finish a list you add this code in the end of the list and your done!
</list>
Example Multisell
So here's an example of a multisell with two items.
<list> <!--- Creates a new list. --> <item id="1"> <!--- New Item which is the 1st item. --> <ingredient id="57" count="10000"/> <!--- The item that the player needs to have (in this case 10000 adena). --> <production id="1" count="1"/> <!--- The item that the player gets (in this case one sword). --> </item> <!--- Closes the current item. --> <item id="2"> <!--- New Item which is the 2nd item. --> <ingredient id="57" count="20000"/> <!--- The item that the player needs to have (in this case 20000 adena). --> <production id="1" count="2"/> <!--- The item that the player gets (in this case two swords). --> </item> <!--- Closes the current item. --> </list> <!--- Closes the list. -->
Notices and other stuff.
Notice:
<!--- This is a comment line in here you can write a comment related to the item or not related. --->
III. Connecting it with npcs.
Connecting a multisell with an npc is really easy , what your gonna need is a new or existing npc (Im not gonna show you how to make a new npc cause this kind of tutorials already exist , but Im gonna show you how to connect it with multisell).
How to save the multisell
Assuming that you have your multisell ready in notepad click save as and change the file extension to .xml then select all files and save it with a number like "00093.xml" , this should do.Next step is to copy/move it to Your_server_location/gameserver/data/multisell , after you copy/move it to that directory make sure there are no file conflicts and make sure you remember the number it is very important.
How to connect it with npcs
Assuming that you have your npc ready go to gameserver/data/html and find your npcs html file.Right click in the html file and open it with notepad then add this line somewhere
<a action="bypass -h npc_%objectId%_Multisell Your_Multisells_Number_Here">Buy from multisell</a><br>
Save it and your done , now you have connected the multisell with the npc go login to your server make a //reload or restart and spawn the npc to test it.
Example of connecting
Lets say I have transferred the multisell in gameserver/data/multisell and the name of the multisell is 99887700.xml then that is the code I need to add to the npc.
<a action="bypass -h npc_%objectId%_Multisell 99887700">Buy from multisell</a><br>
IV. Possible Errors and what to avoid.
If you have errors coming from the gameserver , it is most likely that they are based on a syntax mistake or because of missing tags so make sure to double check the multisells before you save them so that you wont have troubles later.Also avoid using the same item id for more than 1 items this will cause problems and the items on the multisell will not be displayed correctly.
Updated (3) time(s).
Tutorial Created by Stealth , please give credits if you copy my work , thanks.
-
Nice Tracks I ve heard almost all of these in clubs.
-
Oxi mono thema filias alla kai thema ektimisis pisteuw.
-
Nice job mate so this will work in most servers for dualboxing right? I mean servers that have dualbox protection with l2.ini
-
I'd choose only title changing.
Me too.
-
Better then the ones you made before.
-
Yeap indeed amazing guide, you are doing great job nowdays and you are very active mate.
-
You have to make a database named l2jdb , not to name the connection l2jdb.
PS: After you make the database add in there all the sql tables.
-
auto dn legete varemara,agamia legete :P
xaxaaaxaxxax oxi re to eixa pathei kai egw otan piga diakopes se ena katsikoxwri prin apo 10 meres kai den eixa pc mazi mou.
-
Οκ το τόπικ πρέπει να κλειδωθεί αφού τελείωσε το match για να αποφευχθεί τυχόν spam.
-
Well as you said is nothing special but it's a really nice mode
good joob leeroy i like it ;)
Agree you did nice jod there , keep up learning java mate.
-
-
FAKE... i tried it... pfff give me 15 minutes and 7 euro back!!!
I knew it , well I thought so , because I know from chemistry that this cannot happen.
-
Well has anyone tested it? Does it really work? Here in Greece we dont have this kind of refreshments (Mountain Dew).
-
Good server I have played here in the past , although Im not aware of the current situation when I was playing it was pretty much a smooth gameplay , the only thing that was kinda boring was that I needed to farm for days to get the custom armors and weapons.
But I had fun and thats what Lineage and all games are about.
-
Welcome to L2 Diversify Server SERVER IS LIVE!!!!
Login
Processador 6 Quad Core 9500 +
8 GB de RAM
1 HD x 160 GB Total
Servidor 99.9% Uptime
Location: USA
Server
Processador 6 Quad Core 9500 +
8 GB de RAM
1 HD x 160 GB Total
Servidor 99.9% Uptime
Location: USA
Exp: X45 SP: X45 Adena: X90
Information:
* Gracia Final Server
* Items all from C1- Present
* PvP Events are Auto and CTF are Auto
* PvP
* Olimpiads
* Server open 24 hours a day 7 days a week to all players
* TvT Event
* Global Gatekeeper
* 2 Hour Buffer
* Auto Learn Skills
* Enchant Min 4 Max 35
Add this info to the first post it would be more helpfull fot people who wish to join your server.
-
Very nice post GrisoM , its well done because you have added prices too.
But could you integrate the two posts? cause it would be better I think.
-
mozilla FTW and for all my life :)...
I voted for Mozzila too , Chrome is good too but they need to make addons or so and its very minimal something I dont really like in browsers.So my vote goes to Mozzila again.
-
http://supercocktails.com/recipes/Cocktails/
http://allrecipes.com/Recipes/Drinks/Cocktails/Main.aspx
Edit: Oops now I saw the link from grisom.
Anyway here is a greek site too => http://drink-or-die.blogspot.com/
-
I support greek teams so my vote goes to pao even if i am olympiakos.
-
Its really cool mate :) Nice design.
-
Very nice looks promising...
-
You need to post more information , plus I think that you may be in wrong section cause you dont say what is exactly the problem.
You need a new server to play or your server has a problem?
-
this programme is recognized as a trojan horse by my panda premium firewall software.
Its a false-positive.
[Tutorial][Full Guide]How to make a multisell!
in Server Development Discussion [L2J]
Posted
I will also add pictures later to make it better , but thanks for now :)