战神引擎-装备提升属性点NPC-这里设置的最高8点 你可以改成自己想要的点数
program mir2; procedure _DoExit; begin This_Npc.CloseDialog(This_Player); end; procedure _Exit; begin This_Npc.CloseDialog(This_Player); end; var ck_name : array[1..18] of string; ck_value : array[1..18] of integer; procedure OnInitialize; begin ck_name[1] :='狂雷项链'; ck_name[2] :='逆火项链'; ck_name[3] :='通云项链'; ck_name[4] :='狂雷战盔'; ck_name[5] :='狂雷护腕'; ck_name[6] :='狂雷战戒'; ck_name[7] :='狂雷腰带'; ck_name[8] :='狂雷战靴'; ck_name[9] :='逆火魔盔'; ck_name[10] :='逆火护腕'; ck_name[11] :='逆火魔戒'; ck_name[12] :='逆火腰带'; ck_name[13] :='逆火魔靴'; ck_name[14] :='通云道盔'; ck_name[15] :='通云护腕'; ck_name[16] :='通云道戒'; ck_name[17] :='通云腰带'; ck_name[18] :='通云道靴'; ck_value[1] :=500; ck_value[2] :=500; ck_value[3] :=500; ck_value[4] :=500; ck_value[5] :=500; ck_value[6] :=500; ck_value[7] :=500; ck_value[8] :=500; ck_value[9] :=500; ck_value[10] :=500; ck_value[11] :=500; ck_value[12] :=500; ck_value[13] :=500; ck_value[14] :=500; ck_value[15] :=500; ck_value[16] :=500; ck_value[17] :=500; ck_value[18] :=500; end; procedure _Checkup; begin This_Player.setv(85,1,1); This_Player.setv(85,2,0); This_Player.setv(85,3,0); This_Player.setv(85,4,0); This_NPC.Click_CommitItem(This_Player,1,'待升级首饰:'); end; procedure _Checkup01; begin This_Player.setv(85,1,0); This_Player.setv(85,2,1); This_Player.setv(85,3,0); This_Player.setv(85,4,0); This_NPC.Click_CommitItem(This_Player,1,'待升级项链:'); end; procedure CommitItem(AType:word); var i,ck_num,ck_kind,ck_gold,ck_rand:integer; ck_str,ck_red:string; begin ck_gold := 0; //初始化 ck_str := ''; //初始化 ck_red := ''; //初始化
if This_Player.getv(85,1)= 1 then begin
for ck_kind := 4 to 18 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 < 8) then begin for i:= 1 to ck_num do begin ck_gold := ck_gold; end; end; end; end;
if ck_num > 7 then begin This_Player.NotifyClientCommitItem(0,'无法鉴定:你的'+This_Item.ItemName+'已激发出所有属性!'); end else if ck_gold > 0 then begin if This_Player.GetBagItemCount('金刚石') >= ck_gold then begin ck_rand := random(40); if ck_rand < 7 then begin This_Player.PlayerNotice('鉴定失败:没有鉴定出任何属性.请取下装备重新鉴定。',2); end else if ck_rand < 10 then begin This_Item.AddPa1 := This_Item.AddPa1 + 1; //攻击+1 ck_str :='防御+1'; end else if ck_rand < 17 then begin This_Item.AddPa4 := This_Item.AddPa4 + 1; //魔法+1 ck_str :='魔法+1'; end else if ck_rand < 19 then begin This_Item.AddPa5 := This_Item.AddPa5 + 1; //道术+1 ck_str :='道术+1'; end else if ck_rand < 21 then begin This_Item.AddPa3 := This_Item.AddPa3 + 1; //攻击+1 ck_str :='攻击+1'; end else if ck_rand < 23 then begin This_Item.AddPa3 := This_Item.AddPa3 + 2; //攻击+2 ck_str :='攻击+2'; ck_red :='红字公告'; end else if ck_rand < 25 then begin This_Item.AddPa4 := This_Item.AddPa4 + 2; //魔法+2 ck_str :='魔法+2'; ck_red :='红字公告'; end else if ck_rand < 27 then begin This_Item.AddPa5 := This_Item.AddPa5 + 2; //道术+2 ck_str :='道术+2'; ck_red :='红字公告'; end else if ck_rand < 29 then begin This_Item.AddPa4 := This_Item.AddPa4 + 1; //魔法+1 ck_str :='魔法+1'; end else if ck_rand < 32 then begin This_Item.AddPa5 := This_Item.AddPa5 + 1; //道术+1 ck_str :='道术+1'; end else if ck_rand < 35 then begin This_Item.AddPa3 := This_Item.AddPa3 + 1; //攻击+1 ck_str :='攻击+1'; end else if ck_rand < 39 then begin This_Player.PlayerNotice('鉴定失败:没有鉴定出任何属性.请取下装备重新鉴定。',2); end else begin This_Item.AddPa2 := This_Item.AddPa2 + 1; //防御+1 ck_str :='首饰魔御+1,项链幸运+1'; end; This_Player.Take('金刚石',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; //--------------------------------------------------------------------------------fenge end else if This_Player.getv(85,2)= 1 then begin
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 < 5) then begin for i:= 1 to ck_num do begin ck_gold := ck_gold; end; end; end; end;
if ck_num > 4 then begin This_Player.NotifyClientCommitItem(0,'无法鉴定:你的'+This_Item.ItemName+'已激发出所有属性!'); end else if ck_gold > 0 then begin if This_Player.GetBagItemCount('金刚石') >= ck_gold then begin ck_rand := random(30); if ck_rand < 10 then begin This_Player.PlayerNotice('鉴定失败:没有鉴定出任何属性.请取下装备重新鉴定。',2); end else if ck_rand < 8 then begin This_Item.AddPa1 := This_Item.AddPa1 + 1; //道术+1 ck_str :='躲避+1'; end else if ck_rand < 9 then begin This_Item.AddPa2 := This_Item.AddPa2 + 1; //攻击+1 ck_str :='幸运+1'; end else if ck_rand < 12 then begin This_Item.AddPa3 := This_Item.AddPa3 + 2; //攻击+2 ck_str :='攻击+2'; ck_red :='红字公告'; end else if ck_rand < 13 then begin This_Item.AddPa4 := This_Item.AddPa4 + 2; //魔法+2 ck_str :='魔法+2'; ck_red :='红字公告'; end else if ck_rand < 14 then begin This_Item.AddPa5 := This_Item.AddPa5 + 2; //道术+2 ck_str :='道术+2'; ck_red :='红字公告'; end else if ck_rand < 18 then begin This_Item.AddPa5 := This_Item.AddPa5 + 1; //道术+1 ck_str :='道术+1'; end else if ck_rand < 22 then begin This_Item.AddPa4 := This_Item.AddPa4 + 1; //道术+1 ck_str :='魔法+1'; end else if ck_rand < 25 then begin This_Item.AddPa3 := This_Item.AddPa3 + 1; //攻击+1 ck_str :='攻击+1'; end else if ck_rand < 29 then begin This_Player.PlayerNotice('鉴定失败:没有鉴定出任何属性.请取下装备重新鉴定。',2); end else begin This_Item.AddPa5 := This_Item.AddPa5 + 1; //防御+1 ck_str :='道术+1'; end; This_Player.Take('金刚石',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; end; function xin(price, num: Integer):boolean; begin result := true;
end; //--------------------------------------------------------di procedure _CheckupRule1; begin This_Player.Flyto('0121~6',3,16); end; procedure _CheckupRule; begin This_Npc.NpcDialog(This_Player, '雷炎装备必须淬炼完毕(淬炼5点)之后可以在我这进行鉴定: |\' +'<最高鉴定+8>,<项链鉴定+5>每次500金刚石|\' +'<鉴定出的属性:每次最高加2点,成功率完全看脸.失败不会破碎!/c=red> |\' +'|{cmd}<返回/@main>' ); end; begin This_Npc.NpcDialog(This_Player, '我可以帮你把雷炎装备鉴定出超强属性:|\' +'每次鉴定需要<500金刚石>.成功率看脸.|\' +'鉴定出的属性:每次最高加两点!|\' +'<注意:雷炎装备必须(淬炼过5点)才可以在我这进行鉴定>\' +'|{cmd}<鉴定首饰/@Checkup> ^<鉴定项链/@Checkup01>\' +'|{cmd}<清除首饰附加属性/@CheckupRule1> \' +'|{cmd}<查看鉴定规则/@CheckupRule>\' ); end. |