本WIKI编辑权限开放,欢迎收藏起来防止迷路,也希望有爱的小伙伴和我们一起编辑哟~
有兴趣想参与WIKI建设的玩家可以加入交流群。赛尔计划WIKI交流群1:818743827
编辑帮助:目录 • BWIKI反馈留言板
本WIKI编辑权限开放,欢迎收藏起来防止迷路,也希望有爱的小伙伴和我们一起编辑哟~ 有兴趣想参与WIKI建设的玩家可以加入交流群。赛尔计划WIKI交流群1:818743827
Widget:技能创建工具
<style>
input { background: #353535; color: #ffffff;
}
}
select {
background: #353535;
}
textarea { background: #353535;
}
.suc-img {
background: url(https://patchwiki.biligame.com/images/seerwar/1/17/2a4sow9u5paeyebvie3wvqnj11a0ago.png); background-size: 301px; height: 299px; width: 309px; display: inline-block; text-align: center;
} .suc-title {
text-align: center; font-size: 25px;
} .jnk-button-add {
min-height: 32px; min-width: 4em; max-width: 32.75em; margin: 0; padding: 5px 12px; background-color: #447ff5; color: #ffffff; border-color: #447ff5; width: 80px; font-weight: bold; cursor: default; margin-top: 5px; margin-bottom: 5px; margin-left: 5px; margin-right: 5px;
} .jnk-button-save {
min-height: 32px; min-width: 4em; max-width: 32.75em; margin: 0; padding: 5px 12px; background-color: #447ff5; color: #ffffff; border-color: #447ff5; width: 4px; font-weight: bold; cursor: default; margin-top: 5px; margin-bottom: 5px; margin-left: 5px; margin-right: 5px;
} .jnk-logon {
min-height: 32px; min-width: 4em; max-width: 32.75em; margin: 0; padding: 5px 12px; background-color: #447ff5; color: #ffffff; border-color: #447ff5; width: 55px; font-weight: bold; cursor: default; margin-top: 5px; margin-bottom: 5px; margin-left: 5px; margin-right: 5px;
} .jnk-button-add:hover {
background-color: #2a4b8d; border-color: #2a4b8d; box-shadow: none;
} .jnk-button-save:hover {
background-color: #2a4b8d; border-color: #2a4b8d; box-shadow: none;
} .jnk-logon:hover {
background-color: #2a4b8d; border-color: #2a4b8d; box-shadow: none;
} </style> <script> (window.RLQ = window.RLQ || []).push(['jquery', () => {
$(document).ready(function () { var u = (document.cookie.match(/DedeUserID=([^;]+)/) || [])[1] || ""; var dz = mw.config.values.wgGameName; /*var jn1 = `` var jn2 = `` var jn3 = ``*/ var rolename = mw.config.values.wgPageName var ssjs = ``
$.getJSON(`https://wiki.biligame.com/seerplan/api.php?action=ask&format=json&query=[[分类:${rolename}]]&utf8=1`, function (result) { window.getjjson = result if (typeof window.getjjson === 'object' && window.getjjson !== null && typeof window.getjjson.query === 'object' && window.getjjson.query !== null && Array.isArray(window.getjjson.query.results) && window.getjjson.query.results.length === 0) { // 当 window.getjjson.query.results 是空数组时,执行以下操作
document.querySelector('.skill-1').innerHTML = `
`;
} // 当 window.getjjson.query.results 包含数据时,不执行任何操作或显示其他内容
}) $.getJSON(`https://wiki.biligame.com/seerplan/api.php?action=ask&format=json&query=[[分类:${rolename}]]&utf8=1`, function (result) { window.getjjson = result if (typeof window.getjjson === 'object' && window.getjjson !== null && typeof window.getjjson.query === 'object' && window.getjjson.query !== null && Array.isArray(window.getjjson.query.results) && window.getjjson.query.results.length === 0) { // 当 window.getjjson.query.results 是空数组时,执行以下操作
document.querySelector('.skill-2').innerHTML = `
`;
} // 当 window.getjjson.query.results 包含数据时,不执行任何操作或显示其他内容
}) $.getJSON(`https://wiki.biligame.com/seerplan/api.php?action=ask&format=json&query=[[分类:${rolename}]]&utf8=1`, function (result) { window.getjjson = result if (typeof window.getjjson === 'object' && window.getjjson !== null && typeof window.getjjson.query === 'object' && window.getjjson.query !== null && Array.isArray(window.getjjson.query.results) && window.getjjson.query.results.length === 0) { // 当 window.getjjson.query.results 是空数组时,执行以下操作
document.querySelector('.skill-3').innerHTML = `
`;
} // 当 window.getjjson.query.results 包含数据时,不执行任何操作或显示其他内容
})
$('.skill-1').on('click', '.jnk-button-add', function (event) { if (u === ``) {
document.querySelector('.skill-1').innerHTML = `
`
} else {
document.querySelector('.skill-1').innerHTML = `
技能图标(请保存后上传) | 属性:<select id="属性" tabindex="6" name="属性" class="createboxInput pfShowIfSelected"> <option value=""></option>
<option value="草">草</option><option value="水">水</option><option value="火">火</option><option value="电">电</option><option value="冰">冰</option><option value="超能">超能</option><option value="飞行">飞行</option><option value="普通">普通</option><option value="机械">机械</option><option value="战斗">战斗</option><option value="暗影">暗影</option><option value="光">光</option><option value="地面">地面</option><option value="龙">龙</option><option value="神秘">神秘</option><option value="次元">次元</option><option value="圣灵">圣灵</option><option value="远古">远古</option><option value="邪灵">邪灵</option><option value="自然">自然</option></select> |
技能名称:<input id="技能名称" tabindex="2" class="createboxInput" size="18" name="技能名称"> | ||||
---|---|---|---|---|---|---|
PP: | <input type="number" id="PP" name="PP" min="0" max="10"> | 威力: | <input type="number" id="威力" name="quantity" min="0" max="999"> | |||
标签(请用“、”分隔属性): | <input id="标签" tabindex="2" class="createboxInput" size="35" name="标签"> | |||||
技能效果(满级): | <textarea tabindex="9" name="技能效果" id="技能效果" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
技能等级效果[编辑 | 编辑源代码]
<tbody> </tbody>技能最高等级 | <input type="number" id="quantity" name="等级" min="1" max="5"> |
---|---|
LV2 | <textarea tabindex="9" name="等级2" id="等级2" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV3 | <textarea tabindex="9" name="等级3" id="等级3" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV4 | <textarea tabindex="9" name="等级4" id="等级4" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV5 | <textarea tabindex="9" name="等级5" id="等级5" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV6 | <textarea tabindex="9" name="等级6" id="等级6" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
`
} });
$('.skill-2').on('click', '.jnk-button-add', function (event) { if (u === ``) {
document.querySelector('.skill-2').innerHTML = `
`
} else {
document.querySelector('.skill-2').innerHTML = `
技能图标(请保存后上传) | 属性:<select id="属性" tabindex="6" name="属性" class="createboxInput pfShowIfSelected"> <option value=""></option>
<option value="草">草</option><option value="水">水</option><option value="火">火</option><option value="电">电</option><option value="冰">冰</option><option value="超能">超能</option><option value="飞行">飞行</option><option value="普通">普通</option><option value="机械">机械</option><option value="战斗">战斗</option><option value="暗影">暗影</option><option value="光">光</option><option value="地面">地面</option><option value="龙">龙</option><option value="神秘">神秘</option><option value="次元">次元</option><option value="圣灵">圣灵</option><option value="远古">远古</option><option value="邪灵">邪灵</option><option value="自然">自然</option></select> |
技能名称:<input id="技能名称" tabindex="2" class="createboxInput" size="18" name="技能名称"> | ||||
---|---|---|---|---|---|---|
PP: | <input type="number" id="PP" name="PP" min="0" max="10"> | 威力: | <input type="number" id="威力" name="quantity" min="0" max="999"> | |||
标签(请用“、”分隔属性): | <input id="标签" tabindex="2" class="createboxInput" size="35" name="标签"> | |||||
技能效果(满级): | <textarea tabindex="9" name="技能效果" id="技能效果" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
技能等级效果[编辑 | 编辑源代码]
<tbody> </tbody>技能最高等级 | <input type="number" id="quantity" name="等级" min="1" max="5"> |
---|---|
LV2 | <textarea tabindex="9" name="等级2" id="等级2" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV3 | <textarea tabindex="9" name="等级3" id="等级3" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV4 | <textarea tabindex="9" name="等级4" id="等级4" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV5 | <textarea tabindex="9" name="等级5" id="等级5" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV6 | <textarea tabindex="9" name="等级6" id="等级6" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
`
} }); $('.skill-3').on('click', '.jnk-button-add', function (event) { if (u === ``) {
document.querySelector('.skill-3').innerHTML = `
`
} else {
document.querySelector('.skill-3').innerHTML = `
技能图标(请保存后上传) | 属性:<select id="属性" tabindex="6" name="属性" class="createboxInput pfShowIfSelected"> <option value=""></option>
<option value="草">草</option><option value="水">水</option><option value="火">火</option><option value="电">电</option><option value="冰">冰</option><option value="超能">超能</option><option value="飞行">飞行</option><option value="普通">普通</option><option value="机械">机械</option><option value="战斗">战斗</option><option value="暗影">暗影</option><option value="光">光</option><option value="地面">地面</option><option value="龙">龙</option><option value="神秘">神秘</option><option value="次元">次元</option><option value="圣灵">圣灵</option><option value="远古">远古</option><option value="邪灵">邪灵</option><option value="自然">自然</option></select> |
技能名称:<input id="技能名称" tabindex="2" class="createboxInput" size="18" name="技能名称"> | ||||
---|---|---|---|---|---|---|
PP: | <input type="number" id="PP" name="PP" min="0" max="10"> | 威力: | <input type="number" id="威力" name="quantity" min="0" max="999"> | |||
标签(请用“、”分隔属性): | <input id="标签" tabindex="2" class="createboxInput" size="35" name="标签"> | |||||
技能效果(满级): | <textarea tabindex="9" name="技能效果" id="技能效果" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
技能等级效果[编辑 | 编辑源代码]
<tbody> </tbody>技能最高等级 | <input type="number" id="quantity" name="等级" min="1" max="5"> |
---|---|
LV2 | <textarea tabindex="9" name="等级2" id="等级2" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV3 | <textarea tabindex="9" name="等级3" id="等级3" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV4 | <textarea tabindex="9" name="等级4" id="等级4" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV5 | <textarea tabindex="9" name="等级5" id="等级5" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
LV6 | <textarea tabindex="9" name="等级6" id="等级6" class="createboxInput" rows="5" cols="90" style="width: 100%"></textarea> |
`
} }); $('.skill-1').on('click', '.jnk-button-save', function (event) { var jnmc = $('.skill-1 input#技能名称').val() var sx = $('.skill-1 select#属性').val() var PP = $('.skill-1 input#PP').val() var wl = $('.skill-1 input#威力').val() var dj = $('.skill-1 input#quantity').val() var bq = $('.skill-1 input#标签').val() var jnxg = $('.skill-1 textarea#技能效果').val() var lv2 = $('.skill-1 textarea#等级2').val() var lv3 = $('.skill-1 textarea#等级3').val() var lv4 = $('.skill-1 textarea#等级4').val() var lv5 = $('.skill-1 textarea#等级5').val() var lv6 = $('.skill-1 textarea#等级6').val() getApi(`https://wiki.biligame.com/${dz}/api.php?action=query&meta=tokens&format=json`, function (json) { let token = JSON.parse(json).query.tokens.csrftoken xhr = new XMLHttpRequest() xhr.open(`post`, `https://wiki.biligame.com/${dz}/api.php`, true) let fd = new FormData() fd.append("action", "edit") fd.append("title", `${jnmc}`) fd.append("text", `模板:技能\n`) fd.append("token", token) fd.append("format", "json") xhr.onload = function () { console.log(xhr.response) } xhr.send(fd) })
document.querySelector('.skill-1').innerHTML = `
`
}); $('.skill-2').on('click', '.jnk-button-save', function (event) { var jnmc = $('.skill-2 input#技能名称').val() var sx = $('.skill-2 select#属性').val() var PP = $('.skill-2 input#PP').val() var wl = $('.skill-2 input#威力').val() var dj = $('.skill-2 input#quantity').val() var bq = $('.skill-2 input#标签').val() var jnxg = $('.skill-2 textarea#技能效果').val() var lv2 = $('.skill-2 textarea#等级2').val() var lv3 = $('.skill-2 textarea#等级3').val() var lv4 = $('.skill-2 textarea#等级4').val() var lv5 = $('.skill-2 textarea#等级5').val() var lv6 = $('.skill-2 textarea#等级6').val() getApi(`https://wiki.biligame.com/${dz}/api.php?action=query&meta=tokens&format=json`, function (json) { let token = JSON.parse(json).query.tokens.csrftoken xhr = new XMLHttpRequest() xhr.open(`post`, `https://wiki.biligame.com/${dz}/api.php`, true) let fd = new FormData() fd.append("action", "edit") fd.append("title", `${jnmc}`) fd.append("text", `模板:技能\n`) fd.append("token", token) fd.append("format", "json") xhr.onload = function () { console.log(xhr.response) } xhr.send(fd) })
document.querySelector('.skill-2').innerHTML = `
`
}); $('.skill-3').on('click', '.jnk-button-save', function (event) { var jnmc = $('.skill-3 input#技能名称').val() var sx = $('.skill-3 select#属性').val() var PP = $('.skill-3 input#PP').val() var wl = $('.skill-3 input#威力').val() var dj = $('.skill-3 input#quantity').val() var bq = $('.skill-3 input#标签').val() var jnxg = $('.skill-3 textarea#技能效果').val() var lv2 = $('.skill-3 textarea#等级2').val() var lv3 = $('.skill-3 textarea#等级3').val() var lv4 = $('.skill-3 textarea#等级4').val() var lv5 = $('.skill-3 textarea#等级5').val() var lv6 = $('.skill-3 textarea#等级6').val() getApi(`https://wiki.biligame.com/${dz}/api.php?action=query&meta=tokens&format=json`, function (json) { let token = JSON.parse(json).query.tokens.csrftoken xhr = new XMLHttpRequest() xhr.open(`post`, `https://wiki.biligame.com/${dz}/api.php`, true) let fd = new FormData() fd.append("action", "edit") fd.append("title", `${jnmc}`) fd.append("text", `模板:技能\n`) fd.append("token", token) fd.append("format", "json") xhr.onload = function () { console.log(xhr.response) } xhr.send(fd) })
document.querySelector('.skill-3').innerHTML = `
`
});
$('.skill-1').on('click', '.jnk-button-autoskil1', function (event){
// 获取.skillDetails的文本内容 var content = $('.skill-1 #skillDetails').text().trim();
// 使用正则表达式查找LV.2及其后面的内容 var regex2 = /LV\.2\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex3 = /LV\.3\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex4 = /LV\.4\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex5 = /LV\.5\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex6 = /LV\.6\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex2 = /Lv\.2\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var regex3 = /Lv\.3\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var regex4 = /Lv\.4\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var regex5 = /Lv\.5\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var regex6 = /Lv\.6\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var match2 = content.match(regex2); var match3 = content.match(regex3); var match4 = content.match(regex4); var match5 = content.match(regex5); var match6 = content.match(regex6);
// 如果有匹配项,则提取并填充到textarea中 if (match2 && match2[1]) { // 去除匹配到的LV.2和可能的前导空格 var cleanedContent2 = match2[1].trim(); var cleanedContent3 = match3[1].trim(); var cleanedContent4 = match4[1].trim(); var cleanedContent5 = match5[1].trim(); var cleanedContent6 = match6[1].trim();
// 填充到textarea中 $('.skill-1 #等级2').val(cleanedContent2); $('.skill-1 #等级3').val(cleanedContent3); $('.skill-1 #等级4').val(cleanedContent4); $('.skill-1 #等级5').val(cleanedContent5); $('.skill-1 #等级6').val(cleanedContent6); } else { // 如果没有找到匹配项,清空textarea
}
}); $('.skill-2').on('click', '.jnk-button-autoskil1', function (event){
// 获取.skillDetails的文本内容 var content = $('.skill-2 #skillDetails').text().trim();
// 使用正则表达式查找LV.2及其后面的内容 var regex2 = /LV\.2\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex3 = /LV\.3\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex4 = /LV\.4\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex5 = /LV\.5\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex6 = /LV\.6\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var match2 = content.match(regex2); var match3 = content.match(regex3); var match4 = content.match(regex4); var match5 = content.match(regex5); var match6 = content.match(regex6);
// 如果有匹配项,则提取并填充到textarea中 if (match2 && match2[1]) { // 去除匹配到的LV.2和可能的前导空格 var cleanedContent2 = match2[1].trim(); var cleanedContent3 = match3[1].trim(); var cleanedContent4 = match4[1].trim(); var cleanedContent5 = match5[1].trim(); var cleanedContent6 = match6[1].trim();
// 填充到textarea中 $('.skill-2 #等级2').val(cleanedContent2); $('.skill-2 #等级3').val(cleanedContent3); $('.skill-2 #等级4').val(cleanedContent4); $('.skill-2 #等级5').val(cleanedContent5); $('.skill-2 #等级6').val(cleanedContent6); } else { // 如果没有找到匹配项,清空textarea }
}); $('.skill-3').on('click', '.jnk-button-autoskil1', function (event){
// 获取.skillDetails的文本内容 var content = $('.skill-3 #skillDetails').text().trim();
// 使用正则表达式查找LV.2及其后面的内容 var regex2 = /LV\.2\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex3 = /LV\.3\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex4 = /LV\.4\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex5 = /LV\.5\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex6 = /LV\.6\s*([\s\S]*?)(?=\s*LV\.|\s*$)/; var regex2 = /Lv\.2\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var regex3 = /Lv\.3\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var regex4 = /Lv\.4\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var regex5 = /Lv\.5\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var regex6 = /Lv\.6\s*([\s\S]*?)(?=\s*Lv\.|\s*$)/; var match2 = content.match(regex2); var match3 = content.match(regex3); var match4 = content.match(regex4); var match5 = content.match(regex5); var match6 = content.match(regex6);
// 如果有匹配项,则提取并填充到textarea中 if (match2 && match2[1]) { // 去除匹配到的LV.2和可能的前导空格 var cleanedContent2 = match2[1].trim(); var cleanedContent3 = match3[1].trim(); var cleanedContent4 = match4[1].trim(); var cleanedContent5 = match5[1].trim(); var cleanedContent6 = match6[1].trim();
// 填充到textarea中 $('.skill-3 #等级2').val(cleanedContent2); $('.skill-3 #等级3').val(cleanedContent3); $('.skill-3 #等级4').val(cleanedContent4); $('.skill-3 #等级5').val(cleanedContent5); $('.skill-3 #等级6').val(cleanedContent6); } else { // 如果没有找到匹配项,清空textarea }
});
})
}]);
</script>
<script>
function getApi(url, callback = false, callbackE = false) {
let ajax = new XMLHttpRequest() if (!callback) { ajax.open("GET", url, true) ajax.send() let json = JSON.parse(ajax.responseText) return json } ajax.open("GET", url) ajax.send() ajax.onreadystatechange = function () { if (ajax.readyState == 4) { if (ajax.status == 200) { callback(ajax.responseText) } else if (ajax.status == 404 && callbackE) { callbackE(true) } } }
} function postFdApi(url, fd, isParse = true) {
let ajax = new XMLHttpRequest() ajax.open("POST", url, true) ajax.send(fd) if (!isParse) { return ajax.responseText } let json = JSON.parse(ajax.responseText) return json
} </script>