sm

立即登录 | 账号注册

积分: 0 |用户组: 游客

搜索

战神引擎服务端huishouFact.pas回收道具详细设置

已有 264 次阅读2023-3-23 22:48 |个人分类:战神引擎| 战神引擎, 回收脚本

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

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

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

//返回装备种类ID方法 调用者应根据ID分发奖励
function getItemsID(itemName : string) : integer;
Var
items : array[1..10] of string;
i : integer;
begin
result := 0
//示例
//定义回收种类
items[1] := '绿色项链,骑士手镯,力量戒指,恶魔铃铛,龙之手镯,紫碧螺,灵魂项链,三眼手镯,泰坦戒指,黑铁头盔,裁决之杖,骨玉权杖,龙纹剑';
items[2] := '圣战头盔,圣战手镯,圣战戒指,圣战项链,法神头盔,法神手镯,法神戒指,法神项链,天尊头盔,天尊手镯,天尊戒指,天尊项链';
items[3] := '龙牙,怒斩,逍遥扇,天魔神甲,法神披风,天尊道袍,圣战宝甲,霓裳羽衣,天师长袍';
items[4] := '雷霆项链,雷霆护腕,雷霆战戒,烈焰项链,烈焰护腕,烈焰魔戒,光芒项链,光芒护腕,光芒道戒,圣龙盔,天龙盔,魔龙盔,雷霆战靴,烈焰魔靴,光芒道靴,雷霆腰带,烈焰腰带,光芒腰带,光芒道盔,烈焰魔盔,雷霆战盔';
items[5] := '强化雷霆项链,强化雷霆护腕,强化雷霆战戒,强化光芒项链,强化光芒护腕,强化光芒道戒,强化烈焰项链,强化烈焰护腕,强化烈焰魔戒,强化烈焰魔靴,强化烈焰腰带,强化光芒道靴,强化光芒腰带,强化雷霆战靴,强化雷霆腰带';
items[6] := '霸者之刃,嗜魂法杖,屠龙,雷霆战甲(男),雷霆战甲(女),烈焰魔衣(男),烈焰魔衣(女),光芒道袍(男),光芒道袍(女)';
for i:=1 to 10 do
begin
if items[i] = '' then
break
if pos(itemName, items[i]) > 0 then
begin
//找到返回归属ID
result := i;
break
end
end
end;

//接收客户端回收消息
procedure _removeitemAw(items : string);
Var
itemName : string;
num, idx : integer;
begin
//this_player.playerNotice(items, 2);

while (pos(',',items) > 0) do
begin
itemName := copy(items, 1, pos(',',items) - 1);
items := copy(items, pos(',',items) + 1, length(items));
num := this_player.getBagitemCount(itemName)
this_player.playerNotice(items, 1);
this_player.playerNotice(itemName, 0);
if num > 0 then
begin
idx := getitemsID(itemName);
if idx > 0 then
begin
this_player.take(itemName, num);
case idx of
1:
begin
this_player.give('经验', 10000 * num);
this_player.playerNotice('你回收了' + itemName, 2);
end
2:
begin
this_player.give('经验', 30000 * num);
this_player.playerNotice('你回收了' + itemName, 2);
end
3:
begin
this_player.give('经验', 50000 * num);
this_player.playerNotice('你回收了' + itemName, 2);
end
4:
begin
this_player.give('经验', 100000 * num);
this_player.playerNotice('你回收了' + itemName, 2);
end
5:
begin
this_player.give('经验', 200000 * num);
this_player.playerNotice('你回收了' + itemName, 2);
end
6:
begin
this_player.give('经验', 500000 * num);
this_player.playerNotice('你回收了' + itemName, 2);
end
end
end
end;
end

end;

路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist

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

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

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

GMT+8, 2024-5-11 20:33 , Processed in 0.152688 second(s), 19 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024, Tencent Cloud.

返回顶部