Jump to content
  • 0

Adding(Copying) A Weapon/armor. Copying An Npc, Editing It's Html And Purpose


Question

Posted

I'm using l2j aCis.

 

So, i've tried to do this on my own, but as i'm new to this, the furthest i got, was to be able to see the item icons in the shop, followed by a crit error quicly after that. I'll list the steps i've done, please correct me where i went wrong.


NPC PART:

 

I was attempting to make an NPC which sells CUSTOM items for 1 adena. The items are already implemented in the server, they just aren't sold at any NPC(craftable/droppable by RB's).

1. I added an NPC in the "data/xml/npc/npcs.xml" file(Copied the stats of an old one) with an unique ID, changed its type to "L2Mercant(idk if that matters ?)

2. I added the NPC in npcgrp.dat, npcname-e.dat.

3. Logged in game, spawned the NPC, the NPC was visible, it's name and tittle as well(no html yet).
4. Added the HTML file in "data\html\merchant\NPCID.html". The html contains some text and 2 anchors(example: "<a action="bypass -h npc_%objectId%_multisell 364543">". The multisell ID's are unique.
5. I created the multisell xml files, in which i added the custom weapons / armors, changed the adena price to "1".

6. Logged in, checked the shop, when clicking on the Weapon or Armor button, the shop opens up. I can see the weapon icons, but shortly after that follows a crit. error :

History: UUIDATA_ITEM::execGetSetItemIDList <- UObject::execClassContext <-
 (ToolTip Transient.ToolTip0 @ FunctionInterface.ToolTip.ReturnTooltip_NTT_ITEM : 11BE) <- UObject::ProcessEvent <-
 (ToolTip Transient.ToolTip0, Function Interface.ToolTip.OnEvent) <-
 XMLUIManager::ExecuteUIEvent <- NCTooltipManager::MakeTooltipInfo <-
 NCItemWnd::OnPostPaint <- NCVirtualWndMain::PostDrawChildWindow <-
 NCVirtualWndMain::DispatchWndMsg <- NConsoleWnd::ConsolePostRender <-
 UGameEngine::Draw <- UWindowsViewport::Repaint <- UWindowsClient::Tick <-
 ClientTick <- UGameEngine::Tick <- UpdateWorld <- MainLoop 

After that, even my client-side files got messed up, every item (even in my inventory, including retail items) was shown as "NoNameItem", which i solved by reapplying the patch.

Copying a weapon/armor part:
I want to make an expirable weapon/armor.
Got no clue what exactly to do here besides editing the items.xml file, copying the weapon/armor and changing it's ID to an unique one, changing it's stats for it to be expirable(I guess the stat used to set this is "<set name="duration" val="600" />" ?)

Is there also an edit needed in the client?

Hope there's someone out here who can help me out please :)

10 answers to this question

Recommended Posts

  • 0
Posted

I added the NPC in npcgrp.dat, npcname-e.dat.

 

1.You don't have to add the npc to client side..You just create a new one in data/xml/npcs (as you already did)

And then you create the html and you add it to the correct folder (depends on the type of npc)

 

2.As for the html it's ok there are no problems.

 

3.The critical error is probably because you didn't add properly the custom items.

If you want to add custom items you should add them to armorgrp.dat (armors) and to itemname-e.dat

Systextures,Animations must exist too.(that may cause your critical error)

 

4.Another idea is that your multisell might be wrong in some way , but i dont think so because you are saying that icons (weapons,armor) are shown properly.

  • 0
Posted

I added the NPC in npcgrp.dat, npcname-e.dat.

 

1.You don't have to add the npc to client side..You just create a new one in data/xml/npcs (as you already did)

And then you create the html and you add it to the correct folder (depends on the type of npc)

 

2.As for the html it's ok there are no problems.

 

3.The critical error is probably because you didn't add properly the custom items.

If you want to add custom items you should add them to armorgrp.dat (armors) and to itemname-e.dat

Systextures,Animations must exist too.(that may cause your critical error)

 

4.Another idea is that your multisell might be wrong in some way , but i dont think so because you are saying that icons (weapons,armor) are shown properly.

1. I added the NPC to the client side because i created a new ID for it, therefore u must define it's looks don't u ? otherwise it just shows me a bunny.

3.The custom items are already added to the server and they work properlly,they get dropped by raids and are usable, working the way they're supposed to.

This error occured when i tried adding them to the NPC. I guess i added them properlly because they got shown in the shop ?

4. Here's my multisell code:

 

<?xml version='1.0' encoding='utf-8'?>
<list>
 <item id="1">
   <production id="9205" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="2">
   <production id="9202" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="3">
   <production id="9203" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="4">
   <production id="9206" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="5">
   <production id="9208" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="6">
   <production id="9209" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="7">
   <production id="9214" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="8">
   <production id="9215" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="9">
   <production id="9216" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="10">
   <production id="9217" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="11">
   <production id="9204" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="12">
   <production id="9207" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="13">
   <production id="5801" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
 <item id="14">
   <production id="5800" count="1"/>
   <ingredient id="57" count="1"/>
  </item>
</list>

The ID's are correct, i checked them twice, also tried to manually spawn them.

  • 0
Posted (edited)

Here's an example of an npc, make sure to add them on the proper file (example: Id of npc=50050 , it goes to 50000-50999.xml)

idTemplate="xxx" , In idTemplate put the id of any npc you like ..You may like how grand olympiad manager looks like , so put this ID in there..And then your npc won't look like a bunny.

<npc id="50006" idTemplate="31228" name="Roy the Cat" title="Class Manager">
		<set name="level" val="70"/>
		<set name="radius" val="9"/>
		<set name="height" val="16"/>
		<set name="rHand" val="0"/>
		<set name="lHand" val="0"/>
		<set name="type" val="L2ClassMaster"/>
		<set name="exp" val="0"/>
		<set name="sp" val="10"/>
		<set name="hp" val="2444.46819"/>
		<set name="mp" val="1345.8"/>
		<set name="hpRegen" val="7.5"/>
		<set name="mpRegen" val="2.7"/>
		<set name="pAtk" val="688.86373"/>
		<set name="pDef" val="295.91597"/>
		<set name="mAtk" val="470.40463"/>
		<set name="mDef" val="216.53847"/>
		<set name="crit" val="4"/>
		<set name="atkSpd" val="253"/>
		<set name="str" val="40"/>
		<set name="int" val="21"/>
		<set name="dex" val="30"/>
		<set name="wit" val="20"/>
		<set name="con" val="43"/>
		<set name="men" val="20"/>
		<set name="corpseTime" val="7"/>
		<set name="walkSpd" val="80"/>
		<set name="runSpd" val="120"/>
		<set name="dropHerbGroup" val="0"/>
		<set name="attackRange" val="40"/>
		<ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
		<skills>
			<skill id="4045" level="1"/>
			<skill id="4416" level="7"/>
		</skills>
	</npc>

*Multisell looks fine to me.

 

So your problem is that u get a critical error when ur mouse is over an item , right?

(also check ur pm)

Edited by protoftw
  • 0
Posted

Here's an example of an npc, make sure to add them on the proper file (example: Id of npc=50050 , it goes to 50000-50999.xml)

idTemplate="xxx" , In idTemplate put the id of any npc you like ..You may like how grand olympiad manager looks like , so put this ID in there..And then your npc won't look like a bunny.

<npc id="50006" idTemplate="31228" name="Roy the Cat" title="Class Manager">
		<set name="level" val="70"/>
		<set name="radius" val="9"/>
		<set name="height" val="16"/>
		<set name="rHand" val="0"/>
		<set name="lHand" val="0"/>
		<set name="type" val="L2ClassMaster"/>
		<set name="exp" val="0"/>
		<set name="sp" val="10"/>
		<set name="hp" val="2444.46819"/>
		<set name="mp" val="1345.8"/>
		<set name="hpRegen" val="7.5"/>
		<set name="mpRegen" val="2.7"/>
		<set name="pAtk" val="688.86373"/>
		<set name="pDef" val="295.91597"/>
		<set name="mAtk" val="470.40463"/>
		<set name="mDef" val="216.53847"/>
		<set name="crit" val="4"/>
		<set name="atkSpd" val="253"/>
		<set name="str" val="40"/>
		<set name="int" val="21"/>
		<set name="dex" val="30"/>
		<set name="wit" val="20"/>
		<set name="con" val="43"/>
		<set name="men" val="20"/>
		<set name="corpseTime" val="7"/>
		<set name="walkSpd" val="80"/>
		<set name="runSpd" val="120"/>
		<set name="dropHerbGroup" val="0"/>
		<set name="attackRange" val="40"/>
		<ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
		<skills>
			<skill id="4045" level="1"/>
			<skill id="4416" level="7"/>
		</skills>
	</npc>

*Multisell looks fine to me.

 

So your problem is that u get a critical error when ur mouse is over an item , right?

(also check ur pm)

Addin the NPC using "idTemplate="31228"" in the header instead of manually adding it in the client files solved my problems, thank you a lot!

 

I will try with copying the weapons/armors and making them "expirable" tommorow. I will report my findings on this post

  • 0
Posted (edited)

Just take one of the billion L2Merchant and remake the html and the buylist.

 

If you want to create a "new" npc as you already know, c/p html, xml, add buylist or multisell and for client add the new id at npcgrp and npcname

Or as you understood you can use the idTemplate that will use that npc as template.

 

As for your multisell and your customs the ids 9200 till 9208 are already filled up with retail items. Plus the id 5800 etc. belong to dusk/dawn as far as i remember.

 

About the shadow items as i checked at both armorgrp & weapongrp there is a tab 'durabily' next to the icon paths.. As i saw Shadow items (ex. 9035, etc.) got the duration in seconds. Idk further..

 

Edit: There are no further*

Edited by IpotoniC
  • 0
Posted

Thanks for the advice.

The biggest problem i got right now is finding a filledit which will open my weapongrp(it opens the armorgrp). I tried using about 5-6 of them, none of them opens it.

  • 0
Posted

Thanks for the advice.

 

The biggest problem i got right now is finding a filledit which will open my weapongrp(it opens the armorgrp). I tried using about 5-6 of them, none of them opens it.

Here in this post have a good File Editor http://www.maxcheaters.com/topic/160510-tool-pack/ 

  • 0
Posted

Here in this post have a good File Editor http://www.maxcheaters.com/topic/160510-tool-pack/ 

Tried using this one, doesn't work. I also tried editing a different weapongrp(from a different server), i can't open it. Im really out of ideas, the other .dat files open normally

  • 0
Posted

Tried using this one, doesn't work. I also tried editing a different weapongrp(from a different server), i can't open it. Im really out of ideas, the other .dat files open normally

If you can't edit it, maybe its crypted.

  • 0
Posted (edited)

If you can't edit it, maybe its crypted.

Found the right fileedit which opened it without problems.

 

As per the expirable weapons/armors, durability does work, but it makes it a shadow item with a set amound to equips(example:200). Is there any way to make the weapon for a set amount of time in INTERLUDE ?

Like 30 days, which was used on retail servers in more recent chronicles.

Edited by janezt

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.

Guest
Answer this question...

×   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.



×
×
  • Create New...