Manapotion / Adding NPCs

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Manapotion / Adding NPCs

Post by II337 »

My question is how to add NPCs?
Most of the NPC I tried to add (GMShop,GK) require a
execution of sql.files on Navicat. But its always telling its unsucessfully.
I dont understand why. Can someone help me? I tried the YANBuffer too
but Im failing at it maybe I dont understand something basically .

Another Problem is my Mana Potions
are not working. If I click them nothing
happens. They dont dissapear and I dont get any mana.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?><list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/skills.xsd">    <skill id="10000" levels="1" name="Custom Mana Drug">        <set name="itemConsumeId" val="726" />        <set name="itemConsumeCount" val="1" />        <set name="buffDuration" val="15000" />        <set name="isPotion" val="true" />        <set name="magicLvl" val="1" />        <set name="operateType" val="OP_ACTIVE" />        <set name="skillType" val="MPHOT" />        <set name="target" val="TARGET_SELF" />        <cond msgId="113" addName="1">            <player flyMounted="False" />        </cond>        <for>             <effect count="3" name="ManaHealOverTime" time="5" val="10" stackOrder="1.5" stackType="mp_recover" />        </for>    </skill>    <skill id="10001" levels="1" name="Custom Mana Potion">        <set name="itemConsumeId" val="728" />        <set name="itemConsumeCount" val="1" />        <set name="isPotion" val="true" />        <set name="magicLvl" val="1" />        <set name="operateType" val="OP_ACTIVE" />        <set name="power" val="1000" />        <set name="skillType" val="MANAHEAL" />        <set name="target" val="TARGET_SELF" />        <cond msgId="113" addName="1">            <player flyMounted="False" />        </cond>    </skill>    <skill id="10002" levels="1" name="Custom Trap skill">        <!-- Use this skill if you want to handle trap activation in scripts(example Seed of Destruction Spawn Traps) -->        <set name="targetType" val="AURA" />        <set name="isMagic" val="1" /> <!-- Magic Skill -->        <set name="operateType" val="P" />    </skill></list>
dedmoped
Posts: 70
Joined: Thu Jul 01, 2010 5:44 pm
Location: Ukraine

Re: Manapotion / Adding NPCs

Post by dedmoped »

Add new NPC can be in the file - game\data\stats\npcs\custom\custom.xml

Add the line:
    <npc id="66666" displayId="31324" name="GMShop" usingServerSideName="true" title="Manager" usingServerSideTitle="true" type="L2Npc">
        <collision>
            <radius normal="8" />
            <height normal="23" />
        </collision>
    </npc>
This ID will be displayed in the form of NPC textures:
displayId="31324"

-----------------------

file - game\config\L2JMods.properties
# ---------------------------------------------------------------------------
# Mana Drugs/Potions
# ---------------------------------------------------------------------------

# This option will enable core support for:
# Mana Drug (item ID 726), using skill ID 10000.
# Mana Potion (item ID 728), using skill ID 10001.
EnableManaPotionSupport = True

Enabled?
Sorry for my english...
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Manapotion / Adding NPCs

Post by II337 »

Manapotions are enabled. And in general.properties CustomsSkills are loaded.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Manapotion / Adding NPCs

Post by UnAfraid »

Make sure u are not invul!
Image
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Manapotion / Adding NPCs

Post by II337 »

Code: Select all

SkillTable: No skill info found for skill id 10001 and skill level 1. 
Thats what the console said.
User avatar
Asmodaius
Posts: 170
Joined: Sun Jul 16, 2006 9:43 am

Re: Manapotion / Adding NPCs

Post by Asmodaius »

Restart server instead of using reload command.
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Manapotion / Adding NPCs

Post by II337 »

Still not working. Just the mana potions are that hard?
Sdw
L2j Veteran
L2j Veteran
Posts: 855
Joined: Mon May 03, 2010 8:38 am
Location: France

Re: Manapotion / Adding NPCs

Post by Sdw »

Enable custom skills in properties.
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Manapotion / Adding NPCs

Post by II337 »

Code: Select all

# ---------------------------------------------------------------------------# Custom Components# --------------------------------------------------------------------------- # Default: FalseCustomSpawnlistTable = True # Option to save GM spawn only in the custom table.# Default: FalseSaveGmSpawnOnCustom = True # Default: FalseCustomNpcTable = True # Default: FalseCustomNpcSkillsTable = True # Default: FalseCustomTeleportTable = True # Default: FalseCustomDroplistTable = True # Default: FalseCustomMerchantTables = True # Default: FalseCustomNpcBufferTables = True # Default: FalseCustomSkillsLoad = True # Default: FalseCustomItemsLoad = True # Default: FalseCustomMultisellLoad = True

Code: Select all

# ---------------------------------------------------------------------------# Mana Drugs/Potions# --------------------------------------------------------------------------- # This option will enable core support for:# Mana Drug (item ID 726), using skill ID 10000.# Mana Potion (item ID 728), using skill ID 10001.EnableManaPotionSupport = True

Code: Select all

    <skill id="10001" levels="1" name="Custom Mana Potion">        <set name="itemConsumeId" val="728" />        <set name="itemConsumeCount" val="1" />        <set name="isPotion" val="true" />        <set name="magicLvl" val="1" />        <set name="operateType" val="OP_ACTIVE" />        <set name="power" val="1000" />        <set name="skillType" val="MANAHEAL" />        <set name="target" val="TARGET_SELF" />        <cond msgId="113" addName="1">            <player flyMounted="False" />        </cond>    </skill>

Code: Select all

    <item id="728" type="EtcItem" name="Mana Potion">        <set name="icon" val="icon.etc_reagent_blue_i00" />        <set name="default_action" val="skill_reduce" />        <set name="etcitem_type" val="potion" />        <set name="immediate_effect" val="1" />        <set name="material" val="liquid" />        <set name="weight" val="180" />        <set name="price" val="2000" />        <set name="is_stackable" val="true" />        <set name="is_oly_restricted" val="true" />        <set name="handler" val="ManaPotion" />        <set name="item_skill" val="10001-1" />        <set name="for_npc" val="true" />        <cond msgId="113" addName="1">            <player flyMounted="false" />        </cond>    </item>
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Manapotion / Adding NPCs

Post by II337 »

Oh I found the error log :

Code: Select all

[Fatal Error] 10000-10099.xml:37:3: The element type "skill" must be terminatedby the matching end-tag "</skill>".Error loading file C:\L2Server\game\data\stats\skills\custom\10000-10099.xmlorg.xml.sax.SAXParseException; systemId: file:/C:/L2Server/game/data/stats/skills/custom/10000-10099.xml; lineNumber: 37; columnNumber: 3; The element type "skill" must be terminated by the matching end-tag "</skill>".        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)        at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)        at com.l2jserver.gameserver.engines.DocumentBase.parse(DocumentBase.java:151)        at com.l2jserver.gameserver.engines.DocumentEngine.loadSkills(DocumentEngine.java:88)        at com.l2jserver.gameserver.engines.DocumentEngine.loadAllSkills(DocumentEngine.java:97)        at com.l2jserver.gameserver.datatables.SkillTable.load(SkillTable.java:60)        at com.l2jserver.gameserver.datatables.SkillTable.<init>(SkillTable.java:47)        at com.l2jserver.gameserver.datatables.SkillTable$SingletonHolder.<clinit>(SkillTable.java:222)        at com.l2jserver.gameserver.datatables.SkillTable.getInstance(SkillTable.java:217)        at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:216)        at com.l2jserver.gameserver.GameServer.main(GameServer.java:470)
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Manapotion / Adding NPCs

Post by II337 »

I fixed that log above but now there is another Error Showing:

Code: Select all

Error in file C:\L2Server\game\data\stats\skills\custom\10000-10099.xmljava.lang.IllegalArgumentException: Enum value of type com.l2jserver.gameserver.model.skills.L2SkillTyperequired, but found: MPHOT        at com.l2jserver.gameserver.model.StatsSet.getEnum(StatsSet.java:627)        at com.l2jserver.gameserver.engines.skills.DocumentSkill.makeSkills(DocumentSkill.java:892)        at com.l2jserver.gameserver.engines.skills.DocumentSkill.parseSkill(DocumentSkill.java:475)        at com.l2jserver.gameserver.engines.skills.DocumentSkill.parseDocument(DocumentSkill.java:125)        at com.l2jserver.gameserver.engines.DocumentBase.parse(DocumentBase.java:160)        at com.l2jserver.gameserver.engines.DocumentEngine.loadSkills(DocumentEngine.java:88)        at com.l2jserver.gameserver.engines.DocumentEngine.loadAllSkills(DocumentEngine.java:97)        at com.l2jserver.gameserver.datatables.SkillTable.load(SkillTable.java:60)        at com.l2jserver.gameserver.datatables.SkillTable.<init>(SkillTable.java:47)        at com.l2jserver.gameserver.datatables.SkillTable$SingletonHolder.<clinit>(SkillTable.java:222)        at com.l2jserver.gameserver.datatables.SkillTable.getInstance(SkillTable.java:217)        at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:216)        at com.l2jserver.gameserver.GameServer.main(GameServer.java:470)
User avatar
Asmodaius
Posts: 170
Joined: Sun Jul 16, 2006 9:43 am

Re: Manapotion / Adding NPCs

Post by Asmodaius »

Post your Server/DP revision
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Manapotion / Adding NPCs

Post by II337 »

Server:6622
Data:10421
User avatar
Asmodaius
Posts: 170
Joined: Sun Jul 16, 2006 9:43 am

Re: Manapotion / Adding NPCs

Post by Asmodaius »

Your xml files seems to be way older than the revision you are mentioning.
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Manapotion / Adding NPCs

Post by II337 »

FIXED MANA POTIONS


Everything is working now. Is there a way to change the description of the item?
I set the weight to 0 but it displays still 180. For the solution :

Code: Select all

    <skill id="10001" levels="1" name="Mana Potion">        <set name="displayId" val="2288" />        <set name="isMagic" val="2" /> <!-- Static Skill -->        <set name="itemConsumeId" val="728" />        <set name="itemConsumeCount" val="1" />        <set name="magicLvl" val="1" />        <set name="operateType" val="A1" />        <set name="reuseDelay" val="1" />        <set name="targetType" val="SELF" />        <for>            <effect name="ManaHeal" noicon="1" val="1000" />        </for>    </skill>
Last edited by II337 on Wed Oct 29, 2014 8:59 pm, edited 1 time in total.
Post Reply