Excuse, for putting this question in here. I don't where to put else.
Yes i have already used the search function of this forum, but to much matches for my search.
No my question:
How to add new / create items, for example a bottle / potion, for changing outfit / skin of a player character.
(for example -> Darkelf into a Werwolf)
Thank you forwarding
(Sry for my bad english)
Create new Item
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- L2j Veteran
- Posts: 1554
- Joined: Mon Oct 10, 2005 6:49 pm
If I understand correctly, you want to make a "polymorph" potion...so, here are the things you can do and the things you cannot do...
1) You can NOT create a brand new item (that doesn't already exist), except by hacking the client which is illegal and we under no circumstances support here.
2) You CAN take an existing item and change its effect, however when a player clicks on that item ingame, the description shown will be exactly what the client had for the original item. You cannot change this description either. This confuses players...but it's up to you to communicate with them and make sure that EVERYBODY understands that this item has been customized and will do something different than what the client says.
3) Even if the player used a potion that polymorphed him/her, that player would NOT be able to see himself/herself polymorphed. However, the character would correctly appear in its new form for all other players.
Assuming that the above is all acceptable to you, here is what you can do:
- First, search the etcitem table to find an item that looks like a potion and is not used anywhere in the entire game (make sure it's not a quest item, too)
- Next, you will need to write an "itemhandler" for this potion...this means changing code in the L2J core. I would recommend that you open the core and search for the itemhandlers for facelift and hairdye potions. Copy their code and paste it in a new Java file, change the ID of the item at the top, and then change the effect to a polymorph. You can easily find ready Java code for polymorph by looking at the gmCommandHandlers for polymorph. Just find and copy the small segment of that handler that actually does the morphing and add it in the potion's effect.
I may have made it sound simple. Well, if you are really good with java, it will be. Otherwise, you will need to learn some java and do lots of reading of the core code in order to be able to understand it before you can proceed.
1) You can NOT create a brand new item (that doesn't already exist), except by hacking the client which is illegal and we under no circumstances support here.
2) You CAN take an existing item and change its effect, however when a player clicks on that item ingame, the description shown will be exactly what the client had for the original item. You cannot change this description either. This confuses players...but it's up to you to communicate with them and make sure that EVERYBODY understands that this item has been customized and will do something different than what the client says.
3) Even if the player used a potion that polymorphed him/her, that player would NOT be able to see himself/herself polymorphed. However, the character would correctly appear in its new form for all other players.
Assuming that the above is all acceptable to you, here is what you can do:
- First, search the etcitem table to find an item that looks like a potion and is not used anywhere in the entire game (make sure it's not a quest item, too)
- Next, you will need to write an "itemhandler" for this potion...this means changing code in the L2J core. I would recommend that you open the core and search for the itemhandlers for facelift and hairdye potions. Copy their code and paste it in a new Java file, change the ID of the item at the top, and then change the effect to a polymorph. You can easily find ready Java code for polymorph by looking at the gmCommandHandlers for polymorph. Just find and copy the small segment of that handler that actually does the morphing and add it in the potion's effect.
I may have made it sound simple. Well, if you are really good with java, it will be. Otherwise, you will need to learn some java and do lots of reading of the core code in order to be able to understand it before you can proceed.
I'm a joyful, merriful, playful, curious, young, little elf!!! 
I'm also a High(tech) Elf, (computer) wiz!

I'm also a High(tech) Elf, (computer) wiz!
-
- Posts: 3
- Joined: Wed Jul 11, 2007 1:30 pm
it isn´t possible to make an own item, just looking like other items?
maybe by copy items with only a new id?
because for a event i made by myself i would need an item named Evas Chest an looking like an small chest....
so if i can´t create a new item, what items can i use to modify?
how can i know waht items are unused in game?
pla is there a list somewhere?
maybe by copy items with only a new id?
because for a event i made by myself i would need an item named Evas Chest an looking like an small chest....
so if i can´t create a new item, what items can i use to modify?
how can i know waht items are unused in game?
pla is there a list somewhere?
-
- L2j Veteran
- Posts: 1554
- Joined: Mon Oct 10, 2005 6:49 pm
You cannot create a brand new item. The client won't recognize the new ID and won't be able to display the item.
We do not have a list of unused items. Retail also tends to "clean up" such items occasionally, so having such a list would mean we'd have to keep checking each item after every update to make sure it wasn't removed.
Some items that I believe still exist in the client are the mouse, coke, and nvidia items. Quickhealing and mana potions should also exist (retail makes them available via special events) so if you don't plan to use them you may wish to change them. In the past there existed various "Test Item" and "Test Quest Item" but I believe those have been deleted.
I'm afraid you'll have to search and find a suitable item on your own. Also, no...you cannot change the name of the item that you use. The server merely sends the itemId. The item name and description are handled by the client.
We do not have a list of unused items. Retail also tends to "clean up" such items occasionally, so having such a list would mean we'd have to keep checking each item after every update to make sure it wasn't removed.
Some items that I believe still exist in the client are the mouse, coke, and nvidia items. Quickhealing and mana potions should also exist (retail makes them available via special events) so if you don't plan to use them you may wish to change them. In the past there existed various "Test Item" and "Test Quest Item" but I believe those have been deleted.
I'm afraid you'll have to search and find a suitable item on your own. Also, no...you cannot change the name of the item that you use. The server merely sends the itemId. The item name and description are handled by the client.
I'm a joyful, merriful, playful, curious, young, little elf!!! 
I'm also a High(tech) Elf, (computer) wiz!

I'm also a High(tech) Elf, (computer) wiz!
-
- Posts: 199
- Joined: Thu Jan 11, 2007 4:03 pm
- Location: France