| 赞 | 4 |
| VIP | |
| 好人卡 | |
| 积分 | 10 |
| 经验 | |
| 最后登录 | 2025-10-15 |
| 在线时间 | 319 小时 |
- 梦石
- 0
- 星屑
- 963
- 在线时间
- 319 小时
- 注册时间
- 2011-8-31
- 回帖
- 86

|
发表于 2023-1-16 23:52:49
|
显示全部楼层
一句话脚本就可以了:$dataWeapons[n].wtypeId=数字;
n是物品在数据库ID,wtypeId是装备类型,‘数字’是你自定义更换装备类型ID。
如下:
[pre lang="javascript"]$dataWeapons[4].wtypeId=10
10
$dataWeapons
(301) [null, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, …]
[0 … 99]
0
:
null
1
:
{id: 1, animationId: 6, description: "", etypeId: 1, traits: Array(2), …}
2
:
{id: 2, animationId: 1, description: "无级别", etypeId: 1, traits: Array(2), …}
3
:
{id: 3, animationId: 6, description: "无级别", etypeId: 1, traits: Array(2), …}
4
:
animationId
:
0
description
:
""
etypeId
:
1
iconIndex
:
0
id
:
4
maxItem
:
30
meta
:
{}
name
:
"---10级---"
note
:
""
params
:
(8) [0, 0, 0, 0, 0, 0, 0, 0]
price
:
0
traits
:
(2) [{…}, {…}]
wtypeId
:
10[/pre]
控制台输入后可以看到ID已经给改成10了。
其他道具也一样:
$dataItems[4].itypeId=10//把道具4号的类型ID改成10;
$dataArmors[4].atypeId=10//把护甲4号的类型ID改成10;
这个‘10’任意填,比如你可以把一些道具的ID类型统一改成21,然后遍历ID类型21的放到一起,自己取个名字叫袜子,那么就相当于增加了一个袜子类型……可以无限拓展。
|
|