Utility scripts for a TES3MP server administrator.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

41 lines
700 B

#!/bin/bash -e
this_dir=$(realpath $(dirname ${0}))
tes3mp_dir=${this_dir}/..
if ! [ "${1}" = '--nosv' ]; then
nosv=true
fi
if ! [ "${1}" = '--nowarps' ]; then
nowarps=true
fi
if [ -z $nosv ]; then
sv stop tes3mp
fi
cat <<EOF > ${tes3mp_dir}/lua/CoreScripts/data/world/world.json
{
"customVariables":[],
"factionReputation":[],
"factionRanks":[],
"journal":[],
"topics":[],
"general":{
"currentMpNum":0
},
"kills":[],
"factionExpulsion":[]
}
EOF
if ! [ -z $nowarps ]; then
${this_dir}/update-world-warps.py ${tes3mp_dir}/lua/CoreScripts/data/world/world.json
fi
if [ -z $nosv ]; then
sv start tes3mp
fi
echo $(date +%F)-$(date +%T) QUEST RESET DONE!