Skip to content
Snippets Groups Projects
Commit cc4f5715 authored by DrLecter's avatar DrLecter
Browse files

database_installer.sh: taneltm addition for updates directory parsing. Some...

database_installer.sh: taneltm addition for updates directory parsing. Some update files had to be commented out to avoid issues.
parent d7789a1c
No related branches found
No related tags found
No related merge requests found
DROP TABLE IF EXISTS `random_spawn`; -- DROP TABLE IF EXISTS `random_spawn`;
CREATE TABLE `random_spawn` ( -- CREATE TABLE `random_spawn` (
groupId INT NOT NULL default 0, -- groupId INT NOT NULL default 0,
npcId INT NOT NULL default 0, -- npcId INT NOT NULL default 0,
count INT NOT NULL default 0, -- count INT NOT NULL default 0,
initialDelay BIGINT NOT NULL default -1, -- initialDelay BIGINT NOT NULL default -1,
respawnDelay BIGINT NOT NULL default -1, -- respawnDelay BIGINT NOT NULL default -1,
despawnDelay BIGINT NOT NULL default -1, -- despawnDelay BIGINT NOT NULL default -1,
broadcastSpawn VARCHAR(5) NOT NULL default 'false', -- broadcastSpawn VARCHAR(5) NOT NULL default 'false',
randomSpawn VARCHAR(5) NOT NULL default 'true', -- randomSpawn VARCHAR(5) NOT NULL default 'true',
PRIMARY KEY (groupId) -- PRIMARY KEY (groupId)
); -- );
INSERT INTO `random_spawn` VALUES (1, 7556, 1, -1, 1800000, 1800000, 'false', 'true'); -- INSERT INTO `random_spawn` VALUES (1, 7556, 1, -1, 1800000, 1800000, 'false', 'true');
\ No newline at end of file \ No newline at end of file
-- Forest of dead/Cursed Village Day/Night spawn implementation -- Forest of dead/Cursed Village Day/Night spawn implementation
-- npc -- npc
/*
UPDATE npc SET type = 'L2Monster' WHERE id IN (1596,1599); UPDATE npc SET type = 'L2Monster' WHERE id IN (1596,1599);
UPDATE npc SET type = 'L2Minion' WHERE id IN (1597,1598,1600,1601); UPDATE npc SET type = 'L2Minion' WHERE id IN (1597,1598,1600,1601);
UPDATE npc SET hp=0,mp=0,exp=0,sp=0 WHERE id = 12789; UPDATE npc SET hp=0,mp=0,exp=0,sp=0 WHERE id = 12789;
...@@ -615,4 +616,4 @@ INSERT INTO spawnlist VALUES ...@@ -615,4 +616,4 @@ INSERT INTO spawnlist VALUES
(NULL,'forest_of_the_dead',1,1585,55544,-44500,-2922,0,0,0,240,0,2), (NULL,'forest_of_the_dead',1,1585,55544,-44500,-2922,0,0,0,240,0,2),
(NULL,'forest_of_the_dead',1,1585,57349,-46255,-2773,0,0,0,240,0,2), (NULL,'forest_of_the_dead',1,1585,57349,-46255,-2773,0,0,0,240,0,2),
(NULL,'forest_of_the_dead',1,1587,55602,-45389,-2894,0,0,0,240,0,2), (NULL,'forest_of_the_dead',1,1587,55602,-45389,-2894,0,0,0,240,0,2),
(NULL,'forest_of_the_dead',1,1587,56641,-45690,-2905,0,0,0,240,0,2); (NULL,'forest_of_the_dead',1,1587,56641,-45690,-2905,0,0,0,240,0,2); */
\ No newline at end of file \ No newline at end of file
/*
update npc set absorb_level='13' where (id='10319'); update npc set absorb_level='13' where (id='10319');
update npc set absorb_level='13', `type`='L2Boss' where (id='10338'); update npc set absorb_level='13', `type`='L2Boss' where (id='10338');
...@@ -19,4 +20,5 @@ UPDATE npc SET absorb_level='3' WHERE id IN ...@@ -19,4 +20,5 @@ UPDATE npc SET absorb_level='3' WHERE id IN
('797','636','637'); ('797','636','637');
UPDATE npc SET absorb_level='2' WHERE id IN UPDATE npc SET absorb_level='2' WHERE id IN
('795','796'); ('795','796');
\ No newline at end of file */
\ No newline at end of file
...@@ -221,7 +221,7 @@ asktype(){ ...@@ -221,7 +221,7 @@ asktype(){
echo "" echo ""
echo "" echo ""
echo "WARNING: A full install (f) will destroy all existing character data." echo "WARNING: A full install (f) will destroy all existing character data."
echo -ne "GAMESERVER DB install type: (f) full install or (u) upgrade or (s) skip or (q) quit?" echo -ne "GAMESERVER DB install type: (f) full install, (u) upgrade, (s) skip or (q) quit? "
read INSTALLTYPE read INSTALLTYPE
case "$INSTALLTYPE" in case "$INSTALLTYPE" in
"f"|"F") fullinstall; upgradeinstall I; experimental; expinstall;; "f"|"F") fullinstall; upgradeinstall I; experimental; expinstall;;
...@@ -314,6 +314,7 @@ $MYG < ../sql/teleport.sql &> /dev/null ...@@ -314,6 +314,7 @@ $MYG < ../sql/teleport.sql &> /dev/null
$MYG < ../sql/topic.sql &> /dev/null $MYG < ../sql/topic.sql &> /dev/null
$MYG < ../sql/weapon.sql &> /dev/null $MYG < ../sql/weapon.sql &> /dev/null
$MYG < ../sql/zone.sql &> /dev/null $MYG < ../sql/zone.sql &> /dev/null
newbie_helper
} }
experimental(){ experimental(){
...@@ -363,6 +364,34 @@ echo "Script execution finished." ...@@ -363,6 +364,34 @@ echo "Script execution finished."
exit 0 exit 0
} }
newbie_helper(){
while :
do
echo ""
echo -ne "If you're not that skilled applying changes within 'updates' folder, i can try to do it for you (y). If you wish to do it on your own, choose (n). Shall i parse updates files? (Y/n)"
read NOB
if [ "$NOB" == "Y" -o "$NOB" == "y" -o "$NOB" == "" ]; then
echo ""
echo "There we go, it may take some time..."
echo "updates parser results. Last run: "`date` >database_installer.log
for file in $(ls ../sql/updates/*sql);do
echo $file|cut -d/ -f4 >> database_installer.log
$MYG < $file 2>> database_installer.log
if [ $? -eq 0 ];then
echo "no errors">> database_installer.log
fi
done
echo ""
echo "Log available at $(pwd)/database_installer.log"
echo ""
break
elif [ "$NOB" == "n" -o "$NOB" == "N" ]; then
break
fi
done
}
clear clear
load_config $1 load_config $1
MYL="$MYSQLPATH -h $LSDBHOST -u $LSUSER --password=$LSPASS -D $LSDB" MYL="$MYSQLPATH -h $LSDBHOST -u $LSUSER --password=$LSPASS -D $LSDB"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment