用于战神引擎云游宗师+升级首饰Npc脚本(随机几率),

部分脚本
if This_Player.getv(88,3)= 1 then
begin
for ck_kind := 1 to 300 do
begin
if ck_name[ck_kind] = This_Item.ItemName then
begin
ck_num := This_Item.AddPa5; //道术+1
ck_gold := ck_value[ck_kind];
if (ck_num > 0) and (ck_num < 10) then begin for i:= 1 to ck_num do begin ck_gold := ck_gold*2; end; end; end; end; if ck_num > 6 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(100);
if ck_rand < 80 then begin if This_Item.AddPa5 > 0 then This_Item.AddPa5 := This_Item.AddPa5 - 1; //1
if This_Item.AddPa5 > 0 then This_Player.NotifyClientCommitItem(0,'升级失败,你的首饰属性降低1点');
if This_Item.AddPa5 = 0 then This_Player.NotifyClientCommitItem(0,'升级失败,你的首饰属性未发生变化');
This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
This_NPC.Click_CommitItem(This_Player,1,'待升级首饰:');
This_Player.DecGold(ck_gold);
end else
if ck_rand < 100 then
begin
This_Item.AddPa5 := This_Item.AddPa5 + 1; //道术+1
This_Player.DecGold(ck_gold);
ck_str :='道术+1';
ck_red :='红字公告';
This_NPC.Click_CommitItem(This_Player,1,'待升级首饰:');
end;
if ck_str <> '' then
begin
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 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;
begin
//if This_Player.GMLevel > 0 then
//begin
This_Npc.NpcDialog(This_Player,
'|‘<祖玛首饰、赤月首饰、衣服系列/c=180> 成功率:<%20/c=249>’ \ \'+
'|<升级条件/SCOLOR=223>:<第1点10万金币,依次升级翻倍扣费/SCOLOR=70>\'+
'|<升级失败/SCOLOR=223>:<首饰属性降低1点,最多升级10点/SCOLOR=70>\'+
+'|<注意:每次升级间隔时间请大于5秒!!/c=245>\'
+'|<注意:否则会出现点击多次没反映!!/c=245>\'
+'|{cmd}<升级攻击/@Checkup_1> ^<升级魔法/@Checkup_2> ^<升级道术/@Checkup_3>\'
+'|{cmd}<关闭/@doexit>\'
);
//end;
end.








