procedure _Checkup_1;
begin
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 := ''; //初始化
for ck_kind := 1 to 3 do //如果上面添加到了10个 则这里的3改成10
begin
if ck_name[ck_kind] = This_Item.ItemName then
begin
ck_num := This_Item.AddPa2;
ck_gold := ck_value[ck_kind];
if (ck_num > 0) and (ck_num < 3) then //有添加的话这里相应改到10,下同
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 ck_rand := random(100)
if This_Player.YBNum>= ck_gold then
case ck_num of
0 :
begin
if ck_rand < 1then
begin
This_Player.PsYBConsum(This_NPC,'xin',20152,ck_gold,1);
This_Player.NotifyClientCommitItem(0,'升级失败,你的项链属性未发生变化');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
This_NPC.Click_CommitItem(This_Player,1,'待升级装备:');
end else
if ck_rand < 99 then
begin
This_Item.AddPa2 := This_Item.AddPa2 + 1; //幸运+1
This_Player.PsYBConsum(This_NPC,'xin',20153,ck_gold,1);
ck_str :='幸运+1';
ck_red :='红字公告';
This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升到了'+ck_str+'!');
This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在幸运使者处把'+This_Item.ItemName+'的幸运提升到了'+ck_str+'!');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
This_NPC.Click_CommitItem(This_Player,1,'待升级装备:');
end;
end;
1 : begin
if ck_rand < 50 then
begin
This_Player.PsYBConsum(This_NPC,'xin',20152,ck_gold,1);
This_Player.NotifyClientCommitItem(0,'升级失败,你的项链属性未发生变化');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
This_NPC.Click_CommitItem(This_Player,1,'待升级装备:');
end else
if ck_rand < 99 then
begin
This_Item.AddPa2 := This_Item.AddPa2 + 1; //幸运+2
This_Player.PsYBConsum(This_NPC,'xin',20153,ck_gold,1);
ck_str :='幸运+2';
ck_red :='红字公告';
This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升到了'+ck_str+'!');
This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在幸运使者处把'+This_Item.ItemName+'的幸运提升到了'+ck_str+'!');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
This_NPC.Click_CommitItem(This_Player,1,'待升级装备:');
end;
end;
2:begin ck_rand := random(100);
if ck_rand < 85 then
begin
This_Player.PsYBConsum(This_NPC,'xin',20152,ck_gold,1);
This_Player.NotifyClientCommitItem(0,'升级失败,你的项链属性未发生变化');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
This_NPC.Click_CommitItem(This_Player,1,'待升级装备:');
end else
if ck_rand < 99 then
begin
This_Item.AddPa2 := This_Item.AddPa2 + 1; //幸运+3
This_Player.PsYBConsum(This_NPC,'xin',20153,ck_gold,1);
ck_str :='幸运+3';
ck_red :='红字公告';
This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升到了'+ck_str+'!');
This_NPC.NpcNotice('恭喜:'+This_Player.Name+'在幸运使者处把'+This_Item.ItemName+'的幸运提升到了'+ck_str+'!');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
This_NPC.Click_CommitItem(This_Player,1,'待升级装备:');
end;
end;
end else
begin
This_Player.NotifyClientCommitItem(0,'无法鉴定:你的元宝不足,需要'+inttostr(ck_gold)+'元宝。!');
end;
end else
begin
This_Player.NotifyClientCommitItem(0,'该物品不可升级,请投入可升级的装备!');
end;
end;
function xin(price, num: Integer):boolean;
begin
result := true;