├── GrepBuildings ├── GrepBuildings.sln └── GrepBuildings │ ├── GrepBuildings.Designer.cs │ ├── GrepBuildings.cs │ ├── GrepBuildings.csproj │ ├── GrepBuildings.resx │ ├── ImageZoom.Designer.cs │ ├── ImageZoom.cs │ ├── ImageZoom.resx │ ├── Images │ ├── academy.png │ ├── academyx20.png │ ├── addx20.png │ ├── barracks.png │ ├── barracksx20.png │ ├── docks.png │ ├── docksx20.png │ ├── emptyx20.png │ ├── farm.png │ ├── farmx20.png │ ├── favicon.ico │ ├── favor.png │ ├── hide.png │ ├── hidex20.png │ ├── iron.png │ ├── ironer.png │ ├── ironerx20.png │ ├── library.png │ ├── libraryx20.png │ ├── lighthouse.png │ ├── lighthousex20.png │ ├── lumber.png │ ├── lumberx20.png │ ├── main.png │ ├── mainx20.png │ ├── market.png │ ├── marketx20.png │ ├── oracle.png │ ├── oraclex20.png │ ├── statue.png │ ├── statuex20.png │ ├── stone.png │ ├── stoner.png │ ├── stonerx20.png │ ├── storage.png │ ├── storagex20.png │ ├── temple.png │ ├── templex20.png │ ├── theater.png │ ├── theaterx20.png │ ├── thermal.png │ ├── thermalx20.png │ ├── tower.png │ ├── towerx20.png │ ├── trade_office.png │ ├── trade_officex20.png │ ├── wall.png │ ├── wallx20.png │ └── wood.png │ └── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── GrepCulture ├── GrepCulture.sln └── GrepCulture │ ├── GrepCulture.Designer.cs │ ├── GrepCulture.cs │ ├── GrepCulture.csproj │ ├── GrepCulture.resx │ ├── Images │ ├── breadx50.jpeg │ ├── favicon.ico │ ├── partyx50.jpeg │ ├── theaterx50.jpeg │ └── triumphx50.jpeg │ └── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── GrepFarmers ├── GrepFarmers.sln └── GrepFarmers │ ├── GrepFarmers.Designer.cs │ ├── GrepFarmers.cs │ ├── GrepFarmers.csproj │ ├── GrepFarmers.resx │ ├── Images │ ├── farm_town_1_0_0.png │ ├── farm_town_1_0_1.png │ ├── farm_town_1_1_0.png │ └── farm_town_1_1_1.png │ └── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── GrepSchedulerSmall ├── GrepSchedulerSmall.sln └── GrepSchedulerSmall │ ├── GrepSchedulerSmall.Designer.cs │ ├── GrepSchedulerSmall.cs │ ├── GrepSchedulerSmall.csproj │ ├── GrepSchedulerSmall.resx │ └── Properties │ └── AssemblyInfo.cs ├── GrepUnits ├── GrepUnits.sln └── GrepUnits │ ├── GrepUnits.Designer.cs │ ├── GrepUnits.cs │ ├── GrepUnits.csproj │ ├── GrepUnits.resx │ ├── Images │ ├── archerx40.png │ ├── attack_shipx40.png │ ├── big_transporterx40.png │ ├── biremex40.png │ ├── calydonian_boarx40.png │ ├── catapultx40.png │ ├── centaurx40.png │ ├── cerberusx40.png │ ├── chariotx40.png │ ├── colonize_shipx40.png │ ├── demolition_shipx40.png │ ├── furyx40.png │ ├── godsentx40.png │ ├── griffinx40.png │ ├── harpyx40.png │ ├── hoplitex40.png │ ├── manticorex40.png │ ├── medusax40.png │ ├── minotaurx40.png │ ├── pegasusx40.png │ ├── population.png │ ├── poseidon_mini.png │ ├── riderx40.png │ ├── sea_monsterx40.png │ ├── slingerx40.png │ ├── small_transporterx40.png │ ├── swordx40.png │ ├── triremex40.png │ └── zyklopx40.png │ └── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── GrepolisBot2 ├── Enable_IE10.reg ├── Enable_IE9.reg ├── GrepolisBot2.sln └── GrepolisBot2 │ ├── ArmyUnit.cs │ ├── Building.cs │ ├── CaptchaHandler.cs │ ├── Controller.cs │ ├── CookieHelpers.cs │ ├── CulturalEvent.cs │ ├── CustomArgs.cs │ ├── Farmer.cs │ ├── GrepolisBot2.Designer.cs │ ├── GrepolisBot2.cs │ ├── GrepolisBot2.csproj │ ├── GrepolisBot2.csproj.user │ ├── GrepolisBot2.resx │ ├── Group.cs │ ├── HttpHandler.cs │ ├── IOHandler.cs │ ├── Images │ ├── artemis_mini.png │ ├── athena_mini.png │ ├── favicon.ico │ ├── favor.png │ ├── god_mini.png │ ├── god_minix40.png │ ├── hades_mini.png │ ├── hera_mini.png │ ├── iron.png │ ├── militia_40x40.png │ ├── population.png │ ├── poseidon_mini.png │ ├── power_call_of_the_ocean_offx40.png │ ├── power_call_of_the_oceanx40.png │ ├── power_fertility_improvement_offx40.png │ ├── power_fertility_improvementx40.png │ ├── power_town_protection_offx40.png │ ├── power_town_protectionx40.png │ ├── reload_icon.png │ ├── resources.png │ ├── stone.png │ ├── wood.png │ └── zeus_mini.png │ ├── MailClient.cs │ ├── Microsoft.mshtml.dll │ ├── Movement.cs │ ├── Notification.cs │ ├── Parser.cs │ ├── Player.cs │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx │ ├── QueueTemplate.cs │ ├── Research.cs │ ├── Settings.cs │ ├── Technology.cs │ ├── Town.cs │ ├── Trade.cs │ └── jdTimer.cs ├── LICENSE └── README.md /GrepBuildings/GrepBuildings.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrepBuildings", "GrepBuildings\GrepBuildings.csproj", "{6609A419-3028-4B28-B5CA-3C69F3FCCB90}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {6609A419-3028-4B28-B5CA-3C69F3FCCB90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {6609A419-3028-4B28-B5CA-3C69F3FCCB90}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {6609A419-3028-4B28-B5CA-3C69F3FCCB90}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {6609A419-3028-4B28-B5CA-3C69F3FCCB90}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/GrepBuildings.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {6609A419-3028-4B28-B5CA-3C69F3FCCB90} 9 | Library 10 | Properties 11 | GrepBuildings 12 | GrepBuildings 13 | v3.5 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | AnyCPU 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | x86 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | Form 48 | 49 | 50 | ImageZoom.cs 51 | 52 | 53 | True 54 | True 55 | Resources.resx 56 | 57 | 58 | UserControl 59 | 60 | 61 | GrepBuildings.cs 62 | 63 | 64 | 65 | 66 | 67 | 68 | ImageZoom.cs 69 | 70 | 71 | ResXFileCodeGenerator 72 | Resources.Designer.cs 73 | 74 | 75 | GrepBuildings.cs 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 233 | -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/GrepBuildings.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/ImageZoom.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace GrepBuildings 2 | { 3 | partial class ImageZoom 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.SuspendLayout(); 32 | // 33 | // ImageZoom 34 | // 35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 37 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.main; 38 | this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; 39 | this.ClientSize = new System.Drawing.Size(40, 40); 40 | this.ControlBox = false; 41 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 42 | this.Name = "ImageZoom"; 43 | this.ShowIcon = false; 44 | this.ShowInTaskbar = false; 45 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; 46 | this.ResumeLayout(false); 47 | 48 | } 49 | 50 | #endregion 51 | } 52 | } -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/ImageZoom.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace GrepBuildings 11 | { 12 | public partial class ImageZoom : Form 13 | { 14 | public ImageZoom() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | public void setLocation(int p_X, int p_Y) 20 | { 21 | this.Location = new Point(p_X, p_Y); 22 | } 23 | 24 | public void setImageByName(string p_Building) 25 | { 26 | switch (p_Building) 27 | { 28 | case "main": 29 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.main; 30 | break; 31 | case "hide": 32 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.hide; 33 | break; 34 | case "storage": 35 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.storage; 36 | break; 37 | case "farm": 38 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.farm; 39 | break; 40 | case "lumber": 41 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.lumber; 42 | break; 43 | case "stoner": 44 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.stoner; 45 | break; 46 | case "ironer": 47 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.ironer; 48 | break; 49 | case "market": 50 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.market; 51 | break; 52 | case "docks": 53 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.docks; 54 | break; 55 | case "barracks": 56 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.barracks; 57 | break; 58 | case "wall": 59 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.wall; 60 | break; 61 | case "academy": 62 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.academy; 63 | break; 64 | case "temple": 65 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.temple; 66 | break; 67 | case "theater": 68 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.theater; 69 | break; 70 | case "thermal": 71 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.thermal; 72 | break; 73 | case "library": 74 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.library; 75 | break; 76 | case "lighthouse": 77 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.lighthouse; 78 | break; 79 | case "tower": 80 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.tower; 81 | break; 82 | case "statue": 83 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.statue; 84 | break; 85 | case "oracle": 86 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.oracle; 87 | break; 88 | case "trade_office": 89 | this.BackgroundImage = global::GrepBuildings.Properties.Resources.trade_office; 90 | break; 91 | } 92 | this.Height = 40; 93 | this.Width = 40; 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/ImageZoom.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/academy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/academy.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/academyx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/academyx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/addx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/addx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/barracks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/barracks.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/barracksx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/barracksx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/docks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/docks.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/docksx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/docksx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/emptyx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/emptyx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/farm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/farm.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/farmx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/farmx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/favicon.ico -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/favor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/favor.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/hide.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/hidex20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/hidex20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/iron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/iron.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/ironer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/ironer.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/ironerx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/ironerx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/library.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/library.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/libraryx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/libraryx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/lighthouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/lighthouse.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/lighthousex20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/lighthousex20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/lumber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/lumber.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/lumberx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/lumberx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/main.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/mainx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/mainx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/market.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/market.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/marketx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/marketx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/oracle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/oracle.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/oraclex20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/oraclex20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/statue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/statue.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/statuex20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/statuex20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/stone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/stone.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/stoner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/stoner.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/stonerx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/stonerx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/storage.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/storagex20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/storagex20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/temple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/temple.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/templex20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/templex20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/theater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/theater.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/theaterx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/theaterx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/thermal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/thermal.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/thermalx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/thermalx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/tower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/tower.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/towerx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/towerx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/trade_office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/trade_office.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/trade_officex20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/trade_officex20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/wall.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/wallx20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/wallx20.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Images/wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepBuildings/GrepBuildings/Images/wood.png -------------------------------------------------------------------------------- /GrepBuildings/GrepBuildings/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GrepBuildings")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GrepBuildings")] 13 | [assembly: AssemblyCopyright("Copyright © Uthar 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bf6c6ef2-7f4f-4340-9eb6-b35231cfcc22")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("2.54.0.2")] 36 | [assembly: AssemblyFileVersion("2.54.0.2")] 37 | -------------------------------------------------------------------------------- /GrepCulture/GrepCulture.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrepCulture", "GrepCulture\GrepCulture.csproj", "{675F84B2-BB08-4632-8671-4B24D9A673E6}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {675F84B2-BB08-4632-8671-4B24D9A673E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {675F84B2-BB08-4632-8671-4B24D9A673E6}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {675F84B2-BB08-4632-8671-4B24D9A673E6}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {675F84B2-BB08-4632-8671-4B24D9A673E6}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/GrepCulture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Drawing; 5 | using System.Data; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace GrepCulture 11 | { 12 | public partial class GrepCulture : UserControl 13 | { 14 | private bool m_EnabledParty = false; 15 | private bool m_EnabledGames = false; 16 | private bool m_EnabledTriumph = false; 17 | private bool m_EnabledTheater = false; 18 | private string m_Index = "0"; 19 | private string m_TownName = "No town selected"; 20 | private string m_TownID = "0"; 21 | 22 | //-->Constructor 23 | public GrepCulture() 24 | { 25 | InitializeComponent(); 26 | } 27 | 28 | public GrepCulture(string p_Index, string p_ID, string p_Name, bool p_EnabledGlobal, bool p_EnabledParty, bool p_EnabledGames, bool p_EnabledTriumph, bool p_EnabledTheater) 29 | { 30 | InitializeComponent(); 31 | m_Index = p_Index; 32 | m_TownName = p_Name; 33 | m_TownID = p_ID; 34 | groupBoxTown.Text = p_Name; 35 | m_EnabledParty = p_EnabledParty; 36 | m_EnabledGames = p_EnabledGames; 37 | m_EnabledTriumph = p_EnabledTriumph; 38 | m_EnabledTheater = p_EnabledTheater; 39 | } 40 | 41 | //-->Attributes 42 | public string Index 43 | { 44 | get { return m_Index; } 45 | set { m_Index = value; } 46 | } 47 | 48 | public string TownName 49 | { 50 | get { return m_TownName; } 51 | set 52 | { 53 | m_TownName = value; 54 | groupBoxTown.Text = value; 55 | } 56 | } 57 | 58 | public string TownID 59 | { 60 | get { return m_TownID; } 61 | set { m_TownID = value; } 62 | } 63 | 64 | public bool EnabledParty 65 | { 66 | get { return m_EnabledParty; } 67 | set 68 | { 69 | m_EnabledParty = value; 70 | checkBoxPartyEnabled.Checked = value; 71 | } 72 | } 73 | 74 | public bool EnabledGames 75 | { 76 | get { return m_EnabledGames; } 77 | set 78 | { 79 | m_EnabledGames = value; 80 | checkBoxGamesEnabled.Checked = value; 81 | } 82 | } 83 | 84 | public bool EnabledTriumph 85 | { 86 | get { return m_EnabledTriumph; } 87 | set 88 | { 89 | m_EnabledTriumph = value; 90 | checkBoxTriumphEnabled.Checked = value; 91 | } 92 | } 93 | 94 | public bool EnabledTheater 95 | { 96 | get { return m_EnabledTheater; } 97 | set 98 | { 99 | m_EnabledTheater = value; 100 | checkBoxTheaterEnabled.Checked = value; 101 | } 102 | } 103 | 104 | //-->Methods 105 | 106 | //-->Event handlers 107 | private void checkBoxPartyEnabled_CheckedChanged(object sender, EventArgs e) 108 | { 109 | m_EnabledParty = checkBoxPartyEnabled.Checked; 110 | } 111 | 112 | private void checkBoxGamesEnabled_CheckedChanged(object sender, EventArgs e) 113 | { 114 | m_EnabledGames = checkBoxGamesEnabled.Checked; 115 | } 116 | 117 | private void checkBoxTriumphEnabled_CheckedChanged(object sender, EventArgs e) 118 | { 119 | m_EnabledTriumph = checkBoxTriumphEnabled.Checked; 120 | } 121 | 122 | private void checkBoxTheaterEnabled_CheckedChanged(object sender, EventArgs e) 123 | { 124 | m_EnabledTheater = checkBoxTheaterEnabled.Checked; 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/GrepCulture.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {675F84B2-BB08-4632-8671-4B24D9A673E6} 9 | Library 10 | Properties 11 | GrepCulture 12 | GrepCulture 13 | v3.5 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | x86 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | UserControl 47 | 48 | 49 | GrepCulture.cs 50 | 51 | 52 | 53 | True 54 | True 55 | Resources.resx 56 | 57 | 58 | 59 | 60 | 61 | GrepCulture.cs 62 | 63 | 64 | ResXFileCodeGenerator 65 | Resources.Designer.cs 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 88 | -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/GrepCulture.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/Images/breadx50.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepCulture/GrepCulture/Images/breadx50.jpeg -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/Images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepCulture/GrepCulture/Images/favicon.ico -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/Images/partyx50.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepCulture/GrepCulture/Images/partyx50.jpeg -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/Images/theaterx50.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepCulture/GrepCulture/Images/theaterx50.jpeg -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/Images/triumphx50.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepCulture/GrepCulture/Images/triumphx50.jpeg -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GrepCulture")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GrepCulture")] 13 | [assembly: AssemblyCopyright("Copyright © Uthar 2012")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("5fc69eee-3ed9-4a43-92d0-2d6c3e1932aa")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.235 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GrepCulture.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GrepCulture.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | internal static System.Drawing.Bitmap breadx50 { 64 | get { 65 | object obj = ResourceManager.GetObject("breadx50", resourceCulture); 66 | return ((System.Drawing.Bitmap)(obj)); 67 | } 68 | } 69 | 70 | internal static System.Drawing.Bitmap partyx50 { 71 | get { 72 | object obj = ResourceManager.GetObject("partyx50", resourceCulture); 73 | return ((System.Drawing.Bitmap)(obj)); 74 | } 75 | } 76 | 77 | internal static System.Drawing.Bitmap theaterx50 { 78 | get { 79 | object obj = ResourceManager.GetObject("theaterx50", resourceCulture); 80 | return ((System.Drawing.Bitmap)(obj)); 81 | } 82 | } 83 | 84 | internal static System.Drawing.Bitmap triumphx50 { 85 | get { 86 | object obj = ResourceManager.GetObject("triumphx50", resourceCulture); 87 | return ((System.Drawing.Bitmap)(obj)); 88 | } 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /GrepCulture/GrepCulture/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Images\breadx50.jpeg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Images\partyx50.jpeg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Images\theaterx50.jpeg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Images\triumphx50.jpeg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrepFarmers", "GrepFarmers\GrepFarmers.csproj", "{161494A5-62DB-40E2-9544-5FAEF18389D1}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {161494A5-62DB-40E2-9544-5FAEF18389D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {161494A5-62DB-40E2-9544-5FAEF18389D1}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {161494A5-62DB-40E2-9544-5FAEF18389D1}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {161494A5-62DB-40E2-9544-5FAEF18389D1}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/GrepFarmers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Drawing; 5 | using System.Data; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace GrepFarmers 11 | { 12 | public partial class GrepFarmers : UserControl 13 | { 14 | private string m_Index = "0"; 15 | private string m_TownID = "0"; 16 | private string m_TownName = "No town selected"; 17 | 18 | private ToolTip m_Tooltip = new ToolTip(); 19 | 20 | //-->Constructor 21 | 22 | public GrepFarmers() 23 | { 24 | InitializeComponent(); 25 | } 26 | 27 | //-->Attributes 28 | 29 | public string Index 30 | { 31 | get { return m_Index; } 32 | set { m_Index = value; } 33 | } 34 | 35 | public string TownID 36 | { 37 | get { return m_TownID; } 38 | set { m_TownID = value; } 39 | } 40 | 41 | public string TownName 42 | { 43 | get { return m_TownName; } 44 | set 45 | { 46 | m_TownName = value; 47 | groupBoxTown.Text = m_TownName; 48 | } 49 | } 50 | 51 | //-->Methods 52 | 53 | public void setFarmersStatus(string p_Relations, string p_Limits) 54 | { 55 | string[] l_Relations = new string[] { "", "" };//dynamic array 56 | string[] l_Limits = new string[] { "", "" };//dynamic array 57 | l_Relations = p_Relations.Split(';'); 58 | //Input parameter is true when limit is reached. Need to invert boolean here! 59 | l_Limits = p_Limits.Split(';'); 60 | 61 | for (int i = 0; i < flowLayoutPanelFarmersA.Controls.Count; i++) 62 | { 63 | if (l_Relations[i].Equals("False") && l_Limits[i].Equals("True")) 64 | ((Label)(flowLayoutPanelFarmersA.Controls[i])).Image = global::GrepFarmers.Properties.Resources.farm_town_1_0_0; 65 | else if(l_Relations[i].Equals("False") && l_Limits[i].Equals("False")) 66 | ((Label)(flowLayoutPanelFarmersA.Controls[i])).Image = global::GrepFarmers.Properties.Resources.farm_town_1_0_1; 67 | else if (l_Relations[i].Equals("True") && l_Limits[i].Equals("True")) 68 | ((Label)(flowLayoutPanelFarmersA.Controls[i])).Image = global::GrepFarmers.Properties.Resources.farm_town_1_1_0; 69 | else 70 | ((Label)(flowLayoutPanelFarmersA.Controls[i])).Image = global::GrepFarmers.Properties.Resources.farm_town_1_1_1; 71 | } 72 | 73 | for (int i = 0; i < flowLayoutPanelFarmersB.Controls.Count; i++) 74 | { 75 | if (l_Relations[i+4].Equals("False") && l_Limits[i+4].Equals("True")) 76 | ((Label)(flowLayoutPanelFarmersB.Controls[i])).Image = global::GrepFarmers.Properties.Resources.farm_town_1_0_0; 77 | else if (l_Relations[i+4].Equals("False") && l_Limits[i+4].Equals("False")) 78 | ((Label)(flowLayoutPanelFarmersB.Controls[i])).Image = global::GrepFarmers.Properties.Resources.farm_town_1_0_1; 79 | else if (l_Relations[i+4].Equals("True") && l_Limits[i+4].Equals("True")) 80 | ((Label)(flowLayoutPanelFarmersB.Controls[i])).Image = global::GrepFarmers.Properties.Resources.farm_town_1_1_0; 81 | else 82 | ((Label)(flowLayoutPanelFarmersB.Controls[i])).Image = global::GrepFarmers.Properties.Resources.farm_town_1_1_1; 83 | } 84 | 85 | } 86 | 87 | public void setFarmersName(string p_Names) 88 | { 89 | string[] l_Names = new string[] { "", "" };//dynamic array 90 | l_Names = p_Names.Split(';'); 91 | 92 | for (int i = 0; i < flowLayoutPanelFarmersA.Controls.Count; i++) 93 | { 94 | m_Tooltip.SetToolTip(((Label)(flowLayoutPanelFarmersA.Controls[i])), l_Names[i]); 95 | } 96 | 97 | for (int i = 0; i < flowLayoutPanelFarmersB.Controls.Count; i++) 98 | { 99 | m_Tooltip.SetToolTip(((Label)(flowLayoutPanelFarmersB.Controls[i])), l_Names[i+4]); 100 | } 101 | } 102 | 103 | public void setFarmersLootTime(string p_LootTimes) 104 | { 105 | string[] l_LootTimes = new string[] { "", "" };//dynamic array 106 | l_LootTimes = p_LootTimes.Split(';'); 107 | 108 | labelTimerFarmer1.Text = l_LootTimes[0]; 109 | labelTimerFarmer2.Text = l_LootTimes[1]; 110 | labelTimerFarmer3.Text = l_LootTimes[2]; 111 | labelTimerFarmer4.Text = l_LootTimes[3]; 112 | labelTimerFarmer5.Text = l_LootTimes[4]; 113 | labelTimerFarmer6.Text = l_LootTimes[5]; 114 | labelTimerFarmer7.Text = l_LootTimes[6]; 115 | labelTimerFarmer8.Text = l_LootTimes[7]; 116 | } 117 | 118 | public void setFarmersMood(string p_Mood) 119 | { 120 | string[] l_Mood = new string[] { "", "" };//dynamic array 121 | l_Mood = p_Mood.Split(';'); 122 | 123 | labelMoodFarmer1.Text = l_Mood[0]; 124 | labelMoodFarmer2.Text = l_Mood[1]; 125 | labelMoodFarmer3.Text = l_Mood[2]; 126 | labelMoodFarmer4.Text = l_Mood[3]; 127 | labelMoodFarmer5.Text = l_Mood[4]; 128 | labelMoodFarmer6.Text = l_Mood[5]; 129 | labelMoodFarmer7.Text = l_Mood[6]; 130 | labelMoodFarmer8.Text = l_Mood[7]; 131 | } 132 | 133 | public void setFarmersLimit(string p_Limit) 134 | { 135 | string[] l_Limit = new string[] { "", "" };//dynamic array 136 | l_Limit = p_Limit.Split(';'); 137 | 138 | labelLimitFarmer1.Text = l_Limit[0]; 139 | labelLimitFarmer2.Text = l_Limit[1]; 140 | labelLimitFarmer3.Text = l_Limit[2]; 141 | labelLimitFarmer4.Text = l_Limit[3]; 142 | labelLimitFarmer5.Text = l_Limit[4]; 143 | labelLimitFarmer6.Text = l_Limit[5]; 144 | labelLimitFarmer7.Text = l_Limit[6]; 145 | labelLimitFarmer8.Text = l_Limit[7]; 146 | } 147 | 148 | public string getSelectedFarmers() 149 | { 150 | string l_Selected = checkBoxFarmer1.Checked.ToString() + ";" + checkBoxFarmer2.Checked.ToString() + ";" + checkBoxFarmer3.Checked.ToString() + ";" + 151 | checkBoxFarmer4.Checked.ToString() + ";" + checkBoxFarmer5.Checked.ToString() + ";" + checkBoxFarmer6.Checked.ToString() + ";" + 152 | checkBoxFarmer7.Checked.ToString() + ";" + checkBoxFarmer8.Checked.ToString() + ";"; 153 | return l_Selected; 154 | } 155 | 156 | public void setSelectedFarmers(string p_SelectedFarmers) 157 | { 158 | try 159 | { 160 | string[] l_SelectedFarmers = new string[] { "", "" };//dynamic array 161 | l_SelectedFarmers = p_SelectedFarmers.Split(';'); 162 | checkBoxFarmer1.Checked = l_SelectedFarmers[0].Equals("True"); 163 | checkBoxFarmer2.Checked = l_SelectedFarmers[1].Equals("True"); 164 | checkBoxFarmer3.Checked = l_SelectedFarmers[2].Equals("True"); 165 | checkBoxFarmer4.Checked = l_SelectedFarmers[3].Equals("True"); 166 | checkBoxFarmer5.Checked = l_SelectedFarmers[4].Equals("True"); 167 | checkBoxFarmer6.Checked = l_SelectedFarmers[5].Equals("True"); 168 | checkBoxFarmer7.Checked = l_SelectedFarmers[6].Equals("True"); 169 | checkBoxFarmer8.Checked = l_SelectedFarmers[7].Equals("True"); 170 | } 171 | catch(Exception) 172 | { 173 | } 174 | } 175 | 176 | public void selectAll() 177 | { 178 | checkBoxFarmer1.Checked = true; 179 | checkBoxFarmer2.Checked = true; 180 | checkBoxFarmer3.Checked = true; 181 | checkBoxFarmer4.Checked = true; 182 | checkBoxFarmer5.Checked = true; 183 | checkBoxFarmer6.Checked = true; 184 | checkBoxFarmer7.Checked = true; 185 | checkBoxFarmer8.Checked = true; 186 | } 187 | 188 | public void deselectAll() 189 | { 190 | checkBoxFarmer1.Checked = false; 191 | checkBoxFarmer2.Checked = false; 192 | checkBoxFarmer3.Checked = false; 193 | checkBoxFarmer4.Checked = false; 194 | checkBoxFarmer5.Checked = false; 195 | checkBoxFarmer6.Checked = false; 196 | checkBoxFarmer7.Checked = false; 197 | checkBoxFarmer8.Checked = false; 198 | } 199 | 200 | public void hideFarmers() 201 | { 202 | flowLayoutPanelFarmersLayout.Visible = false; 203 | } 204 | 205 | public void showFarmers() 206 | { 207 | flowLayoutPanelFarmersLayout.Visible = true; 208 | } 209 | } 210 | } 211 | -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/GrepFarmers.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {161494A5-62DB-40E2-9544-5FAEF18389D1} 9 | Library 10 | Properties 11 | GrepFarmers 12 | GrepFarmers 13 | v3.5 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | x86 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | x86 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | UserControl 48 | 49 | 50 | GrepFarmers.cs 51 | 52 | 53 | 54 | True 55 | True 56 | Resources.resx 57 | 58 | 59 | 60 | 61 | 62 | GrepFarmers.cs 63 | 64 | 65 | ResXFileCodeGenerator 66 | Resources.Designer.cs 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 89 | -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/GrepFarmers.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/Images/farm_town_1_0_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepFarmers/GrepFarmers/Images/farm_town_1_0_0.png -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/Images/farm_town_1_0_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepFarmers/GrepFarmers/Images/farm_town_1_0_1.png -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/Images/farm_town_1_1_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepFarmers/GrepFarmers/Images/farm_town_1_1_0.png -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/Images/farm_town_1_1_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepFarmers/GrepFarmers/Images/farm_town_1_1_1.png -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GrepFarmers")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GrepFarmers")] 13 | [assembly: AssemblyCopyright("Copyright © Uthar 2012")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("794d764e-55d3-49d0-9acd-f73f9c97064f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.225 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GrepFarmers.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GrepFarmers.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | internal static System.Drawing.Bitmap farm_town_1_0_0 { 64 | get { 65 | object obj = ResourceManager.GetObject("farm_town_1_0_0", resourceCulture); 66 | return ((System.Drawing.Bitmap)(obj)); 67 | } 68 | } 69 | 70 | internal static System.Drawing.Bitmap farm_town_1_0_1 { 71 | get { 72 | object obj = ResourceManager.GetObject("farm_town_1_0_1", resourceCulture); 73 | return ((System.Drawing.Bitmap)(obj)); 74 | } 75 | } 76 | 77 | internal static System.Drawing.Bitmap farm_town_1_1_0 { 78 | get { 79 | object obj = ResourceManager.GetObject("farm_town_1_1_0", resourceCulture); 80 | return ((System.Drawing.Bitmap)(obj)); 81 | } 82 | } 83 | 84 | internal static System.Drawing.Bitmap farm_town_1_1_1 { 85 | get { 86 | object obj = ResourceManager.GetObject("farm_town_1_1_1", resourceCulture); 87 | return ((System.Drawing.Bitmap)(obj)); 88 | } 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /GrepFarmers/GrepFarmers/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Images\farm_town_1_0_0.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Images\farm_town_1_0_1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Images\farm_town_1_1_0.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Images\farm_town_1_1_1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | -------------------------------------------------------------------------------- /GrepSchedulerSmall/GrepSchedulerSmall.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrepSchedulerSmall", "GrepSchedulerSmall\GrepSchedulerSmall.csproj", "{9EA2FAE0-6A5A-42C2-B9B1-8145183F73B1}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {9EA2FAE0-6A5A-42C2-B9B1-8145183F73B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {9EA2FAE0-6A5A-42C2-B9B1-8145183F73B1}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {9EA2FAE0-6A5A-42C2-B9B1-8145183F73B1}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {9EA2FAE0-6A5A-42C2-B9B1-8145183F73B1}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /GrepSchedulerSmall/GrepSchedulerSmall/GrepSchedulerSmall.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {9EA2FAE0-6A5A-42C2-B9B1-8145183F73B1} 9 | Library 10 | Properties 11 | GrepSchedulerSmall 12 | GrepSchedulerSmall 13 | v3.5 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | x86 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | x86 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | UserControl 48 | 49 | 50 | GrepSchedulerSmall.cs 51 | 52 | 53 | 54 | 55 | 56 | 57 | GrepSchedulerSmall.cs 58 | 59 | 60 | 61 | 68 | -------------------------------------------------------------------------------- /GrepSchedulerSmall/GrepSchedulerSmall/GrepSchedulerSmall.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /GrepSchedulerSmall/GrepSchedulerSmall/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GrepSchedulerSmall")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GrepSchedulerSmall")] 13 | [assembly: AssemblyCopyright("Copyright © Uthar 2012")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("c4dabe55-aaae-4aa8-9874-7c7a1e2775f1")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /GrepUnits/GrepUnits.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrepUnits", "GrepUnits\GrepUnits.csproj", "{94B01079-AA08-4DA3-B962-510242852082}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {94B01079-AA08-4DA3-B962-510242852082}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {94B01079-AA08-4DA3-B962-510242852082}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {94B01079-AA08-4DA3-B962-510242852082}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {94B01079-AA08-4DA3-B962-510242852082}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/GrepUnits.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {94B01079-AA08-4DA3-B962-510242852082} 9 | Library 10 | Properties 11 | GrepUnits 12 | GrepUnits 13 | v3.5 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | x86 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | x86 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | UserControl 48 | 49 | 50 | GrepUnits.cs 51 | 52 | 53 | 54 | True 55 | True 56 | Resources.resx 57 | 58 | 59 | 60 | 61 | 62 | GrepUnits.cs 63 | 64 | 65 | ResXFileCodeGenerator 66 | Resources.Designer.cs 67 | Designer 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 165 | -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/GrepUnits.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/archerx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/archerx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/attack_shipx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/attack_shipx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/big_transporterx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/big_transporterx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/biremex40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/biremex40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/calydonian_boarx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/calydonian_boarx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/catapultx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/catapultx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/centaurx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/centaurx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/cerberusx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/cerberusx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/chariotx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/chariotx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/colonize_shipx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/colonize_shipx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/demolition_shipx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/demolition_shipx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/furyx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/furyx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/godsentx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/godsentx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/griffinx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/griffinx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/harpyx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/harpyx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/hoplitex40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/hoplitex40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/manticorex40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/manticorex40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/medusax40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/medusax40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/minotaurx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/minotaurx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/pegasusx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/pegasusx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/population.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/population.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/poseidon_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/poseidon_mini.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/riderx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/riderx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/sea_monsterx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/sea_monsterx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/slingerx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/slingerx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/small_transporterx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/small_transporterx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/swordx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/swordx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/triremex40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/triremex40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Images/zyklopx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepUnits/GrepUnits/Images/zyklopx40.png -------------------------------------------------------------------------------- /GrepUnits/GrepUnits/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GrepUnits")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GrepUnits")] 13 | [assembly: AssemblyCopyright("Copyright © Uthar 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("416e3637-a476-4165-bf99-b7fc785cbc32")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("2.80.0.1")] 36 | [assembly: AssemblyFileVersion("2.80.0.1")] 37 | -------------------------------------------------------------------------------- /GrepolisBot2/Enable_IE10.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/Enable_IE10.reg -------------------------------------------------------------------------------- /GrepolisBot2/Enable_IE9.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/Enable_IE9.reg -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrepolisBot2", "GrepolisBot2\GrepolisBot2.csproj", "{111002A6-55F2-4CF5-AE03-731D3D68B45C}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x86 = Debug|x86 9 | Release|x86 = Release|x86 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {111002A6-55F2-4CF5-AE03-731D3D68B45C}.Debug|x86.ActiveCfg = Debug|x86 13 | {111002A6-55F2-4CF5-AE03-731D3D68B45C}.Debug|x86.Build.0 = Debug|x86 14 | {111002A6-55F2-4CF5-AE03-731D3D68B45C}.Release|x86.ActiveCfg = Release|x86 15 | {111002A6-55F2-4CF5-AE03-731D3D68B45C}.Release|x86.Build.0 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/ArmyUnit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class ArmyUnit 9 | { 10 | private string m_Name = ""; 11 | private string m_LocalName = ""; 12 | private int m_Population = 0; 13 | private int m_Capacity = 0; 14 | private string m_God = "none"; 15 | private bool m_IsFromBarracks = true; 16 | private int m_CurrentAmount = 0;//Currently in town 17 | private int m_TotalAmount = 0;//Total units (Includes those on a mission) 18 | private int m_MaxBuild = 0;//How many you can build with the current resources 19 | private int m_QueueBot = 0;//Target training amount 20 | private int m_QueueGame = 0;//Current amount that is being trained ingame 21 | private bool m_IsResearched = false; 22 | private int m_Wood = 0; 23 | private int m_Stone = 0; 24 | private int m_Iron = 0; 25 | private int m_Favor = 0; 26 | private int m_TempleLvlReq = 0; 27 | private int m_BarracksLvlReq = 0; 28 | private int m_DocksLvlReq = 0; 29 | 30 | //-->Constructors 31 | 32 | public ArmyUnit() 33 | { 34 | 35 | } 36 | 37 | public ArmyUnit(string p_Name, int p_Population, int p_Capacity, string p_God, bool p_IsFromBarracks, 38 | bool p_IsResearched, int p_Wood, int p_Stone, int p_Iron, int p_Favor, int p_TempleLvlReq, int p_BarracksLvlReq, int p_DocksLvlReq) 39 | { 40 | m_Name = p_Name; 41 | m_Population = p_Population; 42 | m_Capacity = p_Capacity; 43 | m_God = p_God; 44 | m_IsFromBarracks = p_IsFromBarracks; 45 | m_IsResearched = p_IsResearched; 46 | m_Wood = p_Wood; 47 | m_Stone = p_Stone; 48 | m_Iron = p_Iron; 49 | m_Favor = p_Favor; 50 | m_TempleLvlReq = p_TempleLvlReq; 51 | m_BarracksLvlReq = p_BarracksLvlReq; 52 | m_DocksLvlReq = p_DocksLvlReq; 53 | } 54 | 55 | //-->Attributes 56 | 57 | public string Name 58 | { 59 | get { return m_Name; } 60 | set { m_Name = value; } 61 | } 62 | 63 | public string LocalName 64 | { 65 | get 66 | { 67 | //Forces LocalName to return dev name of unit when translation is not available. 68 | if (m_LocalName.Length > 0) 69 | return m_LocalName; 70 | else 71 | return m_Name; 72 | } 73 | set { m_LocalName = value; } 74 | } 75 | 76 | public int Population 77 | { 78 | get { return m_Population; } 79 | set { m_Population = value; } 80 | } 81 | 82 | public int Capacity 83 | { 84 | get { return m_Capacity; } 85 | set { m_Capacity = value; } 86 | } 87 | 88 | public string God 89 | { 90 | get { return m_God; } 91 | set { m_God = value; } 92 | } 93 | 94 | public bool IsFromBarracks 95 | { 96 | get { return m_IsFromBarracks; } 97 | set { m_IsFromBarracks = value; } 98 | } 99 | 100 | public int CurrentAmount 101 | { 102 | get { return m_CurrentAmount; } 103 | set { m_CurrentAmount = value; } 104 | } 105 | 106 | public int TotalAmount 107 | { 108 | get { return m_TotalAmount; } 109 | set { m_TotalAmount = value; } 110 | } 111 | 112 | public int QueueBot 113 | { 114 | get { return m_QueueBot; } 115 | set { m_QueueBot = value; } 116 | } 117 | 118 | public int QueueGame 119 | { 120 | get { return m_QueueGame; } 121 | set { m_QueueGame = value; } 122 | } 123 | 124 | public int MaxBuild 125 | { 126 | get { return m_MaxBuild; } 127 | set { m_MaxBuild = value; } 128 | } 129 | 130 | public bool IsResearched 131 | { 132 | get { return m_IsResearched; } 133 | set { m_IsResearched = value; } 134 | } 135 | 136 | public int Wood 137 | { 138 | get { return m_Wood; } 139 | set { m_Wood = value; } 140 | } 141 | 142 | public int Stone 143 | { 144 | get { return m_Stone; } 145 | set { m_Stone = value; } 146 | } 147 | 148 | public int Iron 149 | { 150 | get { return m_Iron; } 151 | set { m_Iron = value; } 152 | } 153 | 154 | public int Favor 155 | { 156 | get { return m_Favor; } 157 | set { m_Favor = value; } 158 | } 159 | 160 | public int TempleLvlReq 161 | { 162 | get { return m_TempleLvlReq; } 163 | set { m_TempleLvlReq = value; } 164 | } 165 | 166 | public int BarracksLvlReq 167 | { 168 | get { return m_BarracksLvlReq; } 169 | set { m_BarracksLvlReq = value; } 170 | } 171 | 172 | public int DocksLvlReq 173 | { 174 | get { return m_DocksLvlReq; } 175 | set { m_DocksLvlReq = value; } 176 | } 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Building.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class Building 9 | { 10 | private string m_LocalName = ""; 11 | private string m_DevName = ""; 12 | private int m_Level = 0;//Includes the buildings in the ingame queue 13 | private int m_NextLevel = 0; 14 | private int m_TearDownLevel = 0; 15 | private int m_MaxLevel = 0; 16 | private bool m_IsMaxLevel = false; 17 | private int m_MaxLevelHero = 0; 18 | private int m_TargetLevel = 0; 19 | private bool m_Upgradable = false; 20 | private bool m_Teardownable = false; 21 | private double m_PopBase = 0; 22 | private double m_PopFactor = 0; 23 | 24 | //-->Constructors 25 | 26 | public Building() 27 | { 28 | 29 | } 30 | 31 | public Building(string p_DevName, int p_MaxLevel, int p_MaxLevelHero, double p_PopBase, double p_PopFactor) 32 | { 33 | m_DevName = p_DevName; 34 | m_MaxLevel = p_MaxLevel; 35 | m_MaxLevelHero = p_MaxLevelHero; 36 | m_PopBase = p_PopBase; 37 | m_PopFactor = p_PopFactor; 38 | } 39 | 40 | //-->Attributes 41 | 42 | public string LocalName 43 | { 44 | get 45 | { 46 | if (m_LocalName.Length > 0) 47 | return m_LocalName; 48 | else 49 | return m_DevName; 50 | } 51 | set { m_LocalName = value; } 52 | } 53 | 54 | public string DevName 55 | { 56 | get { return m_DevName; } 57 | set { m_DevName = value; } 58 | } 59 | 60 | public int Level 61 | { 62 | get { return m_Level; } 63 | set { m_Level = value; } 64 | } 65 | 66 | public int NextLevel 67 | { 68 | get { return m_NextLevel; } 69 | set { m_NextLevel = value; } 70 | } 71 | 72 | public int TearDownLevel 73 | { 74 | get { return m_TearDownLevel; } 75 | set { m_TearDownLevel = value; } 76 | } 77 | 78 | public int MaxLevel 79 | { 80 | get { return m_MaxLevel; } 81 | set { m_MaxLevel = value; } 82 | } 83 | 84 | public bool IsMaxLevel 85 | { 86 | get { return m_IsMaxLevel; } 87 | set { m_IsMaxLevel = value; } 88 | } 89 | 90 | public int MaxLevelHero 91 | { 92 | get { return m_MaxLevelHero; } 93 | set { m_MaxLevelHero = value; } 94 | } 95 | 96 | public int TargetLevel 97 | { 98 | get { return m_TargetLevel; } 99 | set { m_TargetLevel = value; } 100 | } 101 | 102 | public bool Upgradable 103 | { 104 | get { return m_Upgradable; } 105 | set { m_Upgradable = value; } 106 | } 107 | 108 | public bool Teardownable 109 | { 110 | get { return m_Teardownable; } 111 | set { m_Teardownable = value; } 112 | } 113 | 114 | public double PopBase 115 | { 116 | get { return m_PopBase; } 117 | set { m_PopBase = value; } 118 | } 119 | 120 | public double PopFactor 121 | { 122 | get { return m_PopFactor; } 123 | set { m_PopFactor = value; } 124 | } 125 | 126 | //-->Methods 127 | 128 | public override string ToString() 129 | { 130 | return m_LocalName + " " + m_Level.ToString(); 131 | } 132 | 133 | public int getPopulationAtTargetLevel() 134 | { 135 | double l_PopExact = m_PopBase * Math.Pow(m_TargetLevel, m_PopFactor); 136 | int l_Pop = (int)(l_PopExact + 0.5); 137 | return l_Pop; 138 | } 139 | 140 | public int getMaximumLevel(bool p_IsHeroMode) 141 | { 142 | int l_Level = 0; 143 | 144 | if (p_IsHeroMode) 145 | { 146 | l_Level = m_MaxLevelHero; 147 | } 148 | else 149 | { 150 | l_Level = m_MaxLevel; 151 | } 152 | 153 | return l_Level; 154 | } 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/CaptchaHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.IO; 6 | using System.Drawing; 7 | 8 | namespace GrepolisBot2 9 | { 10 | class CaptchaHandler 11 | { 12 | public static string imageToBase64(Image p_Image, System.Drawing.Imaging.ImageFormat p_Format) 13 | { 14 | using (MemoryStream l_Ms = new MemoryStream()) 15 | { 16 | // Convert Image to byte[] 17 | p_Image.Save(l_Ms, p_Format); 18 | byte[] l_ImageBytes = l_Ms.ToArray(); 19 | 20 | // Convert byte[] to Base64 String 21 | string l_Base64String = Convert.ToBase64String(l_ImageBytes, 0, l_ImageBytes.Length); 22 | return l_Base64String; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/CookieHelpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Runtime.InteropServices; 6 | using System.Text; 7 | 8 | namespace GrepolisBot2 9 | { 10 | static class CookieHelpers 11 | { 12 | [DllImport("wininet.dll", SetLastError = true)] 13 | public static extern bool InternetGetCookieEx(string url, string cookieName, StringBuilder cookieData, ref int size, Int32 dwFlags, IntPtr lpReserved); 14 | private const Int32 InternetCookieHttponly = 0x2000; 15 | [DllImport("wininet.dll", SetLastError = true)] 16 | private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength); 17 | private const int INTERNET_OPTION_END_BROWSER_SESSION = 42; 18 | 19 | public static CookieContainer GetUriCookieContainer(Uri uri) 20 | { 21 | CookieContainer l_Cookies = null; 22 | // Determine the size of the cookie 23 | int l_Datasize = 8192 * 16; 24 | StringBuilder l_CookieData = new StringBuilder(l_Datasize); 25 | 26 | if (!InternetGetCookieEx(uri.ToString(), null, l_CookieData, ref l_Datasize, InternetCookieHttponly, IntPtr.Zero)) 27 | { 28 | if (l_Datasize < 0) 29 | return null; 30 | 31 | // Allocate stringbuilder large enough to hold the cookie 32 | l_CookieData = new StringBuilder(l_Datasize); 33 | 34 | if (!InternetGetCookieEx(uri.ToString(), null, l_CookieData, ref l_Datasize, InternetCookieHttponly, IntPtr.Zero)) 35 | return null; 36 | } 37 | 38 | if (l_CookieData.Length > 0) 39 | { 40 | l_Cookies = new CookieContainer(); 41 | l_Cookies.SetCookies(uri, l_CookieData.ToString().Replace(';', ',')); 42 | } 43 | return l_Cookies; 44 | } 45 | 46 | public static void ClearCookie() 47 | { 48 | InternetSetOption(IntPtr.Zero, INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/CulturalEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class CulturalEvent 9 | { 10 | private string m_Name = ""; 11 | private string m_NameLocal = ""; 12 | private bool m_Ready = false;//Checks if already started and if building requirements are OK 13 | private bool m_EnoughResources = false; 14 | 15 | //-->Constructor 16 | public CulturalEvent(string p_Name) 17 | { 18 | m_Name = p_Name; 19 | } 20 | 21 | //-->Attributes 22 | public string Name 23 | { 24 | get { return m_Name; } 25 | set { m_Name = value; } 26 | } 27 | 28 | public string NameLocal 29 | { 30 | get { return m_NameLocal; } 31 | set { m_NameLocal = value; } 32 | } 33 | 34 | public bool Ready 35 | { 36 | get { return m_Ready; } 37 | set { m_Ready = value; } 38 | } 39 | 40 | public bool EnoughResources 41 | { 42 | get { return m_EnoughResources; } 43 | set { m_EnoughResources = value; } 44 | } 45 | 46 | //-->Methods 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/CustomArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class CustomArgs : System.EventArgs 9 | { 10 | private string m_Message; 11 | 12 | //-->Constructor 13 | 14 | public CustomArgs(string p_Message) 15 | { 16 | m_Message = p_Message; 17 | } 18 | 19 | //-->Methods 20 | 21 | public string getMessage() 22 | { 23 | return m_Message; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Farmer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class Farmer 9 | { 10 | private string m_ID = ""; 11 | private string m_Name = ""; 12 | private int m_ExpansionState = 0; 13 | private int m_Mood = 0; 14 | private string m_IslandX = "000"; 15 | private string m_IslandY = "000"; 16 | private bool m_RelationStatus = false; 17 | private string m_LootTimer = "";//When you are able to loot again displayed in seconds. 18 | private string m_LootTimerHuman = "";//Shows in understandable words when you're able to loot again. 19 | private string m_Limit = "0/0"; 20 | private string m_Looted = "0";//When m_Limit ends with /0 replace m_Limit with m_Looted. 21 | private bool m_FarmersLimitReached = false; 22 | private bool m_Enabled = false; 23 | 24 | //-->Constructors 25 | 26 | public Farmer() 27 | { 28 | 29 | } 30 | 31 | public Farmer(string p_ID, string p_Name, string p_ExpansionState, string p_IslandX, string p_IslandY, string p_Mood, string p_RelationStatus, string p_LootTimer, string p_LootTimerHuman) 32 | { 33 | m_ID = p_ID; 34 | m_Name = p_Name; 35 | m_ExpansionState = int.Parse(p_ExpansionState); 36 | m_IslandX = p_IslandX; 37 | m_IslandY = p_IslandY; 38 | m_Mood = int.Parse(p_Mood); 39 | m_RelationStatus = p_RelationStatus.Equals("1"); 40 | m_LootTimer = p_LootTimer; 41 | m_LootTimerHuman = p_LootTimerHuman; 42 | } 43 | 44 | //-->Attributes 45 | 46 | public String ID 47 | { 48 | get { return m_ID; } 49 | set { m_ID = value; } 50 | } 51 | 52 | public String Name 53 | { 54 | get { return m_Name; } 55 | set { m_Name = value; } 56 | } 57 | 58 | public int ExpansionState 59 | { 60 | get { return m_ExpansionState; } 61 | set { m_ExpansionState = value; } 62 | } 63 | 64 | public int Mood 65 | { 66 | get { return m_Mood; } 67 | set { m_Mood = value; } 68 | } 69 | 70 | public string IslandX 71 | { 72 | get { return m_IslandX; } 73 | set { m_IslandX = value; } 74 | } 75 | 76 | public string IslandY 77 | { 78 | get { return m_IslandY; } 79 | set { m_IslandY = value; } 80 | } 81 | 82 | public bool RelationStatus 83 | { 84 | get { return m_RelationStatus; } 85 | set { m_RelationStatus = value; } 86 | } 87 | 88 | public string LootTimer 89 | { 90 | get { return m_LootTimer; } 91 | set { m_LootTimer = value; } 92 | } 93 | 94 | public string LootTimerHuman 95 | { 96 | get { return m_LootTimerHuman; } 97 | set { m_LootTimerHuman = value; } 98 | } 99 | 100 | public string Limit 101 | { 102 | get 103 | { 104 | if (m_Limit.EndsWith("/0")) 105 | return m_Looted; 106 | else 107 | return m_Limit; 108 | } 109 | set { m_Limit = value; } 110 | } 111 | 112 | public string Looted 113 | { 114 | get { return m_Looted; } 115 | set { m_Looted = value; } 116 | } 117 | 118 | public bool FarmersLimitReached 119 | { 120 | get { return m_FarmersLimitReached; } 121 | set { m_FarmersLimitReached = value; } 122 | } 123 | 124 | public bool Enabled 125 | { 126 | get { return m_Enabled; } 127 | set { m_Enabled = value; } 128 | } 129 | 130 | //-->Methods 131 | 132 | public bool isLootable(string p_ServerTime) 133 | { 134 | Settings l_Settings = Settings.Instance; 135 | 136 | bool l_Lootable = false; 137 | long l_TimeRemaining = 1; 138 | 139 | l_TimeRemaining = long.Parse(m_LootTimer) - long.Parse(p_ServerTime); 140 | 141 | //Added an extra 60 seconds to handle server lag 142 | if (m_RelationStatus && l_TimeRemaining <= (0-l_Settings.AdvFarmerLootLag) && long.Parse(m_LootTimer) != 0) 143 | l_Lootable = true; 144 | 145 | return l_Lootable; 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/GrepolisBot2.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {111002A6-55F2-4CF5-AE03-731D3D68B45C} 9 | WinExe 10 | Properties 11 | GrepolisBot2 12 | GrepolisBot2 13 | v3.5 14 | 512 15 | OnOutputUpdated 16 | 17 | 18 | x86 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | x86 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | Images\favicon.ico 38 | 39 | 40 | 41 | ..\..\GrepBuildings\GrepBuildings\bin\Release\GrepBuildings.dll 42 | 43 | 44 | ..\..\GrepCulture\GrepCulture\bin\Release\GrepCulture.dll 45 | 46 | 47 | ..\..\GrepFarmers\GrepFarmers\bin\Release\GrepFarmers.dll 48 | 49 | 50 | ..\..\GrepSchedulerSmall\GrepSchedulerSmall\bin\Release\GrepSchedulerSmall.dll 51 | 52 | 53 | ..\..\GrepUnits\GrepUnits\bin\Release\GrepUnits.dll 54 | 55 | 56 | False 57 | True 58 | .\Microsoft.mshtml.dll 59 | True 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | Form 82 | 83 | 84 | GrepolisBot2.cs 85 | 86 | 87 | 88 | Component 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | GrepolisBot2.cs 107 | 108 | 109 | ResXFileCodeGenerator 110 | Resources.Designer.cs 111 | Designer 112 | 113 | 114 | True 115 | Resources.resx 116 | True 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 196 | 197 | if /I "$(ConfigurationName)" == "Release" Eazfuscator.NET.exe "$(TargetPath)" --msbuild-project-path "$(ProjectPath)" --msbuild-project-configuration "$(ConfigurationName)" --msbuild-project-platform "$(PlatformName)" --msbuild-solution-path "$(SolutionPath)" -n --newline-flush -v 3.3 198 | 199 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/GrepolisBot2.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Group.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class Group 9 | { 10 | private string m_ID = ""; 11 | private string m_Name = ""; 12 | private bool m_IsAdministrator = false; 13 | private List m_Towns = new List(); 14 | 15 | //-->Constructor 16 | 17 | public Group() 18 | { 19 | 20 | } 21 | 22 | public Group(string p_ID, string p_Name, bool p_IsAdministrator) 23 | { 24 | m_ID = p_ID; 25 | m_Name = p_Name; 26 | m_IsAdministrator = p_IsAdministrator; 27 | } 28 | 29 | //-->Attributes 30 | 31 | public string ID 32 | { 33 | get { return m_ID; } 34 | set { m_ID = value; } 35 | } 36 | 37 | public string Name 38 | { 39 | get { return m_Name; } 40 | set { m_Name = value; } 41 | } 42 | 43 | public List Towns 44 | { 45 | get { return m_Towns; } 46 | set { m_Towns = value; } 47 | } 48 | 49 | //-->Methods 50 | 51 | 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/HttpHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Net; 6 | using System.Collections.Specialized; 7 | 8 | namespace GrepolisBot2 9 | { 10 | class HttpHandler : WebClient 11 | { 12 | private CookieContainer m_CookieContainer = new CookieContainer(); 13 | 14 | protected override WebRequest GetWebRequest(Uri address) 15 | { 16 | Settings l_Settings = Settings.Instance; 17 | WebRequest request = base.GetWebRequest(address); 18 | if (request is HttpWebRequest) 19 | { 20 | (request as HttpWebRequest).CookieContainer = m_CookieContainer; 21 | //The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. 22 | (request as HttpWebRequest).KeepAlive = false; 23 | (request as HttpWebRequest).UserAgent = l_Settings.AdvUserAgent; 24 | } 25 | 26 | //The underlying connection was closed: The connection was closed unexpectedly. 27 | //request.ConnectionGroupName = Guid.NewGuid().ToString(); 28 | return request; 29 | } 30 | 31 | public CookieContainer CookieContainer 32 | { 33 | get { return m_CookieContainer; } 34 | set { m_CookieContainer = value; } 35 | } 36 | 37 | public void clearCookies() 38 | { 39 | m_CookieContainer = new CookieContainer(); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/artemis_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/artemis_mini.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/athena_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/athena_mini.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/favicon.ico -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/favor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/favor.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/god_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/god_mini.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/god_minix40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/god_minix40.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/hades_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/hades_mini.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/hera_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/hera_mini.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/iron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/iron.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/militia_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/militia_40x40.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/population.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/population.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/poseidon_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/poseidon_mini.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/power_call_of_the_ocean_offx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/power_call_of_the_ocean_offx40.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/power_call_of_the_oceanx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/power_call_of_the_oceanx40.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/power_fertility_improvement_offx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/power_fertility_improvement_offx40.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/power_fertility_improvementx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/power_fertility_improvementx40.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/power_town_protection_offx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/power_town_protection_offx40.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/power_town_protectionx40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/power_town_protectionx40.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/reload_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/reload_icon.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/resources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/resources.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/stone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/stone.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/wood.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Images/zeus_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Images/zeus_mini.png -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/MailClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Net; 6 | using System.Net.Mail; 7 | using System.Windows.Forms; 8 | //using Google.GData.Calendar; 9 | //using Google.GData.Extensions; 10 | //using Google.GData.Client; 11 | 12 | namespace GrepolisBot2 13 | { 14 | class MailClient 15 | { 16 | 17 | //-->Constructors 18 | 19 | public MailClient() 20 | { 21 | 22 | } 23 | 24 | //-->Attributes 25 | 26 | //-->Methods 27 | public void sendMail(string p_Server, int p_Port, bool p_Ssl, string p_User, string p_Pass, string p_Receiver, string p_Subject, string p_Message, bool p_Test) 28 | { 29 | IOHandler l_IOHandler = IOHandler.Instance; 30 | 31 | try 32 | { 33 | if (isValid(p_Server, p_Port, p_Ssl, p_User, p_Pass, p_Receiver)) 34 | { 35 | SmtpClient l_Client = new SmtpClient(p_Server, p_Port); 36 | l_Client.EnableSsl = p_Ssl; 37 | NetworkCredential l_NetworkCredential = new NetworkCredential(p_User, p_Pass); 38 | l_Client.Credentials = l_NetworkCredential; 39 | l_Client.Send(p_User, p_Receiver, p_Subject, p_Message); 40 | } 41 | } 42 | catch (Exception ex) 43 | { 44 | if(p_Test) 45 | MessageBox.Show(ex.Message, "Problem sending mail", MessageBoxButtons.OK); 46 | l_IOHandler.debug(ex.Message); 47 | } 48 | } 49 | 50 | /* 51 | * Sends a sms using the google api. 52 | * No longer works, sms reminders seem to be disabled for event created via the api 53 | */ 54 | public void sendSMS(string p_UserName, string p_Password, string p_Message) 55 | { 56 | /*CalendarService service = new CalendarService(p_UserName); 57 | service.setUserCredentials(p_UserName, p_Password); 58 | 59 | EventEntry l_Message = new EventEntry(); 60 | 61 | l_Message.Title.Text = p_Message; 62 | //When l_When = new When(DateTime.Now.AddSeconds(80), DateTime.Now.AddHours(1)); 63 | DateTime l_Start = DateTime.Now.AddMinutes(31); 64 | DateTime l_End = DateTime.Now.AddMinutes(31); 65 | l_End = l_End.AddHours(1); 66 | When l_When = new When(l_Start, l_End); 67 | 68 | l_Message.Times.Add(l_When); 69 | 70 | Reminder l_Sms = new Reminder(); 71 | l_Sms.Minutes = 10; 72 | l_Sms.Method = Reminder.ReminderMethod.sms; 73 | l_Message.Reminders.Add(l_Sms); 74 | 75 | Uri l_Uri = new Uri("http://www.google.com/calendar/feeds/default/private/full"); 76 | 77 | AtomEntry insertedEntry = service.Insert(l_Uri, l_Message);*/ 78 | } 79 | 80 | private bool isValid(string p_Server, int p_Port, bool p_Ssl, string p_User, string p_Pass, string p_Receiver) 81 | { 82 | bool l_IsValid = false; 83 | if (p_Server.Length > 0 && p_Port >= 0 && p_User.Length > 0 && p_Pass.Length > 0 && p_Receiver.Contains("@")) 84 | { 85 | l_IsValid = true; 86 | } 87 | return l_IsValid; 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Microsoft.mshtml.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josdemmers/Grepolis2Bot/58df35f8d660fbed54d10b2412a6c6dc7bcd84fe/GrepolisBot2/GrepolisBot2/Microsoft.mshtml.dll -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Movement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class Movement 9 | { 10 | //General 11 | private string m_Type = ""; 12 | private bool m_Cancelable = false; 13 | private string m_Started_at = ""; 14 | private string m_Arrival_at = ""; 15 | private string m_Arrival_eta = ""; 16 | //private string m_Arrival_seconds_left = ""; 17 | private string m_Arrived_human = ""; 18 | private string m_Id = ""; 19 | private bool m_Incoming = false; 20 | private bool m_Incoming_attack = false;//Only when l_MovIncoming is true 21 | private string m_Command_name = ""; 22 | //Origin movement 23 | private string m_OriginTownID = ""; 24 | private string m_OriginTownName = ""; 25 | 26 | //-->Constructors 27 | 28 | public Movement() 29 | { 30 | 31 | } 32 | 33 | public Movement(string p_Type, bool p_Cancelable, string p_Started_at, string p_Arrival_at, string p_Arrival_eta, string p_Arrived_human, string p_Id, bool p_Incoming, bool p_Incoming_attack, string p_Command_name) 34 | { 35 | m_Type = p_Type; 36 | m_Cancelable = p_Cancelable; 37 | m_Started_at = p_Started_at; 38 | m_Arrival_at = p_Arrival_at; 39 | m_Arrival_eta = p_Arrival_eta; 40 | //m_Arrival_seconds_left = p_Arrival_seconds_left; 41 | m_Arrived_human = p_Arrived_human; 42 | m_Id = p_Id; 43 | m_Incoming = p_Incoming; 44 | m_Incoming_attack = p_Incoming_attack; 45 | m_Command_name = p_Command_name; 46 | } 47 | 48 | //-->Attributes 49 | 50 | //General 51 | public string Type 52 | { 53 | get { return m_Type; } 54 | set { m_Type = value; } 55 | } 56 | 57 | public bool Cancelable 58 | { 59 | get { return m_Cancelable; } 60 | set { m_Cancelable = value; } 61 | } 62 | 63 | public string Started_at 64 | { 65 | get { return m_Started_at; } 66 | set { m_Started_at = value; } 67 | } 68 | 69 | public string Arrival_at 70 | { 71 | get { return m_Arrival_at; } 72 | set { m_Arrival_at = value; } 73 | } 74 | 75 | public string Arrival_eta 76 | { 77 | get { return m_Arrival_eta; } 78 | set { m_Arrival_eta = value; } 79 | } 80 | 81 | /*public string Arrival_seconds_left 82 | { 83 | get { return m_Arrival_seconds_left; } 84 | set { m_Arrival_seconds_left = value; } 85 | }*/ 86 | 87 | public string Arrived_human 88 | { 89 | get { return m_Arrived_human; } 90 | set { m_Arrived_human = value; } 91 | } 92 | 93 | public string Id 94 | { 95 | get { return m_Id; } 96 | set { m_Id = value; } 97 | } 98 | 99 | public bool Incoming 100 | { 101 | get { return m_Incoming; } 102 | set { m_Incoming = value; } 103 | } 104 | 105 | public bool Incoming_attack 106 | { 107 | get { return m_Incoming_attack; } 108 | set { m_Incoming_attack = value; } 109 | } 110 | 111 | public string Command_name 112 | { 113 | get { return m_Command_name; } 114 | set { m_Command_name = value; } 115 | } 116 | 117 | //Origin movement 118 | public string OriginTownID 119 | { 120 | get { return m_OriginTownID; } 121 | set { m_OriginTownID = value; } 122 | } 123 | 124 | public string OriginTownName 125 | { 126 | get { return m_OriginTownName; } 127 | set { m_OriginTownName = value; } 128 | } 129 | 130 | //-->Methods 131 | 132 | public void addTOIInfo(string p_Id, string p_Name) 133 | { 134 | Parser l_Parser = Parser.Instance; 135 | 136 | m_OriginTownID = p_Id; 137 | m_OriginTownName = p_Name; 138 | } 139 | } 140 | } -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Notification.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class Notification 9 | { 10 | private string m_ServerTime = ""; 11 | private string m_Notify_id = ""; 12 | private string m_Time = ""; 13 | private string m_Type = "";//building_finished, newreport, phoenician_salesman_leave 14 | private string m_Subject = ""; 15 | 16 | //-->Constructor 17 | 18 | public Notification() 19 | { 20 | 21 | } 22 | 23 | public Notification(string p_ServerTime, string p_Notify_id, string p_Time, string p_Type, string p_Subject) 24 | { 25 | m_ServerTime = p_ServerTime; 26 | m_Notify_id = p_Notify_id; 27 | m_Time = p_Time; 28 | m_Type = p_Type; 29 | m_Subject = p_Subject; 30 | } 31 | 32 | //-->Attributes 33 | 34 | public string ServerTime 35 | { 36 | get { return m_ServerTime; } 37 | set { m_ServerTime = value; } 38 | } 39 | 40 | public string Notify_id 41 | { 42 | get { return m_Notify_id; } 43 | set { m_Notify_id = value; } 44 | } 45 | 46 | public string Time 47 | { 48 | get { return m_Time; } 49 | set { m_Time = value; } 50 | } 51 | 52 | public string Type 53 | { 54 | get { return m_Type; } 55 | set { m_Type = value; } 56 | } 57 | 58 | public string Subject 59 | { 60 | get { return m_Subject; } 61 | set { m_Subject = value; } 62 | } 63 | 64 | //-->Methods 65 | 66 | public string getHumanTimeCreated() 67 | { 68 | Settings l_Settings = Settings.Instance; 69 | //double l_Offset = double.Parse(l_Settings.ServerTimeOffset) - double.Parse(l_Settings.LocaleTimeOffset); 70 | //double l_Offset = double.Parse(l_Settings.ServerTimeOffset); 71 | double l_Offset = double.Parse(l_Settings.LocaleTimeOffset); 72 | 73 | while (m_ServerTime.Length > 10) 74 | { 75 | m_ServerTime = m_ServerTime.Remove(m_ServerTime.Length - 1); 76 | } 77 | 78 | double l_Seconds = double.Parse(m_ServerTime) + (l_Offset * 1.0); 79 | DateTime l_Time = new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(l_Seconds); 80 | return l_Time.ToString(); 81 | } 82 | 83 | public string getHumanTimeNotification() 84 | { 85 | Settings l_Settings = Settings.Instance; 86 | //double l_Offset = double.Parse(l_Settings.ServerTimeOffset) - double.Parse(l_Settings.LocaleTimeOffset); 87 | //double l_Offset = double.Parse(l_Settings.ServerTimeOffset); 88 | double l_Offset = double.Parse(l_Settings.LocaleTimeOffset); 89 | 90 | while (m_Time.Length > 10) 91 | { 92 | m_Time = m_Time.Remove(m_Time.Length - 1); 93 | } 94 | 95 | double l_Seconds = double.Parse(m_Time) + (l_Offset * 1.0); 96 | DateTime l_Time = new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(l_Seconds); 97 | return l_Time.ToString(); 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace GrepolisBot2 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new GrepolisBot2()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Grepolis 2 Bot")] 9 | [assembly: AssemblyDescription("This is a bot for the browsergame Grepolis")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Grepolis 2 Bot")] 13 | [assembly: AssemblyCopyright("Copyright © Uthar 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("d2cbafdd-ffd2-4e24-a3e7-00891dd49db8")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("2.86.0.1")] 36 | [assembly: AssemblyFileVersion("2.86.0.1")] 37 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.239 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GrepolisBot2.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GrepolisBot2.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | internal static System.Drawing.Bitmap artemis_mini { 64 | get { 65 | object obj = ResourceManager.GetObject("artemis_mini", resourceCulture); 66 | return ((System.Drawing.Bitmap)(obj)); 67 | } 68 | } 69 | 70 | internal static System.Drawing.Bitmap athena_mini { 71 | get { 72 | object obj = ResourceManager.GetObject("athena_mini", resourceCulture); 73 | return ((System.Drawing.Bitmap)(obj)); 74 | } 75 | } 76 | 77 | internal static System.Drawing.Icon favicon { 78 | get { 79 | object obj = ResourceManager.GetObject("favicon", resourceCulture); 80 | return ((System.Drawing.Icon)(obj)); 81 | } 82 | } 83 | 84 | internal static System.Drawing.Bitmap favor { 85 | get { 86 | object obj = ResourceManager.GetObject("favor", resourceCulture); 87 | return ((System.Drawing.Bitmap)(obj)); 88 | } 89 | } 90 | 91 | internal static System.Drawing.Bitmap god_mini { 92 | get { 93 | object obj = ResourceManager.GetObject("god_mini", resourceCulture); 94 | return ((System.Drawing.Bitmap)(obj)); 95 | } 96 | } 97 | 98 | internal static System.Drawing.Bitmap god_minix40 { 99 | get { 100 | object obj = ResourceManager.GetObject("god_minix40", resourceCulture); 101 | return ((System.Drawing.Bitmap)(obj)); 102 | } 103 | } 104 | 105 | internal static System.Drawing.Bitmap hades_mini { 106 | get { 107 | object obj = ResourceManager.GetObject("hades_mini", resourceCulture); 108 | return ((System.Drawing.Bitmap)(obj)); 109 | } 110 | } 111 | 112 | internal static System.Drawing.Bitmap hera_mini { 113 | get { 114 | object obj = ResourceManager.GetObject("hera_mini", resourceCulture); 115 | return ((System.Drawing.Bitmap)(obj)); 116 | } 117 | } 118 | 119 | internal static System.Drawing.Bitmap iron { 120 | get { 121 | object obj = ResourceManager.GetObject("iron", resourceCulture); 122 | return ((System.Drawing.Bitmap)(obj)); 123 | } 124 | } 125 | 126 | internal static System.Drawing.Bitmap militia_40x40 { 127 | get { 128 | object obj = ResourceManager.GetObject("militia_40x40", resourceCulture); 129 | return ((System.Drawing.Bitmap)(obj)); 130 | } 131 | } 132 | 133 | internal static System.Drawing.Bitmap population { 134 | get { 135 | object obj = ResourceManager.GetObject("population", resourceCulture); 136 | return ((System.Drawing.Bitmap)(obj)); 137 | } 138 | } 139 | 140 | internal static System.Drawing.Bitmap poseidon_mini { 141 | get { 142 | object obj = ResourceManager.GetObject("poseidon_mini", resourceCulture); 143 | return ((System.Drawing.Bitmap)(obj)); 144 | } 145 | } 146 | 147 | internal static System.Drawing.Bitmap power_call_of_the_ocean_offx40 { 148 | get { 149 | object obj = ResourceManager.GetObject("power_call_of_the_ocean_offx40", resourceCulture); 150 | return ((System.Drawing.Bitmap)(obj)); 151 | } 152 | } 153 | 154 | internal static System.Drawing.Bitmap power_call_of_the_oceanx40 { 155 | get { 156 | object obj = ResourceManager.GetObject("power_call_of_the_oceanx40", resourceCulture); 157 | return ((System.Drawing.Bitmap)(obj)); 158 | } 159 | } 160 | 161 | internal static System.Drawing.Bitmap power_fertility_improvement_offx40 { 162 | get { 163 | object obj = ResourceManager.GetObject("power_fertility_improvement_offx40", resourceCulture); 164 | return ((System.Drawing.Bitmap)(obj)); 165 | } 166 | } 167 | 168 | internal static System.Drawing.Bitmap power_fertility_improvementx40 { 169 | get { 170 | object obj = ResourceManager.GetObject("power_fertility_improvementx40", resourceCulture); 171 | return ((System.Drawing.Bitmap)(obj)); 172 | } 173 | } 174 | 175 | internal static System.Drawing.Bitmap power_town_protection_offx40 { 176 | get { 177 | object obj = ResourceManager.GetObject("power_town_protection_offx40", resourceCulture); 178 | return ((System.Drawing.Bitmap)(obj)); 179 | } 180 | } 181 | 182 | internal static System.Drawing.Bitmap power_town_protectionx40 { 183 | get { 184 | object obj = ResourceManager.GetObject("power_town_protectionx40", resourceCulture); 185 | return ((System.Drawing.Bitmap)(obj)); 186 | } 187 | } 188 | 189 | internal static System.Drawing.Bitmap reload_icon { 190 | get { 191 | object obj = ResourceManager.GetObject("reload_icon", resourceCulture); 192 | return ((System.Drawing.Bitmap)(obj)); 193 | } 194 | } 195 | 196 | internal static System.Drawing.Bitmap resources { 197 | get { 198 | object obj = ResourceManager.GetObject("resources", resourceCulture); 199 | return ((System.Drawing.Bitmap)(obj)); 200 | } 201 | } 202 | 203 | internal static System.Drawing.Bitmap stone { 204 | get { 205 | object obj = ResourceManager.GetObject("stone", resourceCulture); 206 | return ((System.Drawing.Bitmap)(obj)); 207 | } 208 | } 209 | 210 | internal static System.Drawing.Bitmap wood { 211 | get { 212 | object obj = ResourceManager.GetObject("wood", resourceCulture); 213 | return ((System.Drawing.Bitmap)(obj)); 214 | } 215 | } 216 | 217 | internal static System.Drawing.Bitmap zeus_mini { 218 | get { 219 | object obj = ResourceManager.GetObject("zeus_mini", resourceCulture); 220 | return ((System.Drawing.Bitmap)(obj)); 221 | } 222 | } 223 | } 224 | } 225 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/QueueTemplate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class QueueTemplate : IComparable 9 | { 10 | private string m_Name = ""; 11 | private string m_Queue = ""; 12 | 13 | private List m_ArmyUnits = new List(); 14 | private List m_Buildings = new List(); 15 | 16 | //-->Constructor 17 | 18 | public QueueTemplate() 19 | { 20 | 21 | } 22 | 23 | public QueueTemplate(string p_Name) 24 | { 25 | m_Name = p_Name; 26 | addBuildings(); 27 | addArmyUnits(); 28 | } 29 | 30 | public QueueTemplate(string p_Name, string p_Queue) 31 | { 32 | m_Name = p_Name; 33 | m_Queue = p_Queue; 34 | addBuildings(); 35 | addArmyUnits(); 36 | } 37 | 38 | //-->Attributes 39 | 40 | public string Name 41 | { 42 | get { return m_Name; } 43 | set { m_Name = value; } 44 | } 45 | 46 | public string Queue 47 | { 48 | get { return m_Queue; } 49 | set { m_Queue = value; } 50 | } 51 | 52 | //-->Methods 53 | 54 | private void addBuildings() 55 | { 56 | m_Buildings.Add(new Building("main", 25, 25, 1, 1.5)); 57 | m_Buildings.Add(new Building("hide", 10, 10, 3, 0.5)); 58 | m_Buildings.Add(new Building("storage", 30, 35, 0, 1)); 59 | m_Buildings.Add(new Building("farm", 40, 45, 0, 0)); 60 | m_Buildings.Add(new Building("lumber", 40, 40, 1, 1.25)); 61 | m_Buildings.Add(new Building("stoner", 40, 40, 1, 1.25)); 62 | m_Buildings.Add(new Building("ironer", 40, 40, 1, 1.25)); 63 | m_Buildings.Add(new Building("market", 30, 40, 2, 1.1)); 64 | m_Buildings.Add(new Building("docks", 30, 30, 4, 1)); 65 | m_Buildings.Add(new Building("barracks", 30, 30, 1, 1.3)); 66 | m_Buildings.Add(new Building("wall", 25, 25, 2, 1.16)); 67 | m_Buildings.Add(new Building("academy", 30, 36, 3, 1)); 68 | m_Buildings.Add(new Building("temple", 25, 30, 5, 1)); 69 | m_Buildings.Add(new Building("theater", 1, 1, 60, 1)); 70 | m_Buildings.Add(new Building("thermal", 1, 1, 60, 1)); 71 | m_Buildings.Add(new Building("library", 1, 1, 60, 1)); 72 | m_Buildings.Add(new Building("lighthouse", 1, 1, 60, 1)); 73 | m_Buildings.Add(new Building("tower", 1, 1, 60, 1)); 74 | m_Buildings.Add(new Building("statue", 1, 1, 60, 1)); 75 | m_Buildings.Add(new Building("oracle", 1, 1, 60, 1)); 76 | m_Buildings.Add(new Building("trade_office", 1, 1, 60, 1)); 77 | } 78 | 79 | private void addArmyUnits() 80 | { 81 | m_ArmyUnits.Add(new ArmyUnit("sword", 1, 0, "none", true, true, 95, 0, 85, 0, 0, 1, 0)); 82 | m_ArmyUnits.Add(new ArmyUnit("slinger", 1, 0, "none", true, false, 55, 100, 40, 0, 0, 1, 0)); 83 | m_ArmyUnits.Add(new ArmyUnit("archer", 1, 0, "none", true, false, 120, 0, 75, 0, 0, 1, 0)); 84 | m_ArmyUnits.Add(new ArmyUnit("hoplite", 1, 0, "none", true, false, 0, 75, 150, 0, 0, 1, 0)); 85 | m_ArmyUnits.Add(new ArmyUnit("rider", 3, 0, "none", true, false, 240, 120, 360, 0, 0, 10, 0)); 86 | m_ArmyUnits.Add(new ArmyUnit("chariot", 4, 0, "none", true, false, 200, 440, 320, 0, 0, 15, 0)); 87 | m_ArmyUnits.Add(new ArmyUnit("catapult", 15, 0, "none", true, false, 1200, 1200, 1200, 0, 0, 1, 0)); 88 | m_ArmyUnits.Add(new ArmyUnit("minotaur", 30, 0, "zeus", true, true, 1400, 600, 3100, 202, 10, 1, 0)); 89 | m_ArmyUnits.Add(new ArmyUnit("manticore", 45, 0, "zeus", true, true, 4400, 3000, 3400, 405, 15, 1, 0)); 90 | m_ArmyUnits.Add(new ArmyUnit("centaur", 12, 0, "athena", true, true, 1740, 300, 700, 100, 4, 1, 0)); 91 | m_ArmyUnits.Add(new ArmyUnit("pegasus", 20, 0, "athena", true, true, 2800, 360, 80, 180, 12, 1, 0)); 92 | m_ArmyUnits.Add(new ArmyUnit("harpy", 14, 0, "hera", true, true, 1600, 400, 1360, 130, 5, 1, 0)); 93 | m_ArmyUnits.Add(new ArmyUnit("medusa", 18, 0, "hera", true, true, 1500, 3800, 2200, 210, 10, 1, 0)); 94 | m_ArmyUnits.Add(new ArmyUnit("zyklop", 40, 0, "poseidon", true, true, 2000, 4200, 3360, 360, 12, 1, 0)); 95 | m_ArmyUnits.Add(new ArmyUnit("cerberus", 30, 0, "hades", true, true, 1250, 1500, 3000, 320, 10, 1, 0)); 96 | m_ArmyUnits.Add(new ArmyUnit("fury", 55, 0, "hades", true, true, 2500, 5000, 5000, 480, 16, 1, 0)); 97 | m_ArmyUnits.Add(new ArmyUnit("griffin", 38, 0, "artemis", true, true, 3800, 1900, 4800, 250, 15, 1, 0)); 98 | m_ArmyUnits.Add(new ArmyUnit("calydonian_boar", 20, 0, "artemis", true, true, 2800, 1400, 1600, 110, 10, 1, 0)); 99 | m_ArmyUnits.Add(new ArmyUnit("godsent", 3, 0, "none", true, true, 0, 0, 0, 15, 1, 1, 0)); 100 | m_ArmyUnits.Add(new ArmyUnit("big_transporter", 7, 20, "none", false, true, 500, 500, 400, 0, 0, 0, 1));//19 101 | m_ArmyUnits.Add(new ArmyUnit("bireme", 8, 0, "none", false, false, 800, 700, 180, 0, 0, 0, 1)); 102 | m_ArmyUnits.Add(new ArmyUnit("attack_ship", 10, 0, "none", false, false, 1300, 300, 800, 0, 0, 0, 1)); 103 | m_ArmyUnits.Add(new ArmyUnit("demolition_ship", 8, 0, "none", false, false, 500, 750, 150, 0, 0, 0, 1)); 104 | m_ArmyUnits.Add(new ArmyUnit("small_transporter", 5, 10, "none", false, false, 800, 0, 400, 0, 0, 0, 1)); 105 | m_ArmyUnits.Add(new ArmyUnit("trireme", 16, 0, "none", false, false, 2000, 1300, 900, 0, 0, 0, 1)); 106 | m_ArmyUnits.Add(new ArmyUnit("colonize_ship", 170, 0, "none", false, false, 10000, 10000, 10000, 0, 0, 0, 20)); 107 | m_ArmyUnits.Add(new ArmyUnit("sea_monster", 50, 0, "poseidon", false, true, 5400, 2800, 3800, 400, 22, 0, 1)); 108 | } 109 | 110 | public override string ToString() 111 | { 112 | return m_Name; 113 | } 114 | 115 | public int CompareTo(QueueTemplate p_Obj) 116 | { 117 | return m_Name.CompareTo(p_Obj.ToString()); 118 | } 119 | 120 | public int getUnitTargetAmount(string p_Name) 121 | { 122 | int l_Target = 0; 123 | 124 | for (int i = 0; i < m_ArmyUnits.Count; i++) 125 | { 126 | if (m_ArmyUnits[i].Name.Equals(p_Name)) 127 | l_Target = m_ArmyUnits[i].QueueBot; 128 | } 129 | 130 | return l_Target; 131 | } 132 | 133 | public void setUnitTargetAmount(string p_Name, int p_Amount) 134 | { 135 | for (int i = 0; i < m_ArmyUnits.Count; i++) 136 | { 137 | if (m_ArmyUnits[i].Name.Equals(p_Name)) 138 | m_ArmyUnits[i].QueueBot = p_Amount; 139 | } 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Research.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class Research 9 | { 10 | //Custom classes 11 | private List m_Technologies = new List(); 12 | 13 | //-->Constructor 14 | 15 | public Research() 16 | { 17 | initTechnologies(); 18 | } 19 | 20 | //-->Attributes 21 | 22 | //-->Methods 23 | 24 | private void initTechnologies() 25 | { 26 | m_Technologies.Add(new Technology("slinger")); 27 | m_Technologies.Add(new Technology("archer")); 28 | m_Technologies.Add(new Technology("hoplite")); 29 | m_Technologies.Add(new Technology("town_guard")); 30 | m_Technologies.Add(new Technology("diplomacy")); 31 | m_Technologies.Add(new Technology("espionage")); 32 | m_Technologies.Add(new Technology("booty")); 33 | m_Technologies.Add(new Technology("pottery")); 34 | m_Technologies.Add(new Technology("rider")); 35 | m_Technologies.Add(new Technology("architecture")); 36 | m_Technologies.Add(new Technology("instructor")); 37 | m_Technologies.Add(new Technology("bireme")); 38 | m_Technologies.Add(new Technology("building_crane")); 39 | m_Technologies.Add(new Technology("meteorology")); 40 | m_Technologies.Add(new Technology("chariot")); 41 | m_Technologies.Add(new Technology("attack_ship")); 42 | m_Technologies.Add(new Technology("conscription")); 43 | m_Technologies.Add(new Technology("shipwright")); 44 | m_Technologies.Add(new Technology("demolition_ship")); 45 | m_Technologies.Add(new Technology("catapult")); 46 | m_Technologies.Add(new Technology("cryptography")); 47 | m_Technologies.Add(new Technology("colonize_ship")); 48 | m_Technologies.Add(new Technology("small_transporter")); 49 | m_Technologies.Add(new Technology("plow")); 50 | m_Technologies.Add(new Technology("trireme")); 51 | m_Technologies.Add(new Technology("phalanx")); 52 | m_Technologies.Add(new Technology("mathematics")); 53 | m_Technologies.Add(new Technology("ram")); 54 | m_Technologies.Add(new Technology("cartography")); 55 | m_Technologies.Add(new Technology("take_over")); 56 | } 57 | 58 | public bool isResearched(string p_Id) 59 | { 60 | bool l_IsResearched = false; 61 | for (int i = 0; i < m_Technologies.Count; i++) 62 | { 63 | if (m_Technologies[i].Id.Equals(p_Id) && m_Technologies[i].Researched) 64 | { 65 | l_IsResearched = true; 66 | break; 67 | } 68 | } 69 | return l_IsResearched; 70 | } 71 | 72 | public void setResearchStatus(string p_Id, bool p_Researched) 73 | { 74 | for (int i = 0; i < m_Technologies.Count; i++) 75 | { 76 | if (m_Technologies[i].Id.Equals(p_Id)) 77 | { 78 | m_Technologies[i].Researched = p_Researched; 79 | break; 80 | } 81 | } 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Technology.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class Technology 9 | { 10 | string m_Id = ""; 11 | bool m_Researched = false; 12 | 13 | //-->Constructor 14 | 15 | public Technology(string p_Id) 16 | { 17 | m_Id = p_Id; 18 | } 19 | 20 | //-->Attributes 21 | 22 | public string Id 23 | { 24 | get { return m_Id; } 25 | set { m_Id = value; } 26 | } 27 | 28 | public bool Researched 29 | { 30 | get { return m_Researched; } 31 | set { m_Researched = value; } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/Trade.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GrepolisBot2 7 | { 8 | class Trade 9 | { 10 | private string m_Origin_town_id = ""; 11 | //private string m_origin_town_name = ""; 12 | //private string m_origin_ix = ""; 13 | //private string m_origin_iy = ""; 14 | //private string m_origin_town_player_id = ""; 15 | //private string m_origin_farm_town_name = ""; 16 | private string m_Destination_town_id = ""; 17 | //private string m_destination_town_name = ""; 18 | //private string m_destination_ix = ""; 19 | //private string m_destination_iy = ""; 20 | //private string m_destination_town_player_id = ""; 21 | //private string m_destination_farm_town_name = ""; 22 | //private string m_wonder_type = ""; 23 | //private string m_wonder_ix = ""; 24 | //private string m_wonder_iy = ""; 25 | private string m_Id = ""; 26 | private string m_Wood = "0"; 27 | private string m_Stone = "0"; 28 | private string m_Iron = "0"; 29 | //private string m_started_at = ""; 30 | //private string m_arrival_at = ""; 31 | //private string m_origin_town_type = ""; 32 | //private string m_destination_town_type = ""; 33 | private string m_In_exchange = ""; 34 | //private string m_arrival_seconds_left = ""; 35 | //private string m_cancelable = ""; 36 | //private string m_origin_town_link = ""; 37 | //private string m_destination_town_link = ""; 38 | 39 | //-->Constructors 40 | 41 | public Trade() 42 | { 43 | 44 | } 45 | 46 | public Trade(string p_Id) 47 | { 48 | m_Id = p_Id; 49 | } 50 | 51 | //-->Attributes 52 | 53 | public string Origin_town_id 54 | { 55 | get { return m_Origin_town_id; } 56 | set { m_Origin_town_id = value; } 57 | } 58 | 59 | public string Destination_town_id 60 | { 61 | get { return m_Destination_town_id; } 62 | set { m_Destination_town_id = value; } 63 | } 64 | 65 | public string Id 66 | { 67 | get { return m_Id; } 68 | set { m_Id = value; } 69 | } 70 | 71 | public string Wood 72 | { 73 | get { return m_Wood; } 74 | set { m_Wood = value; } 75 | } 76 | 77 | public string Stone 78 | { 79 | get { return m_Stone; } 80 | set { m_Stone = value; } 81 | } 82 | 83 | public string Iron 84 | { 85 | get { return m_Iron; } 86 | set { m_Iron = value; } 87 | } 88 | 89 | public string In_exchange 90 | { 91 | get { return m_In_exchange; } 92 | set { m_In_exchange = value; } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /GrepolisBot2/GrepolisBot2/jdTimer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Timers; 6 | 7 | namespace GrepolisBot2 8 | { 9 | class jdTimer 10 | { 11 | private DateTime m_StartTime = new DateTime(); 12 | private DateTime m_EndTime = new DateTime(); 13 | private Timer m_InternalTimer = new Timer(); 14 | private double m_Interval = 100;//Internal timer 15 | private double m_Duration = 1;//Duration in minutes 16 | 17 | //-->Constructor 18 | 19 | public jdTimer() 20 | { 21 | m_StartTime = DateTime.Now; 22 | m_EndTime = DateTime.Now; 23 | initEventHandlers(); 24 | initTimer(); 25 | setTimer(); 26 | } 27 | 28 | //-->Attributes 29 | 30 | public string TimeLeft 31 | { 32 | get { return getTimeLeft(); } 33 | } 34 | 35 | public double Duration 36 | { 37 | get { return m_Duration; } 38 | set { m_Duration = value; } 39 | } 40 | 41 | public Timer InternalTimer 42 | { 43 | get { return m_InternalTimer; } 44 | set { m_InternalTimer = value; } 45 | } 46 | 47 | //-->Methods 48 | 49 | private void initEventHandlers() 50 | { 51 | m_InternalTimer.Elapsed += new ElapsedEventHandler(timeout); 52 | } 53 | 54 | private void initTimer() 55 | { 56 | m_InternalTimer.Stop(); 57 | m_InternalTimer.AutoReset = true; 58 | m_InternalTimer.Interval = m_Interval; 59 | } 60 | 61 | public void setRefreshInterval(double p_Milliseconds) 62 | { 63 | m_Interval = p_Milliseconds; 64 | m_InternalTimer.Interval = m_Interval; 65 | } 66 | 67 | private void setStartTime() 68 | { 69 | m_StartTime = DateTime.Now; 70 | } 71 | 72 | private void setEndTime() 73 | { 74 | m_EndTime = m_StartTime.AddMinutes(m_Duration); 75 | } 76 | 77 | private void setTimer() 78 | { 79 | setStartTime(); 80 | setEndTime(); 81 | } 82 | 83 | public string getTimeLeft() 84 | { 85 | string l_TimeLeft = m_EndTime.Subtract(DateTime.Now).ToString(); 86 | l_TimeLeft = l_TimeLeft.Substring(0, 8); 87 | return l_TimeLeft; 88 | } 89 | 90 | public string getElapsedTime() 91 | { 92 | string l_TimeElapsed = DateTime.Now.Subtract(m_StartTime).ToString(); 93 | l_TimeElapsed = l_TimeElapsed.Substring(0, 8); 94 | return l_TimeElapsed; 95 | } 96 | 97 | public bool isTimerDone() 98 | { 99 | bool l_Ready = false; 100 | string l_TimeLeft = getTimeLeft(); 101 | if (l_TimeLeft.Equals("00:00:00") || l_TimeLeft.Contains("-")) 102 | l_Ready = true; 103 | return l_Ready; 104 | } 105 | 106 | public void start(double p_Minutes) 107 | { 108 | m_Duration = p_Minutes; 109 | setTimer(); 110 | m_InternalTimer.Start(); 111 | } 112 | 113 | public void stop() 114 | { 115 | m_InternalTimer.Stop(); 116 | } 117 | 118 | public void resume() 119 | { 120 | m_EndTime = m_StartTime.AddMinutes(m_Duration); 121 | m_InternalTimer.Start(); 122 | } 123 | 124 | //-->Event Handler 125 | 126 | /** 127 | * Timeout of the internal timer 128 | */ 129 | void timeout(object sender, ElapsedEventArgs e) 130 | { 131 | //Handled by the controller class 132 | } 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #### Notice 2 | This is the source code from the [Grepolis 2](http://en.grepolis.com/) Bot project on http://bots.uthar.nl. 3 | It started as a small hobby project back in 2011, and has currently grown in a full featured bot. Now that the development has come to an end (13-4-2015) I decided to make the source code public. Feel free to fork this project to continue with your own version of the bot. 4 | 5 | # License 6 | Grepolis2Bot is licensed under [GPL v2](http://choosealicense.com/licenses/gpl-2.0/) 7 | 8 | # Grepolis2Bot 9 | Bot for the browsergame [Grepolis 2](http://en.grepolis.com/) written in C#. The user guide explaining all the features of the bot can be found here: 10 | http://bots.uthar.nl/155/grepolis-2-bot-guide 11 | 12 | ## Directories 13 | GrepolisBot2: Main project. 14 | GrepBuildings: Custom .NET control used by Grepolis2Bot. 15 | GrepCulture: Custom .NET control used by Grepolis2Bot. 16 | GrepFarmers: Custom .NET control used by Grepolis2Bot. 17 | GrepSchedulerSmall: Custom .NET control used by Grepolis2Bot. 18 | GrepUnits: Custom .NET control used by Grepolis2Bot. 19 | 20 | ## Development 21 | Most of the important methods are commented, however if you are missing some comments or want me to extend some of them, let me know. In the next section you'll find sequence diagrams to clarify some processes. 22 | 23 | ### Sequence Diagrams 24 | Simplified diagram of the login process including the first server request used to get basic information about your towns. 25 | ![Sequence diagram login](http://i58.tinypic.com/1zml64p.png) 26 | 27 | 28 | 29 | 30 | 31 | --------------------------------------------------------------------------------