MOBIUS版怎樣修改或添加傳送/
如題阿..SOS 建立一個自訂傳送xml文件放在 data\teleporters\others\中
1.)
這個是自訂NPC ID <npc id="900107">
也可以多個 NPC 例如
<npc id="801">
<npcs>
<npc id="801" />
<npc id="802" />
</npcs>
2.)
<teleport type="NORMAL">
我們可以選擇"OTHER"802-1001 是傳點類型編號
<teleport name="802-1001" type="OTHER">
3.)下面有4個傳送點,尢上至下為 0,1,2,3
<teleport name="802-1001" type="OTHER">
<location x="-109252" y="237384" z="-2918" /> <!-- 8-18 埃薩吉拉遺蹟地0-->
<location x="-82399" y="244119" z="-3733" /> <!-- 10-20 風之森林1-->
<location x="-88186" y="81241" z="-2675" /> <!-- 20-29 風之丘陵 2-->
<location x="-75437" y="168800" z="-3627" /> <!-- 20-24 風車的山坡 3-->
</teleport>
以上是自訂傳送點的寫法
傳送NPC對話的連接寫法
action="bypass -h npc_%objectId%_teleport 802-1001 0"<--這是第1個傳點
action="bypass -h npc_%objectId%_teleport 802-1001 1"<--這是第2個傳點 我只是打开了一个mobius的服务端压缩包,没有运行
传送仍然是在game\data\teleporters\ 这里,不过格式变了 l2fater 发表于 2019-7-28 21:19
我只是打开了一个mobius的服务端压缩包,没有运行
传送仍然是在game\data\teleporters\ 这里,不过格 ...
現在我是用一個NPC + 一份傳送文件
但是這樣不太美觀....
能夠像以前L2JTW的年代,NPC一個按鈕就能傳送另一個位置嗎?
目前是這樣
<td align=center>
<button action="bypass -h npc_%objectId%_showTeleports" value="TEST傳送" width=200 height=31 back="BranchSys3.icon2.ArmyTrainingBtn_down" fore="BranchSys3.icon2.ArmyTrainingBtn">
</td>
之後該NPC會跳到
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/teleporterData.xsd">
<npc id="900107"> <!-- Plie -->
<teleport type="NORMAL">
<location npcStringId="1010560" x="29298" y="74968" z="-3777" feeCount="100" /> <!-- 精靈的地底要塞(Lv. 10) -->
</teleport>
</npc>
</list>
這一頁才選擇地方..
bctey 发表于 2019-7-29 14:05
建立一個自訂傳送xml文件
放在 data\teleporters\others\中
謝謝
不過錯誤發生了
Exception processing bypass from player 魔王史奈曼: npc_268481015_teleport 900107-1 1
java.lang.IndexOutOfBoundsException: Index 1 out-of-bounds for length 1
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
at java.base/java.util.Objects.checkIndex(Unknown Source)
at java.base/java.util.ArrayList.get(Unknown Source)
at org.l2jmobius.gameserver.model.teleporter.TeleportHolder.getLocation(TeleportHolder.java:106)
at org.l2jmobius.gameserver.model.teleporter.TeleportHolder.doTeleport(TeleportHolder.java:201)
at org.l2jmobius.gameserver.model.actor.instance.TeleporterInstance.onBypassFeedback(TeleporterInstance.java:135)
at org.l2jmobius.gameserver.network.clientpackets.RequestBypassToServer.run(RequestBypassToServer.java:166)
at org.l2jmobius.gameserver.network.clientpackets.RequestBypassToServer.run(RequestBypassToServer.java:52)
at org.l2jmobius.gameserver.network.GameClient.channelRead0(GameClient.java:136)
at org.l2jmobius.gameserver.network.GameClient.channelRead0(GameClient.java:63)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:546)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Unknown Source)
附上我的xml寫法
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/teleporterData.xsd">
<npc id="900107"> <!-- 希依露 -->
<teleport name="9001071" type="OTHER">
<location x="-44031" y="45819" z="-8847" feeCount="100" /> <!-- 軍團指揮所 - 1 -->
<location x="-44031" y="45819" z="-8847" feeCount="100" /> <!-- 軍團指揮所 - 2 -->
</teleport>
</npc>
</list>
<td align=center>
<button action="bypass -h npc_%objectId%_teleport 9001071 1" value="TEST傳送" width=200 height=31 back="BranchSys3.icon2.ArmyTrainingBtn_down" fore="BranchSys3.icon2.ArmyTrainingBtn">
</td> 哈哈哈 我不會看出錯信息
如果格式都對還會出錯
有一個可能是"NPC類型" 對話html必須放在相對應的文件夾中
注意:Mobius端和其他端"NPC類型" 的格式不一樣
我在附上完整的xml
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/teleporterData.xsd">
<npc id="801">
<npcs>
<npc id="801" />
<npc id="802" />
</npcs>
<!-- 「新人練級傳點」 LV.1-40 802-1001.htm -->
<teleport name="802-1001" type="OTHER">
<location x="-109252" y="237384" z="-2918" /> <!-- 8-18 埃薩吉拉遺蹟地0-->
<location x="-82399" y="244119" z="-3733" /> <!-- 10-20 風之森林1-->
<location x="-88186" y="81241" z="-2675" /> <!-- 20-29 風之丘陵 2-->
<location x="-75437" y="168800" z="-3627" /> <!-- 20-24 風車的山坡 3-->
<location x="-41167" y="122789" z="-2909" /> <!-- 25-29 悲哀廢墟 4-->
<location x="-53000" y="191672" z="-3563" /> <!-- 27-33 遺忘神殿 5-->
<location x="-9965" y="176174" z="-4144" /> <!-- 29-38 螞蟻洞窟 6-->
<location x="-19353" y="136842" z="-3754" /> <!-- 30-34 絕望廢墟 7-->
<location x="-89776" y="105344" z="-3576" /> <!-- 30-39土瑞克獸人兵營 8-->
<location x="-16526" y="208032" z="-3659" /> <!-- 35-40荒原 9-->
</teleport>
</npc>
</list>
------------------------------------------------------
對話html("NPC類型"為 Teleporter ,對話html 須放在 html\teleporter 文件夾中)
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 0" msg="811;埃薩吉拉遺蹟地">埃薩吉拉遺蹟地 (Lv.8-18)</Button>
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 1" msg="811;風之森林">風之森林 (Lv.10-20)</Button>
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 2" msg="811;風之丘陵">風之丘陵 (Lv.20-29)</Button>
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 3" msg="811;風車的山坡">風車的山坡 (Lv.20-24)</Button>
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 4" msg="811;悲哀廢墟">悲哀廢墟 (Lv.25-29)</Button>
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 5" msg="811;遺忘神殿">遺忘神殿 (Lv.27-33)</Button>
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 6" msg="811;螞蟻洞窟">螞蟻洞窟 (Lv.29-38)</Button>
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 7" msg="811;絕望廢墟">絕望廢墟 (Lv.30-34)</Button>
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 8" msg="811;土瑞克獸人兵營">土瑞克獸人兵營 (Lv.30-39)</Button>
<button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport 802-1001 9" msg="811;荒原">荒原 (Lv.35-40)</Button>
成功了 感激B大
原來我XML放錯FILE引致無法成功 QQ
页:
[1]