- Joined
- Jun 29, 2008
- Messages
- 5,021
- Reaction score
- 999
Since so many people utterly fail to follow the guides on how to properly create the linked server i finally give up trying to teach people how to do it. Instead i will try removing the linked server requirement altogether.
I thought we actually had one of these topics already but i can't find it now (which means somebody is probably gonna post it below).
Open up Query Analyser (or management studo for 2005 users). Find cabal_sp_newchar in the gamedb. Right-click and Edit.
Delete everything in that window and paste in everything below:
Now press F5 or Execute.
Next find cabal_sp_delchar and do the same.
Hopefully that will stop the endless stream of failed-to-pay-attention.
I thought we actually had one of these topics already but i can't find it now (which means somebody is probably gonna post it below).
Open up Query Analyser (or management studo for 2005 users). Find cabal_sp_newchar in the gamedb. Right-click and Edit.


Delete everything in that window and paste in everything below:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.cabal_sp_newchar Script Date: 2008-4-14 5:52:47 ******/
ALTER PROCEDURE [dbo].[cabal_sp_newchar] (@charname varchar(16), @characteridx int, @style int, @stylemast int)
AS
begin
SET NOCOUNT ON
if( exists ( select * from cabal_badwoard where badword=@charname ) ) select convert(int,0x04)
else if( exists ( select * from cabal_character_table where Name=@charname ) ) select convert(int,0x03)
else if( exists ( select * from cabal_character_table where characteridx=@characteridx ) ) select convert(int,0x02)
else if( @stylemast < 0x01 or @stylemast > 0x06 ) select convert(int,0x02)
else
begin
-----------------------------------------------------------------------------------------------
declare @RegTime dateTime, @userNum int, @serverIdx int, @result int
set @userNum = @characterIdx/8
set @serverIdx = dbo.getServerIdx()
set @RegTime = getDate()
set @result = convert(int, 0xA0) + @stylemast
------------------------------------------------------------------------------------------------
select charTable.*, etcTable.equipmentData, etcTable.inventoryData, etcTable.skillData,
etcTable.quickSlotData, etcTable.questData, etcTable.questFlagsData
into #tempTable
from account.dbo.cabal_newCharData_table as charTable,
account.dbo.cabal_newEtcData_table as etcTable,
( select top 1 charDataIdx, etcDataIdx from account.dbo.cabal_newFlagData_table
where channel = @serverIdx) as flagTable
where flagTable.etcDataIdx = etcTable.dataIdx and flagTable.charDataIdx = charTable.dataIdx
and charTable.classType = etcTable.classType and charTable.classType = @stylemast
IF( NOT EXISTS ( select * from #tempTable))
BEGIN
select convert(int, 0x01)
drop table #tempTable
return
END
-----------------------------------------------------------------------------------------------
-- 캐릭터 카운트 증가
EXEC account.dbo.cabal_sp_update_character_count @userNum, @serverIdx, 1
--캐릭터 생성
insert into cabal_character_table( CharacterIdx, Name, LEV, [EXP], [STR], DEX, [INT], PNT, Rank, Alz,
WorldIdx, [Position], Style, HP, MP, SP, SwdPNT, MagPNT, RankEXP, Flags, WarpBField, MapsBField, Reputation, Reserved1 )
select @characteridx, @charname, LEV, [EXP], [STR], [DEX], [INT], [PNT], Rank, Alz,
WorldIdx, Position, @style, HP, MP, SP, SwdPNT, MagPNT, RankEXP, Flags, WarpBField, MapsBField, Reputation, Reserved1
from #TempTable
begin tran
insert into cabal_equipment_table (characterIdx, data) select @characteridx, equipmentData from #TempTable
insert into cabal_inventory_table (characterIdx, data) select @characteridx, inventoryData from #TempTable
insert into cabal_skilllist_table (characterIdx, data) select @characteridx, skillData from #TempTable
insert into cabal_quickslot_table (characterIdx, data) select @characteridx, quickSlotData from #TempTable
insert into cabal_questdata_table (characterIdx, data, flags) select @characteridx, questData, questFlagsData from #TempTable
commit tran
----------------------------------------------------------------------------------------------
-- 리턴값 0xA1 ~ 0xA6
drop table #tempTable
select convert(int, @result)
-----------------------------------------------------------------------------------------------
end
SET NOCOUNT OFF
end
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Now press F5 or Execute.
Next find cabal_sp_delchar and do the same.
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.cabal_sp_delchar Script Date: 2008-4-14 5:52:47 ******/
ALTER PROCEDURE [dbo].[cabal_sp_delchar] (@characteridx int)
AS
begin
SET NOCOUNT ON
DECLARE @ROWCOUNT int
BEGIN
--If GuildMaster, return 0xB2
SELECT @ROWCOUNT = COUNT(A.GroupIndex) FROM GUILDGROUP A
INNER JOIN
(
SELECT GroupIndex FROM GUILDMEMBER WHERE CharacterIndex = @characteridx
) B
ON A.GroupIndex = B.GroupIndex
WHERE A.GroupPermission = 0
IF( @ROWCOUNT > 0 )
BEGIN
SELECT CONVERT(INT, 0xB2)
SET NOCOUNT OFF
RETURN
END
END
begin tran
INSERT INTO DELETED_CABAL_CHARACTER_TABLE(
CHARACTERIDX, NAME, LEV, EXP, STR, DEX, INT, PNT, RANK, ALZ, WORLDIDX, POSITION, STYLE, HP, MP, SWDPNT, MAGPNT, RANKEXP, FLAGS, WARPBFIELD, MAPSBFIELD, SP, PENALTYEXP, LOGOUTTIME, RP, REPUTATION, LOGINTIME, PLAYTIME, CHANNELIDX, CreateDate, EQUIPDATA, INVENDATA, SKILLDATA, QSLOTDATA, QDFLAGS, QSTDATA, QSTFLAGS, Level0, Level1, Level2, Level3, Level4, Exp0, Exp1, Exp2, Exp3, Exp4, CraftFlags, PKPenalty, Nation, BBeadData)
SELECT
A.CHARACTERIDX, NAME, LEV, EXP, STR, DEX, INT, PNT, RANK, ALZ, WORLDIDX, POSITION, STYLE, HP, MP, SWDPNT, MAGPNT, RANKEXP, A.FLAGS, WARPBFIELD, MAPSBFIELD, SP, PENALTYEXP, LOGOUTTIME, RP, REPUTATION, LOGINTIME, PLAYTIME, CHANNELIDX, CreateDate, B.DATA, C.DATA, D.DATA, E.DATA, F.FLAGS, G.DATA, G.FLAGS, H.Level0, H.Level1, H.Level2, H.Level3, H.Level4, H.Exp0, H.Exp1, H.Exp2, H.Exp3, H.Exp4, H.Flags, A.PKPenalty, A.Nation, I.DATA
FROM CABAL_CHARACTER_TABLE A
LEFT OUTER JOIN CABAL_EQUIPMENT_TABLE B ON A.CHARACTERIDX = B.CHARACTERIDX
LEFT OUTER JOIN CABAL_INVENTORY_TABLE C ON A.CHARACTERIDX = C.CHARACTERIDX
LEFT OUTER JOIN CABAL_SKILLLIST_TABLE D ON A.CHARACTERIDX = D.CHARACTERIDX
LEFT OUTER JOIN CABAL_QUICKSLOT_TABLE E ON A.CHARACTERIDX = E.CHARACTERIDX
LEFT OUTER JOIN CABAL_QDDATA_TABLE F ON A.CHARACTERIDX = F.CHARACTERIDX
LEFT OUTER JOIN CABAL_QUESTDATA_TABLE G ON A.CHARACTERIDX = G.CHARACTERIDX
LEFT OUTER JOIN CABAL_CRAFT_TABLE H ON A.CHARACTERIDX = H.CHARACTERIDX
LEFT OUTER JOIN CABAL_BBEAD_TABLE I ON A.CHARACTERIDX = I.CHARACTERIDX
WHERE A.CHARACTERIDX = @characteridx
delete from chat_buddy_table where (RegisterCharIdx = @characteridx) OR (RegisteeCharIdx = @characteridx)
delete from chat_buddygroup_table where CharIdx = @characteridx
delete from guildmember where characterindex = @characteridx
delete from cabal_bbead_table where CharacterIdx=@characteridx
delete from cabal_craft_table where Characteridx=@characteridx
delete from cabal_equipment_table where CharacterIdx=@characteridx
delete from cabal_inventory_table where CharacterIdx=@characteridx
delete from cabal_skilllist_table where CharacterIdx=@characteridx
delete from cabal_quickslot_table where CharacterIdx=@characteridx
delete from cabal_questdata_table where CharacterIdx=@characteridx
delete from cabal_qddata_table where CharacterIdx=@characteridx
delete from cabal_character_table where CharacterIdx=@characteridx
set @ROWCOUNT = @@ROWCOUNT
commit tran
IF( @ROWCOUNT > 0 )
BEGIN
-- ???? ??? ???
DECLARE @USERNUM INT, @SERVERIDX INT
SET @USERNUM = @CHARACTERIDX/8
SET @SERVERIDX = DBO.GETSERVERIDX()
EXEC ACCOUNT.dbo.CABAL_SP_UPDATE_CHARACTER_COUNT @USERNUM, @SERVERIDX, -1
END
SELECT CONVERT(INT, 0xA1)
SET NOCOUNT OFF
end
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Hopefully that will stop the endless stream of failed-to-pay-attention.