مشرف قسم CrossFire
|
• الانـتـسـاب » May 2010
|
• رقـم العـضـويـة » 70996
|
• المشـــاركـات » 3,556
|
• الـدولـة » مــصــر
|
• الـهـوايـة » Silkroad Service
|
• اسـم الـسـيـرفـر » Private Server
|
• الـجـنـس » Male
|
• نقـاط التقييم » 15
|
|
|
رد: استفسار بخصوص _AddNewChar
اقتباس:
المشاركة الأصلية كتبت بواسطة thedeathlist
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
حضرتك الكويرى دا مش شغال بيجيب كدا
Msg 208, Level 16, State 1, Line 2
Invalid object name 'sys.sql_moudels'.
|
تمام عدلت عليها بالاسم الصح قولتلك مش فاكر اوى :D
كود PHP:
USE SRO_VT_SHARD SELECT * FROM sys.all_sql_modules WHERE definition like '%_AddTimedJob%'
نتايجها عندى
وده اللى المفروض هتعمله بعد ماتمسح اللى عندك
كود PHP:
CREATE procedure [dbo].[_AddTimedJob]
كود PHP:
CREATE procedure [dbo].[_AddTimedJob] @CharID int, @Category tinyint, @JobID int, @TimeToKeep int, @Data1 int, @Data2 int, --##begin due to develop composite item @Data3 int, @Data4 int, @Data5 int, @Data6 int, @Data7 int, @Data8 int, @Serial64 bigint, @JID int --##end due to develop composite item as if (not exists (select CharID from _Char with (nolock) where CharID = @CharID)) return -1 if (@TimeToKeep <= 0) return -2 declare @NewJobID int set @NewJobID = 0 --##begin due to develop composite item insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64,JID) values(@CharID, @Category, @JobID, @TimeToKeep, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID) --##end due to develop composite item set @NewJobID = @@identity if (@@error <> 0 or @@rowcount = 0) return -3 return @NewJobID
كود PHP:
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- pet_skill_item (أƒأ–¼±أˆ£) --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
CREATE PROCEDURE [dbo].[_AddTimedJobForPet] @CharID int, @Category tinyint, @JobID int, @TimeToKeep int, @Data1 int, @Data2 int, @Data3 int, @Data4 int, @Data5 int, @Data6 int, @Data7 int, @Data8 int, @Serial64 bigint as if (not exists (select ID from _CharCOS with (nolock) where ID = @CharID)) return -1
if (@TimeToKeep <= 0) return -2
declare @NewJobID int set @NewJobID = 0
insert into _TimedJobForPet values(@CharID, @Category, @JobID, @TimeToKeep, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, 0) set @NewJobID = @@identity
if (@@error <> 0 or @@rowcount = 0) return -3
return @NewJobID
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
كود PHP:
USE SRO_VT_SHARD SELECT * FROM sys.all_sql_modules WHERE definition like '%_AddNewChar%'
نتايجها عندى
كود PHP:
-- أ„³¸¯أ…أچ¸¦ »أ½¼آ؛أ‡أڈ´أ‚ أ‡أپ·أژ½أƒأ€أ؛¸¦ ¼أ¶أپ¤أ‡أڈآ؟© أ„³¸¯أ…أچ »أ½¼آ؛ ½أƒ, _CharTrijobآ؟آ، ·¹أ„أڑµأ¥¸¦ أƒأں°آ،أ‡أڈµµ·أڈ أ‡أ‘´أ™. CREATE PROCEDURE [dbo].[_AddNewChar_THINH] @UserJID INT, @Accname Varchar(64), --@CharSlot INT, @RefCharID INT, @CharName varchar (64), @CharScale tinyINT, @StartRegionID INT, @StartPos_X real, @StartPos_Y real, @StartPos_Z real, @DefaultTeleport INT, @RefMailID INT, @RefPantsID INT, @RefBootsID INT, @RefWeaponID INT, @DurMail tinyINT, @DurPants tinyINT, @DurBoots tinyINT, @DurWeapon tinyINT, @DefaultArrow INT AS SET NOCOUNT ON DECLARE @temp INT DECLARE @NewCharID INT SET @NewCharID = 0 ----------------------------------------------------------------------------- -- 1. أ„³¸¯أ…أچ ½½·أ” ³أ‘¹أ¶°آ، validأ‡أ‘ °أچأ€أژأپأ¶, ±×¸®°أ* آ؛أ³½½·أ”أ€أŒ ¸أ‚´أ‚أپأ¶ ¸أ•أ€أ؛ أƒ¼أ…©أ‡أ‘´أ™. ----------------------------------------------------------------------------- /* -- commented by novice. for server integration. IF (@CharSlot = 0) BEGIN SELECT @temp = CharID1 FROM _User WITH (NOLOCK) WHERE UserJID = @UserJID END ELSE IF (@CharSlot = 1) BEGIN SELECT @temp = CharID2 FROM _User WITH (NOLOCK) WHERE UserJID = @UserJID END ELSE IF (@CharSlot = 2) BEGIN SELECT @temp = CharID3 FROM _User WITH (NOLOCK) WHERE UserJID = @UserJID END ELSE BEGIN -- °آ،´أ‰أ‡أ‘ أ„³¸¯أ…أچ ½½·أ”أ€آ؛ 1,2,3 أ€أŒ·¸°أ” 3°³ »أ“أ€أŒ¶أ³°أ*! ROLLBACK TRANSACTION RETURN -1 END IF (@temp <> 0) BEGIN -- آ؛أ³ ½½·أ”أ€أŒ ¾أ†´أڈ¹أ‡·أژ ¹«أˆآ؟! ROLLBACK TRANSACTION RETURN -2 END */ -- start by novice. SELECT @temp = count(CharID) FROM _User WITH (NOLOCK) WHERE UserJID = @UserJID IF (@temp >= 3) BEGIN -- ³أٹ¹« ¸¹أ€أڑ³آھ RETURN -2 END -- finish by novice. ----------------------------------------------------------------------------- -- 2. أ„³¸¯أ…أچ أƒأں°آ،أ‡أڈ±â ----------------------------------------------------------------------------- IF (@CharScale > 68) -- 0100 0100 --> 68 أ€أŒ´أ™! BEGIN -- أ„³¸¯أ…أچ »أ½¼آ؛ ½أ‡أ†أگ! ½آ؛أ„أ‰أ€أڈ °آھأ€أŒ أ€أŒ»أ³أ‡أڈ´أ™! RETURN -3 END EXEC @temp = _IsExistingCharName @CharName IF (@temp <> 0) BEGIN -- أ€أŒ¹أŒ »çآ؟ëأپأںأ€أژ أ€أŒ¸§أ€أŒ¶أ³´أ‚µ¥? RETURN -4 END
BEGIN TRANSACTION
INSERT INTO _Char ( RefObjID, CharName16, Scale, Strength, Intellect, LatestRegion,PosX, PosY, PosZ, AppointedTeleport, InventorySize, LastLogout, CurLevel, MaxLevel, RemainGold, RemainStatPoint, RemainSkillPoint, HP, MP, JobLvl_Trader, JobLvl_Hunter, JobLvl_Robber) VALUES (@RefCharID, @CharName, @CharScale, 20, 20, @StartRegionID, @StartPos_X, @StartPos_Y, @StartPos_Z, @DefaultTeleport, 45, GetDate(), 1, 1, 0, 0, 0, 200,200, 1, 1, 1) SET @NewCharID = @@IDENTITY
-- INSERT INTO _User VALUES (@UserJID, @NewCharID)
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0) BEGIN -- أ„³¸¯أ…أچ »أ½¼آ؛ ½أ‡أ†أگ! ROLLBACK TRANSACTION RETURN -5 END INSERT INTO _User VALUES (@UserJID, @NewCharID)
/* -- commented by novice. for server integration. IF (@CharSlot = 0) BEGIN UPDATE _User SET CharID1 = @NewCharID WHERE UserJID= @UserJID END ELSE IF (@CharSlot = 1) BEGIN UPDATE _User SET CharID2 = @NewCharID WHERE UserJID= @UserJID END ELSE IF (@CharSlot = 2) BEGIN UPDATE _User SET CharID3 = @NewCharID WHERE UserJID = @UserJID END IF (@@ERROR <> 0) BEGIN -- 'Userأ…×أ€أŒآ؛أ*أ€أ‡ أ„³¸¯أ…أچ ½½·أ” ¼¼أ†أƒ ½أ‡أ†أگ! ROLLBACK TRANSACTION RETURN -6 END */ -- start by novice. -- أ€أŒأپ¦ Slot ¾أˆ¾´´أ™.. ±×³أ‰ Insert ¸¸.. -- INSERT INTO _User VALUES (@UserJID, @NewCharID) -- finish by novice. ----------------------------------------------------------------------------- -- 3. أ€أ¥آ؛أ± ½½·أ” أƒ¤آ؟أ¬±â -- [أ€أژآ؛¥أ…أ¤¸® ½½·أ” 48°³] + [أ€أ¥آ؛أ±½½·أ” 13°³] ----------------------------------------------------------------------------- INSERT INTO _Inventory(CharID, Slot, ItemID) SELECT @NewCharID, CNT, 0 FROM _RefDummySlot WITH (NOLOCK) WHERE CNT < 61
IF (@@ERROR <> 0) BEGIN -- أ€أژآ؛¥أ…أ¤¸® »أ½¼آ؛ ½أ‡أ†أگ! ROLLBACK TRANSACTION RETURN -7 END -- µأ°أ†أ؛أ†®·أژ ¼±أ…أƒأ‡أ‘ ¾أ†أ€أŒأ…أ›أ€» ´أ™½أƒ ³أ–¾îأپأ–أ€أڑ... /* آ؟أ¤·± ¼أ¸¼*·أژ أپ¤أ€أ‡µأ‡¾î أ€أ–´أ™. 0: EQUIP_SLOT_HELM 1: EQUIP_SLOT_MAIL, 2: EQUIP_SLOT_SHOULDERGUARD, 3: EQUIP_SLOT_GAUNTLET, 4: EQUIP_SLOT_PANTS, 5: EQUIP_SLOT_BOOTS, 6: EQUIP_SLOT_WEAPON, 7: EQUIP_SLOT_SHIELD or ARROW, 8: EQUIP_SLOT_EARRING, 9: EQUIP_SLOT_NECKLACE, 10: EQUIP_SLOT_L_RING, 11: EQUIP_SLOT_R_RING, */ DECLARE @ItemID BIGINT SET @ItemID = 0
-- »أ³°© IF (@RefMailID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 1, @RefMailID, @DurMail IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -8 END END -- ¹أ™أپأ¶ IF (@RefPantsID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 4, @RefPantsID, @DurPants IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -9 END END -- Boots IF (@RefBootsID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 5, @RefBootsID, @DurBoots IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -10 END END -- Weapon IF (@RefWeaponID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 6, @RefWeaponID, @DurWeapon IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -11 END END -- أˆ¤½أƒ default·أژ ¼±أ…أƒأ‡أ‘ ¹«±â°آ، أˆ°أ€أŒ¶أ³¸é أˆ*»أ¬ 250°³µéأ€أŒ أˆ°أ…ëµµ أ‡أ”²² أپأک´أ™. أپأ’أ„آ،? IF (@DefaultArrow <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 7, @DefaultArrow, 250 IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -12 END END ----------------------------------------------------------------------------- -- default skill³أ–¾îأپأ–±â ----------------------------------------------------------------------------- DECLARE @country tinyINT EXEC @country = _GetObjCountry @RefCharID INSERT INTO _CharSkillMastery (CharID, MasteryID, [Level]) SELECT @NewCharID, MasteryID, 0 FROM _RefCharDefault_SkillMastery WITH (NOLOCK) WHERE Race = @country or Race = 3 IF (@@error <> 0) BEGIN ROLLBACK TRANSACTION RETURN -13 END INSERT INTO _CharSkill (CharID,SkillID,Enable) SELECT @NewCharID, SkillID, 1 FROM _RefCharDefault_Skill WITH (NOLOCK) WHERE Race = @country or Race = 3 IF (@@error <> 0) BEGIN ROLLBACK TRANSACTION RETURN -14 END
----------------------------------------------------------------------------- -- TutorialQuest³أ–¾îأپأ–±â ----------------------------------------------------------------------------- INSERT INTO _CharQuest (CharID, QuestID, Status, AchievementCount, StartTime, EndTime, QuestData1, QuestData2) SELECT @NewCharID, QuestID, 4, 0, getdate(), getdate(), 0, 0 FROM _RefCharDefault_Quest WITH (NOLOCK) WHERE Race = @country or Race = 3 IF (@@error <> 0) BEGIN ROLLBACK TRANSACTION RETURN -15 END ----------------------------------------------------------------------------- -- Static Avatar Initial Record ³أ–±â ----------------------------------------------------------------------------- INSERT INTO _StaticAvatar(CharID) values(@NewCharID) IF (@@ERROR <> 0) BEGIN ROLLBACK TRANSACTION RETURN -16 END
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- PATCH_READY ¹«آ؟آھ°أ؛ »ï°¢´ë¸³2 (أƒأ–أ€أژأˆ£) --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ----------------------------------------------------------------------------- -- Trijob أƒ¤آ؟أ¶³أ–±â!!!!! ----------------------------------------------------------------------------- INSERT INTO _CharTrijob VALUES (@NewCharID, 0, 1, 0, 0, 0) IF (@@ERROR <> 0) BEGIN -- أ€أژآ؛¥أ…أ¤¸® »أ½¼آ؛ ½أ‡أ†أگ! ROLLBACK TRANSACTION RETURN -17 END
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- PATCH_READY ¹«آ؟آھ°أ؛ »ï°¢´ë¸³2 (أƒأ–أ€أژأˆ£) --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ insert _AccountJID values(@Accname, @UserJID,0) ----------------------------------------------------------------------------- -- CharListآ؟آ، ID ³أ–¾îأپأ–±â ----------------------------------------------------------------------------- INSERT _CharNameList VALUES(@CharName, @NewCharID) COMMIT TRANSACTION
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_E060118_60EXP_HELP',1,1 exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_E060118_100EXP_HELP',1,1
-- Quick Slot أپ¤آ؛¸ أ€أ؛أ€أ¥آ؟ë!!! exec _AddNewClientConfig @NewCharID -- by novice...... for saving client configurations...
RETURN @NewCharID
وده برضو اللى المفروض هتعمله بعد ماتمسح اللى عندك من نتايجك انت !
كود PHP:
CREATE PROCEDURE [dbo].[_AddNewChar]
كود PHP:
CREATE PROCEDURE [dbo].[_AddNewChar] @UserJID INT, --@CharSlot INT, @RefCharID INT, @CharName varchar (64), @CharScale tinyINT, @StartRegionID INT, @StartPos_X real, @StartPos_Y real, @StartPos_Z real, @DefaultTeleport INT, @RefMailID INT, @RefPantsID INT, @RefBootsID INT, @RefWeaponID INT, @RefShield INT, @DurMail tinyINT, @DurPants tinyINT, @DurBoots tinyINT, @DurWeapon tinyINT, @DurShield tinyINT, @DefaultArrow INT AS SET NOCOUNT ON
DECLARE @Slot INT DECLARE @temp INT DECLARE @NewCharID INT SET @NewCharID = 0 ----------------------------------------------------------------------------- -- 1. أ„³¸¯أ…أچ ½½·أ” ³أ‘¹أ¶°آ، validأ‡أ‘ °أچأ€أژأپأ¶, ±×¸®°أ* آ؛أ³½½·أ”أ€أŒ ¸أ‚´أ‚أپأ¶ ¸أ•أ€أ؛ أƒ¼أ…©أ‡أ‘´أ™. ----------------------------------------------------------------------------- -- start by novice. SELECT @temp = count(CharID) FROM _User WITH (NOLOCK) WHERE UserJID = @UserJID IF (@temp >= 4) BEGIN -- ³أٹ¹« ¸¹أ€أڑ³آھ RETURN -2 END -- finish by novice. ----------------------------------------------------------------------------- -- 2. أ„³¸¯أ…أچ أƒأں°آ،أ‡أڈ±â ----------------------------------------------------------------------------- IF (@CharScale > 68) -- 0100 0100 --> 68 أ€أŒ´أ™! BEGIN -- أ„³¸¯أ…أچ »أ½¼آ؛ ½أ‡أ†أگ! ½آ؛أ„أ‰أ€أڈ °آھأ€أŒ أ€أŒ»أ³أ‡أڈ´أ™! RETURN -3 END EXEC @temp = _IsExistingCharName @CharName IF (@temp <> 0) BEGIN -- أ€أŒ¹أŒ »çآ؟ëأپأںأ€أژ أ€أŒ¸§أ€أŒ¶أ³´أ‚µ¥? RETURN -4 END BEGIN TRANSACTION -- أ€أژ´أ¸½أƒ½آ؛أ…أ›أ€أŒ أ€ûآ؟ëµأ‡¸é¼* ¸¶أپأ¶¸·آ؟آ، WorldIDآ؟أچ 1°آھأ€» ´أµ ³أ–¾î أپأ–¾أ؛´أ™! INSERT INTO _Char (RefObjID, CharName16, Scale, Strength, Intellect, LatestRegion,PosX, PosY, PosZ, AppointedTeleport, InventorySize, LastLogout, CurLevel, MaxLevel, RemainGold, RemainStatPoint, RemainSkillPoint, HP, MP, JobLvl_Trader, JobLvl_Hunter, JobLvl_Robber, WorldID) VALUES (@RefCharID, @CharName, @CharScale, 20, 20, @StartRegionID, @StartPos_X, @StartPos_Y, @StartPos_Z, @DefaultTeleport, 45, GetDate(), 1, 1, 0, 0, 0, 200,200, 1, 1, 1, 1) SET @NewCharID = @@IDENTITY IF (@@ERROR <> 0 OR @@ROWCOUNT = 0) BEGIN -- أ„³¸¯أ…أچ »أ½¼آ؛ ½أ‡أ†أگ! ROLLBACK TRANSACTION RETURN -5 END -- start by novice. -- أ€أŒأپ¦ Slot ¾أˆ¾´´أ™.. ±×³أ‰ Insert ¸¸.. INSERT INTO _User VALUES (@UserJID, @NewCharID) -- finish by novice. ----------------------------------------------------------------------------- -- 3-1. أ€أ¥آ؛أ± ½½·أ” أƒ¤آ؟أ¬±â -- [أ€أژآ؛¥أ…أ¤¸® ½½·أ” 96°³] + [أ€أ¥آ؛أ±½½·أ” 13°³] <- أ€أژآ؛¥أ…أ¤¸® أˆ®أ€أ¥ ¼*آ؛أ±½آ؛ أˆأ„ 48°³آ؟آ،¼* 96°³·أژ أپأµ°آ،!!!(woos0) ----------------------------------------------------------------------------- --PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!! INSERT INTO _Inventory(CharID, Slot, ItemID) SELECT @NewCharID, cnt, 0 FROM _RefDummySlot with( nolock ) WHERE cnt < 109
IF (@@ERROR <> 0) BEGIN -- أ€أژآ؛¥أ…أ¤¸® »أ½¼آ؛ ½أ‡أ†أگ! ROLLBACK TRANSACTION RETURN -7 END
--PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!! -- µأ°أ†أ؛أ†®·أژ ¼±أ…أƒأ‡أ‘ ¾أ†أ€أŒأ…أ›أ€» ´أ™½أƒ ³أ–¾îأپأ–أ€أڑ... /* آ؟أ¤·± ¼أ¸¼*·أژ أپ¤أ€أ‡µأ‡¾î أ€أ–´أ™. 0: EQUIP_SLOT_HELM 1: EQUIP_SLOT_MAIL, 2: EQUIP_SLOT_SHOULDERGUARD, 3: EQUIP_SLOT_GAUNTLET, 4: EQUIP_SLOT_PANTS, 5: EQUIP_SLOT_BOOTS, 6: EQUIP_SLOT_WEAPON, 7: EQUIP_SLOT_SHIELD or ARROW, 8: EQUIP_SLOT_EARRING, 9: EQUIP_SLOT_NECKLACE, 10: EQUIP_SLOT_L_RING, 11: EQUIP_SLOT_R_RING, */ DECLARE @ItemID BIGINT SET @ItemID = 0 -- »أ³°© IF (@RefMailID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 1, @RefMailID, @DurMail IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -8 END END -- ¹أ™أپأ¶ IF (@RefPantsID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 4, @RefPantsID, @DurPants IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -9 END END -- Boots IF (@RefBootsID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 5, @RefBootsID, @DurBoots IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -10 END END -- Weapon IF (@RefWeaponID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 6, @RefWeaponID, @DurWeapon IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -11 END END -- ¹أ¦أ†أگ IF (@RefShield <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 7, @RefShield, @DurShield IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -12 END END -- أˆ¤½أƒ default·أژ ¼±أ…أƒأ‡أ‘ ¹«±â°آ، أˆ°أ€أŒ¶أ³¸é أˆ*»أ¬ 250°³µéأ€أŒ أˆ°أ…ëµµ أ‡أ”²² أپأک´أ™. أپأ’أ„آ،? IF (@DefaultArrow <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 7, @DefaultArrow, 250 IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -13 END END
----------------------------------------------------------------------------- -- 3-2. ¾أ†¹أ™أ…¸ Inventory ½½·أ” أƒ¤آ؟أ¬±â -- [¾أ†¹أ™أ…¸ أ€أژآ؛¥أ…أ¤¸® ½½·أ” 5°³] -- APPLY_AVATAR_SYSTEMأ€أŒ أ€ûآ؟ëµأ‡¸é¼* أƒأں°آ،µأ‡´أ‚ آ؛أژآ؛أگ ----------------------------------------------------------------------------- --PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!! INSERT INTO _InventoryForAvatar(CharID, Slot, ItemID) SELECT @NewCharID, cnt, 0 FROM _RefDummySlot with( nolock ) WHERE cnt < 5
IF (@@ERROR <> 0) BEGIN -- ¾أ†¹أ™أ…¸ أ€أژآ؛¥أ…أ¤¸® »أ½¼آ؛ ½أ‡أ†أگ! ROLLBACK TRANSACTION RETURN -14 END --PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!! ----------------------------------------------------------------------------- -- default skill³أ–¾îأپأ–±â ----------------------------------------------------------------------------- DECLARE @country tinyINT EXEC @country = _GetObjCountry @RefCharID INSERT INTO _CharSkillMastery (CharID, MasteryID, Level) SELECT @NewCharID, MasteryID, 0 FROM _RefCharDefault_SkillMastery with(nolock) WHERE Race = @country or Race = 3 IF (@@error <> 0) BEGIN ROLLBACK TRANSACTION RETURN -15 END INSERT INTO _CharSkill (CharID,SkillID,Enable) SELECT @NewCharID, SkillID, 1 FROM _RefCharDefault_Skill with(nolock) WHERE Race = @country or Race = 3 IF (@@error <> 0) BEGIN ROLLBACK TRANSACTION RETURN -16 END ----------------------------------------------------------------------------- -- ±âآ؛» أ„ù½آ؛أ†® ³أ–¾îأپأ–±â ----------------------------------------------------------------------------- INSERT INTO _CharQuest (CharID, QuestID, Status, AchievementCount, StartTime, EndTime, QuestData1, QuestData2) SELECT @NewCharID, ID, 1, 0, getdate(), getdate(), 0, 0 FROM _RefQuest WHERE CodeName in (SELECT CodeName FROM _RefCharDefault_Quest with(nolock) WHERE (Race = @country or Race = 3) and RequiredLevel = 1 and Service = 1) IF (@@error <> 0) BEGIN ROLLBACK TRANSACTION RETURN -17 END ----------------------------------------------------------------------------- -- Static Avatar Initial Record ³أ–±â ----------------------------------------------------------------------------- INSERT INTO _StaticAvatar(CharID) values(@NewCharID) IF (@@ERROR <> 0) BEGIN ROLLBACK TRANSACTION RETURN -18 END ----------------------------------------------------------------------------- -- Trijob أƒ¤آ؟أ¶³أ–±â!!!!! ----------------------------------------------------------------------------- INSERT INTO _CharTrijob VALUES (@NewCharID, 0, 1, 0, 0, 0) IF (@@ERROR <> 0) BEGIN -- أ€أژآ؛¥أ…أ¤¸® »أ½¼آ؛ ½أ‡أ†أگ! ROLLBACK TRANSACTION RETURN -19 END ----------------------------------------------------------------------------- -- CharListآ؟آ، ID ³أ–¾îأپأ–±â ----------------------------------------------------------------------------- INSERT _CharNameList VALUES(@CharName, @NewCharID) exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_E060118_60EXP_HELP',1,1 exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_E060118_100EXP_HELP',1,1 exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_SCROLL_RETURN_NEWBIE_01',20,1 -- Quick Slot أپ¤آ؛¸ أ€أ؛أ€أ¥آ؟ë!!! exec _AddNewClientConfig @NewCharID -- by novice...... for saving client configurations...
COMMIT TRANSACTION RETURN @NewCharID
كود PHP:
-- 2008.12.19 woos0 ---------------------------------------------------------------------------------- -- أˆ®أ€أ¥أ‡أڈ´أ‚ أ€أژآ؛¥أ…أ¤¸®آ؟آ، ¸أ‚أƒç أƒأ–´ë أ‡أ‘µµ¼أ¶آ؟آ، ´ëأ‡أ‘ DummySlot (_RefDummySlot) أ€» -- أ‡أ¶أ€ç±îأپأ¶ »أ½¼آ؛أ‡أ‘ أ„³¸¯أ…أچآ؟آ، ³أ–¾îأپأک´أ™. (أ€أŒأˆأ„ »أ½¼آ؛أ‡أڈ´أ‚ أ„³¸¯أ…أچ´أ‚ ¼أ¶أپ¤µأˆ _AddNewCharآ؟آ،¼* أƒ³¸®) -- -- ±âأپ¸ 61°³ ( 13(أ€أ¥آ؛أ±) + 32(±âآ؛»أ€أژآ؛¥) + 16(أ„ù½آ؛أ†®أˆ®أ€أ¥) ) آ؟آ،¼* أˆ®أ€أ¥أ‡أڈآ؟© -- أ‡أ¶أ€ç 109°³ ( 13(أ€أ¥آ؛أ±) + 32(±âآ؛»أ€أژآ؛¥) + 20(أ„ù½آ؛أ†®أˆ®أ€أ¥) + 32(½أ‡أ…© أˆ®أ€أ¥ ¾أ†أ€أŒأ…أ›) + 10(أƒأںأˆأ„ ±âأˆ¹) ) ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- -- أ€أŒ¹أ¸ أˆ®أ€أ¥أ€¸·أژ 109°³ ±îأپأ¶ °آ،¹أ‡·أژ, أ‡أپ·أژ½أƒأ€أ؛ »أ³أ€¸·أژ أ€أژµ¦½آ؛ °آھأ€أژ 61 ~ 108 ¸¦ أ€أ”·أ‚أ‡أکµµ µأ‡أپأ¶¸¸, -- أƒأںأˆأ„ أ‡أ‘¹أ¸ ´أµ أˆ®أ€أ¥أ‡أ’ °آ،´أ‰¼آ؛أ€» آ؟°µأژأ‡أڈآ؟© ½أƒأ€أ›½أƒ آ؛¯¼أ¶ µأژ°³¸¦ ´أµ ¹أµµ·أڈ أ‡أڈآ؟´´أ™. ----------------------------------------------------------------------------------
CREATE PROCEDURE _InsertDummySlotForExtention @BeginIndex tinyint, @EndIndex tinyint AS
-- أ€أ”·أ‚أ‡أ‘ أ€أژµ¦½آ؛ ¹أ¸أˆ£ أ€¯أˆآ؟¼آ؛ °أ‹»ç --------------------------------- IF(@BeginIndex > @EndIndex) BEGIN PRINT('½أƒأ€أ› أ€أژµ¦½آ؛ ¹أ¸أˆ£°آ، ³آ، أ€أژµ¦½آ؛ ¹أ¸أˆ£آ؛¸´أ™ أ…©´أ™!!!') RETURN END
-- أƒأں°آ،أ‡أ’ ´أµ¹أŒ½½·أ”آ؟آ، أ€أŒ¹أŒ ´أ™¸¥ ¾أ†أ€أŒأ…أ›أ€أŒ أ€أ–´أ‚أپأ¶ أˆ®أ€أژ --------------------------------------------------- IF EXISTS (SELECT CharID FROM _Inventory WHERE Slot >= @BeginIndex AND Slot <= @EndIndex AND ItemID <> 0) BEGIN PRINT('أƒأں°آ،أ‡أ’ ´أµ¹أŒ½½·أ”آ؟آ، أ€أŒ¹أŒ ´أ™¸¥ ¾أ†أ€أŒأ…أ›أ€أŒ أ€أ–´أ™!!!') RETURN END
-- ±âأپ¸ أ€أژآ؛¥أ…أ¤¸®آ؟آ، أ€أژµ¦½آ؛ ¹üأ€§آ؟آ، أ‡أک´çأ‡أڈ´أ‚ ½½·أ”أ€أŒ أ€أ–أ€»°أ¦آ؟أ¬ »èأپ¦ -------------------------------------------------------------- DELETE _Inventory WHERE Slot >= @BeginIndex AND Slot <= @EndIndex
BEGIN TRANSACTION
-- ±âأپ¸ _Inventoryآ؟آ، أƒأں°آ،µأ‡´أ‚ DummySlot أƒأں°آ، -------------------------------------------- INSERT _Inventory (CharID, Slot, ItemID) SELECT _Char.CharId, _RefDummySlot.cnt, 0 FROM _Char, _RefDummySlot WHERE _RefDummySlot.cnt >= @BeginIndex and _RefDummySlot.cnt <= @EndIndex and _Char.CharId <> 0 ORDER BY _Char.charid ASC
IF(@@ERROR = 0) BEGIN COMMIT TRANSACTION END ELSE BEGIN ROLLBACK TRANSACTION END
لو ظهرتلك النتايج زى ديه تقدر تمسح وتدخلهم من جديد :)
بس برضو قبل ماتعمل حاجه عاوزك تاخد نسخه من الداتا بيز وتجيب النتايج زى منا جايبهالك كده نشوفها الاول سوا :)
طبعاً ده مثال على اللى عندى انا :)
|