Compare commits
107 Commits
3150a46c47
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f941751304 | |||
| eb74743826 | |||
| 8171485c95 | |||
| 8e4d5fd69d | |||
| d700be4fe7 | |||
| 1c414a5f8c | |||
| 96ea0c4a4c | |||
| dbcd06b2b2 | |||
| ee500c51be | |||
| 66d96187b2 | |||
|
|
4758f7e90f | ||
| 0923c0d0a7 | |||
| 56bea22ff3 | |||
| e3fdac04bc | |||
| 4b022cde37 | |||
| e6b4ffd952 | |||
| d7bfd860dc | |||
| 3de79cc1fa | |||
| c24eb74bcf | |||
| 3c8e92a7d1 | |||
| 3c926a4f46 | |||
| e4fc710ca2 | |||
| 1a3db7fb28 | |||
| b0591ef625 | |||
| 55c8ae5fb6 | |||
| a79ce8d06f | |||
| 608e016890 | |||
| b534c950b5 | |||
| c21e705ccb | |||
| e86eec51b7 | |||
| 66ab00b3a4 | |||
| 200dc23305 | |||
| de74aaf33a | |||
| 9609ad494d | |||
|
|
c808fa1764 | ||
|
|
0c1a372c03 | ||
|
|
337a8a665b | ||
|
|
403a2f66a3 | ||
|
|
7db9bad826 | ||
|
|
35098f622e | ||
|
|
a08db6e4a1 | ||
|
|
53d3e0b443 | ||
|
|
1754817df3 | ||
|
|
5f2f15e35c | ||
|
|
b68afd74bf | ||
|
|
812bece708 | ||
|
|
ffce1d7753 | ||
|
|
17f3c9c9a3 | ||
|
|
3f69a84c26 | ||
|
|
30d8e8b90b | ||
|
|
dd5dde1ac5 | ||
|
|
af106594d1 | ||
|
|
bc24c9f2b4 | ||
|
|
c4912fd3af | ||
|
|
857ba6ce45 | ||
|
|
73aad793dd | ||
|
|
b6ad89a12c | ||
| a230d62bfc | |||
|
|
6ff25a47b9 | ||
|
|
2f55a178b5 | ||
|
|
cbfbda0fed | ||
|
|
724291ec51 | ||
|
|
88bde2df69 | ||
|
|
89d5a0eeda | ||
| 6bdbf1060f | |||
| 4259057c89 | |||
| b1e7343d12 | |||
| 6b1980a672 | |||
| bf7ecccb73 | |||
| cd6ce2b56e | |||
| 1f6a2235f7 | |||
| 3b2d5a9d3c | |||
| 05039ac8c1 | |||
| a05cf425cf | |||
| f90a2e3512 | |||
|
|
c8e4140f72 | ||
|
|
27deab27c8 | ||
|
|
8e23aec5d1 | ||
|
|
5ceff34ceb | ||
|
|
3a41e99c48 | ||
|
|
ae4eab6ad4 | ||
|
|
e15efa8f24 | ||
|
|
b323431d2e | ||
|
|
8c99b09760 | ||
|
|
e5fe7be76d | ||
|
|
6e9904c8b5 | ||
|
|
b1a35463ee | ||
|
|
36a95e8399 | ||
| 517d4278a4 | |||
| 396ed6514b | |||
| 8b681c190e | |||
| 9ca146644c | |||
| c82602661b | |||
| b04d49e9a3 | |||
| 9ee5ee51bf | |||
| 96d41b0948 | |||
| e7d2ae2eef | |||
| 08e5907ef6 | |||
| bd23c5d63a | |||
| 181fb323c3 | |||
| 004a3ea668 | |||
| d3540e0806 | |||
| b1125e6d8a | |||
| 95abdbcee6 | |||
| c37dba8a2f | |||
| 86eee9ecb5 | |||
| bd6d11cf9d |
@@ -1,10 +1,10 @@
|
||||
const fs = require('fs')
|
||||
const key = "UpstarConfig"
|
||||
const values = [0, 1387, 10, 500, 10000, 5, 0] // 等级,物品ID,属性调整,元宝花费,升级概率
|
||||
const interval = [1, 0, 15, 50, -450, 10, 1]
|
||||
const num = 21
|
||||
const start = () => {
|
||||
const template = `"S1": {
|
||||
module.exports = {
|
||||
key: "UpstarConfig",
|
||||
desc: "等级,物品ID,属性调整,元宝花费,升级概率",
|
||||
values: [0, 1387, 10, 500, 10000, 5, 0],
|
||||
interval: [1, 0, 15, 50, -450, 10, 1],
|
||||
num: 21,
|
||||
template: `"S1": {
|
||||
"consume": [
|
||||
{
|
||||
"id": 4,
|
||||
@@ -51,16 +51,5 @@ const start = () => {
|
||||
}
|
||||
],
|
||||
"rate": S5
|
||||
}`
|
||||
const getStr = (index) => {
|
||||
let str = template
|
||||
values.forEach((v, i) => {
|
||||
const reg = new RegExp(`S${i + 1}`, 'g')
|
||||
str = str.replace(reg, v + index * interval[i])
|
||||
})
|
||||
return str
|
||||
}
|
||||
const content = Array(num).fill(1).map((e, i) => `${getStr(i)}`).join(',')
|
||||
fs.writeFileSync(`./dist/${key}.txt`, content)
|
||||
}
|
||||
start()
|
||||
}`,
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1 +1,6 @@
|
||||
{"1":{"Id":1,"actId":10005,"name":"每日签到"},"2":{"Id":2,"actId":10408,"name":"在线豪礼","view":"app.OnlineRewardsView"},"3":{"Id":3,"actId":10149,"name":"装备首爆","view":"app.OpenServerSportsView"},"4":{"Id":4,"actId":10148,"name":"BOSS首杀","view":"app.OpenServerSportsView"},"5":{"Id":5,"actId":10011,"name":"激活码"}}
|
||||
{
|
||||
"1": { "Id": 1, "actId": 10005, "name": "每日签到" },
|
||||
"3": { "Id": 3, "actId": 10149, "name": "装备首爆", "view": "app.OpenServerSportsView" },
|
||||
"4": { "Id": 4, "actId": 10148, "name": "BOSS首杀", "view": "app.OpenServerSportsView" },
|
||||
"5": { "Id": 5, "actId": 10011, "name": "激活码" }
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1,4 @@
|
||||
{"2":{"staticcounttype":30,"type":2,"cost":200000,"adddonate":20,"addcion":20,"limittimes":5},"3":{"staticcounttype":31,"type":3,"cost":20,"adddonate":88,"addcion":88,"limittimes":5}}
|
||||
{
|
||||
"2": { "staticcounttype": 30, "type": 2, "cost": 200000, "adddonate": 20, "addcion": 20, "limittimes": 50 },
|
||||
"3": { "staticcounttype": 31, "type": 3, "cost": 20, "adddonate": 88, "addcion": 88, "limittimes": 50 }
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -151,7 +151,7 @@
|
||||
"2": {
|
||||
"rebornconds": 0,
|
||||
"index": 2,
|
||||
"Uitype": 2,
|
||||
"Uitype": 1,
|
||||
"id": 3,
|
||||
"levelconds": 1,
|
||||
"dayconds": 1,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1 +1,173 @@
|
||||
{"1":{"idx":1,"name":"免费特权","dailyAward":[],"buyAward":[{"id":474,"type":0,"count":1}],"consume":{"id":2,"type":2,"count":10000}},"2":{"idx":2,"name":"月卡","dailyAward":[{"id":302,"type":0,"count":1},{"id":269,"type":0,"count":1},{"id":261,"type":0,"count":5}],"buyAward":[{"id":249,"type":0,"count":1},{"id":302,"type":0,"count":8}],"consume":{"id":4,"type":4,"count":280}},"3":{"idx":3,"name":"大药月卡","dailyAward":[{"id":311,"type":0,"count":1}],"buyAward":[{"id":3,"type":3,"count":66},{"id":11,"type":11,"count":5}],"consume":{"id":4,"type":4,"count":1000}},"4":{"idx":4,"name":"永久卡","dailyAward":[{"id":7,"type":7,"count":10},{"id":2,"type":2,"count":200000}],"buyAward":[{"id":462,"type":0,"count":1},{"id":468,"type":0,"count":1}],"consume":{"id":4,"type":4,"count":1580}},"5":{"idx":5,"dailyAward":[],"Ybprice":2,"superRightLV":1,"name":"白卡","ViewType":2,"buyAward":[{"id":474,"type":0,"count":1},{"id":261,"type":0,"count":50},{"id":926,"type":0,"count":1},{"id":3,"type":3,"count":18},{"id":1058,"type":0,"count":1},{"id":300,"type":0,"count":2}],"pictures":["tq_p_1_1","tq_p_1_2","tq_p_1_3"],"consume":{"id":1242,"type":0,"count":2}},"6":{"idx":6,"dailyAward":[],"Ybprice":10,"superRightLV":2,"name":"绿卡","ViewType":2,"buyAward":[{"id":475,"type":0,"count":1},{"id":823,"type":0,"count":1},{"id":261,"type":0,"count":100},{"id":367,"type":0,"count":1},{"id":249,"type":0,"count":2},{"id":927,"type":0,"count":1}],"pictures":["tq_p_2_2","tq_p_2_1","tq_p_2_3"],"consume":{"id":1242,"type":0,"count":10}},"7":{"idx":7,"dailyAward":[],"Ybprice":20,"superRightLV":3,"name":"蓝卡","ViewType":2,"buyAward":[{"id":468,"type":0,"count":1},{"id":507,"type":0,"count":1},{"id":853,"type":0,"count":113},{"id":854,"type":0,"count":113},{"id":249,"type":0,"count":2},{"id":928,"type":0,"count":1}],"pictures":["tq_p_4_3","tq_p_3_1","tq_p_3_3"],"consume":{"id":1242,"type":0,"count":20}},"8":{"idx":8,"dailyAward":[],"Ybprice":70,"superRightLV":4,"name":"紫卡","ViewType":2,"buyAward":[{"id":929,"type":0,"count":1},{"id":976,"type":0,"count":1},{"id":852,"type":0,"count":30},{"id":250,"type":0,"count":2},{"id":853,"type":0,"count":450},{"id":854,"type":0,"count":450}],"pictures":["tq_p_4_2","tq_p_4_1","tq_p_3_2"],"consume":{"id":1242,"type":0,"count":70}},"9":{"idx":9,"dailyAward":[],"Ybprice":220,"superRightLV":5,"name":"橙卡","ViewType":2,"heraldid":"tq_btnt14_2","buyAward":[{"id":930,"type":0,"count":1},{"id":824,"type":0,"count":1},{"id":953,"type":0,"count":14},{"id":977,"type":0,"count":1},{"id":300,"type":0,"count":50},{"id":250,"type":0,"count":10}],"pictures":["tq_p_5_2","tq_p_5_1","tq_p_5_3"],"consume":{"id":1242,"type":0,"count":220}},"10":{"idx":10,"name":"首充卡","superRightLV":-1},"11":{"idx":11,"name":"白卡"},"12":{"idx":12,"dailyAward":[],"Ybprice":250,"superRightLV":6,"displaylimit":{"openDay":1,"vip":0},"name":"橙星","ViewType":2,"heraldid":"tq_btnt14_4","buyAward":[{"id":1073,"type":0,"count":1},{"id":1146,"type":0,"count":1},{"id":1066,"type":0,"count":300},{"id":1115,"type":0,"count":1},{"id":970,"type":0,"count":666},{"id":300,"type":0,"count":100}],"pictures":["tq_p_6_2","tq_p_6_1","tq_p_6_3"],"consume":{"id":1242,"type":0,"count":250}},"13":{"idx":13,"dailyAward":[],"Ybprice":350,"superRightLV":7,"displaylimit":{"openDay":1,"vip":0},"name":"橙月","ViewType":2,"heraldid":"tq_btnt14_3","buyAward":[{"id":1273,"type":0,"count":1},{"id":1272,"type":0,"count":1},{"id":1241,"type":0,"count":1},{"id":265,"type":0,"count":1888},{"id":970,"type":0,"count":666},{"id":852,"type":0,"count":158}],"pictures":["tq_p_7_2","tq_p_7_1","tq_p_7_3"],"consume":{"id":1242,"type":0,"count":350}}}
|
||||
{
|
||||
"1": { "idx": 1, "name": "免费特权", "dailyAward": [], "buyAward": [{ "id": 474, "type": 0, "count": 1 }], "consume": { "id": 2, "type": 2, "count": 10000 } },
|
||||
"2": {
|
||||
"idx": 2,
|
||||
"name": "月卡",
|
||||
"dailyAward": [
|
||||
{ "id": 302, "type": 0, "count": 1 },
|
||||
{ "id": 269, "type": 0, "count": 1 },
|
||||
{ "id": 261, "type": 0, "count": 5 }
|
||||
],
|
||||
"buyAward": [
|
||||
{ "id": 249, "type": 0, "count": 1 },
|
||||
{ "id": 302, "type": 0, "count": 8 }
|
||||
],
|
||||
"consume": { "id": 4, "type": 4, "count": 280 }
|
||||
},
|
||||
"3": {
|
||||
"idx": 3,
|
||||
"name": "大药月卡",
|
||||
"dailyAward": [{ "id": 311, "type": 0, "count": 1 }],
|
||||
"buyAward": [
|
||||
{ "id": 3, "type": 3, "count": 66 },
|
||||
{ "id": 11, "type": 11, "count": 5 }
|
||||
],
|
||||
"consume": { "id": 4, "type": 4, "count": 1000 }
|
||||
},
|
||||
"4": {
|
||||
"idx": 4,
|
||||
"name": "永久卡",
|
||||
"dailyAward": [
|
||||
{ "id": 7, "type": 7, "count": 10 },
|
||||
{ "id": 2, "type": 2, "count": 200000 }
|
||||
],
|
||||
"buyAward": [
|
||||
{ "id": 462, "type": 0, "count": 1 },
|
||||
{ "id": 468, "type": 0, "count": 1 }
|
||||
],
|
||||
"consume": { "id": 4, "type": 4, "count": 1580 }
|
||||
},
|
||||
"5": {
|
||||
"idx": 5,
|
||||
"dailyAward": [],
|
||||
"Ybprice": 2,
|
||||
"superRightLV": 1,
|
||||
"name": "白卡",
|
||||
"ViewType": 2,
|
||||
"buyAward": [
|
||||
{ "id": 474, "type": 0, "count": 1 },
|
||||
{ "id": 261, "type": 0, "count": 50 },
|
||||
{ "id": 926, "type": 0, "count": 1 },
|
||||
{ "id": 3, "type": 3, "count": 18 },
|
||||
{ "id": 1058, "type": 0, "count": 1 },
|
||||
{ "id": 300, "type": 0, "count": 2 }
|
||||
],
|
||||
"pictures": ["tq_p_1_1", "tq_p_1_2", "tq_p_1_3"],
|
||||
"consume": { "id": 1242, "type": 0, "count": 2 }
|
||||
},
|
||||
"6": {
|
||||
"idx": 6,
|
||||
"dailyAward": [],
|
||||
"Ybprice": 10,
|
||||
"superRightLV": 2,
|
||||
"name": "绿卡",
|
||||
"ViewType": 2,
|
||||
"buyAward": [
|
||||
{ "id": 475, "type": 0, "count": 1 },
|
||||
{ "id": 823, "type": 0, "count": 1 },
|
||||
{ "id": 261, "type": 0, "count": 100 },
|
||||
{ "id": 367, "type": 0, "count": 1 },
|
||||
{ "id": 249, "type": 0, "count": 2 },
|
||||
{ "id": 927, "type": 0, "count": 1 }
|
||||
],
|
||||
"pictures": ["tq_p_2_2", "tq_p_2_1", "tq_p_2_3"],
|
||||
"consume": { "id": 1242, "type": 0, "count": 10 }
|
||||
},
|
||||
"7": {
|
||||
"idx": 7,
|
||||
"dailyAward": [],
|
||||
"Ybprice": 20,
|
||||
"superRightLV": 3,
|
||||
"name": "蓝卡",
|
||||
"ViewType": 2,
|
||||
"buyAward": [
|
||||
{ "id": 468, "type": 0, "count": 1 },
|
||||
{ "id": 507, "type": 0, "count": 1 },
|
||||
{ "id": 853, "type": 0, "count": 113 },
|
||||
{ "id": 854, "type": 0, "count": 113 },
|
||||
{ "id": 249, "type": 0, "count": 2 },
|
||||
{ "id": 928, "type": 0, "count": 1 }
|
||||
],
|
||||
"pictures": ["tq_p_4_3", "tq_p_3_1", "tq_p_3_3"],
|
||||
"consume": { "id": 1242, "type": 0, "count": 20 }
|
||||
},
|
||||
"8": {
|
||||
"idx": 8,
|
||||
"dailyAward": [],
|
||||
"Ybprice": 70,
|
||||
"superRightLV": 4,
|
||||
"name": "紫卡",
|
||||
"ViewType": 2,
|
||||
"buyAward": [
|
||||
{ "id": 929, "type": 0, "count": 1 },
|
||||
{ "id": 976, "type": 0, "count": 1 },
|
||||
{ "id": 852, "type": 0, "count": 30 },
|
||||
{ "id": 250, "type": 0, "count": 2 },
|
||||
{ "id": 853, "type": 0, "count": 450 },
|
||||
{ "id": 854, "type": 0, "count": 450 }
|
||||
],
|
||||
"pictures": ["tq_p_4_2", "tq_p_4_1", "tq_p_3_2"],
|
||||
"consume": { "id": 1242, "type": 0, "count": 70 }
|
||||
},
|
||||
"9": {
|
||||
"idx": 9,
|
||||
"dailyAward": [],
|
||||
"Ybprice": 220,
|
||||
"superRightLV": 5,
|
||||
"name": "橙卡",
|
||||
"ViewType": 2,
|
||||
"heraldid": "tq_btnt14_2",
|
||||
"buyAward": [
|
||||
{ "id": 930, "type": 0, "count": 1 },
|
||||
{ "id": 824, "type": 0, "count": 1 },
|
||||
{ "id": 953, "type": 0, "count": 14 },
|
||||
{ "id": 977, "type": 0, "count": 1 },
|
||||
{ "id": 300, "type": 0, "count": 50 },
|
||||
{ "id": 250, "type": 0, "count": 10 }
|
||||
],
|
||||
"pictures": ["tq_p_5_2", "tq_p_5_1", "tq_p_5_3"],
|
||||
"consume": { "id": 1242, "type": 0, "count": 220 }
|
||||
},
|
||||
"10": { "idx": 10, "name": "首充卡", "superRightLV": -1 },
|
||||
"11": { "idx": 11, "name": "白卡" },
|
||||
"12": {
|
||||
"idx": 12,
|
||||
"dailyAward": [],
|
||||
"Ybprice": 250,
|
||||
"superRightLV": 6,
|
||||
"displaylimit": { "openDay": 1, "vip": 0 ,"zsLevel":11},
|
||||
"name": "橙星",
|
||||
"ViewType": 2,
|
||||
"heraldid": "tq_btnt14_4",
|
||||
"buyAward": [
|
||||
{ "id": 1073, "type": 0, "count": 1 },
|
||||
{ "id": 1146, "type": 0, "count": 1 },
|
||||
{ "id": 1066, "type": 0, "count": 300 },
|
||||
{ "id": 1115, "type": 0, "count": 1 },
|
||||
{ "id": 970, "type": 0, "count": 666 },
|
||||
{ "id": 300, "type": 0, "count": 100 }
|
||||
],
|
||||
"pictures": ["tq_p_6_2", "tq_p_6_1", "tq_p_6_3"],
|
||||
"consume": { "id": 1242, "type": 0, "count": 250 }
|
||||
},
|
||||
"13": {
|
||||
"idx": 13,
|
||||
"dailyAward": [],
|
||||
"Ybprice": 350,
|
||||
"superRightLV": 7,
|
||||
"displaylimit": { "openDay": 1, "vip": 0,"zsLevel":12},
|
||||
"name": "橙月",
|
||||
"ViewType": 2,
|
||||
"heraldid": "tq_btnt14_3",
|
||||
"buyAward": [
|
||||
{ "id": 1273, "type": 0, "count": 1 },
|
||||
{ "id": 1272, "type": 0, "count": 1 },
|
||||
{ "id": 1241, "type": 0, "count": 1 },
|
||||
{ "id": 265, "type": 0, "count": 1888 },
|
||||
{ "id": 970, "type": 0, "count": 666 },
|
||||
{ "id": 852, "type": 0, "count": 158 }
|
||||
],
|
||||
"pictures": ["tq_p_7_2", "tq_p_7_1", "tq_p_7_3"],
|
||||
"consume": { "id": 1242, "type": 0, "count": 350 }
|
||||
}
|
||||
}
|
||||
|
||||
4571
configs/Npc.json
4571
configs/Npc.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1992,14 +1992,14 @@
|
||||
"nLevel": 0,
|
||||
"Consumelist": [
|
||||
{
|
||||
"count": 2000,
|
||||
"type": 2
|
||||
"count": 20,
|
||||
"type": 4
|
||||
}
|
||||
],
|
||||
"displayLevel": 0,
|
||||
"nSceneId": 143,
|
||||
"zsLevel": 0,
|
||||
"sName": "牛魔寺庙一层(绑金2000)",
|
||||
"sName": "牛魔寺庙一层(20元宝)",
|
||||
"nX": 80,
|
||||
"nY": 66
|
||||
},
|
||||
@@ -2011,14 +2011,14 @@
|
||||
"nLevel": 0,
|
||||
"Consumelist": [
|
||||
{
|
||||
"count": 3000,
|
||||
"type": 2
|
||||
"count": 40,
|
||||
"type": 4
|
||||
}
|
||||
],
|
||||
"displayLevel": 0,
|
||||
"nSceneId": 144,
|
||||
"zsLevel": 0,
|
||||
"sName": "牛魔寺庙二层(绑金3000)",
|
||||
"sName": "牛魔寺庙二层(40元宝)",
|
||||
"nX": 85,
|
||||
"nY": 49
|
||||
},
|
||||
@@ -2030,14 +2030,14 @@
|
||||
"nLevel": 0,
|
||||
"Consumelist": [
|
||||
{
|
||||
"count": 4000,
|
||||
"type": 2
|
||||
"count": 60,
|
||||
"type": 4
|
||||
}
|
||||
],
|
||||
"displayLevel": 0,
|
||||
"nSceneId": 145,
|
||||
"zsLevel": 0,
|
||||
"sName": "牛魔寺庙三层(绑金4000)",
|
||||
"sName": "牛魔寺庙三层(60元宝)",
|
||||
"nX": 128,
|
||||
"nY": 79
|
||||
},
|
||||
@@ -2049,14 +2049,14 @@
|
||||
"nLevel": 0,
|
||||
"Consumelist": [
|
||||
{
|
||||
"count": 5000,
|
||||
"type": 2
|
||||
"count": 80,
|
||||
"type": 4
|
||||
}
|
||||
],
|
||||
"displayLevel": 0,
|
||||
"nSceneId": 146,
|
||||
"zsLevel": 0,
|
||||
"sName": "牛魔寺庙四层(绑金5000)",
|
||||
"sName": "牛魔寺庙四层(80元宝)",
|
||||
"nX": 115,
|
||||
"nY": 48
|
||||
},
|
||||
@@ -2068,14 +2068,14 @@
|
||||
"nLevel": 0,
|
||||
"Consumelist": [
|
||||
{
|
||||
"count": 6000,
|
||||
"type": 2
|
||||
"count": 100,
|
||||
"type": 4
|
||||
}
|
||||
],
|
||||
"displayLevel": 0,
|
||||
"nSceneId": 147,
|
||||
"zsLevel": 0,
|
||||
"sName": "牛魔寺庙五层(绑金6000)",
|
||||
"sName": "牛魔寺庙五层(100元宝)",
|
||||
"nX": 67,
|
||||
"nY": 35
|
||||
},
|
||||
@@ -2087,14 +2087,14 @@
|
||||
"nLevel": 0,
|
||||
"Consumelist": [
|
||||
{
|
||||
"count": 7000,
|
||||
"type": 2
|
||||
"count": 150,
|
||||
"type": 4
|
||||
}
|
||||
],
|
||||
"displayLevel": 0,
|
||||
"nSceneId": 148,
|
||||
"zsLevel": 0,
|
||||
"sName": "牛魔寺庙六层(绑金7000)",
|
||||
"sName": "牛魔寺庙六层(150元宝)",
|
||||
"nX": 103,
|
||||
"nY": 67
|
||||
},
|
||||
|
||||
@@ -758,26 +758,6 @@
|
||||
"icon": "icon_kuangbao",
|
||||
"cls": "app.ViolentStateRuleIcon"
|
||||
},
|
||||
"51": {
|
||||
"view": "app.DonationRankWin",
|
||||
"phoneIcon": "icon_juanxianbang",
|
||||
"id": 51,
|
||||
"layer": 4,
|
||||
"isOpenNeed": {
|
||||
"openDay": 1,
|
||||
"level": 51
|
||||
},
|
||||
"phoneCls": "app.DonationRankRuleIcon",
|
||||
"phoneSort": 3,
|
||||
"sort": 5,
|
||||
"phoneLayer": 2,
|
||||
"isShowNeed": {
|
||||
"openDay": 1,
|
||||
"level": 51
|
||||
},
|
||||
"icon": "icon_juanxianbang",
|
||||
"cls": "app.DonationRankRuleIcon"
|
||||
},
|
||||
"52": {
|
||||
"view": "app.FuLi4366Win",
|
||||
"id": 52,
|
||||
@@ -1238,21 +1218,6 @@
|
||||
"level": 1
|
||||
}
|
||||
},
|
||||
"75": {
|
||||
"view": "app.MultiVersionView",
|
||||
"phoneIcon": "icon_sanduanhutong",
|
||||
"id": 75,
|
||||
"layer": 6,
|
||||
"phoneCls": "app.MultiVersionRuleIcon",
|
||||
"phoneSort": 4,
|
||||
"sort": 10,
|
||||
"pfIDArray": [
|
||||
10001
|
||||
],
|
||||
"phoneLayer": 1,
|
||||
"icon": "icon_sanduanhutong",
|
||||
"cls": "app.MultiVersionRuleIcon"
|
||||
},
|
||||
"76": {
|
||||
"view": "app.ActivityCopiesWin",
|
||||
"id": 76,
|
||||
@@ -1724,26 +1689,7 @@
|
||||
"icon": "icon_bangdingyouli",
|
||||
"cls": "app.PlatformFuliBindingRuleIcon"
|
||||
},
|
||||
"100": {
|
||||
"view": "app.FuliIqiyiQQGroupView",
|
||||
"id": 100,
|
||||
"layer": 6,
|
||||
"isOpenNeed": {
|
||||
"openDay": 1,
|
||||
"level": 1
|
||||
},
|
||||
"phoneCls": "app.FuliIqiyiQQGroupRuleIcon",
|
||||
"sort": 17,
|
||||
"pfIDArray": [
|
||||
10001
|
||||
],
|
||||
"isShowNeed": {
|
||||
"openDay": 1,
|
||||
"level": 1
|
||||
},
|
||||
"icon": "icon_aiqiyiQQqun",
|
||||
"cls": "app.FuliIqiyiQQGroupRuleIcon"
|
||||
},
|
||||
|
||||
"101": {
|
||||
"view": "app.FuliGame2BindingView",
|
||||
"id": 101,
|
||||
|
||||
@@ -604,6 +604,19 @@
|
||||
"title": "材料及药品(绿卡特权)",
|
||||
"VipLV": 2
|
||||
},
|
||||
"401": {
|
||||
"idx": 4,
|
||||
"id": 4,
|
||||
"tips": "一键回收疗伤药,需要绿卡会员",
|
||||
"Titletips": "绿卡会员可开启该道具一键回收",
|
||||
"value": 0,
|
||||
"name": "疗伤药",
|
||||
"showQuality": 0,
|
||||
"optionid": 401,
|
||||
"itemlevel": 32,
|
||||
"title": "材料及药品(绿卡特权)",
|
||||
"VipLV": 2
|
||||
},
|
||||
"5": {
|
||||
"idx": 5,
|
||||
"id": 4,
|
||||
@@ -714,7 +727,7 @@
|
||||
"tips": "一键回收7品证明,需要绿卡会员",
|
||||
"Titletips": "绿卡会员可开启该道具一键回收",
|
||||
"value": 0,
|
||||
"name": "7品证明和四象丹",
|
||||
"name": "7品证明",
|
||||
"showQuality": 2,
|
||||
"optionid": 49,
|
||||
"itemlevel": 91,
|
||||
@@ -785,6 +798,19 @@
|
||||
"itemlevel": 96,
|
||||
"title": "材料及药品(绿卡特权)",
|
||||
"VipLV": 2
|
||||
},
|
||||
"402": {
|
||||
"idx": 19,
|
||||
"id": 4,
|
||||
"tips": "一键回收四象丹,需要绿卡会员",
|
||||
"Titletips": "绿卡会员可开启该道具一键回收",
|
||||
"value": 0,
|
||||
"name": "四象丹",
|
||||
"showQuality": 4,
|
||||
"optionid": 402,
|
||||
"itemlevel": 402,
|
||||
"title": "材料及药品(绿卡特权)",
|
||||
"VipLV": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1 +1,15 @@
|
||||
{"1":{"1":{"Tabshop":1,"name":"功能","title":"商城","dealtype":"兑换银两","shoptype":1,"tabname":"功能","sctype":2},"2":{"Tabshop":2,"name":"成长","title":"商城","dealtype":"兑换银两","shoptype":1,"tabname":"成长","sctype":2},"3":{"Tabshop":3,"name":"补给","title":"商城","dealtype":"兑换银两","shoptype":1,"tabname":"补给","sctype":2},"4":{"Tabshop":4,"name":"材料","title":"商城","dealtype":"兑换银两","shoptype":1,"tabname":"材料","sctype":2},"5":{"Tabshop":5,"name":"时装","title":"商城","dealtype":"兑换银两","shoptype":1,"tabname":"时装","sctype":2},"6":{"Tabshop":6,"name":"打宝","title":"商城","dealtype":"兑换银两","shoptype":1,"tabname":"打宝","sctype":2},"7":{"Tabshop":7,"name":"圣物","title":"商城","dealtype":"兑换银两","shoptype":1,"tabname":"圣物","sctype":2}},"2":{"1":{"Tabshop":1,"name":"行会商店","dealtype":"","shoptype":2,"tabname":"行会商店","sctype":0}},"3":{"1":{"Tabshop":1,"name":"杂货","title":"小贩","dealtype":"兑换绑金","shoptype":3,"tabname":"杂货","sctype":1}},"4":{"1":{"Tabshop":1,"name":"杂货","title":"杂货铺","dealtype":"兑换绑金","shoptype":4,"tabname":"杂货","sctype":1}},"6":{"1":{"Tabshop":1,"name":"战令","dealtype":"","shoptype":6,"tabname":"战令","sctype":0}}}
|
||||
{
|
||||
"1": {
|
||||
"1": { "Tabshop": 1, "name": "功能", "title": "商城", "dealtype": "兑换银两", "shoptype": 1, "tabname": "功能", "sctype": 2 },
|
||||
"2": { "Tabshop": 2, "name": "成长", "title": "商城", "dealtype": "兑换银两", "shoptype": 1, "tabname": "成长", "sctype": 2 },
|
||||
"3": { "Tabshop": 3, "name": "补给", "title": "商城", "dealtype": "兑换银两", "shoptype": 1, "tabname": "补给", "sctype": 2 },
|
||||
"4": { "Tabshop": 4, "name": "材料", "title": "商城", "dealtype": "兑换银两", "shoptype": 1, "tabname": "材料", "sctype": 2 },
|
||||
"5": { "Tabshop": 5, "name": "时装", "title": "商城", "dealtype": "兑换银两", "shoptype": 1, "tabname": "时装", "sctype": 2 },
|
||||
"6": { "Tabshop": 6, "name": "打宝", "title": "商城", "dealtype": "兑换银两", "shoptype": 1, "tabname": "打宝", "sctype": 2 },
|
||||
"7": { "Tabshop": 7, "name": "圣物", "title": "商城", "dealtype": "兑换银两", "shoptype": 1, "tabname": "圣物", "sctype": 2 }
|
||||
},
|
||||
"2": { "1": { "Tabshop": 1, "name": "行会商店", "dealtype": "", "shoptype": 2, "tabname": "行会商店", "sctype": 0 } },
|
||||
"3": { "1": { "Tabshop": 1, "name": "杂货", "title": "小贩", "dealtype": "兑换绑金", "shoptype": 3, "tabname": "杂货", "sctype": 1 } },
|
||||
"4": { "1": { "Tabshop": 1, "name": "杂货", "title": "杂货铺", "dealtype": "兑换绑金", "shoptype": 4, "tabname": "杂货", "sctype": 1 } },
|
||||
"6": { "1": { "Tabshop": 1, "name": "战令", "dealtype": "", "shoptype": 6, "tabname": "战令", "sctype": 0 } }
|
||||
}
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
{"1":{"actID":1,"actIDArr":[7],"btnName":"送宝"},"2":{"actID":2,"actIDArr":[7],"btnName":"领取夺宝战宝箱"},"3":{"actID":3,"actIDArr":[8],"btnName":"送宝"},"4":{"actID":4,"actIDArr":[8],"btnName":"领取夺宝战宝箱"},"5":{"actID":5,"actIDArr":[12],"btnName":"领取独闯天涯礼包"},"6":{"actID":6,"actIDArr":[12],"btnName":"领取神速礼包"}}
|
||||
{
|
||||
"1": { "actID": 1, "actIDArr": [7], "btnName": "送宝" },
|
||||
"2": { "actID": 2, "actIDArr": [7], "btnName": "领取夺宝战宝箱" },
|
||||
"3": { "actID": 3, "actIDArr": [8], "btnName": "送宝" },
|
||||
"4": { "actID": 4, "actIDArr": [8], "btnName": "领取夺宝战宝箱" },
|
||||
"5": { "actID": 5, "actIDArr": [12], "btnName": "领取独闯天涯礼包" },
|
||||
"6": { "actID": 6, "actIDArr": [12], "btnName": "领取神速礼包" },
|
||||
"7": { "actID": 7, "actIDArr": [1818], "btnName": "拜年红包" }
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
218938
configs/UpstarConfig.json
218938
configs/UpstarConfig.json
File diff suppressed because it is too large
Load Diff
@@ -1 +1,5 @@
|
||||
{"852":{"id":2,"itemid":852,"price":50},"954":{"id":1,"itemid":954,"price":10}}
|
||||
{
|
||||
"852": { "id": 2, "itemid": 852, "price": 50 },
|
||||
"954": { "id": 1, "itemid": 954, "price": 10 },
|
||||
"845": { "id": 1, "itemid": 845, "price": 1000 }
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ const zip = require("./zip.js")
|
||||
const start = () => {
|
||||
zip.start().then(() => {
|
||||
const tar = new JSZip();
|
||||
['config.xml', 'api.php', 'linuxdo.php','login.php'].forEach(e => {
|
||||
['config.xml', 'api.php', 'linuxdo.php','login.php','gameEui.json'].forEach(e => {
|
||||
const file = fs.readFileSync(e)
|
||||
tar.file(e, file);
|
||||
})
|
||||
|
||||
BIN
excels/SpecialRingConfig.xlsx
Normal file
BIN
excels/SpecialRingConfig.xlsx
Normal file
Binary file not shown.
BIN
excels/StdItems.xlsx
Normal file
BIN
excels/StdItems.xlsx
Normal file
Binary file not shown.
24880
gameEui.json
Normal file
24880
gameEui.json
Normal file
File diff suppressed because it is too large
Load Diff
19
login.php
19
login.php
@@ -6,7 +6,7 @@
|
||||
* @wx 123456
|
||||
* @qq 123456
|
||||
-->
|
||||
<?php
|
||||
<?php
|
||||
|
||||
include 'config.php';
|
||||
|
||||
@@ -98,10 +98,14 @@ $stmt->store_result();
|
||||
我已阅读并同意 <a href="javascript:void(0);" id="agree_btn">用户协议及隐私协议<a/>
|
||||
</div>
|
||||
<a href="javascript:process_login();" id="submitButton" class="button fit">登 录</a>
|
||||
<div style="display:flex;justify-content:center" id="linuxdoConnect">
|
||||
<div style="display:flex;align-items:center;flex-direction:column;gap:4px;cursor:pointer">
|
||||
<div style="display:flex;justify-content:center;gap:8px;font-size:12px" >
|
||||
<div style="display:flex;align-items:center;flex-direction:column;gap:4px;cursor:pointer" id="linuxdoConnect">
|
||||
<img src="static/img/linuxdo_logo.png" style="width:60px;height:60px" alt="Linux.Do登录"/>
|
||||
<div>Linux.do登录</div>
|
||||
<div>Linux.do</div>
|
||||
</div>
|
||||
<div style="display:flex;align-items:center;flex-direction:column;gap:4px;cursor:pointer" id="naixiConnect">
|
||||
<img src="https://forum.naixi.net/favicon.ico" style="width:60px;height:60px" alt="奶昔登录"/>
|
||||
<div>奶昔登录</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="forget_password">
|
||||
@@ -127,8 +131,13 @@ $stmt->store_result();
|
||||
switchBtn = $('#switchBtn');
|
||||
const linuxdoConnect = $("#linuxdoConnect")
|
||||
linuxdoConnect.click(()=>{
|
||||
location.href="https://connect.linux.do/oauth2/authorize?response_type=code&client_id=tfKevot5lSwB5A5gcqPQMMhaXDLjib0P"
|
||||
location.href="https://connect.linux.do/oauth2/authorize?response_type=code&client_id=fqAFU2cQVWtM3CiSLWZEzHb1nFw6evlY"
|
||||
})
|
||||
const naixiConnect = $("#naixiConnect")
|
||||
naixiConnect.click(()=>{
|
||||
location.href="https://auth.naixi.net/login/oauth/authorize?client_id=6c597d1551b868dce9fe&redirect_uri=http://cq.eb.cx/naixi_callback&response_type=code&scope=profile&state=STATE"
|
||||
})
|
||||
|
||||
var isPhone = isMobile(),
|
||||
agent_id = getQueryString('agent_id'),
|
||||
codeOpen = <?=$_CONFIG['code_open']?>,
|
||||
|
||||
178589
main.min_jocw9Tu2.js
178589
main.min_jocw9Tu2.js
File diff suppressed because it is too large
Load Diff
183
naixi_callback.php
Normal file
183
naixi_callback.php
Normal file
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
|
||||
// 奶昔论坛三方登录
|
||||
$_LINUXDO_CONNECT = [
|
||||
'base'=>'https://auth.naixi.net',
|
||||
'client_id' => '6c597d1551b868dce9fe',
|
||||
'client_secret' => '065b759106ce704cb49082b9ebc790266f4e7105'
|
||||
];
|
||||
// cURL 函数
|
||||
function get_curl($url, $post = 0, $referer = 0, $cookie = 0, $header = 0, $ua = 0, $nobaody = 0, $addheader = 0)
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
$httpheader[] = "Accept: */*";
|
||||
$httpheader[] = "Accept-Encoding: gzip,deflate,sdch";
|
||||
$httpheader[] = "Accept-Language: zh-CN,zh;q=0.8";
|
||||
$httpheader[] = "Connection: close";
|
||||
if ($header) {
|
||||
$httpheader = array_merge($httpheader, $header);
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
|
||||
if ($post) {
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
|
||||
}
|
||||
if ($header) {
|
||||
curl_setopt($ch, CURLOPT_HEADER, false);
|
||||
}
|
||||
if ($cookie) {
|
||||
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
|
||||
}
|
||||
if ($referer) {
|
||||
if ($referer == 1) {
|
||||
curl_setopt($ch, CURLOPT_REFERER, '');
|
||||
} else {
|
||||
curl_setopt($ch, CURLOPT_REFERER, $referer);
|
||||
}
|
||||
}
|
||||
if ($ua) {
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
|
||||
} else {
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36");
|
||||
}
|
||||
if ($nobaody) {
|
||||
curl_setopt($ch, CURLOPT_NOBODY, 1);
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
$ret = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$code = $_GET['code'];
|
||||
$header = [];
|
||||
$post = http_build_query([
|
||||
'grant_type' => 'authorization_code',
|
||||
'code' => $code,
|
||||
"client_id"=> $_LINUXDO_CONNECT["client_id"],
|
||||
"client_secret"=> $_LINUXDO_CONNECT["client_secret"],
|
||||
]);
|
||||
|
||||
$getTokenRes = get_curl($_LINUXDO_CONNECT["base"].'/api/login/oauth/access_token', $post, 0, 0, $header);
|
||||
|
||||
$getTokenArr = json_decode($getTokenRes, true);
|
||||
|
||||
if (isset($getTokenArr['access_token'])) {
|
||||
$access_token = $getTokenArr['access_token'];
|
||||
|
||||
$header = [
|
||||
'Authorization: Bearer ' . $access_token
|
||||
];
|
||||
|
||||
$getUserRes = get_curl($_LINUXDO_CONNECT["base"].'/api/userinfo', 0, 0, 0, $header);
|
||||
$getUserArr = json_decode($getUserRes, true);
|
||||
} else {
|
||||
$err = json_encode($getTokenArr);
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta name="applicable-device" content="mobile">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
|
||||
<meta name="full-screen" content="yes" />
|
||||
<meta name="x5-fullscreen" content="true" />
|
||||
<meta name="360-fullscreen" content="true" />
|
||||
|
||||
<meta name="screen-orientation" content="portrait">
|
||||
<meta name="x5-orientation" content="portrait">
|
||||
<meta name="x5-page-mode" content="app">
|
||||
|
||||
<title><?= $_CONFIG['game_name'] ?> <?= $_CONFIG['game_description'] ?></title>
|
||||
<meta name="description" content="<?= $_CONFIG['game_name'] ?> <?= $_CONFIG['game_description'] ?>">
|
||||
<meta name="keywords" content="<?= $_CONFIG['game_name'] ?>,<?= $_CONFIG['game_description'] ?>">
|
||||
|
||||
<link rel="stylesheet" href="static/css/login.css?v=1.1.6" />
|
||||
<script>
|
||||
const initPasswd = "H0CE3sheqe8sp"
|
||||
function request(url, params) {
|
||||
return fetch(url, params).then(res => res.json())
|
||||
}
|
||||
function handleBind(account, linuxdo_account) {
|
||||
return request("/api?act=bind&account=" + account + "&connect_id=" + linuxdo_account+"&type=naixi").then(res => {
|
||||
if (res.password) {
|
||||
alert("绑定成功,请点击确定开始游戏!")
|
||||
location.href = "/play?account=" + account + "&token=" + res.password;
|
||||
}
|
||||
})
|
||||
}
|
||||
function processLogin(params = {}, connect_id) {
|
||||
const formData = new FormData();
|
||||
formData.append("serverId", "1");
|
||||
Object.entries(params).forEach(([key, value]) => formData.append(key, value));
|
||||
request("/api?act=reg", { method: "POST", body: formData }).then(res => {
|
||||
if (res.code == '0') {
|
||||
handleBind(params.account, connect_id)
|
||||
} else {
|
||||
console.error(res)
|
||||
document.body.innerHTML = "授权失败"
|
||||
return
|
||||
}
|
||||
}).catch(err=>console.error(err))
|
||||
}
|
||||
|
||||
function registerDirect() {
|
||||
const linuxdo_account = document.getElementById("linuxdo").value;
|
||||
processLogin({ type: "1", account: linuxdo_account, password: initPasswd, password2: initPasswd }, linuxdo_account)
|
||||
}
|
||||
function linkAccount() {
|
||||
const account = document.getElementById("account").value;
|
||||
const password = document.getElementById("password").value;
|
||||
const linuxdo_account = document.getElementById("linuxdo").value;
|
||||
processLogin({ type: "0", account, password, }, linuxdo_account)
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<input type="hidden" id="linuxdo" value="<?= $getUserArr['email'] ?>">
|
||||
<?php if (!empty($getUserArr['email'])) { ?>
|
||||
<script>
|
||||
const connectId = document.getElementById('linuxdo').value
|
||||
request("/api?act=link&connect_id=" + connectId, { method: "POST" }).then(res => {
|
||||
if (res.code == '0') {
|
||||
location.href = "/play?account=" + res.data.username + "&token=" + res.data.password;
|
||||
} else {
|
||||
document.getElementById("bindBox").style.display = "block"
|
||||
const linkAccountBtn = document.getElementById("linkAccount");
|
||||
linkAccountBtn.addEventListener("click", linkAccount)
|
||||
const registerDirectBtn = document.getElementById("registerDirect");
|
||||
registerDirectBtn.addEventListener("click", registerDirect)
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
<div id="bindBox"
|
||||
style="width:400px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;justify-content:center;align-items:center;flex-direction:column;display:none;">
|
||||
<!-- <div>当前尚未有你的游戏账号,请选择</div><br> -->
|
||||
<button id="registerDirect" onclick="registerDirect" style="cursor:pointer;font-weight:bold">奶昔论坛账号登录</a><br>
|
||||
<!-- <div>如果已有账号,请输入账号和密码</div><br>
|
||||
<input type="text" id="account" placeholder="请输入账号" onKeyUp="value = value.replace(/[\W]/g, '')"
|
||||
autocomplete="off" disableautocomplete><br>
|
||||
<input type="password" id="password" placeholder="请输入密码"><br>
|
||||
<button id="linkAccount">绑定并登录</button> -->
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($err)) { ?>
|
||||
授权发生异常:<?= $err ?>
|
||||
<?php } ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"jszip": "^3.10.1"
|
||||
"jszip": "^3.10.1",
|
||||
"lua-json": "^1.0.1",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build.js",
|
||||
|
||||
146
tools/batchSetting.js
Normal file
146
tools/batchSetting.js
Normal file
@@ -0,0 +1,146 @@
|
||||
const fs = require("fs");
|
||||
const ringType = 6;
|
||||
const YBvoucher = {
|
||||
'380': '100',
|
||||
'388': '200',
|
||||
'389': '500',
|
||||
'390': '1000',
|
||||
'391': '2000',
|
||||
'392': '5000',
|
||||
'393': '10000',
|
||||
'394': '1',
|
||||
'395': '5',
|
||||
'396': '10',
|
||||
'397': '15',
|
||||
'398': '30',
|
||||
'399': '50',
|
||||
'400': '80'
|
||||
}
|
||||
const tpls = {
|
||||
SpecialRing: {
|
||||
key: "SpecialRing",
|
||||
desc: "戒指种类,登记,伤害加倍,元宝花费",
|
||||
values: [ringType, 51, 10, 10],
|
||||
interval: [0, 1, 10, 10],
|
||||
num: 150,
|
||||
template: {
|
||||
4: `"S2": {
|
||||
"attr": [
|
||||
{ "value": S3, "type": 75 },
|
||||
{ "value": 428, "type": 76 },
|
||||
{ "value": 536, "type": 77 },
|
||||
{ "value": 55, "type": 21 },
|
||||
{ "value": 55, "type": 23 },
|
||||
{ "value": 55, "type": 25 },
|
||||
{ "value": 55, "type": 27 },
|
||||
{ "value": 5000, "type": 83 }
|
||||
],
|
||||
"lv": S2,
|
||||
"cost": [
|
||||
{ "id": 4, "type": 4, "count": S4 },
|
||||
{ "id": 1018, "type": 0, "count": 1000 }
|
||||
],
|
||||
"pos": S1
|
||||
}`,
|
||||
5: `"S2": {
|
||||
"attr": [
|
||||
{ "value": S3, "type": 75 },
|
||||
{ "value": 585, "type": 76 },
|
||||
{ "value": 1115, "type": 77 },
|
||||
{ "value": 70, "type": 21 },
|
||||
{ "value": 70, "type": 23 },
|
||||
{ "value": 70, "type": 25 },
|
||||
{ "value": 70, "type": 27 },
|
||||
{ "value": 3400, "type": 79 }
|
||||
],
|
||||
"lv": S2,
|
||||
"cost": [
|
||||
{ "id": 1022, "type": 0, "count": 1600 },
|
||||
{ "id": 4, "type": 4, "count": S4 }
|
||||
],
|
||||
"pos": S1
|
||||
}`,
|
||||
6: `"S2": {
|
||||
"attr": [
|
||||
{ "value": 1000, "type": 5 },
|
||||
{ "value": 100, "type": 76 },
|
||||
{ "value": 100, "type": 77 },
|
||||
{ "value": 2500, "type": 64 },
|
||||
{ "value": S3, "type": 75 }
|
||||
],
|
||||
"lv": S2,
|
||||
"cost": [
|
||||
{ "id": 1037, "type": 0, "count": 180 },
|
||||
{ "id": 4, "type": 4, "count": S4 }
|
||||
],
|
||||
"pos": S1
|
||||
}`,
|
||||
}[ringType],
|
||||
},
|
||||
ItemMergeConfig: {
|
||||
key: "ItemMergeConfig",
|
||||
desc: "ID1,ID2,代金券ID,元宝数",
|
||||
values: [7201, 7202,Object.keys(YBvoucher),Object.values(YBvoucher)],
|
||||
interval: [2, 2],
|
||||
num: Object.keys(YBvoucher).length,
|
||||
template: `
|
||||
"S1": {
|
||||
"circle": 0,
|
||||
"compose": { "id": 4, "type": 4, "count": S40 },
|
||||
"index": 7,
|
||||
"buttontxt10": "合成10次",
|
||||
"mergebutton10": 1,
|
||||
"text": "兑换",
|
||||
"clicklimit": 1,
|
||||
"Eid": S1,
|
||||
"second_index": 1,
|
||||
"table": [{ "id": S3, "type": 0, "count": 1 }],
|
||||
"openserverday": 1,
|
||||
"level": 1
|
||||
},
|
||||
"S2": {
|
||||
"circle": 0,
|
||||
"compose": { "id": 4, "type": 4, "count": S4000 },
|
||||
"index": 7,
|
||||
"buttontxt10": "合成10次",
|
||||
"mergebutton10": 1,
|
||||
"text": "兑换",
|
||||
"clicklimit": 1,
|
||||
"Eid": S2,
|
||||
"second_index": 1,
|
||||
"table": [{ "id": S3, "type": 0, "count": 100 }],
|
||||
"openserverday": 1,
|
||||
"level": 1
|
||||
}
|
||||
`,
|
||||
},
|
||||
};
|
||||
|
||||
const scope = [
|
||||
// "UpstarConfig",
|
||||
"ItemMergeConfig",
|
||||
].filter(Boolean);
|
||||
const start = () => {
|
||||
const configs = scope.map((key) => {
|
||||
return tpls[key];
|
||||
});
|
||||
configs.forEach((file) => {
|
||||
const { key, values, interval, num, template } = file;
|
||||
const getStr = (index) => {
|
||||
let str = template;
|
||||
values.forEach((v, i) => {
|
||||
const reg = new RegExp(`S${i + 1}`, "g");
|
||||
if (Array.isArray(v)) {
|
||||
str = str.replace(reg, v[index]);
|
||||
} else str = str.replace(reg, v + index * interval[i]);
|
||||
});
|
||||
return str;
|
||||
};
|
||||
const content = Array(num)
|
||||
.fill(1)
|
||||
.map((e, i) => `${getStr(i)}`)
|
||||
.join(",");
|
||||
fs.writeFileSync(`./dist/${key}.txt`, content);
|
||||
});
|
||||
};
|
||||
start();
|
||||
54
tools/json2excel.js
Normal file
54
tools/json2excel.js
Normal file
@@ -0,0 +1,54 @@
|
||||
const XLSX = require("xlsx");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { json } = require("stream/consumers");
|
||||
const { log } = require("console");
|
||||
const folderPath = "./configs";
|
||||
const scope = [
|
||||
// "SpecialRingConfig",
|
||||
"StdItems",
|
||||
// "Monster",
|
||||
// "ItemMergeConfig",
|
||||
// "MergeConfig",
|
||||
// "NpcTransConf"
|
||||
// "MergeTotal", "RecyclingSettingConfig", "UpstarConfig",
|
||||
].filter(Boolean);
|
||||
|
||||
function handleJson2ArrayJson(jsonData) {
|
||||
const arr = [];
|
||||
const findElement = (obj) => {
|
||||
for (const key in obj) {
|
||||
if (isNaN(key) && Object.hasOwnProperty.call(obj, key)) {
|
||||
if(typeof obj[key] === "object")
|
||||
obj[key] = JSON.stringify(obj[key]);
|
||||
} else if (typeof obj[key] === "object") {
|
||||
findElement(obj[key]);
|
||||
}
|
||||
}
|
||||
arr.push(obj);
|
||||
};
|
||||
findElement(jsonData);
|
||||
return arr;
|
||||
}
|
||||
function json2excel(jsonData, fileName) {
|
||||
if (!Array.isArray(jsonData)) jsonData = Object.values(jsonData);
|
||||
const data = handleJson2ArrayJson(jsonData)?.filter(Boolean);
|
||||
|
||||
const workbook = XLSX.utils.book_new();
|
||||
const worksheet = XLSX.utils.json_to_sheet(data);
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, fileName);
|
||||
XLSX.writeFile(workbook, `./excels/${fileName}.xlsx`);
|
||||
}
|
||||
|
||||
const start = () => {
|
||||
const files = fs.readdirSync(folderPath);
|
||||
|
||||
// 过滤出所有的 JSON 文件
|
||||
const jsonFiles = files.filter((file) => path.extname(file) === ".json").filter((file) => scope.map((e) => `${e}.json`).includes(file));
|
||||
jsonFiles.forEach((file) => {
|
||||
const json = JSON.parse(fs.readFileSync(path.join(folderPath, file), "utf8"));
|
||||
const filename = path.basename(file, path.extname(file));
|
||||
json2excel(json, filename);
|
||||
});
|
||||
};
|
||||
start();
|
||||
@@ -3,9 +3,20 @@ const fs = require("fs");
|
||||
const path = require("path");
|
||||
const folderPath = "./configs";
|
||||
const scope = [
|
||||
"StdItems", "Monster"
|
||||
// "ItemMergeConfig", "MergeConfig", "MergeTotal", "RecyclingSettingConfig", "UpstarConfig",
|
||||
];
|
||||
"StdItems",
|
||||
"Monster",
|
||||
"ItemMergeConfig",
|
||||
"MergeConfig",
|
||||
"SpecialRingConfig",
|
||||
"RecyclingSettingConfig",
|
||||
"ActivitiesConf",
|
||||
"UpstarPriceConfig",
|
||||
"UpstarConfig",
|
||||
// "GuildDonateConfig",
|
||||
"ShopConfig",
|
||||
// "NpcTransConf"
|
||||
// "MergeTotal", "RecyclingSettingConfig", "UpstarConfig",
|
||||
].filter(Boolean);
|
||||
const strKey = (key) => (isNaN(key) ? `${key}` : `[${key}]`);
|
||||
function jsonToLua(jsonObj, indent = "", linefeed = "\n") {
|
||||
let luaStr = "";
|
||||
|
||||
@@ -1,107 +1,38 @@
|
||||
const { log } = require('console');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const folderPath = "../luaConfigs"
|
||||
const { log } = require("console");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { parse } = require("lua-json");
|
||||
const folderPath = "./luaConfigs";
|
||||
|
||||
function parseLuaConfig(luaContent) {
|
||||
const config = {};
|
||||
const lines = luaContent.split('\n');
|
||||
let currentPath = config;
|
||||
|
||||
lines.forEach(line => {
|
||||
line = line.trim();
|
||||
if (line.startsWith('--')) return; // 跳过注释行
|
||||
|
||||
// 匹配键值对
|
||||
const keyMatch = line.match(/^\s*(\w+)\s*=\s*(.+?),?$/);
|
||||
if (keyMatch) {
|
||||
const key = keyMatch[1].trim();
|
||||
const value = keyMatch[2].trim();
|
||||
|
||||
// 尝试解析值
|
||||
let parsedValue;
|
||||
if (value === 'true' || value === 'false') {
|
||||
parsedValue = value === 'true';
|
||||
} else if (!isNaN(parseFloat(value))) {
|
||||
parsedValue = parseFloat(value);
|
||||
} else if (value.startsWith('"') && value.endsWith('"')) {
|
||||
parsedValue = value.slice(1, -1);
|
||||
} else if (value.startsWith('{') && value.endsWith('}')) {
|
||||
parsedValue = parseLuaTable(value);
|
||||
} else {
|
||||
parsedValue = value;
|
||||
}
|
||||
|
||||
// 处理嵌套对象
|
||||
const keys = key.split('.');
|
||||
keys.reduce((acc, k, i) => {
|
||||
if (i === keys.length - 1) {
|
||||
acc[k] = parsedValue;
|
||||
} else {
|
||||
acc[k] = acc[k] || {};
|
||||
return acc[k];
|
||||
}
|
||||
}, currentPath);
|
||||
}
|
||||
|
||||
// 匹配表(数组或对象)
|
||||
const tableMatch = line.match(/^\s*(\w+)\s*=\s*{(.+?)},?$/);
|
||||
if (tableMatch) {
|
||||
const key = tableMatch[1].trim();
|
||||
const tableContent = tableMatch[2].trim();
|
||||
const parsedTable = parseLuaTable(tableContent);
|
||||
|
||||
// 处理嵌套对象
|
||||
const keys = key.split('.');
|
||||
keys.reduce((acc, k, i) => {
|
||||
if (i === keys.length - 1) {
|
||||
acc[k] = parsedTable;
|
||||
} else {
|
||||
acc[k] = acc[k] || {};
|
||||
return acc[k];
|
||||
}
|
||||
}, currentPath);
|
||||
}
|
||||
});
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
// 解析Lua表(数组或对象)
|
||||
function parseLuaTable(tableContent) {
|
||||
const table = [];
|
||||
const lines = tableContent.split(',').map(line => line.trim());
|
||||
|
||||
lines.forEach(line => {
|
||||
if (line.startsWith('{')) {
|
||||
const nestedTableContent = line.slice(1, -1).trim();
|
||||
table.push(parseLuaTable(nestedTableContent));
|
||||
} else if (line.startsWith('"') && line.endsWith('"')) {
|
||||
table.push(line.slice(1, -1));
|
||||
} else if (!isNaN(parseFloat(line))) {
|
||||
table.push(parseFloat(line));
|
||||
} else if (line === 'true' || line === 'false') {
|
||||
table.push(line === 'true');
|
||||
} else {
|
||||
table.push(line);
|
||||
}
|
||||
});
|
||||
|
||||
return table;
|
||||
}
|
||||
const scope = ["Monster"]
|
||||
const scope = [
|
||||
// "MergeTotal",
|
||||
// "ActivitiesConf",
|
||||
"ShopConfig"
|
||||
].filter(Boolean);
|
||||
|
||||
const start = () => {
|
||||
const files = fs.readdirSync(folderPath);
|
||||
const files = fs.readdirSync(folderPath);
|
||||
|
||||
// 过滤出所有的 JSON 文件
|
||||
const luaFiles = files.filter(file => path.extname(file) === '.config').filter(file => scope.map(e => `${e}.config`).includes(file));
|
||||
luaFiles.forEach(file => {
|
||||
const luaContent = fs.readFileSync(path.join(folderPath, file), 'utf8')
|
||||
const filename = path.basename(file, path.extname(file));
|
||||
const luaConfig = parseLuaConfig(luaContent);
|
||||
log(luaConfig)
|
||||
fs.writeFileSync(`../configs/${filename}.json`, luaConfig);
|
||||
});
|
||||
}
|
||||
start()
|
||||
// 过滤出所有的 JSON 文件
|
||||
const luaFiles = files.filter((file) => path.extname(file) === ".config").filter((file) => scope.map((e) => `${e}.config`).includes(file));
|
||||
luaFiles.forEach((file) => {
|
||||
const luaContent = fs.readFileSync(path.join(folderPath, file), "utf8");
|
||||
const filename = path.basename(file, path.extname(file));
|
||||
const content = luaContent.replace(filename, "").slice(1);
|
||||
const luaConfig = parse(`return ${content}`);
|
||||
for (const key in luaConfig) {
|
||||
const item = luaConfig[key];
|
||||
const arr = [];
|
||||
Object.entries(item).forEach(([k, v]) => {
|
||||
if (!isNaN(k) && typeof v === "object") {
|
||||
arr.push(v);
|
||||
}
|
||||
});
|
||||
if (arr.length > 0) {
|
||||
luaConfig[key] = arr;
|
||||
}
|
||||
}
|
||||
fs.writeFileSync(`./configs/${filename}.json`, JSON.stringify(luaConfig, "utf-8"));
|
||||
});
|
||||
};
|
||||
start();
|
||||
|
||||
Reference in New Issue
Block a user