حفظ بياناتي ؟

1/01/2023

22/05/2024_hema

22/05/2024_hema

END_shaher_01/01/2025

Ahmed_k_nayel_01_01_2025

END_02/12/2024

END 29/01/2025

END 06/12/2024

END 28/12/2024

END 30/12/2024_waiting

END 30/02/2025_Belal

END 06/01/2025

END 12/01/2025

END _14/01/2025_Karuoke

END _14/01/2025_Karuoke

END 18/01/2025

END 18/01/2025

END 20/01/2025_coinY

END 20/01/2025_1418

25/01/2022

QueenSro_01_10_2024

Ahmed_k_nayel_01_01_2025

ibrahim_END 07/1212024

END 29/01/2025

END 12/01/2025

END _14/01/2025_Karuoke

END 18/01/2025

END 18/01/2025

END 20/01/2025_coinY

 الـجـروب الـرسـمى لـلـمـنـتـدى FaceBook | Official Group 



قسم الاسئلة و الاستفسارات لعمل السيرفرات الخاصة [ قسم خاص لأسئلة واستفسارات عمل السيرفرات الخاصة ] [ يرجى الالتزام بقوانين قسم الأسئلة والاستفسارات ]

موضوع مغلق
 
أدوات الموضوع انواع عرض الموضوع
قديم 21-10-2012, 08:25 PM   #1

XxXBowXxX
عضو فعال



الصورة الرمزية XxXBowXxX


• الانـتـسـاب » Feb 2012
• رقـم العـضـويـة » 98641
• المشـــاركـات » 289
• الـدولـة » Alexandria
• الـهـوايـة »
• اسـم الـسـيـرفـر » Centaurus
• الـجـنـس » Male
• نقـاط التقييم » 10
XxXBowXxX صـاعـد

XxXBowXxX غير متواجد حالياً



افتراضي مساعدة من الاخوة قلي شغلين علي Castaway



انا عايز كوبي من AddNewChar علشان قلي عندي باظت ومش عارف اعملها ومينفعش اعمل ريستور علشان معايا ناس في السيرفر يا ريت المساعدة


توقيع XxXBowXxX :
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]


إعلانات google

قديم 21-10-2012, 08:56 PM   #2

محمد سعييد





• الانـتـسـاب » Jul 2012
• رقـم العـضـويـة » 102368
• المشـــاركـات » 818
• الـدولـة » giza egypt
• الـهـوايـة » computer servies
• اسـم الـسـيـرفـر » No Server
• الـجـنـس » Male
• نقـاط التقييم » 11
محمد سعييد صـاعـد

محمد سعييد غير متواجد حالياً



افتراضي



اتفضل

________________________



USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_AddNewChar] Script Date: 10/21/2012 10:44:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER 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. ij¸¯ÅÍ ½½•Ô ³Ñ¹ö°¡ 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. ij¸¯ÅÍ Ãß°¡Çϱâ
-----------------------------------------------------------------------------
IF (@CharScale > 68) -- 0100 0100 --> 68 ÀÌ´Ù!
BEGIN
-- ij¸¯ÅÍ »ý¼º ½ÇÆÐ! ½ºÄÉÀÏ °ªÀÌ ÀÌ»óÇÏ´Ù!
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, 85,
GetDate(), 1, 1, 0, 0, 5000, 200,200, 1, 1, 1, 1)

SET @NewCharID = @@IDENTITY
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
-- ij¸¯ÅÍ »ý¼º ½ÇÆÐ!
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
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_SPEED_UP_BASIC',20,1
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_E080723_HWAN_POTION',10,1
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_INTERNAL_150EXP_SCROLL',1,1
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_INTERNAL_150SP_SCROLL',1,1
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_RENT_REVERSE_RETURN_SCROLL', 1,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_HP_SUPERSET_2_BAG',250,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_MP_SUPERSET_2_BAG',250,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_SWORD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_TSWORD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_CROSSBOW_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_DAGGER_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_TSTAFF_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_HARP_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_STAFF_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_DARKSTAFF_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_SHIELD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_AXE_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_SPEAR_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_BOW_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_TBLADE_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_SWORD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_BLADE_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_SHIELD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_MALL_AVATAR_M_SANTA_HAT',1,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_MALL_AVATAR_M_SANTA',1,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_MALL_AVATAR_W_SANTA_HAT',1,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_MALL_AVATAR_W_SANTA',1,0


-- Quick Slot Á¤º¸ ÀúÀå¿ë!!!
exec _AddNewClientConfig @NewCharID -- by novice...... for saving client configurations...

COMMIT TRANSACTION

RETURN @NewCharID








اقتباس:
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_AddNewChar] Script Date: 10/21/2012 10:44:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER 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. ij¸¯ÅÍ ½½•Ô ³Ñ¹ö°¡ 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. ij¸¯ÅÍ Ãß°¡Çϱâ
-----------------------------------------------------------------------------
IF (@CharScale > 68) -- 0100 0100 --> 68 ÀÌ´Ù!
BEGIN
-- ij¸¯ÅÍ »ý¼º ½ÇÆÐ! ½ºÄÉÀÏ °ªÀÌ ÀÌ»óÇÏ´Ù!
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, 85,
GetDate(), 1, 1, 0, 0, 5000, 200,200, 1, 1, 1, 1)

SET @NewCharID = @@IDENTITY
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
-- ij¸¯ÅÍ »ý¼º ½ÇÆÐ!
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
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_SPEED_UP_BASIC',20,1
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_E080723_HWAN_POTION',10,1
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_INTERNAL_150EXP_SCROLL',1,1
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_INTERNAL_150SP_SCROLL',1,1
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_RENT_REVERSE_RETURN_SCROLL', 1,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_HP_SUPERSET_2_BAG',250,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_MP_SUPERSET_2_BAG',250,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_SWORD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_TSWORD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_CROSSBOW_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_DAGGER_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_TSTAFF_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_HARP_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_STAFF_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_DARKSTAFF_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_SHIELD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_EU_AXE_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_SPEAR_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_BOW_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_TBLADE_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_SWORD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_BLADE_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_CH_SHIELD_09_A_RARE',1,12
exec _ADD_ITEM_EXTERN @CharName,'ITEM_MALL_AVATAR_M_SANTA_HAT',1,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_MALL_AVATAR_M_SANTA',1,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_MALL_AVATAR_W_SANTA_HAT',1,0
exec _ADD_ITEM_EXTERN @CharName,'ITEM_MALL_AVATAR_W_SANTA',1,0


-- Quick Slot Á¤º¸ ÀúÀå¿ë!!!
exec _AddNewClientConfig @NewCharID -- by novice...... for saving client configurations...

COMMIT TRANSACTION

RETURN @NewCharID




قديم 21-10-2012, 09:15 PM   #3

XxXBowXxX
عضو فعال



الصورة الرمزية XxXBowXxX


• الانـتـسـاب » Feb 2012
• رقـم العـضـويـة » 98641
• المشـــاركـات » 289
• الـدولـة » Alexandria
• الـهـوايـة »
• اسـم الـسـيـرفـر » Centaurus
• الـجـنـس » Male
• نقـاط التقييم » 10
XxXBowXxX صـاعـد

XxXBowXxX غير متواجد حالياً



افتراضي



اقتباس:
المشاركة الأصلية كتبت بواسطة محمد سعييد عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
اتفضل

________________________



use [sro_vt_shard]
go
/****** object: Storedprocedure [dbo].[_addnewchar] script date: 10/21/2012 10:44:38 ******/
set ansi_nulls on
go
set quoted_identifier on
go
alter 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. ij¸¯ÅÍ ½½•Ô ³Ñ¹ö°¡ 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. ij¸¯ÅÍ Ãß°¡Çϱâ
-----------------------------------------------------------------------------
if (@charscale > 68) -- 0100 0100 --> 68 ÀÌ´Ù!
Begin
-- ij¸¯ÅÍ »ý¼º ½ÇÆÐ! ½ºÄÉÀÏ °ªÀÌ ÀÌ»óÇÏ´Ù!
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, 85,
getdate(), 1, 1, 0, 0, 5000, 200,200, 1, 1, 1, 1)

set @newcharid = @@identity
if (@@error <> 0 or @@rowcount = 0)
begin
-- ij¸¯ÅÍ »ý¼º ½ÇÆÐ!
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
exec _add_item_extern @charname,'item_etc_speed_up_basic',20,1
exec _add_item_extern @charname,'item_etc_e080723_hwan_potion',10,1
exec _add_item_extern @charname,'item_etc_internal_150exp_scroll',1,1
exec _add_item_extern @charname,'item_etc_internal_150sp_scroll',1,1
exec _add_item_extern @charname,'item_event_rent_reverse_return_scroll', 1,0
exec _add_item_extern @charname,'item_event_hp_superset_2_bag',250,0
exec _add_item_extern @charname,'item_event_mp_superset_2_bag',250,0
exec _add_item_extern @charname,'item_event_eu_sword_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_eu_tsword_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_eu_crossbow_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_eu_dagger_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_eu_tstaff_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_eu_harp_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_eu_staff_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_eu_darkstaff_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_eu_shield_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_eu_axe_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_ch_spear_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_ch_bow_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_ch_tblade_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_ch_sword_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_ch_blade_09_a_rare',1,12
exec _add_item_extern @charname,'item_event_ch_shield_09_a_rare',1,12
exec _add_item_extern @charname,'item_mall_avatar_m_santa_hat',1,0
exec _add_item_extern @charname,'item_mall_avatar_m_santa',1,0
exec _add_item_extern @charname,'item_mall_avatar_w_santa_hat',1,0
exec _add_item_extern @charname,'item_mall_avatar_w_santa',1,0


-- quick slot Á¤º¸ ÀúÀå¿ë!!!
Exec _addnewclientconfig @newcharid -- by novice...... For saving client configurations...

Commit transaction

return @newcharid
شكرا اوي والله المشكلة اتحلت والحمد لله علي ايد حضرتك


توقيع XxXBowXxX :
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]


قديم 21-10-2012, 09:39 PM   #4

™Anas™
عضو سوبر



الصورة الرمزية ™Anas™


• الانـتـسـاب » Oct 2011
• رقـم العـضـويـة » 93031
• المشـــاركـات » 2,931
• الـدولـة » PortSaid In My Heart
• الـهـوايـة » VictorSRO
• اسـم الـسـيـرفـر » Private Server
• الـجـنـس » Male
• نقـاط التقييم » 39
™Anas™ صـاعـد

™Anas™ غير متواجد حالياً



افتراضي



شكرا محمد
Close
#




موضوع مغلق


يتصفح الموضوع حالياً : 1 (0 عضو و 1 زائر)
 

ضوابط المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

المواضيع المتشابهه
الموضوع كاتب الموضوع المنتدى الردود آخر مشاركة
مساعدة من الاخوة الي معاهم بفات w1eg Ceres 5 20-09-2010 04:37 AM
طلب مساعدة من الاخوة xdvb قسم المواضيع المكررة و المخالفة 6 01-09-2009 07:54 AM
طلب مساعدة من الاخوة xdvb مـنـاقـشـات عـامـة حـول سيلك رود أون لايـن 8 28-08-2009 09:14 AM
ياريت مساعدة من الاخوة الفلات العالية فى سرفر اودين yousefmtm Bellona 0 24-09-2008 08:56 AM


الساعة الآن 09:40 PM.