传奇6社区|传奇六社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 1748|回复: 1

[技术文章] 墨香上线自动送属性点、金钱、技能点

[复制链接]
发表于 2014-2-25 04:02:45 | 显示全部楼层 |阅读模式
上线创建人物自动送金钱、技能、属性点等。修改 MP_CHARACTER_CreateCharacter 这个存储过程,数据库mhgame中。修改如下:


/****** ?遂: 玷痦?唔 dbo.MP_CHARACTER_CreateCharacter    ?值丕祉?: 2010/7/25 珥 02:30:41 ******/
/****** 彗素: ?? ???? dbo.MP_CHARACTER_CreateCharacter    ???? 蜱?: 2010-07-28 ?? 10:31:41 ******/
CREATE                               proc dbo.MP_CHARACTER_CreateCharacter
(
@USER_IDX        int
, @CHARACTER_GENGOAL     smallint
, @CHARACTER_DEX      smallint
, @CHARACTER_STA      smallint
, @CHARACTER_SIMMAK     smallint
, @CHARACTER_NAME      varchar(16)
, @CHARACTER_FACETYPE     tinyint
, @CHARACTER_HEADTYPE     tinyint
, @CHARACTER_MAP      tinyint
, @CHARACTER_GENDER     tinyint
, @CHARACTER_HAT      smallint
, @CHARACTER_WEAPON     smallint
, @CHARACTER_DRESS      smallint
, @CHARACTER_SHOES     smallint
, @CHARACTER_RING1      smallint
, @CHARACTER_RING2      smallint
, @CHARACTER_CAPE      smallint
, @CHARACTER_NECKLACE     smallint
, @CHARACTER_ARMLET     smallint
, @CHARACTER_BELT      smallint
, @CHARACTER_LOGINPOINT    int
, @ServerNo      int
, @height      float
, @width       float
, @IP       varchar(16)
)
as
Set Nocount on
-- Set Xact_Abort on
declare @presentKind tinyint
declare @presentItem int
if((select count(*) from TB_CHARACTER where USER_IDX = @USER_IDX and CHARACTER_STANDINDEX != 5) > 4)
begin
   select 1    -- ?淑捂 ?臃? 眵?
   return
end
else if exists ( select * from TB_CHARACTER where CHARACTER_NAME = @CHARACTER_NAME and CHARACTER_STANDINDEX != 5 )
begin
   select 2
   return -- ?淑 ? ??蕖 眵?
end
else if exists (select * from tb_guild where   GuildName = @CHARACTER_NAME )
begin
select 3 -- 栝? ? ??
return
end
else if @character_name is null
   begin
    select 2    -- ?淑 ? null 眵?
    return
   end
else
begin
   declare @StandIndex int
   declare @n   int
   select @StandIndex = count(character_idx) from tb_character where user_idx = @USER_IDX
   set @n = 0
   if(@StandIndex != 0)
    begin
     while(@n < 5)
      begin
       if exists (select * from tb_character where character_standindex = @n and user_idx = @USER_IDX)
        begin
         Set @n = @n + 1
         continue
        end
       else
        begin
         Set @StandIndex = @n
         break
        end
      end
    end
--ADD 03.19
-- DECLARE @isMp3 bit
-- EXEC @isMp3 = dssog59.mhcmember.dbo.UP_IsUsercharacter @user_idx
--
   insert TB_CHARACTER
   (
    USER_IDX
   , CHARACTER_STANDINDEX
   , CHARACTER_GENGOAL
   , CHARACTER_DEX  
   , CHARACTER_STA  
   , CHARACTER_SIMMAK
   , CHARACTER_NAME
   , CHARACTER_FACETYPE
   , CHARACTER_HEADTYPE
   , CHARACTER_MAP
   , CHARACTER_GENDER
   , CHARACTER_HAT
   , CHARACTER_WEAPON
   , CHARACTER_DRESS  
   , CHARACTER_SHOES
   , CHARACTER_RING1  
   , CHARACTER_RING2  
   , CHARACTER_CAPE  
   , CHARACTER_NECKLACE  
   , CHARACTER_ARMLET
   , CHARACTER_BELT
   , character_loginpoint
                          ,             CHARACTER_GRADEUPPOINT
                          ,             CHARACTER_GRADE
   , character_Money
   , character_Height
   , character_Width
   , CHARACTER_NICKNAME
                           ,            CHARACTER_ABILITYEXP
   )
    values
    (
     @USER_IDX
    , @StandIndex
    , @CHARACTER_GENGOAL
    , @CHARACTER_DEX  
    , @CHARACTER_STA  
    , @CHARACTER_SIMMAK
    , @CHARACTER_NAME  
    , @CHARACTER_FACETYPE
    , @CHARACTER_HEADTYPE
    , 17--@CHARACTER_MAP    上线登陆点
    , @CHARACTER_GENDER
    , @CHARACTER_HAT
    , @CHARACTER_WEAPON
    , @CHARACTER_DRESS  
    , @CHARACTER_SHOES
    , @CHARACTER_RING1  
    , @CHARACTER_RING2  
    , @CHARACTER_CAPE  
    , @CHARACTER_NECKLACE  
    , @CHARACTER_ARMLET
    , @CHARACTER_BELT  
    , @CHARACTER_LOGINPOINT
                                        ,            570--@CHARACTER_GRADEUPPOINT 属性点570
                                        ,            94--@ CHARACTER_GRADE 等级
    , 9999999999   -----金钱
    , @Height
    , @Width
    ,            ''
                                        ,            808080808   ---技能点
    )
   declare @Character_idx int

   select @Character_idx = max(Character_idx) from tb_character where @USER_IDX = User_idx
   insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability)
    values(@Character_idx, @CHARACTER_DRESS, 82, 0, 0)
   insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability)
    values(@Character_idx, @CHARACTER_SHOES, 83, 0, 0)
   insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability)
    values(@Character_idx, @CHARACTER_WEAPON, 81, 0, 0)
   -- 嚓斐 袁 斯斐 ??
   insert tb_mainquest(character_idx, quest_idx, subquest_do, end_param, regist_time)
    values(@Character_idx, 0, 0, 0, 0)
   -- Ability 斯斐 ??
   insert tb_ability(character_idx, BattleAbility, KyungGongAbility, SocietyAbility, JobAbility,
      BattleQuick,KyungGongQuick,SocietyQuick,JobQuick)
    values(
     @Character_idx
    , 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
    , 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
    , 'ABBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
    , 'ABBBABAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAA'
    , 'CL          DFDDDCDB                    '
    , '                                        '
    , '                                        '
    , '                                        ' )

   -- ??斯斐 ??
   insert TB_CharacterCreateInfo( character_idx, user_idx, character_name, flag, create_date, create_ip )
     values( @Character_idx, @USER_IDX, @CHARACTER_NAME, 1, getdate(), @IP )
--53075 MP3媵??(疏??斯? ?? ?袁? 淑? 蒜???)-
--IF @isMp3 = 0
--begin
--    insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability)
--    values(@Character_idx, 53024, 0, 0, 0)
--end
   -- ??? 吞(嚓斐?) -----
/*   declare @cc int
   select @cc = count(*) from TB_CHARACTER where USER_IDX = @USER_IDX
    if( @cc = 1 )
   begin
    --53076 斐笮蕃 _Level1
    insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability)
    values(@Character_idx, 53076, 1, 0, 0)
    --53077 斐笮蕃 _Level8
    insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability)
    values(@Character_idx, 53077, 2, 0, 0)
    --53078 斐笮蕃 _Level15
    insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability)
    values(@Character_idx, 53078, 3, 0, 0)
    --53079 斐笮蕃 _Level20
    insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability)
    values(@Character_idx, 53079, 4, 0, 0)
    --53080 斐笮蕃 _Level25
    insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability)
    values(@Character_idx, 53080, 5, 0, 0)
    --050809 ??
    --55128 嚓斐 _ ??_獠在
    insert tb_item(character_idx, item_idx, item_position, item_qposition, item_durability, item_param)
    values(@Character_idx, 55128, 390, 0, 1, 1)   
   end
*/
   select 0
--   exec dssog3.MHCMember.dbo.up_Character_Insert @Character_idx, @USER_IDX, @CHARACTER_NAME, @ServerNo
  
end
GO
回复

使用道具 举报

发表于 2016-5-11 00:24:19 | 显示全部楼层
购买金融互助理财盘金币盘资金盘网站开发加我扣扣:八五八八八二二三四,金融理财虚拟币山寨自己开盘操盘联系我们订制维护网站推广宣传代理国外服务器
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|Mir6.com

GMT+8, 2018-10-20 18:38 , Processed in 1.079404 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表