1.1.0 - install + stat gen

This commit is contained in:
mikx
2024-12-27 17:05:41 -05:00
parent 65714e77ad
commit 16dbfe86fa
21 changed files with 3453 additions and 8 deletions

View File

@@ -0,0 +1,326 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Body
{
private static string iBint = "";
private static string iBstr = "";
private static string iBstrint = "";
private static string iBstrdex = "";
private static string iBdex = "";
private static string iBdexint = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Body Armour")
{
if (reader.GetString("type") == "int_armour")
{
iBint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_armour")
{
iBstr += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_int_armour")
{
iBstrint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_dex_armour")
{
iBstrdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_armour")
{
iBdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_int_armour")
{
iBdexint += string.Format(@" ""{0}""", name);
}
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/BODY.filter";
File.AppendAllText(path, $"#### SECTION: (Body Armour)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != null || iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != null || iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != null || iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != null || iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != null || iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != null || iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != null || iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != null || iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != null || iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != null || iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != null || iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != null || iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != null || iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != null || iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != null || iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != null || iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != null || iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != null || iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,326 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Boots
{
private static string iBint = "";
private static string iBstr = "";
private static string iBstrint = "";
private static string iBstrdex = "";
private static string iBdex = "";
private static string iBdexint = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Boots")
{
if (reader.GetString("type") == "int_armour")
{
iBint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_armour")
{
iBstr += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_int_armour")
{
iBstrint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_dex_armour")
{
iBstrdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_armour")
{
iBdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_int_armour")
{
iBdexint += string.Format(@" ""{0}""", name);
}
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/BOOTS.filter";
File.AppendAllText(path, $"#### SECTION: (Boots)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,191 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Bows
{
private static string iBint = "";
private static string iBstr = "";
private static string iBdex = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Bow")
{
iBdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("class") == "Crossbow")
{
iBdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("class") == "Quiver")
{
iBdex += string.Format(@" ""{0}""", name);
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/BOWS.filter";
File.AppendAllText(path, $"#### SECTION: (Bows and Crossbows)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,184 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Claws
{
private static string iBint = "";
private static string iBstr = "";
private static string iBdex = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Claw")
{
iBdex += string.Format(@" ""{0}""", name);
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/CLAWS.filter";
File.AppendAllText(path, $"#### SECTION: (Claws)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,183 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Daggers
{
private static string iBint = "";
private static string iBstr = "";
private static string iBdex = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Dagger")
{
iBdex += string.Format(@" ""{0}""", name);
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/DAGGERS.filter";
File.AppendAllText(path, $"#### SECTION: (Daggers)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,303 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Focus
{
private static string iBint = "";
private static string iBstr = "";
private static string iBstrint = "";
private static string iBstrdex = "";
private static string iBdex = "";
private static string iBdexint = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Focus")
{
iBint += string.Format(@" ""{0}""", name);
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/FOCUS.filter";
File.AppendAllText(path, $"#### SECTION: (Focus)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,326 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Gloves
{
private static string iBint = "";
private static string iBstr = "";
private static string iBstrint = "";
private static string iBstrdex = "";
private static string iBdex = "";
private static string iBdexint = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Gloves")
{
if (reader.GetString("type") == "int_armour")
{
iBint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_armour")
{
iBstr += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_int_armour")
{
iBstrint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_dex_armour")
{
iBstrdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_armour")
{
iBdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_int_armour")
{
iBdexint += string.Format(@" ""{0}""", name);
}
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/GLOVES.filter";
File.AppendAllText(path, $"#### SECTION: (Gloves)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,326 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Helmets
{
private static string iBint = "";
private static string iBstr = "";
private static string iBstrint = "";
private static string iBstrdex = "";
private static string iBdex = "";
private static string iBdexint = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Helmet")
{
if (reader.GetString("type") == "int_armour")
{
iBint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_armour")
{
iBstr += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_int_armour")
{
iBstrint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_dex_armour")
{
iBstrdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_armour")
{
iBdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_int_armour")
{
iBdexint += string.Format(@" ""{0}""", name);
}
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/HELMETS.filter";
File.AppendAllText(path, $"#### SECTION: (Helmets)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,191 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class OneHander
{
private static string iBint = "";
private static string iBstr = "";
private static string iBdex = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "One Hand Sword")
{
iBstr += string.Format(@" ""{0}""", name);
}
if (reader.GetString("class") == "One Hand Axe")
{
iBstr += string.Format(@" ""{0}""", name);
}
if (reader.GetString("class") == "One Hand Mace")
{
iBstr += string.Format(@" ""{0}""", name);
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/ONEHANDER.filter";
File.AppendAllText(path, $"#### SECTION: (One Hander (Melee))" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,326 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Shields
{
private static string iBint = "";
private static string iBstr = "";
private static string iBstrint = "";
private static string iBstrdex = "";
private static string iBdex = "";
private static string iBdexint = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Shield")
{
if (reader.GetString("type") == "int_armour")
{
iBint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_armour")
{
iBstr += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_int_armour")
{
iBstrint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "str_dex_armour")
{
iBstrdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_armour")
{
iBdex += string.Format(@" ""{0}""", name);
}
if (reader.GetString("type") == "dex_int_armour")
{
iBdexint += string.Format(@" ""{0}""", name);
}
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/SHIELDS.filter";
File.AppendAllText(path, $"#### SECTION: (Shields)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrint != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstrdex != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstrdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorStrDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdexint != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdexint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BackgroundColorDexInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,187 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Staves
{
private static string iBint = "";
private static string iBstr = "";
private static string iBdex = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Staff")
{
iBint += string.Format(@" ""{0}""", name);
}
if (reader.GetString("class") == "Warstaff")
{
iBdex += string.Format(@" ""{0}""", name);
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/STAVES.filter";
File.AppendAllText(path, $"#### SECTION: (Staff and Quarterstaff)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,191 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class TwoHander
{
private static string iBint = "";
private static string iBstr = "";
private static string iBdex = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Two Hand Sword")
{
iBstr += string.Format(@" ""{0}""", name);
}
if (reader.GetString("class") == "Two Hand Axe")
{
iBstr += string.Format(@" ""{0}""", name);
}
if (reader.GetString("class") == "Two Hand Mace")
{
iBstr += string.Format(@" ""{0}""", name);
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/TWOHANDER.filter";
File.AppendAllText(path, $"#### SECTION: (Two Hander (Melee))" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,183 @@
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class Wands
{
private static string iBint = "";
private static string iBstr = "";
private static string iBdex = "";
public static void Gen()
{
using (MySqlConnection connection = DB.MySql.MSQLCo())
{
try
{
connection.Open();
string query = "SELECT * FROM item_base";
using (MySqlCommand command = new MySqlCommand(query, connection))
{
using (MySqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
string name = reader.GetString("name");
if (reader.GetString("class") == "Wand")
{
iBint += string.Format(@" ""{0}""", name);
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
string path = "out/gen/WANDS.filter";
File.AppendAllText(path, $"#### SECTION: (Wands)" + Environment.NewLine, Encoding.UTF8);
// normal
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Normal" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorNormal + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// magic
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Magic" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Magic" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorMagic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
// rare
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"## RARITY: Rare" + Environment.NewLine, Encoding.UTF8);
if (iBint != ""){
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, $"# TYPE: INT" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBint + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorInt + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBstr != ""){
File.AppendAllText(path, $"# TYPE: STR" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBstr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorStr + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
if (iBdex != ""){
File.AppendAllText(path, $"# TYPE: DEX" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iBdex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.TextColorRare + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, _Color.BorderColorDex + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxFilterGen2.Generator
{
internal class _Color
{
public static string TextColorNormal = " SetTextColor 200 200 200";
public static string TextColorMagic = " SetTextColor 136 136 255";
public static string TextColorRare = " SetTextColor 255 255 0";
public static string BorderColorInt = " SetBorderColor 3 48 252";
public static string BorderColorStr = " SetBorderColor 252 3 36";
public static string BorderColorDex = " SetBorderColor 4 217 11";
public static string BackgroundColorStrInt = " SetBackgroundColor 56 69 89";
public static string BackgroundColorStrDex = " SetBackgroundColor 50 69 49";
public static string BackgroundColorDexInt = " SetBackgroundColor 56 69 89";
}
}