Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Transfer Character

Experienced Elementalist
Joined
Jul 11, 2014
Messages
274
Reaction score
2
Is this posible to transfer Character to another account with all the items inside the character transfer also to another account? what will be the sql script?
 
Experienced Elementalist
Joined
Feb 17, 2015
Messages
263
Reaction score
119
Code:
USE [SERVER01] 
GO

SET ANSI_NULLS ON 
GO 
SET QUOTED_IDENTIFIER ON 
GO

CREATE procedure [dbo].[TransferePersonagem] [USER=404713]nome[/USER]Clonado varchar(100), [USER=404713]nome[/USER]Destino varchar(100) 
AS

begin tran	
    DECLARE @IdxClonado int, @IdxDestino int 
    select @IdxClonado = CharacterIdx from cabal_character_table where Name = [USER=404713]nome[/USER]Clonado 
    select @IdxDestino = CharacterIdx from cabal_character_table where Name = [USER=404713]nome[/USER]Destino
    if (ISNULL(@IdxDestino, 0) > 0 AND ISNULL(@IdxClonado, 0) > 0) BEGIN

-- delete mula 
    exec dbo.[cabal_sp_delchar_internal] @IdxDestino

-- clean old tables
    delete from cabal_Forcecalibur_Owner where CharacterIdx = @IdxDestino	
    delete from cabal_LordOfWar_table where CharacterIdx = @IdxDestino 
    delete from cabal_LordOfWar_Rank_table where CharacterIdx = @IdxDestino 
    delete from cabal_LordOfWar_point_table where CharacterIdx = @IdxDestino 
    delete from cabal_soul_ability_table where CharacterIdx = @IdxDestino 
    delete from chat_buddy_pr_message where CharIdx = @IdxDestino 
    delete from cabal_saved_buff_table where CharacterIdx = @IdxDestino 
    delete from cabal_record_combo where CharIdx = @IdxDestino 
    delete from cabal_item_extend_table where CharacterIdx = @IdxDestino 
    delete from cabal_qddata_table where CharacterIdx = @IdxDestino 
    delete from cabal_pet_table where OwnerCharIdx = @IdxDestino 
    delete from cabal_WarExp_Table where CharacterIdx = @IdxDestino 
    delete from cabal_achievement_title where CharacterIdx = @IdxDestino 
    delete from cabal_mail_sent_table where SenderCharIdx = @IdxDestino 
    delete from cabal_mail_sent_table where ReceiverCharName = [USER=404713]nome[/USER]Destino 
    delete from chat_buddygroup_table where CharIdx = @IdxDestino 
    delete from chat_buddy_table where RegisterCharIdx = @IdxDestino 
    delete from chat_buddy_table where RegisteeCharIdx = @IdxDestino 
    delete from cabal_achievement_open where CharacterIdx = @IdxDestino 
    delete from cabal_bbead_table where CharacterIdx = @IdxDestino 
    delete from cabal_achievement_history where CharacterIdx = @IdxDestino 
    delete from cabal_Assistant_table where CharacterIdx = @IdxDestino 
    delete from Mail where charidxsend = @IdxDestino 
    delete from Mail where charidxrcv = @IdxDestino 
    delete from cabal_mail_notice_forward_table where CharIdx = @IdxDestino 
    delete from cabal_agentshop_pet_table where OwnerCharIdx = @IdxDestino 
    delete from cabal_mail_sent_pet_table where SenderCharIdx = @IdxDestino 
    delete from cabal_mail_received_table where ReceiverCharIdx = @IdxDestino 
    delete from cabal_mail_received_table where SenderCharIdx = @IdxDestino	
    delete from cabal_equipment_lock_table where CharacterIdx = @IdxDestino	
    delete from cabal_DungeonRankingSingle_table where CharIdx = @IdxDestino 
    delete from cabal_DungeonRankingParty_table where LeaderCharIdx = @IdxDestino 
    delete from cabal_DungeonPoint_table where CharacterIdx = @IdxDestino 
    delete from cabal_craft_table where CharacterIdx = @IdxDestino	
    delete from Cabal_Title_Table where CharacterIdx = @IdxDestino

-- update tables
    update cabal_character_table set Name = [USER=404713]nome[/USER]Destino, CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_Inventory_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_equipment_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_skilllist_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_quickslot_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_questdata_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado	
    update cabal_Forcecalibur_Owner set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado	
    update cabal_LordOfWar_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_LordOfWar_Rank_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_LordOfWar_point_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_soul_ability_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update chat_buddy_pr_message set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_saved_buff_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_record_combo set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_item_extend_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_qddata_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_pet_table set OwnerCharIdx = @IdxDestino where OwnerCharIdx = @IdxClonado 
    update cabal_WarExp_Table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_achievement_title set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_mail_sent_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado 
    update cabal_mail_sent_table set ReceiverCharName = [USER=404713]nome[/USER]Destino where ReceiverCharName = [USER=404713]nome[/USER]Destino 
    update chat_buddygroup_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update chat_buddy_table set RegisterCharIdx = @IdxDestino where RegisterCharIdx = @IdxClonado 
    update chat_buddy_table set RegisteeCharIdx = @IdxDestino where RegisteeCharIdx = @IdxClonado 
    update cabal_achievement_open set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_bbead_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_achievement_history set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_Assistant_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update Mail set charidxsend = @IdxDestino where charidxsend = @IdxClonado 
    update Mail set charidxrcv = @IdxDestino where charidxrcv = @IdxClonado 
    update cabal_mail_notice_forward_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_agentshop_pet_table set OwnerCharIdx = @IdxDestino where OwnerCharIdx = @IdxClonado 
    update cabal_mail_sent_pet_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado 
    update cabal_mail_received_table set ReceiverCharIdx = @IdxDestino where ReceiverCharIdx = @IdxClonado
    update cabal_mail_received_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado	
    update cabal_equipment_lock_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado	
    update cabal_DungeonRankingSingle_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_DungeonRankingParty_table set LeaderCharIdx = @IdxDestino where LeaderCharIdx =
@IdxClonado 
    update cabal_DungeonPoint_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_craft_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado	
    update Cabal_Title_Table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado
end
commit tran

Code:
exec dbo.TransferePersonagem 'CHAR', 'MULA'
 
Last edited:
Upvote 0
Experienced Elementalist
Joined
Jul 11, 2014
Messages
274
Reaction score
2
let me try this.



is this query for transfer Character to another account?



Code:
USE [SERVER01] 
GO

SET ANSI_NULLS ON 
GO 
SET QUOTED_IDENTIFIER ON 
GO

CREATE procedure [dbo].[TransferePersonagem] @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Clonado varchar(100), @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino varchar(100) 
AS

begin tran    
    DECLARE @IdxClonado int, @IdxDestino int 
    select @IdxClonado = CharacterIdx from cabal_character_table where Name = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Clonado 
    select @IdxDestino = CharacterIdx from cabal_character_table where Name = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino
    if (ISNULL(@IdxDestino, 0) > 0 AND ISNULL(@IdxClonado, 0) > 0) BEGIN

-- delete mula 
    exec dbo.[cabal_sp_delchar_internal] @IdxDestino

-- clean old tables
    delete from cabal_Forcecalibur_Owner where CharacterIdx = @IdxDestino    
    delete from cabal_LordOfWar_table where CharacterIdx = @IdxDestino 
    delete from cabal_LordOfWar_Rank_table where CharacterIdx = @IdxDestino 
    delete from cabal_LordOfWar_point_table where CharacterIdx = @IdxDestino 
    delete from cabal_soul_ability_table where CharacterIdx = @IdxDestino 
    delete from chat_buddy_pr_message where CharIdx = @IdxDestino 
    delete from cabal_saved_buff_table where CharacterIdx = @IdxDestino 
    delete from cabal_record_combo where CharIdx = @IdxDestino 
    delete from cabal_item_extend_table where CharacterIdx = @IdxDestino 
    delete from cabal_qddata_table where CharacterIdx = @IdxDestino 
    delete from cabal_pet_table where OwnerCharIdx = @IdxDestino 
    delete from cabal_WarExp_Table where CharacterIdx = @IdxDestino 
    delete from cabal_achievement_title where CharacterIdx = @IdxDestino 
    delete from cabal_mail_sent_table where SenderCharIdx = @IdxDestino 
    delete from cabal_mail_sent_table where ReceiverCharName = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino 
    delete from chat_buddygroup_table where CharIdx = @IdxDestino 
    delete from chat_buddy_table where RegisterCharIdx = @IdxDestino 
    delete from chat_buddy_table where RegisteeCharIdx = @IdxDestino 
    delete from cabal_achievement_open where CharacterIdx = @IdxDestino 
    delete from cabal_bbead_table where CharacterIdx = @IdxDestino 
    delete from cabal_achievement_history where CharacterIdx = @IdxDestino 
    delete from cabal_Assistant_table where CharacterIdx = @IdxDestino 
    delete from Mail where charidxsend = @IdxDestino 
    delete from Mail where charidxrcv = @IdxDestino 
    delete from cabal_mail_notice_forward_table where CharIdx = @IdxDestino 
    delete from cabal_agentshop_pet_table where OwnerCharIdx = @IdxDestino 
    delete from cabal_mail_sent_pet_table where SenderCharIdx = @IdxDestino 
    delete from cabal_mail_received_table where ReceiverCharIdx = @IdxDestino 
    delete from cabal_mail_received_table where SenderCharIdx = @IdxDestino    
    delete from cabal_equipment_lock_table where CharacterIdx = @IdxDestino    
    delete from cabal_DungeonRankingSingle_table where CharIdx = @IdxDestino 
    delete from cabal_DungeonRankingParty_table where LeaderCharIdx = @IdxDestino 
    delete from cabal_DungeonPoint_table where CharacterIdx = @IdxDestino 
    delete from cabal_craft_table where CharacterIdx = @IdxDestino    
    delete from Cabal_Title_Table where CharacterIdx = @IdxDestino

-- update tables
    update cabal_character_table set Name = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino, CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_Inventory_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_equipment_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_skilllist_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_quickslot_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_questdata_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update cabal_Forcecalibur_Owner set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update cabal_LordOfWar_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_LordOfWar_Rank_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_LordOfWar_point_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_soul_ability_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update chat_buddy_pr_message set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_saved_buff_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_record_combo set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_item_extend_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_qddata_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_pet_table set OwnerCharIdx = @IdxDestino where OwnerCharIdx = @IdxClonado 
    update cabal_WarExp_Table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_achievement_title set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_mail_sent_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado 
    update cabal_mail_sent_table set ReceiverCharName = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino where ReceiverCharName = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino 
    update chat_buddygroup_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update chat_buddy_table set RegisterCharIdx = @IdxDestino where RegisterCharIdx = @IdxClonado 
    update chat_buddy_table set RegisteeCharIdx = @IdxDestino where RegisteeCharIdx = @IdxClonado 
    update cabal_achievement_open set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_bbead_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_achievement_history set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_Assistant_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update Mail set charidxsend = @IdxDestino where charidxsend = @IdxClonado 
    update Mail set charidxrcv = @IdxDestino where charidxrcv = @IdxClonado 
    update cabal_mail_notice_forward_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_agentshop_pet_table set OwnerCharIdx = @IdxDestino where OwnerCharIdx = @IdxClonado 
    update cabal_mail_sent_pet_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado 
    update cabal_mail_received_table set ReceiverCharIdx = @IdxDestino where ReceiverCharIdx = @IdxClonado
    update cabal_mail_received_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado    
    update cabal_equipment_lock_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update cabal_DungeonRankingSingle_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_DungeonRankingParty_table set LeaderCharIdx = @IdxDestino where LeaderCharIdx =
@IdxClonado 
    update cabal_DungeonPoint_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_craft_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update Cabal_Title_Table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado
end
commit tran

Code:
exec dbo.TransferePersonagem 'CHAR', 'MULA'


is this query for transfer Character to another account?
 
Upvote 0
RaGEZONE VIP
[VIP] Member
Joined
Oct 10, 2019
Messages
198
Reaction score
457
Judging by the code, this script replaces one character with another. You need to indicate in the first parameter ID of the character you are going to transfer, in the second parameter - the ID of the character (existing), which will be replaced by the first character. It may be on a different account. I would check this script on a test server first.
 
Upvote 0
Experienced Elementalist
Joined
Jul 11, 2014
Messages
274
Reaction score
2
Judging by the code, this script replaces one character with another. You need to indicate in the first parameter ID of the character you are going to transfer, in the second parameter - the ID of the character (existing), which will be replaced by the first character. It may be on a different account. I would check this script on a test server first.

example bro.
i have character in my account 1
i want to transfer my character into account 2
 
Upvote 0
Experienced Elementalist
Joined
Jul 11, 2014
Messages
274
Reaction score
2
Code:
USE [SERVER01] 
GO

SET ANSI_NULLS ON 
GO 
SET QUOTED_IDENTIFIER ON 
GO

CREATE procedure [dbo].[TransferePersonagem] @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Clonado varchar(100), @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino varchar(100) 
AS

begin tran    
    DECLARE @IdxClonado int, @IdxDestino int 
    select @IdxClonado = CharacterIdx from cabal_character_table where Name = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Clonado 
    select @IdxDestino = CharacterIdx from cabal_character_table where Name = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino
    if (ISNULL(@IdxDestino, 0) > 0 AND ISNULL(@IdxClonado, 0) > 0) BEGIN

-- delete mula 
    exec dbo.[cabal_sp_delchar_internal] @IdxDestino

-- clean old tables
    delete from cabal_Forcecalibur_Owner where CharacterIdx = @IdxDestino    
    delete from cabal_LordOfWar_table where CharacterIdx = @IdxDestino 
    delete from cabal_LordOfWar_Rank_table where CharacterIdx = @IdxDestino 
    delete from cabal_LordOfWar_point_table where CharacterIdx = @IdxDestino 
    delete from cabal_soul_ability_table where CharacterIdx = @IdxDestino 
    delete from chat_buddy_pr_message where CharIdx = @IdxDestino 
    delete from cabal_saved_buff_table where CharacterIdx = @IdxDestino 
    delete from cabal_record_combo where CharIdx = @IdxDestino 
    delete from cabal_item_extend_table where CharacterIdx = @IdxDestino 
    delete from cabal_qddata_table where CharacterIdx = @IdxDestino 
    delete from cabal_pet_table where OwnerCharIdx = @IdxDestino 
    delete from cabal_WarExp_Table where CharacterIdx = @IdxDestino 
    delete from cabal_achievement_title where CharacterIdx = @IdxDestino 
    delete from cabal_mail_sent_table where SenderCharIdx = @IdxDestino 
    delete from cabal_mail_sent_table where ReceiverCharName = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino 
    delete from chat_buddygroup_table where CharIdx = @IdxDestino 
    delete from chat_buddy_table where RegisterCharIdx = @IdxDestino 
    delete from chat_buddy_table where RegisteeCharIdx = @IdxDestino 
    delete from cabal_achievement_open where CharacterIdx = @IdxDestino 
    delete from cabal_bbead_table where CharacterIdx = @IdxDestino 
    delete from cabal_achievement_history where CharacterIdx = @IdxDestino 
    delete from cabal_Assistant_table where CharacterIdx = @IdxDestino 
    delete from Mail where charidxsend = @IdxDestino 
    delete from Mail where charidxrcv = @IdxDestino 
    delete from cabal_mail_notice_forward_table where CharIdx = @IdxDestino 
    delete from cabal_agentshop_pet_table where OwnerCharIdx = @IdxDestino 
    delete from cabal_mail_sent_pet_table where SenderCharIdx = @IdxDestino 
    delete from cabal_mail_received_table where ReceiverCharIdx = @IdxDestino 
    delete from cabal_mail_received_table where SenderCharIdx = @IdxDestino    
    delete from cabal_equipment_lock_table where CharacterIdx = @IdxDestino    
    delete from cabal_DungeonRankingSingle_table where CharIdx = @IdxDestino 
    delete from cabal_DungeonRankingParty_table where LeaderCharIdx = @IdxDestino 
    delete from cabal_DungeonPoint_table where CharacterIdx = @IdxDestino 
    delete from cabal_craft_table where CharacterIdx = @IdxDestino    
    delete from Cabal_Title_Table where CharacterIdx = @IdxDestino

-- update tables
    update cabal_character_table set Name = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino, CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_Inventory_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_equipment_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_skilllist_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_quickslot_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_questdata_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update cabal_Forcecalibur_Owner set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update cabal_LordOfWar_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_LordOfWar_Rank_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_LordOfWar_point_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_soul_ability_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update chat_buddy_pr_message set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_saved_buff_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_record_combo set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_item_extend_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_qddata_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_pet_table set OwnerCharIdx = @IdxDestino where OwnerCharIdx = @IdxClonado 
    update cabal_WarExp_Table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_achievement_title set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_mail_sent_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado 
    update cabal_mail_sent_table set ReceiverCharName = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino where ReceiverCharName = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL][/B][/I]Destino 
    update chat_buddygroup_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update chat_buddy_table set RegisterCharIdx = @IdxDestino where RegisterCharIdx = @IdxClonado 
    update chat_buddy_table set RegisteeCharIdx = @IdxDestino where RegisteeCharIdx = @IdxClonado 
    update cabal_achievement_open set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_bbead_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_achievement_history set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_Assistant_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update Mail set charidxsend = @IdxDestino where charidxsend = @IdxClonado 
    update Mail set charidxrcv = @IdxDestino where charidxrcv = @IdxClonado 
    update cabal_mail_notice_forward_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_agentshop_pet_table set OwnerCharIdx = @IdxDestino where OwnerCharIdx = @IdxClonado 
    update cabal_mail_sent_pet_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado 
    update cabal_mail_received_table set ReceiverCharIdx = @IdxDestino where ReceiverCharIdx = @IdxClonado
    update cabal_mail_received_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado    
    update cabal_equipment_lock_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update cabal_DungeonRankingSingle_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_DungeonRankingParty_table set LeaderCharIdx = @IdxDestino where LeaderCharIdx =
@IdxClonado 
    update cabal_DungeonPoint_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_craft_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update Cabal_Title_Table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado
end
commit tran

Code:
exec dbo.TransferePersonagem 'CHAR', 'MULA'


i tried but not working



its sucess but nothings happen
 
Upvote 0
Newbie Spellweaver
Joined
May 8, 2020
Messages
22
Reaction score
19
This is happening because you are closing the transaction before committing it.Try to place the commit within the transaction.The edited procedure follows:
Code:
USE [SERVER01] 
GO

SET ANSI_NULLS ON 
GO 
SET QUOTED_IDENTIFIER ON 
GO

CREATE procedure [dbo].[TransferePersonagem] @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL]Clonado varchar(100), @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL]Destino varchar(100) 
AS

begin tran    
    DECLARE @IdxClonado int, @IdxDestino int 
    select @IdxClonado = CharacterIdx from cabal_character_table where Name = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL]Clonado 
    select @IdxDestino = CharacterIdx from cabal_character_table where Name = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL]Destino
    if (ISNULL(@IdxDestino, 0) > 0 AND ISNULL(@IdxClonado, 0) > 0) BEGIN

-- delete mula 
    exec dbo.[cabal_sp_delchar_internal] @IdxDestino

-- clean old tables
    delete from cabal_Forcecalibur_Owner where CharacterIdx = @IdxDestino    
    delete from cabal_LordOfWar_table where CharacterIdx = @IdxDestino 
    delete from cabal_LordOfWar_Rank_table where CharacterIdx = @IdxDestino 
    delete from cabal_LordOfWar_point_table where CharacterIdx = @IdxDestino 
    delete from cabal_soul_ability_table where CharacterIdx = @IdxDestino 
    delete from chat_buddy_pr_message where CharIdx = @IdxDestino 
    delete from cabal_saved_buff_table where CharacterIdx = @IdxDestino 
    delete from cabal_record_combo where CharIdx = @IdxDestino 
    delete from cabal_item_extend_table where CharacterIdx = @IdxDestino 
    delete from cabal_qddata_table where CharacterIdx = @IdxDestino 
    delete from cabal_pet_table where OwnerCharIdx = @IdxDestino 
    delete from cabal_WarExp_Table where CharacterIdx = @IdxDestino 
    delete from cabal_achievement_title where CharacterIdx = @IdxDestino 
    delete from cabal_mail_sent_table where SenderCharIdx = @IdxDestino 
    delete from cabal_mail_sent_table where ReceiverCharName = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL]Destino 
    delete from chat_buddygroup_table where CharIdx = @IdxDestino 
    delete from chat_buddy_table where RegisterCharIdx = @IdxDestino 
    delete from chat_buddy_table where RegisteeCharIdx = @IdxDestino 
    delete from cabal_achievement_open where CharacterIdx = @IdxDestino 
    delete from cabal_bbead_table where CharacterIdx = @IdxDestino 
    delete from cabal_achievement_history where CharacterIdx = @IdxDestino 
    delete from cabal_Assistant_table where CharacterIdx = @IdxDestino 
    delete from Mail where charidxsend = @IdxDestino 
    delete from Mail where charidxrcv = @IdxDestino 
    delete from cabal_mail_notice_forward_table where CharIdx = @IdxDestino 
    delete from cabal_agentshop_pet_table where OwnerCharIdx = @IdxDestino 
    delete from cabal_mail_sent_pet_table where SenderCharIdx = @IdxDestino 
    delete from cabal_mail_received_table where ReceiverCharIdx = @IdxDestino 
    delete from cabal_mail_received_table where SenderCharIdx = @IdxDestino    
    delete from cabal_equipment_lock_table where CharacterIdx = @IdxDestino    
    delete from cabal_DungeonRankingSingle_table where CharIdx = @IdxDestino 
    delete from cabal_DungeonRankingParty_table where LeaderCharIdx = @IdxDestino 
    delete from cabal_DungeonPoint_table where CharacterIdx = @IdxDestino 
    delete from cabal_craft_table where CharacterIdx = @IdxDestino    
    delete from Cabal_Title_Table where CharacterIdx = @IdxDestino

-- update tables
    update cabal_character_table set Name = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL]Destino, CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_Inventory_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_equipment_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_skilllist_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_quickslot_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_questdata_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update cabal_Forcecalibur_Owner set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update cabal_LordOfWar_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_LordOfWar_Rank_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_LordOfWar_point_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_soul_ability_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update chat_buddy_pr_message set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_saved_buff_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_record_combo set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_item_extend_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_qddata_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_pet_table set OwnerCharIdx = @IdxDestino where OwnerCharIdx = @IdxClonado 
    update cabal_WarExp_Table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_achievement_title set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_mail_sent_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado 
    update cabal_mail_sent_table set ReceiverCharName = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL]Destino where ReceiverCharName = @[I][B][URL="http://forum.ragezone.com/members/404713.html"]nome[/URL]Destino 
    update chat_buddygroup_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update chat_buddy_table set RegisterCharIdx = @IdxDestino where RegisterCharIdx = @IdxClonado 
    update chat_buddy_table set RegisteeCharIdx = @IdxDestino where RegisteeCharIdx = @IdxClonado 
    update cabal_achievement_open set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_bbead_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_achievement_history set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_Assistant_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update Mail set charidxsend = @IdxDestino where charidxsend = @IdxClonado 
    update Mail set charidxrcv = @IdxDestino where charidxrcv = @IdxClonado 
    update cabal_mail_notice_forward_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_agentshop_pet_table set OwnerCharIdx = @IdxDestino where OwnerCharIdx = @IdxClonado 
    update cabal_mail_sent_pet_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado 
    update cabal_mail_received_table set ReceiverCharIdx = @IdxDestino where ReceiverCharIdx = @IdxClonado
    update cabal_mail_received_table set SenderCharIdx = @IdxDestino where SenderCharIdx = @IdxClonado    
    update cabal_equipment_lock_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update cabal_DungeonRankingSingle_table set CharIdx = @IdxDestino where CharIdx = @IdxClonado 
    update cabal_DungeonRankingParty_table set LeaderCharIdx = @IdxDestino where LeaderCharIdx =
@IdxClonado 
    update cabal_DungeonPoint_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado 
    update cabal_craft_table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado    
    update Cabal_Title_Table set CharacterIdx = @IdxDestino where CharacterIdx = @IdxClonado

  commit transaction;
end

[/B][/I][/B][/I][/B][/I][/B][/I][/B][/I][/B][/I][/B][/I][/B][/I]
 
Upvote 0
Back
Top