{********************************************************************
*******************************************************************}
program mir2;
procedure _DoExit;
begin
This_Npc.CloseDialog(This_Player);
end;
procedure _Exit;
begin
This_Npc.CloseDialog(This_Player);
end;
procedure domain;
begin
This_NPC.NpcDialog(This_Player,
'一个金条兑换一点声望。\'+
'沃玛转兑换1点声望。\'+
'赶快行动起来吧,骚年?\ \'+
+'|{cmd}<金条兑换声望/@duihaun> \' +
+'|{cmd}<装备兑换声望/@Checkup_1> \'
+'|{cmd}<退出/@Exit> \'
);
end;
procedure _duihaun;
begin
if This_Player.GetBagItemCount ('金条') >= 1 then
begin
This_Player.Take('金条',1);
This_Player.MyShengwan := This_Player.MyShengwan + 1;
This_Npc.NpcNotice('恭喜' + This_Player.Name +'成功兑换你一点声望!');
end else
This_NPC.NpcDialog(This_Player,'你都没有今条!\' +'{cmd}<返回/@main>') ;
end;
procedure _Checkup_1;
begin
This_NPC.Click_CommitItem(This_Player,1,'放入兑换声望');
end;
procedure readItemFun_A();
begin
if This_Npc.ChkStrInFile('\one1\woma.txt', This_Item.ItemName ) = true then
begin
This_Player.PlayerNotice('兑换沃玛装备成功,获得5点声望。',2);
This_Player.TakeByClientID(This_Item.ClientItemID);
This_Player.MyShengwan := This_Player.MyShengwan + 5;
This_Player.NotifyClientCommitItem(1,'');
This_NPC.Click_CommitItem(This_Player,1,'兑换声望:');
ServerSay('恭喜:'+This_Player.Name+'兑换沃玛装备获得5点声望!',3);
end;
end;
procedure readItemFun_b();
begin
if This_Npc.ChkStrInFile('\one1\zuma.txt', This_Item.ItemName ) = true then
begin
This_Player.PlayerNotice('兑换zhuma装备成功,获得10点声望。',2);
This_Player.TakeByClientID(This_Item.ClientItemID);
This_Player.MyShengwan := This_Player.MyShengwan + 10;
This_Player.NotifyClientCommitItem(1,'');
This_NPC.Click_CommitItem(This_Player,1,'兑换声望:');
ServerSay('恭喜:'+This_Player.Name+'兑换祖玛装备获得10点声望!',3);
end;
end;
procedure readItemFun_c();
begin
if This_Npc.ChkStrInFile('\one1\chiyue.txt', This_Item.ItemName ) = true then
begin
This_Player.PlayerNotice('兑换chiyue装备成功,获得20点声望。',2);
This_Player.TakeByClientID(This_Item.ClientItemID);
This_Player.MyShengwan := This_Player.MyShengwan + 20;
This_Player.NotifyClientCommitItem(1,'');
This_NPC.Click_CommitItem(This_Player,1,'兑换声望:');
ServerSay('恭喜:'+This_Player.Name+'兑换次月装备获得20点声望!',3);
end;
end;
procedure CommitItem(AType:word);
begin
if (This_Npc.ChkStrInFile('\one1\woma.txt', This_Item.ItemName ) = false) and (This_Npc.ChkStrInFile('\one1\zuma.txt', This_Item.ItemName ) = false) and (This_Npc.ChkStrInFile('\one1\chiyue.txt', This_Item.ItemName ) = false)then
begin
This_Player.PlayerNotice('该物品不能兑换。',2);
end else
readItemFun_A();
readItemFun_b();
readItemFun_c();
end;
begin
domain;
end.