sm

立即登录 | 账号注册

积分: 0 |用户组: 游客

搜索

战神引擎套装属性设置taoZhuangAbilToFact.pas

已有 720 次阅读2023-3-24 15:05 |个人分类:战神引擎| 战神引擎

以下文件复制添加到以下文件

D:\mud2.0\Mir200\Envir\CommonScripts\helperCall 内 如无文件夹自行建立

这是默认目录 如果用是一些启动器 那文件目录会有所差异 只能自己寻找 了



//审查数据
function checkTaozhuang(itemName : string):boolean;
Var i : integer;
begin
result := false
//遍历装备槽位
for i:=0 to 30 do
begin
if this_player.GetItemNameOnBody(i) = itemName then
begin
result := true;
break
end;
end

end;

//激活套装
procedure tzActivation(sid : string; idx : integer);
begin
//idx 保存了套装的序号 如有需要时使用
//记录套装ID 防止重复激活
this_player.setS(117, idx, 200);
case sid of
'赤血魔剑,战神盔甲(男),死神手套,珊瑚戒指':
begin
//this_player.addPlayerAbil(4, 100, 3600);
this_player.playerNotice('套装属性触发 ID = ' + inttostr(idx),2)

end
'赤血魔剑,战神盔甲(女),死神手套,珊瑚戒指':
begin
//this_player.addPlayerAbil(4, 100, 3600);
this_player.playerNotice('套装属性触发 ID = ' + inttostr(idx),2)
end
'木剑,中型盔甲(男),金戒指':
begin
//this_player.addPlayerAbil(4, 50, 3600);
this_player.playerNotice('套装属性触发 ID = ' + inttostr(idx),2)
end
'木剑,中型盔甲(女),金戒指':
begin
//this_player.addPlayerAbil(4, 50, 3600);
this_player.playerNotice('套装属性触发 ID = ' + inttostr(idx),2)
end
'骷髅戒指':
begin
//this_player.addPlayerAbil(0, 5, 3600);
this_player.playerNotice('套装属性触发 ID = ' + inttostr(idx),2)
end
end

end;

//接收客户端套装消息
procedure _getTaoZhuang(data : string);
Var
i, idx : integer;
items : string;
activation : boolean;
begin

//收到客户端套装变化消息
if pos(',', data) = 0 then
begin
//清除套装状态
idx := strtoint(data);
this_player.setS(117, idx, -2);
exit;
end
idx := strtoint(copy(data, 1, pos(',', data) - 1))
items := copy(data, pos(',', data) + 1, length(data));
//审查数据
activation := true;
for i:=1 to 10 do
begin
if split(items, ',', i) = '' then
break
activation := checkTaozhuang(split(items, ',', i));
if not(activation) then
break
end
//激活套装
if activation then
begin
if this_player.getS(117, idx) = 200 then
//套装没变化则不需要再次激活
else
//再次审查并激活属性
tzActivation(items, idx)
end

end;

路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 立即注册

手机版|美林GM论坛 ( 蜀ICP备2020030293号-2 )|网站地图

禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.如遇版权问题,请及时QQ联系

GMT+8, 2024-3-29 13:51 , Processed in 0.170322 second(s), 19 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024, Tencent Cloud.

返回顶部