论坛调整完毕,全面开放注册,无需认证。

用东西兑换的系统

回复
头像
hagcse
Mr.GL
Mr.GL
帖子: 151
注册时间: 2018-02-25 15:50

用东西兑换的系统

帖子 hagcse » 2018-03-10 15:59

第一步:
打开 \l2j\gameserver\data\multisell
新建一个文件名为 003.xml
写入

<?xml version='1.0' encoding='utf-8'?>

<!-- S级英雄重装兑换 NPC ID=12260 -->

<list>

<!-- SoE to Talking Island -->
<item id="1">
<ingredient id="5906" count="1" enchant="0"/>
<ingredient id="5906" count="1" enchant="0"/>
<ingredient id="5907" count="1" enchant="0"/>
<ingredient id="5907" count="1" enchant="0"/>
<ingredient id="3881" count="1" enchant="0"/>
<ingredient id="3882" count="1" enchant="0"/>
<ingredient id="3883" count="1" enchant="0"/>
<ingredient id="3875" count="1" enchant="0"/>
<ingredient id="3877" count="2" enchant="0"/>
<ingredient id="3879" count="1" enchant="0"/>
<ingredient id="3888" count="1" enchant="0"/>
<production id="6373" count="1" enchant="0"/>
</item>

<!-- SoE to Elven Village -->
<item id="2">
<ingredient id="5906" count="1" enchant="0"/>
<ingredient id="5906" count="1" enchant="0"/>
<ingredient id="5907" count="1" enchant="0"/>
<ingredient id="5907" count="1" enchant="0"/>
<ingredient id="3881" count="1" enchant="0"/>
<ingredient id="3882" count="1" enchant="0"/>
<ingredient id="3883" count="1" enchant="0"/>
<ingredient id="3875" count="1" enchant="0"/>
<ingredient id="3877" count="2" enchant="0"/>
<ingredient id="3879" count="1" enchant="0"/>
<ingredient id="3888" count="1" enchant="0"/>
<production id="6374" count="1" enchant="0"/>
</item>

</list>

在打开 \l2j\gameserver\data\html\default
找到 12260.htm 打开
在<br>
<a action="bypass -h npc_%objectId%_Quest"><font color="LEVEL">任务</font></a><br>
前面加入一行
<a action="bypass -h npc_%objectId%_multisell 003"><font color="LEVEL">兑换S英雄装备(重套)</font></a><br>

这里说明下!!
npc_%objectId%_multisell 003
003就是你建的那个文件名,如果你建的那个文件名叫做111.xml 那么那里的003就要改成111
就变成了
npc_%objectId%_multisell 111

然后保存!注意,要保存为utf-8的格式,然后去试下,去找活动管理员会出现一个兑换S英雄装备(重套)的选项,在点会出现熟悉的用物品兑换东西的界面了!!

文件的说明::

xml文件是商店道具的脚本,
<item id="1">
这个表示道具的序号,不是你要换的东西的ID!!
<ingredient id="5906" count="1" enchant="0"/>
ingredient id="5906" 换这个东西需要的道具的ID (这里我的是红色搜魂石11阶段)
count="2" 需要的个数
enchant="0" 精练等级
<production id="6373" count="1" enchant="0"/>
production id="6373" 你要换的东西的ID
count="1" 换得的个数
enchant="0" 精练等级

这里是增加的!

<ingredient id="5906" count="1" enchant="0"/>
这个注意了,如果你需要的这个东西是叠加的话那么count="1"可以为count="2"或更多,如果该物品不是叠加的话(比如武器)那么这里的count="1"必须为1,那么如果要两个一样的呢?怎么办,那只能在开一行.比如
<ingredient id="5906" count="1" enchant="0"/>
需要一个红+11的石头
<ingredient id="5906" count="1" enchant="0"/>
在需要一个红+11的石头.

那大家又要问了,如何知道这个东西是叠加的还是不叠加的那??
这里我们可以这样,到选数据库l2jdb,在选etcitem,查看物品的consume_type字段,如果是stackable那么就是叠加的,反之就是不是叠加的!!
图片

回复