This commit is contained in:
bash
2024-07-29 19:03:28 +00:00
parent 47019a73e8
commit 225c4e56f5
16 changed files with 338 additions and 336 deletions

View File

@@ -1,101 +1,101 @@
#!/bin/bash #!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
source ${ROOT_DIR}/variables.sh source ${ROOT_DIR}/variables.sh
read -p "This will configur the server, are you sure? (Y)es/(N)o: " -n 1 -r read -p "This will configur the server, are you sure? (Y)es/(N)o: " -n 1 -r
echo " "; echo " ";
if [[ $REPLY =~ ^[Yy]$ ]]; if [[ $REPLY =~ ^[Yy]$ ]];
then then
########################################################################################## ##########################################################################################
# Enable mysql server # Enable mysql server
########################################################################################## ##########################################################################################
sudo service mysql start sudo service mysql start
########################################################################################## ##########################################################################################
# Create acore account # Create acore account
########################################################################################## ##########################################################################################
sudo mysql -u root -e "CREATE DATABASE IF NOT EXISTS acore_auth;" sudo mysql -u root -e "CREATE DATABASE IF NOT EXISTS acore_auth;"
sudo mysql -u root -e "CREATE USER IF NOT EXISTS 'acore'@'%' IDENTIFIED BY 'acore';" sudo mysql -u root -e "CREATE USER IF NOT EXISTS 'acore'@'%' IDENTIFIED BY 'acore';"
sudo mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'acore'@'%';" sudo mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'acore'@'%';"
sudo mysql -u root -e "FLUSH PRIVILEGES;" sudo mysql -u root -e "FLUSH PRIVILEGES;"
########################################################################################## ##########################################################################################
# Recompile default conf files # Recompile default conf files
########################################################################################## ##########################################################################################
sudo ${ROOT_DIR}/_server/azerothcore/acore.sh compiler configure sudo ${ROOT_DIR}/_server/azerothcore/acore.sh compiler configure
########################################################################################## ##########################################################################################
# Ensure all folder and files are accesible for the current user # Ensure all folder and files are accesible for the current user
########################################################################################## ##########################################################################################
sudo find ${ROOT_DIR}/_server/ -user root -exec sudo chown $USER: {} + sudo find ${ROOT_DIR}/_server/ -user root -exec sudo chown $USER: {} +
########################################################################################## ##########################################################################################
# Server config merge # Server config merge
########################################################################################## ##########################################################################################
sudo cat ${ROOT_DIR}/config/authserver.conf \ sudo cat ${ROOT_DIR}/config/authserver.conf \
${ROOT_DIR}/_server/azerothcore/env/dist/etc/authserver.conf.dist > \ ${ROOT_DIR}/_server/azerothcore/env/dist/etc/authserver.conf.dist > \
${ROOT_DIR}/_server/azerothcore/env/dist/etc/authserver.conf | exit 1 ${ROOT_DIR}/_server/azerothcore/env/dist/etc/authserver.conf | exit 1
sudo cat ${ROOT_DIR}/config/worldserver.conf \ sudo cat ${ROOT_DIR}/config/worldserver.conf \
${ROOT_DIR}/_server/azerothcore/env/dist/etc/worldserver.conf.dist > \ ${ROOT_DIR}/_server/azerothcore/env/dist/etc/worldserver.conf.dist > \
${ROOT_DIR}/_server/azerothcore/env/dist/etc/worldserver.conf | exit 1 ${ROOT_DIR}/_server/azerothcore/env/dist/etc/worldserver.conf | exit 1
########################################################################################### ###########################################################################################
## Modules config merge ## Modules config merge
########################################################################################### ###########################################################################################
sudo cat ${ROOT_DIR}/config/modules/playerbots.conf \ sudo cat ${ROOT_DIR}/config/modules/playerbots.conf \
${ROOT_DIR}/_server/azerothcore/env/dist/etc/modules/playerbots.conf.dist > \ ${ROOT_DIR}/_server/azerothcore/env/dist/etc/modules/playerbots.conf.dist > \
${ROOT_DIR}/_server/azerothcore/env/dist/etc/modules/playerbots.conf | exit 1 ${ROOT_DIR}/_server/azerothcore/env/dist/etc/modules/playerbots.conf | exit 1
sudo cat ${ROOT_DIR}/config/modules/mod_ahbot.conf \ sudo cat ${ROOT_DIR}/config/modules/mod_ahbot.conf \
${ROOT_DIR}/_server/azerothcore/env/dist/etc/modules/mod_ahbot.conf.dist > \ ${ROOT_DIR}/_server/azerothcore/env/dist/etc/modules/mod_ahbot.conf.dist > \
${ROOT_DIR}/_server/azerothcore/env/dist/etc/modules/mod_ahbot.conf | exit 1 ${ROOT_DIR}/_server/azerothcore/env/dist/etc/modules/mod_ahbot.conf | exit 1
########################################################################################## ##########################################################################################
# Set alias to start, stop and open wow or auth tmux sessions # Set alias to start, stop and open wow or auth tmux sessions
########################################################################################## ##########################################################################################
if grep -R "bash_wow" ~/.bashrc if grep -R "bash_wow" ~/.bashrc
then then
echo "bash_wow exists"; echo "bash_wow exists";
else else
echo " " >> ~/.bashrc echo " " >> ~/.bashrc
echo "if [ -f ~/.bash_wow ]; then" >> ~/.bashrc echo "if [ -f ~/.bash_wow ]; then" >> ~/.bashrc
echo " . ~/.bash_wow" >> ~/.bashrc echo " . ~/.bash_wow" >> ~/.bashrc
echo "fi" >> ~/.bashrc echo "fi" >> ~/.bashrc
fi fi
echo "ROOT_DIR=${ROOT_DIR}" > ~/.bash_wow echo "ROOT_DIR=${ROOT_DIR}" > ~/.bash_wow
echo "DATAPATH=${DATAPATH}" >> ~/.bash_wow echo "DATAPATH=${DATAPATH}" >> ~/.bash_wow
echo "alias update='${ROOT_DIR}/2_update.sh'" >> ~/.bash_wow echo "alias update='${ROOT_DIR}/2_update.sh'" >> ~/.bash_wow
echo "alias build='${ROOT_DIR}/3_build.sh'" >> ~/.bash_wow echo "alias build='${ROOT_DIR}/3_build.sh'" >> ~/.bash_wow
echo "alias compile='${ROOT_DIR}/4_compile.sh'" >> ~/.bash_wow echo "alias compile='${ROOT_DIR}/4_compile.sh'" >> ~/.bash_wow
echo "alias config='${ROOT_DIR}/5_config.sh'" >> ~/.bash_wow echo "alias config='${ROOT_DIR}/5_config.sh'" >> ~/.bash_wow
echo "alias start='${ROOT_DIR}/6_start.sh'" >> ~/.bash_wow echo "alias start='${ROOT_DIR}/6_start.sh'" >> ~/.bash_wow
echo "alias stop='tmux kill-server'" >> ~/.bash_wow echo "alias stop='tmux kill-server'" >> ~/.bash_wow
echo "alias wow='cd ${ROOT_DIR}/_server/azerothcore;tmux attach -t ${WORLDSERVER_SESSION}'" >> ~/.bash_wow echo "alias wow='cd ${ROOT_DIR}/_server/azerothcore;tmux attach -t ${WORLDSERVER_SESSION}'" >> ~/.bash_wow
echo "alias auth='cd ${ROOT_DIR}/_server/azerothcore;tmux attach -t ${AUTHSERVER_SESSION}'" >> ~/.bash_wow echo "alias auth='cd ${ROOT_DIR}/_server/azerothcore;tmux attach -t ${AUTHSERVER_SESSION}'" >> ~/.bash_wow
source ~/.bashrc source ~/.bashrc
echo " " echo " "
echo "###########################################################################################" echo "###########################################################################################"
echo "## After the first install or changes either reboot or TYPE! 'source ~/.bashrc'" echo "## After the first install or changes either reboot or TYPE! 'source ~/.bashrc'"
echo "###########################################################################################" echo "###########################################################################################"
echo "## After the above you can use the following commands:" echo "## After the above you can use the following commands:"
echo "### update - Updates source-code to latest version" echo "### update - Updates source-code to latest version"
echo "### build - Builds the server based on source-code" echo "### build - Builds the server based on source-code"
echo "### compile - Compiles the code based on the build server" echo "### compile - Compiles the code based on the build server"
echo "### config - Applies the server configration" echo "### config - Applies the server configration"
echo "### start - starts auth and world in tmux sessions server" echo "### start - starts auth and world in tmux sessions server"
echo "### stop - stops all sessions" echo "### stop - stops all sessions"
echo "### wow - logon world-server (tmux) session" echo "### wow - logon world-server (tmux) session"
echo "### auth - logon auth-server (tmux) session" echo "### auth - logon auth-server (tmux) session"
echo "###########################################################################################" echo "###########################################################################################"
fi fi

View File

@@ -1,71 +1,71 @@
#!/bin/bash #!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
source ${ROOT_DIR}/variables.sh source ${ROOT_DIR}/variables.sh
########################################################################################## ##########################################################################################
# Apply server realm configuration # Apply server realm configuration
########################################################################################## ##########################################################################################
source ${ROOT_DIR}/helper/update_realm_ip.sh ${REALM_IP} source ${ROOT_DIR}/helper/update_realm_ip.sh ${REALM_IP}
source ${ROOT_DIR}/helper/update_realm_ip.sh ${REALM_NAME} source ${ROOT_DIR}/helper/update_realm_ip.sh ${REALM_NAME}
echo " " echo " "
########################################################################################## ##########################################################################################
# Apply ah-bot custom configuration # Apply ah-bot custom configuration
########################################################################################## ##########################################################################################
source ${ROOT_DIR}/helper/update_ahbot_config.sh ${AH_BOT_MIN_ITEMS} ${AH_BOT_MAX_ITEMS} source ${ROOT_DIR}/helper/update_ahbot_config.sh ${AH_BOT_MIN_ITEMS} ${AH_BOT_MAX_ITEMS}
echo " " echo " "
########################################################################################## ##########################################################################################
# Clear playerbots account and characters (enforces performance and bot levels balance) # Clear playerbots account and characters (enforces performance and bot levels balance)
########################################################################################## ##########################################################################################
source ${ROOT_DIR}/helper/clear_playerbots.sh source ${ROOT_DIR}/helper/clear_playerbots.sh
echo " " echo " "
########################################################################################## ##########################################################################################
# handle the tmux sessions # handle the tmux sessions
########################################################################################## ##########################################################################################
if tmux new-session -d -s $AUTHSERVER_SESSION; then if tmux new-session -d -s $AUTHSERVER_SESSION; then
echo "Created authserver session: $AUTHSERVER_SESSION" echo "Created authserver session: $AUTHSERVER_SESSION"
else else
echo "Error when trying to create authserver session: $AUTHSERVER_SESSION" echo "Error when trying to create authserver session: $AUTHSERVER_SESSION"
fi fi
echo " " echo " "
if tmux new-session -d -s $WORLDSERVER_SESSION; then if tmux new-session -d -s $WORLDSERVER_SESSION; then
echo "Created worldserver session: $WORLDSERVER_SESSION" echo "Created worldserver session: $WORLDSERVER_SESSION"
else else
echo "Error when trying to create worldserver session: $WORLDSERVER_SESSION" echo "Error when trying to create worldserver session: $WORLDSERVER_SESSION"
fi fi
echo " " echo " "
if tmux send-keys -t $AUTHSERVER_SESSION "$AUTHSERVER" C-m; then if tmux send-keys -t $AUTHSERVER_SESSION "$AUTHSERVER" C-m; then
echo "Executed \"$AUTHSERVER\" inside $AUTHSERVER_SESSION" echo "Executed \"$AUTHSERVER\" inside $AUTHSERVER_SESSION"
#echo "You can attach to $AUTHSERVER_SESSION and check the result using \"tmux attach -t $AUTHSERVER_SESSION\"" #echo "You can attach to $AUTHSERVER_SESSION and check the result using \"tmux attach -t $AUTHSERVER_SESSION\""
else else
echo "Error when executing \"$AUTHSERVER\" inside $AUTHSERVER_SESSION" echo "Error when executing \"$AUTHSERVER\" inside $AUTHSERVER_SESSION"
fi fi
echo " " echo " "
if tmux send-keys -t $WORLDSERVER_SESSION "$WORLDSERVER" C-m; then if tmux send-keys -t $WORLDSERVER_SESSION "$WORLDSERVER" C-m; then
echo "Executed \"$WORLDSERVER\" inside $WORLDSERVER_SESSION" echo "Executed \"$WORLDSERVER\" inside $WORLDSERVER_SESSION"
#echo "You can attach to $WORLDSERVER_SESSION and check the result using \"tmux attach -t $WORLDSERVER_SESSION\"" #echo "You can attach to $WORLDSERVER_SESSION and check the result using \"tmux attach -t $WORLDSERVER_SESSION\""
else else
echo "Error when executing \"$WORLDSERVER\" inside $WORLDSERVER_SESSION" echo "Error when executing \"$WORLDSERVER\" inside $WORLDSERVER_SESSION"
fi fi
echo " " echo " "
echo "###########################################################################################" echo "###########################################################################################"
echo "## After the above you can use the following commands:" echo "## After the above you can use the following commands:"
echo "### update - Updates source-code to latest version" echo "### update - Updates source-code to latest version"
echo "### build - Builds the server based on source-code" echo "### build - Builds the server based on source-code"
echo "### compile - Compiles the code based on the build server" echo "### compile - Compiles the code based on the build server"
echo "### config - Applies the server configration" echo "### config - Applies the server configration"
echo "### start - starts auth and world in tmux sessions server" echo "### start - starts auth and world in tmux sessions server"
echo "### stop - stops all sessions" echo "### stop - stops all sessions"
echo "### wow - logon world-server (tmux) session" echo "### wow - logon world-server (tmux) session"
echo "### auth - logon auth-server (tmux) session" echo "### auth - logon auth-server (tmux) session"
echo "###########################################################################################" echo "###########################################################################################"

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/.. ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
source ${ROOT_DIR}/variables.sh source ${ROOT_DIR}/../variables.sh
sudo mysql -u root --database="acore_characters" < ${ROOT_DIR}/sql/clear_auctionhouse.sql sudo mysql -u root --database="acore_characters" < ${ROOT_DIR}/../sql/clear_auctionhouse.sql
echo "Auction house items deleted..." echo "Auction house items deleted..."

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/.. ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/
source ${ROOT_DIR}/variables.sh source ${ROOT_DIR}/../variables.sh
sudo mysql -u root --database="acore_characters" < ${ROOT_DIR}/sql/clear_playerbots.sql sudo mysql -u root --database="acore_characters" < ${ROOT_DIR}/../sql/clear_playerbots.sql
echo "Playerbots accounts and characters deleted..." echo "Playerbots accounts and characters deleted..."

View File

@@ -1,16 +1,16 @@
#!/bin/bash #!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/.. ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
source ${ROOT_DIR}/variables.sh source ${ROOT_DIR}/../variables.sh
ACCOUNT_NAME=$1; ACCOUNT_NAME=$1;
if [ -z "$ACCOUNT_NAME" ] if [ -z "$ACCOUNT_NAME" ]
then then
echo "First parameter 'ACCOUNT_NAME' is required"; echo "First parameter 'ACCOUNT_NAME' is required";
exit 1; exit 1;
fi fi
sed -e "s/{{ACCOUNT_NAME}}/$ACCOUNT_NAME/g" \ sed -e "s/{{ACCOUNT_NAME}}/$ACCOUNT_NAME/g" \
"${ROOT_DIR}/sql/find_character.sql" > "/tmp/find_character.sql" "${ROOT_DIR}/../sql/find_character.sql" > "/tmp/find_character.sql"
sudo mysql -u root --database="acore_characters" < /tmp/find_character.sql sudo mysql -u root --database="acore_characters" < /tmp/find_character.sql
echo "Find character executed..." echo "Find character executed..."

View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Alias GIT (git lg for git commits, git ls for commits with changed files) # Alias GIT (git lg for git commits, git ls for commits with changed files)
git config --global alias.lg 'log --graph --abbrev-commit --decorate --date=relative --all' git config --global alias.lg 'log --graph --abbrev-commit --decorate --date=relative --all'
git config --global alias.ls 'log --stat --pretty=short --graph' git config --global alias.ls 'log --stat --pretty=short --graph'

View File

@@ -1,28 +1,28 @@
#!/bin/bash #!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
########################################################################################## ##########################################################################################
# General dependencies # General dependencies
########################################################################################## ##########################################################################################
sudo apt update && sudo apt install -y git sudo apt update && sudo apt install -y git
read -p "Merge the orginal azerothcore code into the playerbot azerothcore, are you sure? (Y)es/(N)o: " -n 1 -r read -p "Merge the orginal azerothcore code into the playerbot azerothcore, are you sure? (Y)es/(N)o: " -n 1 -r
echo " "; echo " ";
if [[ $REPLY =~ ^[Yy]$ ]]; if [[ $REPLY =~ ^[Yy]$ ]];
then then
########################################################################################## ##########################################################################################
# Try to merge from the orginal azerothcore into the playerbot azerothcore fork branch # Try to merge from the orginal azerothcore into the playerbot azerothcore fork branch
########################################################################################## ##########################################################################################
cd ${ROOT_DIR}/../_download/azerothcore cd ${ROOT_DIR}/../_download/azerothcore
git reset --hard origin/Playerbot git reset --hard origin/Playerbot
git fetch upstream git fetch upstream
git merge upstream/master git merge upstream/master
echo " " echo " "
echo "###########################################################################################" echo "###########################################################################################"
echo "## If (conflict) error just run update (2_update.sh) again to restore to the latest" echo "## If (conflict) error just run update (2_update.sh) again to restore to the latest"
echo "## version of the playerbot branch" echo "## version of the playerbot branch"
echo "###########################################################################################" echo "###########################################################################################"
fi fi

View File

@@ -1,24 +1,26 @@
#!/bin/bash #!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/.. ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
source ${ROOT_DIR}/variables.sh source ${ROOT_DIR}/../variables.sh
AH_BOT_MIN_ITEMS=$1; AH_BOT_MIN_ITEMS=$1;
if [ -z "$AH_BOT_MIN_ITEMS" ] if [ -z "$AH_BOT_MIN_ITEMS" ]
then then
echo "First parameter 'AH_BOT_MIN_ITEMS' is required"; echo "First parameter 'AH_BOT_MIN_ITEMS' is required";
exit 1; echo "Second parameter 'AH_BOT_MAX_ITEMS' is required";
fi exit 1;
AH_BOT_MAX_ITEMS=$2 fi
if [ -z "$AH_BOT_MAX_ITEMS" ] AH_BOT_MAX_ITEMS=$2;
then if [ -z "$AH_BOT_MAX_ITEMS" ]
echo "Second parameter 'AH_BOT_MAX_ITEMS' is required"; then
exit 1; echo "Second parameter 'AH_BOT_MAX_ITEMS' is required";
fi exit 1;
fi
sed -e "s/{{AH_BOT_MIN_ITEMS}}/$AH_BOT_MIN_ITEMS/g" \
-e "s/{{AH_BOT_MAX_ITEMS}}/$AH_BOT_MAX_ITEMS/g" \ sed -e "s/{{AH_BOT_MIN_ITEMS}}/$AH_BOT_MIN_ITEMS/g" \
> "${ROOT_DIR}/sql/update_ahbot_config.sql" > "/tmp/update_ahbot_config.sql" -e "s/{{AH_BOT_MAX_ITEMS}}/$AH_BOT_MAX_ITEMS/g" \
sudo mysql -u root --database="acore_characters" < /tmp/update_ahbot_config.sql "${ROOT_DIR}/../sql/update_ahbot_config.sql" > "/tmp/update_ahbot_config.sql"
sudo mysql -u root --database="acore_characters" < /tmp/update_ahbot_config.sql
echo "AH-bot config updated..." echo "AH-bot config updated..."

View File

@@ -1,17 +1,17 @@
#!/bin/bash #!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/.. ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
source ${ROOT_DIR}/variables.sh source ${ROOT_DIR}/../variables.sh
REALM_IP=$1; REALM_IP=$1;
if [ -z "$REALM_IP" ] if [ -z "$REALM_IP" ]
then then
echo "First parameter 'REALM_IP' is required"; echo "First parameter 'REALM_IP' is required";
exit 1; exit 1;
fi fi
sed -e "s/{{REALM_IP}}/$REALM_IP/g" \ sed -e "s/{{REALM_IP}}/$REALM_IP/g" \
"${ROOT_DIR}/sql/update_realm_ip.sql" > "/tmp/update_realm_ip.sql" "${ROOT_DIR}/../sql/update_realm_ip.sql" > "/tmp/update_realm_ip.sql"
sudo mysql -u root --database="acore_characters" < /tmp/update_realm_ip.sql sudo mysql -u root --database="acore_characters" < /tmp/update_realm_ip.sql
echo "Server realm IP updated..." echo "Server realm IP updated..."

View File

@@ -1,17 +1,17 @@
#!/bin/bash #!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/.. ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
source ${ROOT_DIR}/variables.sh source ${ROOT_DIR}/../variables.sh
REALM_NAME=$1; REALM_NAME=$1;
if [ -z "$REALM_NAME" ] if [ -z "$REALM_NAME" ]
then then
echo "First parameter 'REALM_NAME' is required"; echo "First parameter 'REALM_NAME' is required";
exit 1; exit 1;
fi fi
sed -e "s/{{REALM_NAME}}/$REALM_NAME/g" \ sed -e "s/{{REALM_NAME}}/$REALM_NAME/g" \
"${ROOT_DIR}/sql/update_realm_name.sql" > "/tmp/update_realm_name.sql" "${ROOT_DIR}/../sql/update_realm_name.sql" > "/tmp/update_realm_name.sql"
sudo mysql -u root --database="acore_characters" < /tmp/update_realm_name.sql sudo mysql -u root --database="acore_characters" < /tmp/update_realm_name.sql
echo "Server realm name updated..." echo "Server realm name updated..."

View File

@@ -1,2 +1,2 @@
USE acore_characters; USE acore_characters;
DELETE FROM auctionhouse; DELETE FROM auctionhouse;

View File

@@ -1,30 +1,30 @@
DELETE FROM `acore_playerbots`.`playerbots_random_bots`; DELETE FROM `acore_playerbots`.`playerbots_random_bots`;
UPDATE `acore_characters`.`playerbots_names` SET `in_use`=0; UPDATE `acore_characters`.`playerbots_names` SET `in_use`=0;
DELETE FROM `acore_characters`.`characters` WHERE `account` IN (SELECT `id` FROM `acore_auth`.`account` WHERE `username` LIKE 'RNDBOT%') OR `account` NOT IN (SELECT `id` FROM `acore_auth`.`account`); DELETE FROM `acore_characters`.`characters` WHERE `account` IN (SELECT `id` FROM `acore_auth`.`account` WHERE `username` LIKE 'RNDBOT%') OR `account` NOT IN (SELECT `id` FROM `acore_auth`.`account`);
DELETE FROM `acore_characters`.`character_account_data` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_account_data` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_achievement` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_achievement` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_achievement_progress` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_achievement_progress` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_action` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_action` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_aura` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_aura` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_glyphs` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_glyphs` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_homebind` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_homebind` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`item_instance` WHERE `owner_guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`item_instance` WHERE `owner_guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_inventory` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_inventory` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`pet_aura` WHERE `guid` IN (SELECT `id` FROM `acore_characters`.`character_pet` WHERE `owner` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`)); DELETE FROM `acore_characters`.`pet_aura` WHERE `guid` IN (SELECT `id` FROM `acore_characters`.`character_pet` WHERE `owner` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`));
DELETE FROM `acore_characters`.`pet_spell` WHERE `guid` IN (SELECT `id` FROM `acore_characters`.`character_pet` WHERE `owner` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`)); DELETE FROM `acore_characters`.`pet_spell` WHERE `guid` IN (SELECT `id` FROM `acore_characters`.`character_pet` WHERE `owner` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`));
DELETE FROM `acore_characters`.`pet_spell_cooldown` WHERE `guid` IN (SELECT `id` FROM `acore_characters`.`character_pet` WHERE `owner` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`)); DELETE FROM `acore_characters`.`pet_spell_cooldown` WHERE `guid` IN (SELECT `id` FROM `acore_characters`.`character_pet` WHERE `owner` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`));
DELETE FROM `acore_characters`.`character_pet` WHERE `owner` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_pet` WHERE `owner` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_queststatus` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_queststatus` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_queststatus_rewarded` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_queststatus_rewarded` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_reputation` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_reputation` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_skills` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_skills` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_social` WHERE `friend` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_social` WHERE `friend` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_spell` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_spell` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_spell_cooldown` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_spell_cooldown` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`character_talent` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`character_talent` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`corpse` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`corpse` WHERE `guid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`groups` WHERE `leaderGuid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`groups` WHERE `leaderGuid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`group_member` WHERE `memberGuid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`group_member` WHERE `memberGuid` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`mail` WHERE `receiver` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`mail` WHERE `receiver` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_characters`.`mail_items` WHERE `receiver` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`); DELETE FROM `acore_characters`.`mail_items` WHERE `receiver` NOT IN (SELECT `guid` FROM `acore_characters`.`characters`);
DELETE FROM `acore_auth`.`account` WHERE `username` LIKE 'RNDBOT%'; DELETE FROM `acore_auth`.`account` WHERE `username` LIKE 'RNDBOT%';

View File

@@ -1,5 +1,5 @@
USE acore_auth; USE acore_auth;
SELECT acc.id AS accountId, ch.name as characterName, ch.guid AS characterId, SELECT acc.id AS accountId, ch.name as characterName, ch.guid AS characterId
FROM acore_auth.account AS acc FROM acore_auth.account AS acc
INNER JOIN acore_characters.characters AS ch INNER JOIN acore_characters.characters AS ch
WHERE acc.id = ch.account and acc.username = '{{ACCOUNT_NAME}}'; WHERE acc.id = ch.account and acc.username = '{{ACCOUNT_NAME}}';

View File

@@ -1,3 +1,3 @@
USE acore_world; USE acore_world;
UPDATE mod_auctionhousebot UPDATE mod_auctionhousebot
SET minitems = '{{AH_BOT_MIN_ITEMS}}', maxitems = '{{AH_BOT_MAX_ITEMS}}'; SET minitems = '{{AH_BOT_MIN_ITEMS}}', maxitems = '{{AH_BOT_MAX_ITEMS}}';

View File

@@ -1,3 +1,3 @@
USE acore_auth; USE acore_auth;
SELECT * FROM realmlist; UPDATE realmlist
UPDATE realmlist SET address='{{REALM_IP}}'; SET address='{{REALM_IP}}';

View File

@@ -1,3 +1,3 @@
USE acore_auth; USE acore_auth;
SELECT * FROM realmlist; UPDATE realmlist
UPDATE realmlist SET name='{{REALM_NAME}}'; SET name='{{REALM_NAME}}';