(AzerothCore) Powershell scripts for character and guild export/import menu

Shout-Out

User Tag List

Results 1 to 12 of 12
  1. #1
    Aldebaraan's Avatar Active Member
    Reputation
    39
    Join Date
    Oct 2024
    Posts
    86
    Thanks G/R
    5/31
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    (AzerothCore) Powershell scripts for character and guild export/import

    GitHub - AldebaraanMKII/WoW-character-and-guild-export-import-scripts: Powershell scripts to export/import world of warcraft characters and guilds

    This currently only works on AzerothCore.

    You may ask yourself: Why not just use the .pdump command?
    The .pdump command works most of the time. But it has several disavantages:
    1. You need to know the name of all the characters you want to transfer. With the script you only need to know the account name.
    2. No info is displayed for these characters. If you want to know more details about them, you need to log in into the account to see them for yourself.
    3. You need to run the account/world server. With this, you only need to run the database.
    4. The .pdump command doesn`t transfer guilds (let alone any items in its bank).
    5. The .pdump command doesn`t transfer transmog and reagent bank module data.


    Instructions
    1. Install Powershell 7 (this was tested with 7.4.5)
    2. Extract the scripts folder somewhere
    3. Open each script with notepad++ and check/update the following:

    Code:
    $serverName = "127.0.0.1"
    $port = 3306
    $username = "root"
    $password = "test"
    $username and $password is your MySQL server user and password.
    you may need to alter $serverName and $port if you`re not running the server locally.

    4. If you`re using the export scripts, you also need to check the following settings:
    Code:
    $mysqldumpPath = "H:\My Repack\mysql\bin\mysqldump.exe" 
    $mysqlPath = "H:\My Repack\mysql\bin\mysql.exe"
    those executables are typically included in a repack`s mysql/bin folder. If you don`t have them, install MySQL server.

    5. If you`re exporting characters/guilds, open the MySQL database that contain those characters/guilds.
    6. If you`re importing characters/guilds, open the MySQL database that you want to transfer them to.
    7. Go into the folder you extracted the scripts to, right click > PowerShell 7 > Open Here
    8. type the name of the script like this: ./"Backup character data.ps1"
    9. Follow the instructions in the console.


    Current issues:
    Mysql.data library errors:
    Sometimes it will complain about CLS compliance and the script will fail. When that happens, press CTRL + C to terminate the script (without closing the terminal), open the script in question with notepad++ and comment the following lines:

    Code:
    try {
       Add-Type -Path "./MySql.Data.dll" 2>$null
    } catch {
    
    }
    so that it becomes like this:
    Code:
    #try {
    #   Add-Type -Path "./MySql.Data.dll" 2>$null
    #} catch {
    #
    #}
    then try running the script again (in the same terminal from before).
    I don`t know why does this happen nor how to fix it permanently. Any feedback on this issue would be appreciated.



    IMPORTANT: Make sure only the mysql database is open when you export/import your characters or guild! Trying to export/import while the auth/world server is running can lead to issues, like several items missing from the character inventory or duplicate entries in the database!.
    Last edited by Aldebaraan; 10-01-2024 at 08:11 PM.

    (AzerothCore) Powershell scripts for character and guild export/import
  2. Thanks uber-cheater3000 (1 members gave Thanks to Aldebaraan for this useful post)
  3. #2
    uber-cheater3000's Avatar Member
    Reputation
    2
    Join Date
    Jul 2016
    Posts
    8
    Thanks G/R
    7/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What am I doing wrong? This is my old repack (Zaicopx)

    Backup character data.ps1:

    # Paths to executables
    $mysqldumpPath = "D:\Games\AzerothCore Single Player Repack\mysql\bin\mysqldump.exe" # path to mysqldump executable
    $mysqlPath = "D:\Games\AzerothCore Single Player Repack\mysql\bin\mysql.exe" # path to mysql executable

    MySQL Server is running, login and pass is correct (unchanged)

    $serverName = "127.0.0.1"
    $port = 3306
    $username = "root"
    $password = "ascent"

    script.png

  4. #3
    Aldebaraan's Avatar Active Member
    Reputation
    39
    Join Date
    Oct 2024
    Posts
    86
    Thanks G/R
    5/31
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by uber-cheater3000 View Post
    What am I doing wrong? This is my old repack (Zaicopx)

    Backup character data.ps1:

    # Paths to executables
    $mysqldumpPath = "D:\Games\AzerothCore Single Player Repack\mysql\bin\mysqldump.exe" # path to mysqldump executable
    $mysqlPath = "D:\Games\AzerothCore Single Player Repack\mysql\bin\mysql.exe" # path to mysql executable

    MySQL Server is running, login and pass is correct (unchanged)

    $serverName = "127.0.0.1"
    $port = 3306
    $username = "root"
    $password = "ascent"

    script.png
    It's a issue with mysql.data. Follow the instructions in the opening post regarding issues (comment out the lines mentioned) and try running the script again without closing the console.

  5. #4
    uber-cheater3000's Avatar Member
    Reputation
    2
    Join Date
    Jul 2016
    Posts
    8
    Thanks G/R
    7/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The script from your archive (Backup character data.ps1) already has commented lines. This error was exactly with these parameters
    Code:
    #try {
    #   Add-Type -Path "./MySql.Data.dll" 2>$null
    #} catch {
    #
    #}
    Now I uncommented these lines and tried to run the script. It seems to work. But now I encountered another error:

    anotherone.png


    But I managed to export my guild using another script (Backup guild data.ps1).

  6. #5
    Aldebaraan's Avatar Active Member
    Reputation
    39
    Join Date
    Oct 2024
    Posts
    86
    Thanks G/R
    5/31
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by uber-cheater3000 View Post
    The script from your archive (Backup character data.ps1) already has commented lines. This error was exactly with these parameters
    Code:
    #try {
    #   Add-Type -Path "./MySql.Data.dll" 2>$null
    #} catch {
    #
    #}
    Now I uncommented these lines and tried to run the script. It seems to work. But now I encountered another error:

    anotherone.png


    But I managed to export my guild using another script (Backup guild data.ps1).
    With the console open comment the lines again, save the script, and try to run it again. If that doesn't work update your net framework.

  7. #6
    uber-cheater3000's Avatar Member
    Reputation
    2
    Join Date
    Jul 2016
    Posts
    8
    Thanks G/R
    7/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, this was tricky but it works. Now the last step left...
    I get an error when importing a character into your repack (I didn't forget about the commented lines and #Paths to executables)


    Code:
    PS D:\Games\Azerothcore WoTLK Repack (Playerbots)\WoW-character-and-guild-export-import-scripts-main> ./"Restore character data.ps1"
    
    Please select a character by typing the corresponding number:
    
    1. (gamer) Shooterguy - Troll Hunter Male LV2
    2. (gamer) Vredina - Orc Warlock Female LV60
    3. All characters in list
    4. Exit
    
    Enter your choice (1-4): 2
    
    You selected: (gamer) Vredina - Orc Warlock Female LV60
    Enter account name to transfer the character(s).: horell
    Error: The field or property: "Datetime" for type: "MySql.Data.MySqlClient.MySqlDbType" differs only in letter casing from the field or property: "DateTime". The type must be Common Language Specification (CLS) compliant.
    
    Please select a character by typing the corresponding number:
    
    1. (gamer) Shooterguy - Troll Hunter Male LV2
    2. (gamer) Vredina - Orc Warlock Female LV60
    3. All characters in list
    4. Exit
    
    Enter your choice (1-4):
    PS D:\Games\Azerothcore WoTLK Repack (Playerbots)\WoW-character-and-guild-export-import-scripts-main> ./"Restore character data.ps1"
    
    Please select a character by typing the corresponding number:
    
    1. (gamer) Shooterguy - Troll Hunter Male LV2
    2. (gamer) Vredina - Orc Warlock Female LV60
    3. All characters in list
    4. Exit
    
    Enter your choice (1-4): 2
    
    You selected: (gamer) Vredina - Orc Warlock Female LV60
    Enter account name to transfer the character(s).: horell
    
    ID for username 'horell': 203
    
    Restoring character 'Vredina'
    (characters) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Column count doesn't match value count at row 1"
    Importing character data...
    (character_account_data) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VERSION 5\n\nADDEDVERSION 13\n\nOPTION_GUILD_RECRUITMENT_CHANNEL AUTO\n\nCHANNEL' at line 1"
    (character_achievement_progress) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-40' for key 'character_achievement_progress.PRIMARY'"
    (character_action) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-0-0' for key 'character_action.PRIMARY'"
    (character_aura) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-5-0-11735-3' for key 'character_aura.PRIMARY'"
    (character_glyphs) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-0' for key 'character_glyphs.PRIMARY'"
    (character_queststatus) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-4003' for key 'character_queststatus.PRIMARY'"
    (character_queststatus_rewarded) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-25' for key 'character_queststatus_rewarded.PRIMARY'"
    (character_reputation) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-21' for key 'character_reputation.PRIMARY'"
    (character_skills) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-43' for key 'character_skills.PRIMARY'"
    (character_spell) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-126' for key 'character_spell.PRIMARY'"
    (character_talent) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-17785' for key 'character_talent.PRIMARY'"
    (character_homebind) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005' for key 'character_homebind.PRIMARY'"
    Importing pet data...
    Importing character items...
    (character_inventory) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-0-0' for key 'character_inventory.guid'"
    
    Import done in 1.4537746 seconds. Returning to menu...
    
    Please select a character by typing the corresponding number:
    
    1. (gamer) Shooterguy - Troll Hunter Male LV2
    2. (gamer) Vredina - Orc Warlock Female LV60
    3. All characters in list
    4. Exit
    
    Enter your choice (1-4):

  8. #7
    Aldebaraan's Avatar Active Member
    Reputation
    39
    Join Date
    Oct 2024
    Posts
    86
    Thanks G/R
    5/31
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by uber-cheater3000 View Post
    Well, this was tricky but it works. Now the last step left...
    I get an error when importing a character into your repack (I didn't forget about the commented lines and #Paths to executables)


    Code:
    PS D:\Games\Azerothcore WoTLK Repack (Playerbots)\WoW-character-and-guild-export-import-scripts-main> ./"Restore character data.ps1"
    
    Please select a character by typing the corresponding number:
    
    1. (gamer) Shooterguy - Troll Hunter Male LV2
    2. (gamer) Vredina - Orc Warlock Female LV60
    3. All characters in list
    4. Exit
    
    Enter your choice (1-4): 2
    
    You selected: (gamer) Vredina - Orc Warlock Female LV60
    Enter account name to transfer the character(s).: horell
    Error: The field or property: "Datetime" for type: "MySql.Data.MySqlClient.MySqlDbType" differs only in letter casing from the field or property: "DateTime". The type must be Common Language Specification (CLS) compliant.
    
    Please select a character by typing the corresponding number:
    
    1. (gamer) Shooterguy - Troll Hunter Male LV2
    2. (gamer) Vredina - Orc Warlock Female LV60
    3. All characters in list
    4. Exit
    
    Enter your choice (1-4):
    PS D:\Games\Azerothcore WoTLK Repack (Playerbots)\WoW-character-and-guild-export-import-scripts-main> ./"Restore character data.ps1"
    
    Please select a character by typing the corresponding number:
    
    1. (gamer) Shooterguy - Troll Hunter Male LV2
    2. (gamer) Vredina - Orc Warlock Female LV60
    3. All characters in list
    4. Exit
    
    Enter your choice (1-4): 2
    
    You selected: (gamer) Vredina - Orc Warlock Female LV60
    Enter account name to transfer the character(s).: horell
    
    ID for username 'horell': 203
    
    Restoring character 'Vredina'
    (characters) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Column count doesn't match value count at row 1"
    Importing character data...
    (character_account_data) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VERSION 5\n\nADDEDVERSION 13\n\nOPTION_GUILD_RECRUITMENT_CHANNEL AUTO\n\nCHANNEL' at line 1"
    (character_achievement_progress) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-40' for key 'character_achievement_progress.PRIMARY'"
    (character_action) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-0-0' for key 'character_action.PRIMARY'"
    (character_aura) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-5-0-11735-3' for key 'character_aura.PRIMARY'"
    (character_glyphs) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-0' for key 'character_glyphs.PRIMARY'"
    (character_queststatus) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-4003' for key 'character_queststatus.PRIMARY'"
    (character_queststatus_rewarded) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-25' for key 'character_queststatus_rewarded.PRIMARY'"
    (character_reputation) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-21' for key 'character_reputation.PRIMARY'"
    (character_skills) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-43' for key 'character_skills.PRIMARY'"
    (character_spell) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-126' for key 'character_spell.PRIMARY'"
    (character_talent) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-17785' for key 'character_talent.PRIMARY'"
    (character_homebind) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005' for key 'character_homebind.PRIMARY'"
    Importing pet data...
    Importing character items...
    (character_inventory) An error occurred: Exception calling "ExecuteNonQuery" with "0" argument(s): "Duplicate entry '2005-0-0' for key 'character_inventory.guid'"
    
    Import done in 1.4537746 seconds. Returning to menu...
    
    Please select a character by typing the corresponding number:
    
    1. (gamer) Shooterguy - Troll Hunter Male LV2
    2. (gamer) Vredina - Orc Warlock Female LV60
    3. All characters in list
    4. Exit
    
    Enter your choice (1-4):
    Can you please send me the character sql files zipped?

  9. #8
    uber-cheater3000's Avatar Member
    Reputation
    2
    Join Date
    Jul 2016
    Posts
    8
    Thanks G/R
    7/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure
    Vredina - Orc Warlock Female LV60.zip

    Maybe it's because that repack was really old? I played it in like ‘22 or so

  10. #9
    Aldebaraan's Avatar Active Member
    Reputation
    39
    Join Date
    Oct 2024
    Posts
    86
    Thanks G/R
    5/31
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by uber-cheater3000 View Post
    Sure
    Vredina - Orc Warlock Female LV60.zip

    Maybe it's because that repack was really old? I played it in like ‘22 or so
    It seems to be so. I encountered a similar issue related to hearthstone data when using zaicopx repack with the latest patch from 2023. But this has issues with other stuff. I will download the old repack from 2022 to test. In the meantime you can use the .pdump command to transfer your character.

  11. Thanks uber-cheater3000 (1 members gave Thanks to Aldebaraan for this useful post)
  12. #10
    uber-cheater3000's Avatar Member
    Reputation
    2
    Join Date
    Jul 2016
    Posts
    8
    Thanks G/R
    7/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately the .pdump command doesn't work either. The character cannot be imported into the new server
    Code:
    .pdump load MyProgress horell Vredina
    LoadPlayerDump: (line 819) unknown column name `posO` for table `character_homebind`, aborting due to incompatible DB structure.
    Dump file have broken data!
    Anyway, thanks for trying to help

  13. #11
    uber-cheater3000's Avatar Member
    Reputation
    2
    Join Date
    Jul 2016
    Posts
    8
    Thanks G/R
    7/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I've done it. I created a new character, exported it. Then copied his coordinates from:
    Code:
    INSERT INTO `character_homebind` (`guid`, `mapId`, `zoneId`, `posX`, `posY`, `posZ`) VALUES
    and overwrites it to my character.

    But that's not all. Then I got the error ‘duplicate `character_pet`
    Apparently, this is because of the BeastMaster NPC module.
    Then I deleted the line (since I was hiring a hunter's pet)
    Code:
    INSERT INTO `character_pet` .........
    This worked, the character was able to be imported, but my Felhunter still has some abilities from the Hunter pet. I have to delete them somehow now.
    Other than that, everything seems to be fine.

  14. #12
    Aldebaraan's Avatar Active Member
    Reputation
    39
    Join Date
    Oct 2024
    Posts
    86
    Thanks G/R
    5/31
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by uber-cheater3000 View Post
    Unfortunately the .pdump command doesn't work either. The character cannot be imported into the new server
    Code:
    .pdump load MyProgress horell Vredina
    LoadPlayerDump: (line 819) unknown column name `posO` for table `character_homebind`, aborting due to incompatible DB structure.
    Dump file have broken data!
    Anyway, thanks for trying to help
    Homebind from old zaicopx has a extra column that was removed in current azerothcore.

Similar Threads

  1. [Selling] WoW Scripts for PvP and PvE. Works on ALL servers.
    By Pqrdealer in forum WoW Private Server Buy Sell Trade
    Replies: 51
    Last Post: 12-21-2018, 09:51 PM
  2. [Trading] 3.3.5 DMG/CD/GCD hacks+scripts for characters on Lordaeron/Kronos/TBC realm (WTS)
    By Wave45logi in forum WoW Private Server Buy Sell Trade
    Replies: 0
    Last Post: 04-28-2016, 06:27 PM
  3. [Selling] WoW Scripts for PvP and PvE. Works on ALL servers.
    By Pqrdealer in forum World of Warcraft Buy Sell Trade
    Replies: 22
    Last Post: 08-23-2015, 01:58 AM
  4. Generic Dll Injector for x86 and x64 + Export Caller
    By Cypher in forum WoW Memory Editing
    Replies: 14
    Last Post: 03-31-2013, 05:45 PM
  5. Any script for get non guilded in who list?
    By Ksajimato in forum WoW UI, Macros and Talent Specs
    Replies: 1
    Last Post: 05-17-2011, 09:05 PM
All times are GMT -5. The time now is 08:00 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search