用于战神引擎勋章+斗笠+盾牌鉴定Npc脚本,脚本默认扣除金币,鉴定的几率是随机的,并不是%100可以鉴定成功,帮主亲自测试过,随机属性,随机几率。当然,脚本里面有控制几率的,能看懂就知道怎么改了,脚本为单文件。




部分脚本
procedure CommitItem(AType:word);
var
i,ck_num,ck_kind,YBNum,ck_gold,ck_rand:integer;
ck_str,ck_red:string;
begin
ck_gold := 0; //初始化
ck_str := ''; //初始化
ck_red := ''; //初始化
for ck_kind := 1 to 3 do
begin
if ck_name[ck_kind] = This_Item.ItemName then
begin
ck_num := This_Item.AddPa1 + This_Item.AddPa2 + This_Item.AddPa3 + This_Item.AddPa4 + This_Item.AddPa5;
ck_gold := ck_value[ck_kind];
if (ck_num > 0) and (ck_num < 3) then begin for i:= 1 to ck_num do begin ck_gold := ck_gold*2; end; end; end; end; if ck_num > 3 then
begin
This_Player.NotifyClientCommitItem(0,'无法鉴定:你的'+This_Item.ItemName+'已激发出所有属性!');
end else
if ck_gold > 0 then
begin
if This_Player.GoldNum >= ck_gold then
begin
ck_rand := random(10000);
if ck_rand < 7024 then
begin
This_Player.NotifyClientCommitItem(0,'升级失败,你的勋章属性未发生变化');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
end else
if ck_rand < 8074 then
begin
This_Item.AddPa3 := This_Item.AddPa3 + 1; //攻击+1
ck_str :='攻击+1';
ck_red :='红字公告';
end else
if ck_rand < 8724 then
begin
This_Item.AddPa4 := This_Item.AddPa4 + 1; //魔法+1
ck_str :='魔法+1';
ck_red :='红字公告';
end else
if ck_rand < 9574 then
begin
This_Item.AddPa5 := This_Item.AddPa5 + 1; //道术+1
ck_str :='道术+1';
ck_red :='红字公告';
end;
This_Player.DecGold(ck_gold);
if ck_str <> '' then
begin
This_Player.NotifyClientCommitItem(0,'鉴定成功:你的'+This_Item.ItemName+'提升了'+ck_str+'!');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
end;
if ck_red <> '' then This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在庄园勋章鉴定师鉴定'+This_Item.ItemName+'时提升了'+ck_str+'!');
This_Player.AddLogRec(9, This_Item.ItemName, 811152, ck_gold, ck_str);
end else
begin
This_Player.NotifyClientCommitItem(0,'无法鉴定:你的金币不足,需要'+inttostr(ck_gold)+'金币。');
end;
end else
begin
This_Player.NotifyClientCommitItem(0,'该物品不可鉴定,请投入可鉴定的装备!');
end;
end;
procedure _CheckupRule;
begin
This_Npc.NpcDialog(This_Player,
+'|<勇士你准备好了吗/fcolor=253>\'
+'|<沃玛盾牌/fcolor=250>\'
+'|<祖玛盾牌/fcolor=251>\'
+'|<赤月盾牌/fcolor=252>\'
+'|<每次鉴定消耗一定数量的金币/fcolor=253>\'
+'|{cmd}<返回/@main>'
);
end;
function xin(price, num: Integer):boolean;
begin
result := true;
end;
begin
This_Npc.NpcDialog(This_Player,
+'|<勇士你好,是否想让自己变的更强大~/fcolor=250>\'
+'|<老夫学会了勋章鉴定极品技能!/fcolor=251>\'
+'|<可以到我这里鉴定出极品属性,鉴定/fcolor=252>\'
+'|<可以随机获得攻击.魔法.道术等属性./fcolor=253>\'
+'|<每次收取50万的金币当然会有失败的几率/fcolor=254>\'
+'|<如果你对鉴定出的属性不满意可以去找/fcolor=255>\'
+'|<我师兄勋章清洗师他会帮助你的!/fcolor=250>\ \'
+'|{cmd}<开始鉴定盾牌/@Checkup> |{cmd}<查看可以升级的盾牌/@CheckupRule> \'
);
end.








