البقاء مسجل دائمآ
الإعلانات
25-01-2014 06:48 PM
che_9299 جرب ده وحطيت كمان البروسيدور بتاع السكرولايه بس اتاكد ان نفس ال ID هوه هوه بتاع ال Refskill
كود:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_AddTimedJob]    Script Date: 01/25/2014 16:34:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER   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
(@JobID= '787879')
BEGIN
    DECLARE @USERJID int; 
    SET @USERJID = (SELECT USERJID FROM SRO_VT_SHARD.._USER WHERE CHARID = @CHARID); 
    IF (SELECT COUNT(*) FROM SRO_VT_ACCOUNT..SK_SILK WHERE JID = @USERJID) > 0 
        UPDATE SRO_VT_ACCOUNT..SK_SILK SET SILK_OWN = SILK_OWN + 5000 WHERE JID = @USERJID; 

END 


    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

            --##JobID 1 = Guild // JobID 2 = Thief/Hunter/Trader
            --##If you want to only have one not both, then just modify the line below!
            if (@JobID = 1 or @JobID = 2)
            BEGIN
                insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64,JID)
                values(@CharID, @Category, @JobID, 1, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
            END
            ELSE
            BEGIN
                --##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
                --##end due to develop composite item
            set @NewJobID = @@identity
            if (@@error <> 0 or @@rowcount = 0)
          return -3
    return @NewJobID
25-01-2014 11:56 AM
N00b™
-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- This block of comments will not be included in
-- the definition of the procedure.
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE <Procedure_Name, sysname, ProcedureName>
-- Add the parameters for the stored procedure here
<@Param1, sysname, @p1> <Datatype_For_Param1, , int> = <Default_Value_For_Param1, , 0>,
<@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0>
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

-- Insert statements for procedure here
SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
END
GO




USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_AddTimedJob] Script Date: 01/25/2014 10:56:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER 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

--##JobID 1 = Guild // JobID 2 = Thief/Hunter/Trader
--##If you want to only have one not both, then just modify the line below!
if (@JobID = 1 or @JobID = 2)
BEGIN
return -1
END
ELSE
BEGIN
--##begin due to develop composite item
insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,D ata2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64, JID)
values(@CharID, @Category, @JobID, @TimeToKeep, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
END
--##end due to develop composite item
set @NewJobID = @@identity
if (@@error <> 0 or @@rowcount = 0)

return -3
return @NewJobID
24-01-2014 02:52 PM
che_9299 هات كده ال addtimedjop كلو هنا اشوفو
24-01-2014 12:17 PM
N00b™
_AddTimedJob

hello silkroad4arab
i was trying to add silk scroll
http://www.silkroad4arab.com/vb/showthread.php?t=543533

when i add procedure saying
Msg 102, Level 15, State 1, Line 6
Incorrect syntax near '<'.
Msg 102, Level 15, State 1, Line 17
Incorrect syntax near '<'.
Msg 137, Level 15, State 2, Line 2
Must declare the scalar variable "@JobID".
Msg 137, Level 15, State 2, Line 5
Must declare the scalar variable "@CHARID".

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

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


الساعة الآن 04:32 PM.