الموقع العربي الاول للعبة Silkroad Online

الموقع العربي الاول للعبة Silkroad Online (https://silkroad4arab.com/vb/index.php)
-   قسم الاسئلة و الاستفسارات لعمل السيرفرات الخاصة (https://silkroad4arab.com/vb/forumdisplay.php?f=226)
-   -   طلب تعديل Add Teleport Query (https://silkroad4arab.com/vb/showthread.php?t=579683)

Spicoo 22-02-2015 05:40 PM

طلب تعديل Add Teleport Query
 
صلح الكويري دا من فضلك
انا محتاج كويري التلبورت دا ضروري
اقتباس:

SET NOCOUNT ON;

Declare @Tel_NAME varchar(128),
@refChar_1 varchar(32),
@refChar_2 varchar(32),
@OwnTeleport int,
@Fee int,
@req_Level int,
@ObjID int,
@RegionID smallint,
@Pos_X real,
@Pos_Y real,
@Pos_Z real,
@ObjLink int,
@TelID int,
@WorldID smallint;
SELECT @Tel_NAME = 'PVP_ZONE5',
@refChar_1 = 'Melrin',
@refChar_2 = 'ALO',
@OwnTeleport = 1,
@Fee = 500,
@req_Level = 0;


IF exists (SELECT 1 FROM dbo._RefObjCommon with(NOLOCK) WHERE CodeName128 = 'STORE_' + @Tel_NAME)
BEGIN
RAISERROR('Stated teleportname %s already exists!', 11, 1, @Tel_NAME);
RETURN;
END


SELECT @RegionID = LatestRegion,
@Pos_X = PosX,
@Pos_Y = PosY,
@Pos_Z = PosZ FROM dbo._Char WHERE CharName16 = @refChar_1;


INSERT INTO dbo._RefObjStruct SELECT 0;
SELECT @ObjLink = @@IDENTITY;


INSERT INTO dbo._RefObjCommon ([Service],CodeName128,ObjName128,OrgObjCodeName128,NameStrI D128,DescStrID128,CashItem,Bionic,TypeID1,TypeID2, TypeID3,TypeID4,DecayTime,Country,Rarity,CanTrade, CanSell,CanBuy,CanBorrow,CanDrop,CanPick,CanRepair ,CanRevive,CanUse,CanThrow,Price,CostRepair,CostRe vive,CostBorrow,KeepingFee,SellPrice,ReqLevelType1 ,ReqLevel1,ReqLevelType2,ReqLevel2,ReqLevelType3,R eqLevel3,ReqLevelType4,ReqLevel4,MaxContain,Region ID,Dir,OffsetX,OffsetY,OffsetZ,Speed1,Speed2,Scale ,BCHeight,BCRadius,EventID,AssocFileObj128,AssocFi leDrop128,AssocFileIcon128,AssocFile1_128,AssocFil e2_128,Link)
VALUES (1,'STORE_'+@Tel_NAME,@Tel_NAME,'xxx','SN_STORE_' + @Tel_NAME,'xxx',0,0,4,1,1,0,0,3,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,-1,0,-1,0,-1,0,-1,0,-1,@RegionID,0,@Pos_X,@Pos_Y,@Pos_Z,0,0,50,50,30,0, 'quest\teleport01.bsr','xxx','xxx','xxx','xxx',@Ob jLink)
SELECT @ObjID = @@IDENTITY;


SELECT 'server_dep\silkroad\textdata\teleportbuilding.txt »' 'Destination file', * FROM dbo._RefObjCommon with(NOLOCK) WHERE ID = @ObjID;
SELECT 'server_dep\silkroad\textdata\textdata_object.txt »' 'Destination file', 1, 'SN_STORE_' + @Tel_NAME, '', '', '', '', '', '', '', @Tel_NAME;


SELECT @WorldID = WorldID,
@RegionID = LatestRegion,
@Pos_X = PosX,
@Pos_Y = PosY,
@Pos_Z = PosZ FROM dbo._Char WHERE CharName16 = @refChar_1;


INSERT INTO dbo._RefTeleport ([Service],CodeName128,AssocRefObjCodeName128,AssocRefObjID, ZoneName128,GenRegionID,GenPos_X,GenPos_Y,GenPos_Z ,GenAreaRadius,CanBeResurrectPos,CanGotoResurrectP os,GenWorldID,BindInteractionMask,FixedService)
VALUES (1,'GATE_'+@Tel_NAME,'STORE_'+@Tel_NAME,@ObjID,'SN _STORE_'+@Tel_NAME,@RegionID,@Pos_X,@Pos_Y,@Pos_Z, 30,0,0,@WorldID,1,0);
SELECT @TelID = @@IDENTITY;


SELECT 'server_dep\silkroad\textdata\teleportdata.txt »' 'Destination file', [Service], ID, CodeName128, AssocRefObjID, ZoneName128, GenRegionID, GenPos_X, GenPos_Y, GenPos_Z, GenAreaRadius, CanBeResurrectPos, CanGotoResurrectPos, GenWorldID FROM dbo._RefTeleport with(NOLOCK) WHERE ID = @TelID;


INSERT INTO dbo._RefTeleLink ([Service],OwnerTeleport,TargetTeleport,Fee,RestrictBindMeth od,RunTimeTeleportMethod,CheckResult,Restrict1,Dat a1_1,Data1_2,Restrict2,Data2_1,Data2_2,Restrict3,D ata3_1,Data3_2,Restrict4,Data4_1,Data4_2,Restrict5 ,Data5_1,Data5_2)
VALUES (1,@OwnTeleport,@TelID,@Fee,0,0,0,CASE WHEN @req_Level > 0 THEN 1 ELSE 0 END,@req_Level,CASE WHEN @req_Level > 0 THEN 999 ELSE 0 END,0,0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO dbo._RefTeleLink ([Service],OwnerTeleport,TargetTeleport,Fee,RestrictBindMeth od,RunTimeTeleportMethod,CheckResult,Restrict1,Dat a1_1,Data1_2,Restrict2,Data2_1,Data2_2,Restrict3,D ata3_1,Data3_2,Restrict4,Data4_1,Data4_2,Restrict5 ,Data5_1,Data5_2)
VALUES (1,@TelID,@OwnTeleport,@Fee,0,0,0,CASE WHEN @req_Level > 0 THEN 1 ELSE 0 END,@req_Level,CASE WHEN @req_Level > 0 THEN 999 ELSE 0 END,0,0,0,0,0,0,0,0,0,0,0,0);

SELECT 'server_dep\silkroad\textdata\teleportlink.txt »' 'Destination file', 1, @OwnTeleport, @TelID, @Fee, 0, 0, 0, CASE WHEN @req_Level > 0 THEN 1 ELSE 0 END, @req_Level, CASE WHEN @req_Level > 0 THEN 999 ELSE 0 END, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 UNION ALL
SELECT 'server_dep\silkroad\textdata\teleportlink.txt »' 'Destination file', 1, @TelID, @OwnTeleport, @Fee, 0, 0, 0, CASE WHEN @req_Level > 0 THEN 1 ELSE 0 END, @req_Level, CASE WHEN @req_Level > 0 THEN 999 ELSE 0 END, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;


SET NOCOUNT OFF;

RAISERROR('Transaction for teleport %s successfully completed!', 10, 1, @Tel_NAME);

Hamza FiGo 22-02-2015 05:51 PM

رد: Figo
 
اول حاجة ياريت بعد كدة تسمي الموضوع باسم تاني بعد اذنك علشان نوافق علي الموضوع

تاني حاجة اتفضل


كود:

USE SRO_VT_SHARD

SET NOCOUNT ON;

Declare @Tel_NAME varchar(128),
@refChar_1 varchar(32),
@refChar_2 varchar(32),
@OwnTeleport int,
@Fee int,
@req_Level int,
@ObjID int,
@RegionID smallint,
@Pos_X real,
@Pos_Y real,
@Pos_Z real,
@ObjLink int,
@TelID int,
@WorldID smallint;
SELECT @Tel_NAME = 'PVP_ZONE5',
@refChar_1 = 'Melrin',
@refChar_2 = 'ALO',
@OwnTeleport = 1,
@Fee = 500,
@req_Level = 0;


IF exists (SELECT 1 FROM dbo._RefObjCommon with(NOLOCK) WHERE CodeName128 = 'STORE_' + @Tel_NAME)
BEGIN
RAISERROR('Stated teleportname %s already exists!', 11, 1, @Tel_NAME);
RETURN;
END


SELECT @RegionID = LatestRegion,
@Pos_X = PosX,
@Pos_Y = PosY,
@Pos_Z = PosZ FROM dbo._Char WHERE CharName16 = @refChar_1;


INSERT INTO dbo._RefObjStruct SELECT 0;
SELECT @ObjLink = @@IDENTITY;


INSERT INTO dbo._RefObjCommon ([Service],CodeName128,ObjName128,OrgObjCodeName128,NameStrID128,DescStrID128,CashItem,Bionic,TypeID1,TypeID2, TypeID3,TypeID4,DecayTime,Country,Rarity,CanTrade, CanSell,CanBuy,CanBorrow,CanDrop,CanPick,CanRepair ,CanRevive,CanUse,CanThrow,Price,CostRepair,CostRevive,CostBorrow,KeepingFee,SellPrice,ReqLevelType1 ,ReqLevel1,ReqLevelType2,ReqLevel2,ReqLevelType3,ReqLevel3,ReqLevelType4,ReqLevel4,MaxContain,RegionID,Dir,OffsetX,OffsetY,OffsetZ,Speed1,Speed2,Scale ,BCHeight,BCRadius,EventID,AssocFileObj128,AssocFileDrop128,AssocFileIcon128,AssocFile1_128,AssocFile2_128,Link)
VALUES (1,'STORE_'+@Tel_NAME,@Tel_NAME,'xxx','SN_STORE_' + @Tel_NAME,'xxx',0,0,4,1,1,0,0,3,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,-1,0,-1,0,-1,0,-1,0,-1,@RegionID,0,@Pos_X,@Pos_Y,@Pos_Z,0,0,50,50,30,0, 'quest\teleport01.bsr','xxx','xxx','xxx','xxx',@ObjLink)
SELECT @ObjID = @@IDENTITY;


SELECT 'server_dep\silkroad\textdata\teleportbuilding.txt »' 'Destination file', * FROM dbo._RefObjCommon with(NOLOCK) WHERE ID = @ObjID;
SELECT 'server_dep\silkroad\textdata\textdata_object.txt »' 'Destination file', 1, 'SN_STORE_' + @Tel_NAME, '', '', '', '', '', '', '', @Tel_NAME;


SELECT @WorldID = WorldID,
@RegionID = LatestRegion,
@Pos_X = PosX,
@Pos_Y = PosY,
@Pos_Z = PosZ FROM dbo._Char WHERE CharName16 = @refChar_1;


INSERT INTO dbo._RefTeleport ([Service],CodeName128,AssocRefObjCodeName128,AssocRefObjID, ZoneName128,GenRegionID,GenPos_X,GenPos_Y,GenPos_Z ,GenAreaRadius,CanBeResurrectPos,CanGotoResurrectPos,GenWorldID,BindInteractionMask,FixedService)
VALUES (1,'GATE_'+@Tel_NAME,'STORE_'+@Tel_NAME,@ObjID,'SN _STORE_'+@Tel_NAME,@RegionID,@Pos_X,@Pos_Y,@Pos_Z, 30,0,0,@WorldID,1,0);
SELECT @TelID = @@IDENTITY;


SELECT 'server_dep\silkroad\textdata\teleportdata.txt »' 'Destination file', [Service], ID, CodeName128, AssocRefObjID, ZoneName128, GenRegionID, GenPos_X, GenPos_Y, GenPos_Z, GenAreaRadius, CanBeResurrectPos, CanGotoResurrectPos, GenWorldID FROM dbo._RefTeleport with(NOLOCK) WHERE ID = @TelID;


INSERT INTO dbo._RefTeleLink ([Service],OwnerTeleport,TargetTeleport,Fee,RestrictBindMethod,RunTimeTeleportMethod,CheckResult,Restrict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Restrict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,Restrict5 ,Data5_1,Data5_2)
VALUES (1,@OwnTeleport,@TelID,@Fee,0,0,0,CASE WHEN @req_Level > 0 THEN 1 ELSE 0 END,@req_Level,CASE WHEN @req_Level > 0 THEN 999 ELSE 0 END,0,0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO dbo._RefTeleLink ([Service],OwnerTeleport,TargetTeleport,Fee,RestrictBindMethod,RunTimeTeleportMethod,CheckResult,Restrict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Restrict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,Restrict5 ,Data5_1,Data5_2)
VALUES (1,@TelID,@OwnTeleport,@Fee,0,0,0,CASE WHEN @req_Level > 0 THEN 1 ELSE 0 END,@req_Level,CASE WHEN @req_Level > 0 THEN 999 ELSE 0 END,0,0,0,0,0,0,0,0,0,0,0,0);

SELECT 'server_dep\silkroad\textdata\teleportlink.txt »' 'Destination file', 1, @OwnTeleport, @TelID, @Fee, 0, 0, 0, CASE WHEN @req_Level > 0 THEN 1 ELSE 0 END, @req_Level, CASE WHEN @req_Level > 0 THEN 999 ELSE 0 END, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 UNION ALL
SELECT 'server_dep\silkroad\textdata\teleportlink.txt »' 'Destination file', 1, @TelID, @OwnTeleport, @Fee, 0, 0, 0, CASE WHEN @req_Level > 0 THEN 1 ELSE 0 END, @req_Level, CASE WHEN @req_Level > 0 THEN 999 ELSE 0 END, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;


SET NOCOUNT OFF;

RAISERROR('Transaction for teleport %s successfully completed!', 10, 1, @Tel_NAME);


Hamza FiGo 23-02-2015 03:22 AM

رد: Figo
 
تمام يغلق

##


الساعة الآن 10:21 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.