Page 1 of 2
Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 2:08 am
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>
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 2:22 am
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?
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 3:14 am
by II337
Manapotions are enabled. And in general.properties CustomsSkills are loaded.
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 3:34 am
by UnAfraid
Make sure u are not invul!
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 12:55 pm
by II337
Code: Select all
SkillTable: No skill info found for skill id 10001 and skill level 1.
Thats what the console said.
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 1:10 pm
by Asmodaius
Restart server instead of using reload command.
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 1:20 pm
by II337
Still not working. Just the mana potions are that hard?
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 1:27 pm
by Sdw
Enable custom skills in properties.
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 1:33 pm
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>
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 1:42 pm
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)
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 1:50 pm
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)
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 2:00 pm
by Asmodaius
Post your Server/DP revision
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 2:03 pm
by II337
Server:6622
Data:10421
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 2:37 pm
by Asmodaius
Your xml files seems to be way older than the revision you are mentioning.
Re: Manapotion / Adding NPCs
Posted: Wed Oct 29, 2014 2:56 pm
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>