Code:
USE mu_game;
DELETE FROM gate_template WHERE id = 0;
UPDATE gate_template SET flag = 0 WHERE id = 17;
UPDATE gate_template SET flag = 0 WHERE id = 19;
UPDATE gate_template SET flag = 0 WHERE id = 21;
UPDATE gate_template SET flag = 0 WHERE id = 27;
UPDATE gate_template SET flag = 0 WHERE id = 29;
UPDATE gate_template SET flag = 0 WHERE id = 31;
UPDATE gate_template SET flag = 0 WHERE id = 33;
UPDATE gate_template SET flag = 0 WHERE id = 35;
UPDATE gate_template SET flag = 0 WHERE id = 37;
UPDATE gate_template SET flag = 0 WHERE id = 39;
UPDATE gate_template SET flag = 0 WHERE id = 41;
UPDATE gate_template SET flag = 1 WHERE id = 45;
UPDATE gate_template SET flag = 1 WHERE id = 47;
UPDATE gate_template SET flag = 1 WHERE id = 53;
UPDATE gate_template SET flag = 1 WHERE id = 55;
UPDATE gate_template SET flag = 1 WHERE id = 62;
UPDATE gate_template SET flag = 1 WHERE id = 64;
UPDATE gate_template SET flag = 1 WHERE id = 96;
UPDATE gate_template SET flag = 1 WHERE id = 98;
UPDATE gate_template SET flag = 1 WHERE id = 102;
UPDATE gate_template SET flag = 1 WHERE id = 107;
UPDATE gate_template SET flag = 1 WHERE id = 109;
UPDATE gate_template SET flag = 1 WHERE id = 117;
UPDATE gate_template SET flag = 1 WHERE id = 120;
UPDATE gate_template SET flag = 1 WHERE id = 121;
UPDATE gate_template SET flag = 1 WHERE id = 123;
UPDATE gate_template SET flag = 1 WHERE id = 125;
UPDATE gate_template SET flag = 1 WHERE id = 127;
UPDATE gate_template SET flag = 1 WHERE id = 129;
UPDATE gate_template SET flag = 1 WHERE id = 131;
UPDATE gate_template SET flag = 1 WHERE id = 259;
UPDATE gate_template SET flag = 1 WHERE id = 261;
UPDATE gate_template SET flag = 1 WHERE id = 263;
UPDATE gate_template SET flag = 1 WHERE id = 265;
UPDATE gate_template SET flag = 1 WHERE id = 274;
UPDATE gate_template SET flag = 1 WHERE id = 276;
UPDATE gate_template SET flag = 1 WHERE id = 277;
UPDATE gate_template SET flag = 1 WHERE id = 279;
UPDATE gate_template SET flag = 1 WHERE id = 280;
UPDATE gate_template SET flag = 1 WHERE id = 282;
UPDATE gate_template SET flag = 1 WHERE id = 283;
UPDATE gate_template SET flag = 1 WHERE id = 285;
UPDATE gate_template SET flag = 1 WHERE id = 286;
UPDATE gate_template SET flag = 1 WHERE id = 288;
UPDATE gate_template SET flag = 1 WHERE id = 290;
UPDATE gate_template SET flag = 1 WHERE id = 292;
UPDATE gate_template SET flag = 1 WHERE id = 308;
UPDATE gate_template SET flag = 1 WHERE id = 310;
UPDATE gate_template SET flag = 1 WHERE id = 313;
UPDATE gate_template SET flag = 1 WHERE id = 315;
UPDATE gate_template SET flag = 1 WHERE id = 318;
UPDATE gate_template SET flag = 1 WHERE id = 320;
UPDATE gate_template SET flag = 1 WHERE id = 323;
UPDATE gate_template SET flag = 1 WHERE id = 325;
UPDATE gate_template SET flag = 1 WHERE id = 327;
UPDATE gate_template SET flag = 1 WHERE id = 336;
UPDATE gate_template SET flag = 1 WHERE id = 338;
UPDATE gate_template SET flag = 1 WHERE id = 340;
UPDATE gate_template SET flag = 1 WHERE id = 342;
UPDATE gate_template SET flag = 1 WHERE id = 418;
UPDATE gate_template SET flag = 1 WHERE id = 420;
UPDATE gate_template SET flag = 1 WHERE id = 422;
UPDATE gate_template SET flag = 1 WHERE id = 424;
UPDATE gate_template SET flag = 1 WHERE id = 427;
UPDATE gate_template SET flag = 1 WHERE id = 429;
UPDATE gate_template SET flag = 1 WHERE id = 431;
UPDATE gate_template SET flag = 1 WHERE id = 433;
UPDATE gate_template SET flag = 1 WHERE id = 435;
UPDATE gate_template SET flag = 1 WHERE id = 437;
UPDATE gate_template SET flag = 1 WHERE id = 439;
UPDATE gate_template SET flag = 1 WHERE id = 441;
UPDATE gate_template SET flag = 1 WHERE id = 450;
UPDATE gate_template SET flag = 1 WHERE id = 452;
UPDATE gate_template SET flag = 1 WHERE id = 454;
UPDATE gate_template SET flag = 1 WHERE id = 456;
UPDATE gate_template SET flag = 1 WHERE id = 458;
UPDATE gate_template SET flag = 1 WHERE id = 460;
UPDATE gate_template SET flag = 1 WHERE id = 475;
UPDATE gate_template SET flag = 1 WHERE id = 477;
UPDATE gate_template SET flag = 1 WHERE id = 479;
UPDATE gate_template SET flag = 1 WHERE id = 481;
UPDATE gate_template SET flag = 1 WHERE id = 487;
UPDATE gate_template SET flag = 1 WHERE id = 489;
UPDATE gate_template SET flag = 1 WHERE id = 491;
UPDATE gate_template SET flag = 1 WHERE id = 493;
UPDATE gate_template SET flag = 1 WHERE id = 495;
UPDATE gate_template SET flag = 1 WHERE id = 497;
UPDATE gate_template SET flag = 1 WHERE id = 499;
UPDATE gate_template SET flag = 1 WHERE id = 501;
UPDATE gate_template SET flag = 1 WHERE id = 510;
UPDATE gate_template SET flag = 1 WHERE id = 512;
UPDATE gate_template SET flag = 1 WHERE id = 514;
UPDATE gate_template SET flag = 1 WHERE id = 516;
UPDATE gate_template SET flag = 1 WHERE id = 518;
UPDATE gate_template SET flag = 1 WHERE id = 520;
UPDATE gate_template SET flag = 1 WHERE id = 523;
UPDATE gate_template SET flag = 1 WHERE id = 525;
UPDATE gate_template SET flag = 1 WHERE id = 527;
UPDATE gate_template SET flag = 1 WHERE id = 529;
UPDATE gate_template SET flag = 1 WHERE id = 532;
UPDATE gate_template SET flag = 1 WHERE id = 534;
UPDATE gate_template SET flag = 1 WHERE id = 541;
UPDATE gate_template SET flag = 1 WHERE id = 543;
UPDATE gate_template SET flag = 1 WHERE id = 545;
UPDATE gate_template SET flag = 1 WHERE id = 547;
UPDATE gate_template SET flag = 1 WHERE id = 549;
UPDATE gate_template SET flag = 1 WHERE id = 551;
UPDATE gate_template SET flag = 1 WHERE id = 553;
UPDATE gate_template SET flag = 1 WHERE id = 555;
UPDATE gate_template SET flag = 1 WHERE id = 557;
UPDATE gate_template SET flag = 1 WHERE id = 559;
UPDATE gate_template SET flag = 1 WHERE id = 568;
UPDATE gate_template SET flag = 1 WHERE id = 570;
UPDATE gate_template SET flag = 0 WHERE id = 573;
UPDATE gate_template SET flag = 1 WHERE id = 574;
UPDATE gate_template SET flag = 1 WHERE id = 576;
UPDATE gate_template SET flag = 1 WHERE id = 578;
UPDATE gate_template SET flag = 1 WHERE id = 580;
UPDATE gate_template SET flag = 1 WHERE id = 582;
UPDATE gate_template SET flag = 1 WHERE id = 584;
UPDATE gate_template SET flag = 1 WHERE id = 586;
UPDATE gate_template SET flag = 1 WHERE id = 589;
UPDATE gate_template SET flag = 1 WHERE id = 592;
UPDATE gate_template SET flag = 1 WHERE id = 594;
UPDATE gate_template SET flag = 1 WHERE id = 596;
UPDATE gate_template SET flag = 1 WHERE id = 598;
UPDATE gate_template SET flag = 1 WHERE id = 600;
UPDATE gate_template SET flag = 1 WHERE id = 602;
UPDATE gate_template SET flag = 1 WHERE id = 604;
UPDATE gate_template SET flag = 1 WHERE id = 606;
UPDATE gate_template SET flag = 1 WHERE id = 608;
UPDATE gate_template SET flag = 1 WHERE id = 610;
UPDATE gate_template SET flag = 1 WHERE id = 612;
UPDATE gate_template SET flag = 1 WHERE id = 614;
UPDATE gate_template SET flag = 1 WHERE id = 621;
UPDATE gate_template SET flag = 1 WHERE id = 623;
UPDATE gate_template SET flag = 1 WHERE id = 625;
UPDATE gate_template SET flag = 1 WHERE id = 627;
UPDATE gate_template SET flag = 1 WHERE id = 629;
UPDATE gate_template SET flag = 1 WHERE id = 632;
INSERT INTO settings(server_id, `key`, value) VALUES
(0, 'GameServer.GateHandle', '1'),
(18, 'GameServer.GateHandle', '1'),
(19, 'GameServer.GateHandle', '1');