网站地图 设为首页 加入收藏
 
红月私服中心 下载中心 发布红月 技术资料 发布家族 游戏IP生成   开区服务  
红月私服自由军团存储汉化之税收
文章作者:管理员 文章来源:红月私服中心-Www.hy45.Net 更新时间:2012/2/24 15:28:44 

 

/****** Object:  Stored Procedure dbo.RMS_ARMY_SENDARMYBASEGAIN    Script Date: 2004-5-13 11:21:07 ******/


alter PROCEDURE RMS_ARMY_SENDARMYBASEGAIN

AS
set nocount on

begin transaction RMS_ARMY_SENDARMYBASEGAIN

 DECLARE @ArmyID int
 DECLARE @Commander varchar(14)
 DECLARE @MailContent varchar(200)
 DECLARE @RandomNumber int

 SELECT @ArmyID=ArmyID FROM tblArmyBase1 WHERE ArmyGain>=10000000
 if @@ROWCOUNT!=0 and @ArmyID>0
 BEGIN
  SELECT @Commander=Commander FROM tblArmyList1 WHERE ID=@ArmyID
  if @@ROWCOUNT!=0
  begin
   set @MailContent=
'您好,我是军队的管理员。
我向您发送的一部分您自由军
管辖商店的税收.'

   DECLARE @RowCount int
   DECLARE @MailDate datetime
   SET @MailDate=cast(convert(varchar, GetDate(), 120) as datetime)
   SELECT @RowCount=COUNT(*) FROM tblMail1 WHERE Time=@MailDate AND Recipient=@Commander
   IF @RowCount=0
   BEGIN
    INSERT tblmail1 (Time, Recipient, Sender, ReadOrNot, Title, Line, Content, Item) VALUES (@MailDate,@Commander, '自由军管理员', 0, '商店税收', 5, @MailContent, '0:5-0/10000000.')
   END
   ELSE
   BEGIN
    SELECT @MailDate=DATEADD(SECOND,1,MAX(Time)) FROM tblMail1 WHERE Recipient=@Commander
    INSERT tblmail1 (Time, Recipient, Sender, ReadOrNot, Title, Line, Content, Item) VALUES (@MailDate,@Commander, '自由军管理员', 0, '商店税收', 5, @MailContent, '0:5-0/10000000.')
   END
   if @@ERROR=0
   begin

    update tblArmyBase1 set ArmyGain=ArmyGain-10000000

    set @RandomNumber=RAND() * 100000000
    set @RandomNumber=@RandomNumber%1000

    if @RandomNumber >=998
    begin
     DECLARE @ItemNumber int
     set @RandomNumber=RAND() * 2000000000
     SET  @ItemNumber=@RandomNumber%8
     if @ItemNumber=0
     begin
      insert tblspecialitem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 1, 4, 2, 1, 100, 100, 1, @Commander, 100, 1, @MailDate)
     end
     else if @ItemNumber=1
     begin
      insert tblspecialitem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 2, 4, 2, 1, 100, 100, 1, @Commander, 100, 1, @MailDate)
     end
     else if @ItemNumber=2
     begin
      insert tblspecialitem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 10, 4, 2, 1, 100, 100, 1, @Commander, 100, 1, @MailDate)
     end
     else if @ItemNumber=3
     begin
      insert tblspecialitem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 11, 4, 2, 1, 100, 100, 1, @Commander, 100, 1, @MailDate)
     end
     else if @ItemNumber=4
     begin
      insert tblspecialitem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 15, 4, 2, 1, 100, 100, 1, @Commander, 100, 1, @MailDate)
     end
     else if @ItemNumber=5
     begin
      insert tblspecialitem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 24, 4, 2, 1, 100, 100, 1, @Commander, 100, 1, @MailDate)
     end
     else if @ItemNumber=6
     begin
      insert tblspecialitem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 26, 4, 2, 1, 100, 100, 1, @Commander, 100, 1, @MailDate)
     end
     else if @ItemNumber=7
     begin
      insert tblspecialitem1 (ItemKind, ItemIndex, ItemDurability, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex, MiscTime) values (6, 28, 4, 2, 1, 100, 100, 1, @Commander, 100, 1, @MailDate)
     end
    end
   end
  end
 END
commit transaction RMS_ARMY_SENDARMYBASEGAIN


GO

浏览次数:455
最新文章
· 2003系统任务栏显示桌面图标不见了处理办法...
· 修改红月私服某特定怪属性...
· 红月管理工具使用的配置...
· 教你怎么1个怪1级(去除10%限制)...
· 红月游戏帐号注册之二...
· 红月游戏帐号注册之三...
· 红月游戏帐号注册之一...
· 红月私服带杀人次数排行榜...
· 带防盗码生化排行...
· 出身完成任务一级发针存储过程...
热门文章
· 红月技能点属性上限...
· 3.8C红月私服限制部分外挂的方法...
· 调皮外挂不能正常使用...
· 红月私服角色之说...
· 升华原版升级代码...
· 红月私服自由军团存储汉化之自由军解散原因...
· 红月B2战争规则...
· 红月NPC各地点坐标...
· 红月服务器如何做到冲卡的...
· 红月外挂不能使用新解决办法...
关于我们 开区服务 网站帮助 全部私服
 
CopyRight @2010 hy45.net, Inc. All Rights Reserved  

备案登记号:苏ICP备11017169号-1