[Release] disable Job & Guild Penalty

03/04/2013 08:54 Nexus7#1
Hey guys. I want to start to share my experience with you.
Feel free to share a Thanks :)

Code:
USE [SRO_VT_SHARD]
GO
/******By Jangan ******/
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,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
03/04/2013 12:02 PortalDark#2
#approved
03/04/2013 12:38 soly95#3
nice work keep it up ..... enjoy it before haters comes :D
03/04/2013 13:18 IceAmStiel#4
Quote:
Originally Posted by Nexus7 View Post
Hey guys. I want to start to share my experience with you.
Feel free to share a Thanks :)

Code:
USE [SRO_VT_SHARD]
GO
/******[B][SIZE="5"]By Jangan[/SIZE][/B] ******/
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,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
Sure bro. Try to complete the FGW dungeon with that procedure, good luck.
03/04/2013 18:59 kebabas1600#5
i have workin one with it fgw works and fw dungeon too
03/05/2013 09:51 magicanoo#6
Here is a procedure which works with FGW etc (ONLY JOB,since I'm not interested in Guild resetting).

Code:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_AddTimedJob]    Script Date: 03/05/2013 10:49:15 ******/
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
	--##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
		
		if @Category=2 and @JobID=2
		begin
		delete from _TimedJob where ID=@NewJobID
		end
	return @NewJobID
Pretty simple eh :awesome:
03/05/2013 10:07 Nexus7#7
What is FGW ?
03/05/2013 14:50 magicanoo#8
Quote:
Originally Posted by Nexus7 View Post
What is FGW ?
Forgotten World,basically whenever you enter it the server inserts into _TimedJob a value,and since Jangan's query returns an error and disconnects the character,you can't enter the FGW with that procedure.
03/05/2013 15:50 AceSpace#9
Quote:
Originally Posted by Nexus7 View Post
Hey guys. I want to start to share my experience with you.
Feel free to share a Thanks :)

Code:
USE [SRO_VT_SHARD]
GO
/******By Jangan ******/
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,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
Are you sure that you made this query or copy/paste? -> Its by jangan
Code:
/******By Jangan ******/
03/05/2013 15:55 Nexus7#10
hmmm