Example #1
0
        static void Main(string[] args)
        {
            //PStruct.InitializePlayerArrays();
            //Database.ResetAndGiveExp();

            Log("Iniciando servidor...");
            Log("Cliente definido...");
            Log("");
            Log("Inicializando Array's dos jogadores...");
            PStruct.InitializePlayerArrays();
            Log("Inicializando Array's das guildas...");
            GStruct.InitializeGuildArrays();
            Log("Array's inicializadas.");
            Log("");
            Log("Carregando Inimigos...");
            Database.LoadEnemies();
            Log("Carregado.");
            Log("Carregando Mapas, Missões e Monstros...");
            Database.LoadMaps();
            Log("Carregado.");
            Log("Carregando Itens...");
            Database.LoadItems();
            Log("Carregado.");
            Log("Carregando Armas...");
            Database.LoadWeapons();
            Log("Carregado.");
            Log("Carregando Armaduras...");
            Database.LoadArmors();
            Log("Carregado.");
            Log("Carregando Habilidades...");
            Database.LoadSkills();
            Log("Carregado.");
            Log("Carregando Lojas...");
            Database.LoadShops();
            //Manual, no editor, sorry :/
            ShopStruct.shop[1].map        = 3;
            ShopStruct.shop[1].x          = 9;
            ShopStruct.shop[1].y          = 7;
            ShopStruct.shop[1].item_count = 2;

            ShopStruct.shopitem[1, 1].type  = 1;
            ShopStruct.shopitem[1, 1].num   = 1;
            ShopStruct.shopitem[1, 1].value = 1;
            ShopStruct.shopitem[1, 1].refin = 0;
            ShopStruct.shopitem[1, 1].price = 75;

            ShopStruct.shopitem[1, 2].type  = 1;
            ShopStruct.shopitem[1, 2].num   = 2;
            ShopStruct.shopitem[1, 2].value = 1;
            ShopStruct.shopitem[1, 2].refin = 0;
            ShopStruct.shopitem[1, 2].price = 75;

            //Manual, no editor, sorry :/
            ShopStruct.shop[2].map        = 132;
            ShopStruct.shop[2].x          = 13;
            ShopStruct.shop[2].y          = 7;
            ShopStruct.shop[2].item_count = 1;

            ShopStruct.shopitem[2, 1].type  = 1;
            ShopStruct.shopitem[2, 1].num   = 50;
            ShopStruct.shopitem[2, 1].value = 1;
            ShopStruct.shopitem[2, 1].refin = 0;
            ShopStruct.shopitem[2, 1].price = 25;

            //Manual, no editor, sorry :/
            ShopStruct.shop[3].map        = 136;
            ShopStruct.shop[3].x          = 12;
            ShopStruct.shop[3].y          = 10;
            ShopStruct.shop[3].item_count = 1;

            ShopStruct.shopitem[3, 1].type  = 2;
            ShopStruct.shopitem[3, 1].num   = 28;
            ShopStruct.shopitem[3, 1].value = 1;
            ShopStruct.shopitem[3, 1].refin = 0;
            ShopStruct.shopitem[3, 1].price = 1;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[4].map        = 77;
            ShopStruct.shop[4].x          = 13;
            ShopStruct.shop[4].y          = 3;
            ShopStruct.shop[4].item_count = 1;

            ShopStruct.shopitem[4, 1].type  = 1;
            ShopStruct.shopitem[4, 1].num   = 5;
            ShopStruct.shopitem[4, 1].value = 1;
            ShopStruct.shopitem[4, 1].refin = 0;
            ShopStruct.shopitem[4, 1].price = 100;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[5].map        = 148;
            ShopStruct.shop[5].x          = 9;
            ShopStruct.shop[5].y          = 7;
            ShopStruct.shop[5].item_count = 1;

            ShopStruct.shopitem[5, 1].type  = 2;
            ShopStruct.shopitem[5, 1].num   = 31;
            ShopStruct.shopitem[5, 1].value = 1;
            ShopStruct.shopitem[5, 1].refin = 0;
            ShopStruct.shopitem[5, 1].price = 1;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[6].map        = 149;
            ShopStruct.shop[6].x          = 10;
            ShopStruct.shop[6].y          = 6;
            ShopStruct.shop[6].item_count = 1;

            ShopStruct.shopitem[6, 1].type  = 1;
            ShopStruct.shopitem[6, 1].num   = 47;
            ShopStruct.shopitem[6, 1].value = 1;
            ShopStruct.shopitem[6, 1].refin = 0;
            ShopStruct.shopitem[6, 1].price = 50;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[7].map        = 0;
            ShopStruct.shop[7].x          = 0;
            ShopStruct.shop[7].y          = 0;
            ShopStruct.shop[7].item_count = 3;

            ShopStruct.shopitem[7, 1].type  = 1;
            ShopStruct.shopitem[7, 1].num   = 68;
            ShopStruct.shopitem[7, 1].value = 1;
            ShopStruct.shopitem[7, 1].refin = 0;
            ShopStruct.shopitem[7, 1].price = 5;// 225;

            ShopStruct.shopitem[7, 2].type  = 1;
            ShopStruct.shopitem[7, 2].num   = 70;
            ShopStruct.shopitem[7, 2].value = 1;
            ShopStruct.shopitem[7, 2].refin = 0;
            ShopStruct.shopitem[7, 2].price = 10;// 225;

            ShopStruct.shopitem[7, 3].type  = 1;
            ShopStruct.shopitem[7, 3].num   = 71;
            ShopStruct.shopitem[7, 3].value = 1;
            ShopStruct.shopitem[7, 3].refin = 0;
            ShopStruct.shopitem[7, 3].price = 10;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[8].map        = 13;
            ShopStruct.shop[8].x          = 5;
            ShopStruct.shop[8].y          = 7;
            ShopStruct.shop[8].item_count = 1;

            ShopStruct.shopitem[8, 1].type  = 1;
            ShopStruct.shopitem[8, 1].num   = 69;
            ShopStruct.shopitem[8, 1].value = 1;
            ShopStruct.shopitem[8, 1].refin = 0;
            ShopStruct.shopitem[8, 1].price = 500;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[9].map        = 167;
            ShopStruct.shop[9].x          = 11;
            ShopStruct.shop[9].y          = 6;
            ShopStruct.shop[9].item_count = 11;

            ShopStruct.shopitem[9, 1].type  = 2;
            ShopStruct.shopitem[9, 1].num   = 2;
            ShopStruct.shopitem[9, 1].value = 1;
            ShopStruct.shopitem[9, 1].refin = 0;
            ShopStruct.shopitem[9, 1].price = 209;// 225;

            ShopStruct.shopitem[9, 2].type  = 2;
            ShopStruct.shopitem[9, 2].num   = 3;
            ShopStruct.shopitem[9, 2].value = 1;
            ShopStruct.shopitem[9, 2].refin = 0;
            ShopStruct.shopitem[9, 2].price = 477;// 225;

            ShopStruct.shopitem[9, 3].type  = 2;
            ShopStruct.shopitem[9, 3].num   = 4;
            ShopStruct.shopitem[9, 3].value = 1;
            ShopStruct.shopitem[9, 3].refin = 0;
            ShopStruct.shopitem[9, 3].price = 990;// 225;

            ShopStruct.shopitem[9, 4].type  = 2;
            ShopStruct.shopitem[9, 4].num   = 5;
            ShopStruct.shopitem[9, 4].value = 1;
            ShopStruct.shopitem[9, 4].refin = 0;
            ShopStruct.shopitem[9, 4].price = 1650;// 225;

            ShopStruct.shopitem[9, 5].type  = 2;
            ShopStruct.shopitem[9, 5].num   = 6;
            ShopStruct.shopitem[9, 5].value = 1;
            ShopStruct.shopitem[9, 5].refin = 0;
            ShopStruct.shopitem[9, 5].price = 3350;// 225;

            ShopStruct.shopitem[9, 6].type  = 2;
            ShopStruct.shopitem[9, 6].num   = 7;
            ShopStruct.shopitem[9, 6].value = 1;
            ShopStruct.shopitem[9, 6].refin = 0;
            ShopStruct.shopitem[9, 6].price = 5450;// 225;

            ShopStruct.shopitem[9, 7].type  = 2;
            ShopStruct.shopitem[9, 7].num   = 8;
            ShopStruct.shopitem[9, 7].value = 1;
            ShopStruct.shopitem[9, 7].refin = 0;
            ShopStruct.shopitem[9, 7].price = 8220;// 225;

            ShopStruct.shopitem[9, 8].type  = 2;
            ShopStruct.shopitem[9, 8].num   = 8;
            ShopStruct.shopitem[9, 8].value = 1;
            ShopStruct.shopitem[9, 8].refin = 0;
            ShopStruct.shopitem[9, 8].price = 10130;// 225;

            ShopStruct.shopitem[9, 9].type  = 2;
            ShopStruct.shopitem[9, 9].num   = 9;
            ShopStruct.shopitem[9, 9].value = 1;
            ShopStruct.shopitem[9, 9].refin = 0;
            ShopStruct.shopitem[9, 9].price = 13630;// 225;

            ShopStruct.shopitem[9, 10].type  = 2;
            ShopStruct.shopitem[9, 10].num   = 10;
            ShopStruct.shopitem[9, 10].value = 1;
            ShopStruct.shopitem[9, 10].refin = 0;
            ShopStruct.shopitem[9, 10].price = 17780;// 225;

            ShopStruct.shopitem[9, 11].type  = 2;
            ShopStruct.shopitem[9, 11].num   = 11;
            ShopStruct.shopitem[9, 11].value = 1;
            ShopStruct.shopitem[9, 11].refin = 0;
            ShopStruct.shopitem[9, 11].price = 23180;// 225;


            //Manual, no editor, sorry :/
            ShopStruct.shop[10].map        = 168;
            ShopStruct.shop[10].x          = 11;
            ShopStruct.shop[10].y          = 6;
            ShopStruct.shop[10].item_count = 12;

            ShopStruct.shopitem[10, 1].type  = 3;
            ShopStruct.shopitem[10, 1].num   = 2;
            ShopStruct.shopitem[10, 1].value = 1;
            ShopStruct.shopitem[10, 1].refin = 0;
            ShopStruct.shopitem[10, 1].price = 189;// 225;

            ShopStruct.shopitem[10, 2].type  = 3;
            ShopStruct.shopitem[10, 2].num   = 3;
            ShopStruct.shopitem[10, 2].value = 1;
            ShopStruct.shopitem[10, 2].refin = 0;
            ShopStruct.shopitem[10, 2].price = 389;// 225;

            ShopStruct.shopitem[10, 3].type  = 3;
            ShopStruct.shopitem[10, 3].num   = 4;
            ShopStruct.shopitem[10, 3].value = 1;
            ShopStruct.shopitem[10, 3].refin = 0;
            ShopStruct.shopitem[10, 3].price = 756;// 225;

            ShopStruct.shopitem[10, 4].type  = 3;
            ShopStruct.shopitem[10, 4].num   = 5;
            ShopStruct.shopitem[10, 4].value = 1;
            ShopStruct.shopitem[10, 4].refin = 0;
            ShopStruct.shopitem[10, 4].price = 1229;// 225;

            ShopStruct.shopitem[10, 5].type  = 3;
            ShopStruct.shopitem[10, 5].num   = 14;
            ShopStruct.shopitem[10, 5].value = 1;
            ShopStruct.shopitem[10, 5].refin = 0;
            ShopStruct.shopitem[10, 5].price = 4663;// 225;

            ShopStruct.shopitem[10, 6].type  = 3;
            ShopStruct.shopitem[10, 6].num   = 15;
            ShopStruct.shopitem[10, 6].value = 1;
            ShopStruct.shopitem[10, 6].refin = 0;
            ShopStruct.shopitem[10, 6].price = 7224;// 225;

            ShopStruct.shopitem[10, 7].type  = 3;
            ShopStruct.shopitem[10, 7].num   = 16;
            ShopStruct.shopitem[10, 7].value = 1;
            ShopStruct.shopitem[10, 7].refin = 0;
            ShopStruct.shopitem[10, 7].price = 10101;// 225;

            ShopStruct.shopitem[10, 8].type  = 3;
            ShopStruct.shopitem[10, 8].num   = 17;
            ShopStruct.shopitem[10, 8].value = 1;
            ShopStruct.shopitem[10, 8].refin = 0;
            ShopStruct.shopitem[10, 8].price = 14101;// 225;

            ShopStruct.shopitem[10, 9].type  = 3;
            ShopStruct.shopitem[10, 9].num   = 18;
            ShopStruct.shopitem[10, 9].value = 1;
            ShopStruct.shopitem[10, 9].refin = 0;
            ShopStruct.shopitem[10, 9].price = 19243;// 225;

            ShopStruct.shopitem[10, 10].type  = 3;
            ShopStruct.shopitem[10, 10].num   = 22;
            ShopStruct.shopitem[10, 10].value = 1;
            ShopStruct.shopitem[10, 10].refin = 0;
            ShopStruct.shopitem[10, 10].price = 22342;// 225;

            ShopStruct.shopitem[10, 11].type  = 3;
            ShopStruct.shopitem[10, 11].num   = 23;
            ShopStruct.shopitem[10, 11].value = 1;
            ShopStruct.shopitem[10, 11].refin = 0;
            ShopStruct.shopitem[10, 11].price = 26347;// 225;

            ShopStruct.shopitem[10, 12].type  = 3;
            ShopStruct.shopitem[10, 12].num   = 24;
            ShopStruct.shopitem[10, 12].value = 1;
            ShopStruct.shopitem[10, 12].refin = 0;
            ShopStruct.shopitem[10, 12].price = 32345;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[11].map        = 174;
            ShopStruct.shop[11].x          = 11;
            ShopStruct.shop[11].y          = 6;
            ShopStruct.shop[11].item_count = 6;

            ShopStruct.shopitem[11, 1].type  = 2;
            ShopStruct.shopitem[11, 1].num   = 34;
            ShopStruct.shopitem[11, 1].value = 1;
            ShopStruct.shopitem[11, 1].refin = 0;
            ShopStruct.shopitem[11, 1].price = 500;// 225;

            ShopStruct.shopitem[11, 2].type  = 2;
            ShopStruct.shopitem[11, 2].num   = 32;
            ShopStruct.shopitem[11, 2].value = 1;
            ShopStruct.shopitem[11, 2].refin = 0;
            ShopStruct.shopitem[11, 2].price = 1200;// 225;

            ShopStruct.shopitem[11, 3].type  = 2;
            ShopStruct.shopitem[11, 3].num   = 33;
            ShopStruct.shopitem[11, 3].value = 1;
            ShopStruct.shopitem[11, 3].refin = 0;
            ShopStruct.shopitem[11, 3].price = 2100;// 225;

            ShopStruct.shopitem[11, 4].type  = 2;
            ShopStruct.shopitem[11, 4].num   = 35;
            ShopStruct.shopitem[11, 4].value = 1;
            ShopStruct.shopitem[11, 4].refin = 0;
            ShopStruct.shopitem[11, 4].price = 5000;// 225;

            ShopStruct.shopitem[11, 5].type  = 2;
            ShopStruct.shopitem[11, 5].num   = 36;
            ShopStruct.shopitem[11, 5].value = 1;
            ShopStruct.shopitem[11, 5].refin = 0;
            ShopStruct.shopitem[11, 5].price = 8000;// 225;

            ShopStruct.shopitem[11, 6].type  = 2;
            ShopStruct.shopitem[11, 6].num   = 37;
            ShopStruct.shopitem[11, 6].value = 1;
            ShopStruct.shopitem[11, 6].refin = 0;
            ShopStruct.shopitem[11, 6].price = 14000; //225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[12].map        = 175;
            ShopStruct.shop[12].x          = 11;
            ShopStruct.shop[12].y          = 6;
            ShopStruct.shop[12].item_count = 11;

            ShopStruct.shopitem[12, 1].type  = 3;
            ShopStruct.shopitem[12, 1].num   = 7;
            ShopStruct.shopitem[12, 1].value = 1;
            ShopStruct.shopitem[12, 1].refin = 0;
            ShopStruct.shopitem[12, 1].price = 300;// 225;

            ShopStruct.shopitem[12, 2].type  = 3;
            ShopStruct.shopitem[12, 2].num   = 8;
            ShopStruct.shopitem[12, 2].value = 1;
            ShopStruct.shopitem[12, 2].refin = 0;
            ShopStruct.shopitem[12, 2].price = 600;// 225;

            ShopStruct.shopitem[12, 3].type  = 3;
            ShopStruct.shopitem[12, 3].num   = 9;
            ShopStruct.shopitem[12, 3].value = 1;
            ShopStruct.shopitem[12, 3].refin = 0;
            ShopStruct.shopitem[12, 3].price = 1100;// 225;

            ShopStruct.shopitem[12, 4].type  = 3;
            ShopStruct.shopitem[12, 4].num   = 10;
            ShopStruct.shopitem[12, 4].value = 1;
            ShopStruct.shopitem[12, 4].refin = 0;
            ShopStruct.shopitem[12, 4].price = 1800;// 225;

            ShopStruct.shopitem[12, 5].type  = 3;
            ShopStruct.shopitem[12, 5].num   = 11;
            ShopStruct.shopitem[12, 5].value = 1;
            ShopStruct.shopitem[12, 5].refin = 0;
            ShopStruct.shopitem[12, 5].price = 2500;// 225;

            ShopStruct.shopitem[12, 6].type  = 3;
            ShopStruct.shopitem[12, 6].num   = 12;
            ShopStruct.shopitem[12, 6].value = 1;
            ShopStruct.shopitem[12, 6].refin = 0;
            ShopStruct.shopitem[12, 6].price = 4000;// 225;

            ShopStruct.shopitem[12, 7].type  = 3;
            ShopStruct.shopitem[12, 7].num   = 13;
            ShopStruct.shopitem[12, 7].value = 1;
            ShopStruct.shopitem[12, 7].refin = 0;
            ShopStruct.shopitem[12, 7].price = 6200;// 225;

            ShopStruct.shopitem[12, 8].type  = 3;
            ShopStruct.shopitem[12, 8].num   = 25;
            ShopStruct.shopitem[12, 8].value = 1;
            ShopStruct.shopitem[12, 8].refin = 0;
            ShopStruct.shopitem[12, 8].price = 9300;// 225;

            ShopStruct.shopitem[12, 9].type  = 3;
            ShopStruct.shopitem[12, 9].num   = 26;
            ShopStruct.shopitem[12, 9].value = 1;
            ShopStruct.shopitem[12, 9].refin = 0;
            ShopStruct.shopitem[12, 9].price = 13800;// 225;

            ShopStruct.shopitem[12, 10].type  = 3;
            ShopStruct.shopitem[12, 10].num   = 27;
            ShopStruct.shopitem[12, 10].value = 1;
            ShopStruct.shopitem[12, 10].refin = 0;
            ShopStruct.shopitem[12, 10].price = 17100;// 225;

            ShopStruct.shopitem[12, 11].type  = 3;
            ShopStruct.shopitem[12, 11].num   = 30;
            ShopStruct.shopitem[12, 11].value = 1;
            ShopStruct.shopitem[12, 11].refin = 0;
            ShopStruct.shopitem[12, 11].price = 22400;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[13].map        = 170;
            ShopStruct.shop[13].x          = 11;
            ShopStruct.shop[13].y          = 6;
            ShopStruct.shop[13].item_count = 7;

            ShopStruct.shopitem[13, 1].type  = 1;
            ShopStruct.shopitem[13, 1].num   = 1;
            ShopStruct.shopitem[13, 1].value = 1;
            ShopStruct.shopitem[13, 1].refin = 0;
            ShopStruct.shopitem[13, 1].price = 75;// 225;

            ShopStruct.shopitem[13, 2].type  = 1;
            ShopStruct.shopitem[13, 2].num   = 2;
            ShopStruct.shopitem[13, 2].value = 1;
            ShopStruct.shopitem[13, 2].refin = 0;
            ShopStruct.shopitem[13, 2].price = 75;// 225;

            ShopStruct.shopitem[13, 3].type  = 1;
            ShopStruct.shopitem[13, 3].num   = 69;
            ShopStruct.shopitem[13, 3].value = 1;
            ShopStruct.shopitem[13, 3].refin = 0;
            ShopStruct.shopitem[13, 3].price = 500;// 225;

            ShopStruct.shopitem[13, 4].type  = 1;
            ShopStruct.shopitem[13, 4].num   = 73;
            ShopStruct.shopitem[13, 4].value = 1;
            ShopStruct.shopitem[13, 4].refin = 0;
            ShopStruct.shopitem[13, 4].price = 200;// 225;

            ShopStruct.shopitem[13, 5].type  = 1;
            ShopStruct.shopitem[13, 5].num   = 72;
            ShopStruct.shopitem[13, 5].value = 1;
            ShopStruct.shopitem[13, 5].refin = 0;
            ShopStruct.shopitem[13, 5].price = 700;// 225;

            ShopStruct.shopitem[13, 6].type  = 1;
            ShopStruct.shopitem[13, 6].num   = 74;
            ShopStruct.shopitem[13, 6].value = 1;
            ShopStruct.shopitem[13, 6].refin = 0;
            ShopStruct.shopitem[13, 6].price = 500;// 225;

            ShopStruct.shopitem[13, 7].type  = 1;
            ShopStruct.shopitem[13, 7].num   = 75;
            ShopStruct.shopitem[13, 7].value = 1;
            ShopStruct.shopitem[13, 7].refin = 0;
            ShopStruct.shopitem[13, 7].price = 1000;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[14].map        = 169;
            ShopStruct.shop[14].x          = 11;
            ShopStruct.shop[14].y          = 6;
            ShopStruct.shop[14].item_count = 1;

            ShopStruct.shopitem[14, 1].type  = 1;
            ShopStruct.shopitem[14, 1].num   = 68;
            ShopStruct.shopitem[14, 1].value = 1;
            ShopStruct.shopitem[14, 1].refin = 0;
            ShopStruct.shopitem[14, 1].price = 100000;// 225;


            //Manual, no editor, sorry :/
            ShopStruct.shop[15].map        = 219;
            ShopStruct.shop[15].x          = 11;
            ShopStruct.shop[15].y          = 6;
            ShopStruct.shop[15].item_count = 11;

            ShopStruct.shopitem[15, 1].type  = 3;
            ShopStruct.shopitem[15, 1].num   = 7;
            ShopStruct.shopitem[15, 1].value = 1;
            ShopStruct.shopitem[15, 1].refin = 0;
            ShopStruct.shopitem[15, 1].price = 300;// 225;

            ShopStruct.shopitem[15, 2].type  = 3;
            ShopStruct.shopitem[15, 2].num   = 8;
            ShopStruct.shopitem[15, 2].value = 1;
            ShopStruct.shopitem[15, 2].refin = 0;
            ShopStruct.shopitem[15, 2].price = 600;// 225;

            ShopStruct.shopitem[15, 3].type  = 3;
            ShopStruct.shopitem[15, 3].num   = 9;
            ShopStruct.shopitem[15, 3].value = 1;
            ShopStruct.shopitem[15, 3].refin = 0;
            ShopStruct.shopitem[15, 3].price = 1100;// 225;

            ShopStruct.shopitem[15, 4].type  = 3;
            ShopStruct.shopitem[15, 4].num   = 10;
            ShopStruct.shopitem[15, 4].value = 1;
            ShopStruct.shopitem[15, 4].refin = 0;
            ShopStruct.shopitem[15, 4].price = 1800;// 225;

            ShopStruct.shopitem[15, 5].type  = 3;
            ShopStruct.shopitem[15, 5].num   = 11;
            ShopStruct.shopitem[15, 5].value = 1;
            ShopStruct.shopitem[15, 5].refin = 0;
            ShopStruct.shopitem[15, 5].price = 2500;// 225;

            ShopStruct.shopitem[15, 6].type  = 3;
            ShopStruct.shopitem[15, 6].num   = 12;
            ShopStruct.shopitem[15, 6].value = 1;
            ShopStruct.shopitem[15, 6].refin = 0;
            ShopStruct.shopitem[15, 6].price = 4000;// 225;

            ShopStruct.shopitem[15, 7].type  = 3;
            ShopStruct.shopitem[15, 7].num   = 13;
            ShopStruct.shopitem[15, 7].value = 1;
            ShopStruct.shopitem[15, 7].refin = 0;
            ShopStruct.shopitem[15, 7].price = 6200;// 225;

            ShopStruct.shopitem[15, 8].type  = 3;
            ShopStruct.shopitem[15, 8].num   = 25;
            ShopStruct.shopitem[15, 8].value = 1;
            ShopStruct.shopitem[15, 8].refin = 0;
            ShopStruct.shopitem[15, 8].price = 9300;// 225;

            ShopStruct.shopitem[15, 9].type  = 3;
            ShopStruct.shopitem[15, 9].num   = 26;
            ShopStruct.shopitem[15, 9].value = 1;
            ShopStruct.shopitem[15, 9].refin = 0;
            ShopStruct.shopitem[15, 9].price = 13800;// 225;

            ShopStruct.shopitem[15, 10].type  = 3;
            ShopStruct.shopitem[15, 10].num   = 27;
            ShopStruct.shopitem[15, 10].value = 1;
            ShopStruct.shopitem[15, 10].refin = 0;
            ShopStruct.shopitem[15, 10].price = 17100;// 225;

            ShopStruct.shopitem[15, 11].type  = 3;
            ShopStruct.shopitem[15, 11].num   = 30;
            ShopStruct.shopitem[15, 11].value = 1;
            ShopStruct.shopitem[15, 11].refin = 0;
            ShopStruct.shopitem[15, 11].price = 22400;// 225;

            //Manual, no editor, sorry :/
            ShopStruct.shop[16].map        = 220;
            ShopStruct.shop[16].x          = 11;
            ShopStruct.shop[16].y          = 6;
            ShopStruct.shop[16].item_count = 7;

            ShopStruct.shopitem[16, 1].type  = 1;
            ShopStruct.shopitem[16, 1].num   = 1;
            ShopStruct.shopitem[16, 1].value = 1;
            ShopStruct.shopitem[16, 1].refin = 0;
            ShopStruct.shopitem[16, 1].price = 75;// 225;

            ShopStruct.shopitem[16, 2].type  = 1;
            ShopStruct.shopitem[16, 2].num   = 2;
            ShopStruct.shopitem[16, 2].value = 1;
            ShopStruct.shopitem[16, 2].refin = 0;
            ShopStruct.shopitem[16, 2].price = 75;// 225;

            ShopStruct.shopitem[16, 3].type  = 1;
            ShopStruct.shopitem[16, 3].num   = 69;
            ShopStruct.shopitem[16, 3].value = 1;
            ShopStruct.shopitem[16, 3].refin = 0;
            ShopStruct.shopitem[16, 3].price = 500;// 225;

            ShopStruct.shopitem[16, 4].type  = 1;
            ShopStruct.shopitem[16, 4].num   = 73;
            ShopStruct.shopitem[16, 4].value = 1;
            ShopStruct.shopitem[16, 4].refin = 0;
            ShopStruct.shopitem[16, 4].price = 200;// 225;

            ShopStruct.shopitem[16, 5].type  = 1;
            ShopStruct.shopitem[16, 5].num   = 72;
            ShopStruct.shopitem[16, 5].value = 1;
            ShopStruct.shopitem[16, 5].refin = 0;
            ShopStruct.shopitem[16, 5].price = 700;// 225;

            ShopStruct.shopitem[16, 6].type  = 1;
            ShopStruct.shopitem[16, 6].num   = 74;
            ShopStruct.shopitem[16, 6].value = 1;
            ShopStruct.shopitem[16, 6].refin = 0;
            ShopStruct.shopitem[16, 6].price = 500;// 225;

            ShopStruct.shopitem[16, 7].type  = 1;
            ShopStruct.shopitem[16, 7].num   = 75;
            ShopStruct.shopitem[16, 7].value = 1;
            ShopStruct.shopitem[16, 7].refin = 0;
            ShopStruct.shopitem[16, 7].price = 1000;// 225;

            Log("Carregado.");
            Log("Carregando Receitas...");
            Database.LoadRecipes();
            Log("Carregado.");
            Log("Carregando Guildas...");
            Database.LoadGuilds();
            Log("Carregado.");
            Log("");
            Log("Definingo váriaveis...");
            rdn = new Random();
            Log("OK.");
            Log("");
            Log("Iniciando Loop do servidor...");
            Log("Iniciando conexão TCP/IP...");
            Log(Globals.SMTP_USER);
            //Lidar com fechamento
            event_handler = new ConsoleEventDelegate(ConsoleEventCallback);
            SetConsoleCtrlHandler(event_handler, true);

            //Clientes
            Clients = new List <StateObject>(100);

            // Create the thread object, passing in the Alpha.Beta method
            // via a ThreadStart delegate. This does not start the thread.
            Thread sThread = new Thread(new ThreadStart(Loops.BetaLoop));

            // Start the thread
            sThread.Start();

            //Iniciar conexão
            // Data buffer for incoming data.
            byte[] bytes = new Byte[1024];

            // Establish the local endpoint for the socket.
            // The DNS name of the computer
            // running the listener is "host.contoso.com".
            IPHostEntry ipHostInfo    = Dns.GetHostEntry(Dns.GetHostName());
            IPAddress   ipAddress     = IPAddress.Any;//ipHostInfo.AddressList[0];
            IPEndPoint  localEndPoint = new IPEndPoint(ipAddress, 8000);

            // Create a TCP/IP socket.
            listener = new Socket(AddressFamily.InterNetwork,
                                  SocketType.Stream, ProtocolType.Tcp);
            listener.Bind(localEndPoint);
            listener.Listen(100);
            listener.NoDelay = true;

            // Create the thread object, passing in the Alpha.Beta method
            // via a ThreadStart delegate. This does not start the thread.
            Thread lThread = new Thread(new ThreadStart(Listen));

            // Start the thread
            lThread.Start();

            //Loop principal
            Loops.AlphaLoop();
        }
Example #2
0
        //*********************************************************************************************
        // Main / Revisto pela última vez em 01/08/2016, criado por Allyson S. Bacon
        // Iniciamos o servidor aqui.
        //*********************************************************************************************
        static void Main(string[] args)
        {
            LoadLang();
            Console.WriteLine("");
            Console.WriteLine("///////////////////////////////////////////////////////");
            Console.WriteLine("/                                                     /");
            Console.WriteLine(@"/        ___          _                               /");
            Console.WriteLine(@"/       / __\__  _ __(_) ___ _ __ _   _ _ __ ___      /");
            Console.WriteLine(@"/      / _\/ _ \| '__| |/ _ \ '__| | | | '_ ` _ \     /");
            Console.WriteLine(@"/     / / | (_) | |  | |  __/ |  | |_| | | | | | |    /");
            Console.WriteLine(@"/     \/   \___/|_| _/ |\___|_|   \__,_|_| |_| |_|    /");
            Console.WriteLine(@"/                  |__/                               /");
            Console.WriteLine("/                                                     /");
            Console.WriteLine("/                 http://4tabern.com                  /");
            Console.WriteLine("/         Copyright (C) 2016 Allyson S. Bacon         /");
            Console.WriteLine("/                                                     /");
            Console.WriteLine("///////////////////////////////////////////////////////");

            Console.WriteLine("");
            Console.WriteLine(lang.making_the_query_extensions_in_project);
            Extensions.ExtensionApp.InstanceTypes();

            //EXTEND
            if (Extensions.ExtensionApp.ExtendMyApp
                    (MethodBase.GetCurrentMethod().Name, args) != null)
            {
                return;
            }

            //CÓDIGO PARA RESETAR JOGADORES
            //PStruct.InitializePlayerArrays();
            //Database.ResetAndGiveExp();

            Log(Languages.LStruct.lang.starting_server);
            Log(lang.setting_global_names);
            Globals.GAME_NAME = Database.GET_GAME_NAME();
            Globals.MOTD      = Database.GET_MOTD();
            Globals.NOTICE    = Database.GET_NOTICE();
            Log(lang.starting_server);
            Log(lang.client_defined);
            Log("");
            Log(lang.starting_player_arrays);
            PStruct.InitializePlayerArrays();
            Log(lang.starting_guild_arrays);
            GStruct.InitializeGuildArrays();
            Log(lang.arrays_started);
            Log("");
            Log(lang.loading_enemies);
            Database.LoadEnemies();
            Log(lang.loaded);
            Log(lang.loading_maps_monsters_and_missions);
            Database.LoadMaps();
            Log(lang.loaded);
            Log(lang.loading_items);
            Database.LoadItems();
            Log(lang.loaded);
            Log(lang.loading_weapons);
            Database.LoadWeapons();
            Log(lang.loaded);
            Log(lang.loading_armors);
            Database.LoadArmors();
            Log(lang.loaded);
            Log(lang.loading_skills);
            Database.LoadSkills();
            Log(lang.loaded);
            Log(lang.loading_shops);
            Database.LoadShops();
            //Rudimentar :/
            Database.LoadShopsRud();
            Log(lang.loaded);
            Log(lang.loading_recipes);
            Database.LoadRecipes();
            Log(lang.loaded);
            Log(lang.loading_guilds);
            Database.LoadGuilds();
            Log(lang.loaded);
            Log(lang.loading_classes);
            Database.DEFINE_CLASSES_DATA();
            Log(lang.loaded);
            Log("");
            Log(lang.setting_variables);
            rdn = new Random();
            Log(lang.OK);
            Log("");
            Log(lang.starting_server_loop);
            Log(lang.starting_tcpip_connection);

            WinsockAsync.start();
        }