战神引擎脚本-烈阳脚本全区发邮

[复制链接]
匿名 手游公益服 发表于 2021-7-19 13:56 | 显示全部楼层 |阅读模式
//-----------------------------------------------------
// 本服由【烈阳】开发,定制特色脚本请联系烈阳
//
// 请尊重每一个创作者,此条勿删,谢谢支持!
//-----------------------------------------------------

program Mir2;
var MailTitl,MailCont,CreateTime:String;
MailType,MonyCount,MonyType,InpNum:integer;
ItemInfo:Array[1..6] of string;
InfoNums:Array[1..6] of integer;

procedure _Exit;
begin
  This_Npc.CloseDialog(This_Player);
end;
procedure P100;
begin
end;

procedure _Fsmail;
var ite:integer;
begin
     if MailTitl = '' then MailTitl:='点击输入';
         if MailCont = '' then MailCont:='点击输入';
         MailType:=1;
         if MonyCount = -1 then MonyCount:=0;
         if MonyType = -1 then MonyType:=0;
         if CreateTime = '' then CreateTime:='是';
         
         for ite:=1 to 6 do
         begin
         if ItemInfo[ite] = '' then ItemInfo[ite]:='点击输入';
         end;
         
         for ite:=1 to 6 do
         begin
         if InfoNums[ite] = -1 then InfoNums[ite]:=0;
         end;
         
     This_Npc.NpcDialog(This_Player,
         '<邮件标题:/fcolor=168><'+MailTitl+'/@mail~7>|'+
         '<邮件内容:/fcolor=168><'+MailCont+'/@mail~8>|'+
         '<附加货币:/fcolor=7>货币[<'+inttostr(MonyType)+'/@MType>]            数量[<'+inttostr(MonyCount)+'/@mail~9>]|'+
         '<时间显示:/fcolor=7>                 [<'+CreateTime+'/@CgTime>]|'+
         '<一号物品:/fcolor=22><'+ItemInfo[1]+'/@mail~1>^   数量[<'+inttostr(InfoNums[1])+'/@mail~11>]|'+
         '<二号物品:/fcolor=22><'+ItemInfo[2]+'/@mail~2>^   数量[<'+inttostr(InfoNums[2])+'/@mail~12>]|'+
         '<三号物品:/fcolor=22><'+ItemInfo[3]+'/@mail~3>^   数量[<'+inttostr(InfoNums[3])+'/@mail~13>]|'+
         '<四号物品:/fcolor=22><'+ItemInfo[4]+'/@mail~4>^   数量[<'+inttostr(InfoNums[4])+'/@mail~14>]|'+
         '<五号物品:/fcolor=22><'+ItemInfo[5]+'/@mail~5>^   数量[<'+inttostr(InfoNums[5])+'/@mail~15>]|'+
         '<五号物品:/fcolor=22><'+ItemInfo[6]+'/@mail~6>^   数量[<'+inttostr(InfoNums[6])+'/@mail~16>]|'+
         '<━━━━━━━━━━━━━━━━━━━━/fcolor=248>|'+
         '附加货币<0/fcolor=251>为金币,<1/fcolor=250>为元宝|'+
         '<━━━━━━━━━━━━━━━━━━━━/fcolor=248>|'+
         '{cmd}<点击发送/@StarMail><清空内容/@ClearMail><返回主页/@main>');
         
end;

procedure _ClearMail;
var ite:integer;
begin
     MailTitl:='';
         MailCont:='';
         MonyCount:=-1;
         MonyType:=-1;
         CreateTime:='';
         for ite:=1 to 6 do
         begin
         ItemInfo[ite]:='';
         end;
         
         for ite:=1 to 6 do
         begin
         InfoNums[ite]:=-1;
         end;
         _Fsmail;
end;

procedure _mail(mstr:string);
begin
     InpNum:=StrToIntDef(mstr,0);
     This_NPC.InputDialog(This_Player,'请输入内容',0,115);
end;

procedure P115;
begin
     if InpNum = 7 then MailTitl:=This_Npc.InputStr;
         if InpNum = 8 then MailCont:=This_Npc.InputStr;
         if InpNum = 9 then MonyCount:=StrToIntDef(This_Npc.InputStr ,-1);
         if (InpNum >= 1) and (InpNum <= 6) then ItemInfo[InpNum]:=This_Npc.InputStr;
         if (InpNum >= 11) and (InpNum <= 16) then InfoNums[InpNum-10]:=StrToIntDef(This_Npc.InputStr ,-1);
         _Fsmail;
end;

procedure _MType;
begin
     if MonyType = 0 then
         begin
              MonyType:=1;
              _Fsmail;
              end
         else
         MonyType:=0;
         _Fsmail;
end;

procedure _CgTime;
begin
     if CreateTime = '是' then
         begin
              CreateTime:='否';
              _Fsmail;
              end
         else
         CreateTime:='是';
         _Fsmail;
end;

procedure _StarMail;
var Uname,TimeStr,TrueStr:string;CheckNum,ite:integer;
begin
     if CreateTime = '是' then
         begin
         TimeStr:=MirDateTimeToStr('yyyyMMdd',GetNow);
         end else
         TimeStr:='';
         
         if MailTitl = '点击输入' then MailTitl:='';
         if MailCont = '点击输入' then MailCont:='';
         
         for ite:=1 to 6 do
         begin
         if ItemInfo[ite] = '点击输入' then
         begin
              ItemInfo[ite]:='';
              InfoNums[ite]:=-1;
              end
            else
         begin
         TrueStr:=TrueStr + ItemInfo[ite] + '|' + inttostr(InfoNums[ite]) + '/';end;
         end;
         
         if TrueStr = '' then
         begin
              MailTitl:='';
              MailCont:='';
              MonyCount:=-1;
              MonyType:=-1;
              CreateTime:='';
         This_NPC.InputDialog(This_Player,'                                          发送失败!请输入物品名字!',1,100);
         _Fsmail; exit;
         end;
         
     This_DB.ExecuteQuery('select ChrName from mir3.user_index where level >= 0 order by level desc;');        
         while not(This_DB.PsEof()) do
         begin
            CheckNum:=CheckNum+1;
                Uname:=This_DB.PsFieldByName('ChrName');
                if This_Player.FindPlayer(Uname) then        
                begin
                This_Player.FindPlayerByName(Uname).NewFullMailEx(MailTitl,MailCont,MailType,MonyCount,MonyType,TrueStr,TimeStr);
                end                                
                This_DB.PsNext();
         end;
         
         if CheckNum > 0 then
         begin
         MailTitl:='';
         MailCont:='';
         MonyCount:=-1;
         MonyType:=-1;
         CreateTime:='';
         
              for ite:=1 to 6 do
              begin
              ItemInfo[ite]:='';
              end;
                  
                   for ite:=1 to 6 do
                   begin
                   InfoNums[ite]:=-1;
                   end;
              This_NPC.InputDialog(This_Player,'                                                        发送成功!',1,100);
              end
                else
     begin
         MailTitl:='';
         MailCont:='';
         MonyCount:=-1;
         MonyType:=-1;
         CreateTime:='';
         
         for ite:=1 to 6 do
         begin
         ItemInfo[ite]:='';
         end;
         
             for ite:=1 to 6 do
             begin
             InfoNums[ite]:=-1;
             end;
         This_NPC.InputDialog(This_Player,'                                                        发送失败!',1,100);
         end;
end;

Begin
    if This_Npc.ChkStrInFile('AdminList.txt','* '+This_Player.Name) then
        begin
      This_Npc.NpcDialog(This_Player,
      '|{cmd}<全区发邮/@Fsmail>');
        end else
        This_NPC.InputDialog(This_Player,'                                           你不是GM无法操作!',1,100);
end.

请点击此处下载

需要先购买才能下载

您的用户组是:游客

文件名称:烈阳-全区发邮.zip
下载次数:1  文件大小:2.93 KB  售价:30 下载币
您需要登录后才可以回帖 登录 | 加入网站

本版积分规则