白猪插件实现玩家自动复活配置

作者 : 酷萌 本文共1789个字,预计阅读时间需要5分钟 发布时间: 2023-02-19 共390人阅读

复活依赖盘古,并在白猪登陆器配置效果即可。先看看客户端配置

客户端配置在 killstyle.json 中:

JSON 

{
“maxKillStyle”: 6,
“timeInterval”: 20,
“offsetx”: 0,
“offsety”: 100,
“killStyle”: {
“kill1”: {
“start”: 1,
“endidx”: 10,
“interval”: 0.1
},
“kill2”: {
“start”: 11,
“endidx”: 20,
“interval”: 0.1
},
“kill3”: {
“start”: 21,
“endidx”: 30,
“interval”: 0.1
},
“kill4”: {
“start”: 31,
“endidx”: 40,
“interval”: 0.1
},
“kill5”: {
“start”: 41,
“endidx”: 50,
“interval”: 0.1
},
“kill6”: {
“start”: 111,
“endidx”: 120,
“interval”: 0.1
}
},
“needSound”: false,
“reliveType”: 2,
“reliveMainText”: “确定花10个灵符复活吗?”,
“reliveSubText”: ” “,
“reliveBTN1”: “原地复活”,
“reliveBTNAct1”: 1,
“reliveBTN2”: “回城复活”,
“reliveBTNAct2”: 2,
“closeRelive” : true,
“reliveuseitem” : “灵符”,
“reliveitemneed” : 10
}

reliveType:复活按钮数量,最大支持2个

reliveMainText:复活窗口主标题

reliveSubText:复活窗口副标题

reliveBTN1:第一个按钮文本

reliveBTNAct1:第一个按钮点击后的通讯编号

reliveBTN2:第二个按钮文本

reliveBTNAct2:第二个按钮点击后的通讯编号

closeRelive:是否关闭复活窗口,true 表示关闭;false 表示开启

reliveuseitem:复活需要使用的货币或物品,支持 :元宝、灵符、金币、任意物品。如果不需要材料或货币复活,这行可以不写或留空

reliveitemneed:每次复活需要的 数量

服务端配置

依赖盘古的函数,SetNoKillMapLv,同时也需要开通盘古功能。根据客户端传送的通讯编号识别并处理。

示例代码:

Fortran 

//2、将下面函数,拷贝到runquest.pas中
//@SetNoKillMapLv,1表示原地复活,2表示回城复活,3表示远程仓库
procedure SetNoKillMapLv(ID:Integer);
begin
case ID of
1:
begin
This_Player.PlayerNotice(‘autorelive’,5);
This_Player.PlayerNotice(‘你已原地复活’,5);
if This_Player.MyLFnum > 10 then
begin
This_Player.DecLF(1000110, false);
This_Player.AutoReLive(This_Player.MapName,This_Player.My_X+random(3)-1,This_Player.My_Y+random(3)-1,true,true);
end else
begin
This_Player.PlayerNotice(‘你的灵符不够’,5);
end;
end;
2:
begin
This_Player.PlayerNotice(‘autorelive’,5);
This_Player.PlayerNotice(‘你已盟重复活’,5);
if This_Player.MyLFnum > 10 then
begin
This_Player.DecLF(1000110, false);
This_Player.AutoReLive(‘3’,330+random(3)-1,330+random(3)-1,true,true);
end else
begin
This_Player.PlayerNotice(‘你的灵符不够’,5);
end;
end;
end;
end;
盘古插件需开通功能:
免责声明
1.本文部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责。
2.若您需要商业运营或用于其他商业活动,请您购买正版授权并合法使用。
3.如果本站有侵犯、不妥之处的资源,请在联系我们将会第一时间解决!
4.本站所有内容均由互联网收集整理、网友上传,仅供大家参考、学习,不存在任何商业目的与商业用途。
5.本站提供的所有资源仅供参考学习使用,版权归原著所有,禁止下载本站资源参与商业和非法行为,请在24小时之内自行删除!
6.侵权联系邮箱:16094777@qq.com


酷萌资源网 » 白猪插件实现玩家自动复活配置