Guest User

ScareCrow Alternative Mod

a guest
Dec 26th, 2014
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.41 KB | None | 0 0
  1. using System;
  2. using System.Windows.Forms;
  3. using System.Threading;
  4. using System.Collections.Generic;
  5. using ArcheBuddy.Bot.Classes;
  6.  
  7. namespace ScarecrowAlternative {
  8. public class ScarecrowAlternative : Core {
  9.  
  10. public void PluginRun() {
  11.  
  12.  
  13. // Activate an infinite loop (true: activate, false: deactivate)
  14. bool UseLoop = true;
  15. // How long to wait after each loop in ms (milliseconds)
  16. Random random = new Random();
  17. var mseconds = random.Next(240, 300) * 1000;
  18. var seconds = mseconds / 1000;
  19. int LoopTime = mseconds;
  20.  
  21. InitItemsList();
  22.  
  23. // SetPlantAlgoritm(PlantAlgoritm.Randomized;
  24. SetPlantAlgoritm(PlantAlgoritm.MaxPerfomance);
  25.  
  26.  
  27. // Create one or multiple group of farm
  28. // Just replace the "11111" with your Farm ID
  29. // Use the Scarecrow plugin to quickly find your Farm ID
  30. // Example:
  31.  
  32. List<uint> TreeFarmGroup = new List<uint>();
  33. TreeFarmGroup.Add(11111); //Thatched
  34. TreeFarmGroup.Add(11111); //Gweonid
  35.  
  36. List<uint> NoTreeFarmGroup = new List<uint>();
  37. NoTreeFarmGroup.Add(11111); //Thatched
  38. NoTreeFarmGroup.Add(11111); //Solz
  39. NoTreeFarmGroup.Add(11111); //Small
  40. //NoTreeFarmGroup.Add(11111); //Gweonid
  41. //NoTreeFarmGroup.Add(11111);
  42.  
  43. List<uint> AnimalFarmGroup = new List<uint>();
  44. AnimalFarmGroup.Add(11111); //Solz
  45. //AnimalFarmGroup.Add(11111); //Gweonid
  46. //AnimalFarmGroup.Add(11111);
  47.  
  48. // Create one or multiple groups of item to collect/plant.
  49. // Just enter the name of the item that are added at the bottom of this file under each group.
  50. // Take notice that you can't mix Plant/Tree with Animals so use seperate groups.
  51. // Also note, the first item you add will be the first item that will get processed.
  52.  
  53. //Tree Group - NO PLANTS
  54. List<object> TreeItemGroup = new List<object>();
  55. TreeItemGroup.Add(OliveTree);
  56. //TreeItemGroup.Add(BarleyBundle);
  57.  
  58.  
  59. //No Tree Group - PLANTS ONLY
  60. List<object> NoTreeItemGroup = new List<object>();
  61.  
  62. //Gathering
  63. NoTreeItemGroup.Add(Azalea);
  64. NoTreeItemGroup.Add(Clover);
  65. NoTreeItemGroup.Add(Cornflower);
  66. NoTreeItemGroup.Add(Cotton);
  67. NoTreeItemGroup.Add(Iris);
  68. NoTreeItemGroup.Add(Lavender);
  69. NoTreeItemGroup.Add(Lily);
  70. NoTreeItemGroup.Add(Lotus);
  71. NoTreeItemGroup.Add(Mushroom);
  72. NoTreeItemGroup.Add(Narcissus);
  73. NoTreeItemGroup.Add(Rose);
  74. NoTreeItemGroup.Add(Rosemary);
  75. NoTreeItemGroup.Add(Sunflower);
  76. NoTreeItemGroup.Add(Thistle);
  77.  
  78. //Farming
  79. NoTreeItemGroup.Add(Barley);
  80. NoTreeItemGroup.Add(Carrot);
  81. NoTreeItemGroup.Add(Corn);
  82. NoTreeItemGroup.Add(Cucumber);
  83. NoTreeItemGroup.Add(Garlic);
  84. NoTreeItemGroup.Add(Onion);
  85. NoTreeItemGroup.Add(Potato);
  86. NoTreeItemGroup.Add(Pumpkin);
  87. NoTreeItemGroup.Add(Quinoa);
  88. NoTreeItemGroup.Add(Rice);
  89. NoTreeItemGroup.Add(Strawberry);
  90. NoTreeItemGroup.Add(Tomato);
  91. NoTreeItemGroup.Add(Wheat);
  92. NoTreeItemGroup.Add(Yam);
  93.  
  94.  
  95. //Animal Item Group - ANIMALS ONLY
  96. List<object> AnimalItemGroup = new List<object>();
  97. AnimalItemGroup.Add(DuckCage);
  98. AnimalItemGroup.Add(ChickenCoop);
  99.  
  100.  
  101. bool StopLoop = false;
  102.  
  103.  
  104. while (!StopLoop) {
  105.  
  106.  
  107. ClearLogs();
  108.  
  109. // Farming Log
  110. // This is where I get a starting count of the seeds and gathered items I currently have in my inventory.
  111. // After a count has been done, it posts the results to the log window.
  112. // There must be a new line for each item for now, working on consolidation.
  113.  
  114. var itemStart1 = itemCount("Barley Seed");
  115. var itemStart2 = itemCount("Barley");
  116. var itemStart3 = itemCount("Rice Seed");
  117. var itemStart4 = itemCount("Rice");
  118. var itemStart5 = itemCount("Garlic Seed");
  119. var itemStart6 = itemCount("Garlic");
  120. var itemStart7 = itemCount("Raw Goose Meat");
  121. var itemStart8 = itemCount("Raw Duck Meat");
  122. var itemStart9 = itemCount("Raw Chicken");
  123. var itemStart10 = itemCount("Olive Sapling");
  124. var itemStart11 = itemCount("Olive");
  125. var itemStart12 = itemCount("Ground Grain");
  126. var itemStart13 = itemCount("Fresh Fertilizer");
  127. var itemStart14 = itemCount("Egg");
  128.  
  129. Log("Starting Barley Seed: " + itemStart1);
  130. Log("Starting Barley: " + itemStart2);
  131. Log("Starting Rice Seed: " + itemStart3);
  132. Log("Starting Rice: " + itemStart4);
  133. Log("Starting Garlic Seed: " + itemStart5);
  134. Log("Starting Garlic: " + itemStart6);
  135. Log("Starting Raw Goose Meat: " + itemStart7);
  136. Log("Starting Raw Duck Meat: " + itemStart8);
  137. Log("Starting Raw Chicken: " + itemStart9);
  138. Log("Starting Olive Sapling: " + itemStart10);
  139. Log("Starting Olive: " + itemStart11);
  140. Log("Starting Ground Grain: " + itemStart12);
  141. Log("Starting Fresh Fertilizer " + itemStart13);
  142. Log("Starting Egg: " + itemStart14);
  143.  
  144.  
  145. // This is where you set which item to collect using in each of your groups set up above.
  146. // Use CollectItems for Plants and regular, non-fruit Trees, and CollectAnimals for Animals and Fruit Trees
  147.  
  148. //Animals
  149. CollectAnimals(AnimalFarmGroup, AnimalItemGroup);
  150. PlantAnimals(AnimalFarmGroup, AnimalItemGroup);
  151.  
  152. //Fruit Trees
  153. CollectAnimals(TreeFarmGroup, TreeItemGroup);
  154. PlantAnimals(TreeFarmGroup, TreeItemGroup);
  155.  
  156. //All other plants
  157. CollectItems(NoTreeFarmGroup, NoTreeItemGroup);
  158. PlantItems(NoTreeFarmGroup, NoTreeItemGroup);
  159.  
  160. Log("End of loop.");
  161.  
  162. // This is the second portion of the Used/Gathered Log.
  163. // Here we get the ending values of the seeds and gathered items in our inventory and calulate the difference.
  164.  
  165. var itemEnd1 = itemCount("Barley Seed");
  166. var itemEnd2 = itemCount("Barley");
  167. var itemEnd3 = itemCount("Rice Seed");
  168. var itemEnd4 = itemCount("Rice");
  169. var itemEnd5 = itemCount("Garlic Seed");
  170. var itemEnd6 = itemCount("Garlic");
  171. var itemEnd7 = itemCount("Raw Goose Meat");
  172. var itemEnd8 = itemCount("Raw Duck Meat");
  173. var itemEnd9 = itemCount("Raw Chicken");
  174. var itemEnd10 = itemCount("Olive Sapling");
  175. var itemEnd11 = itemCount("Olive");
  176. var itemEnd12 = itemCount("Ground Grain");
  177. var itemEnd13 = itemCount("Fresh Fertilizer");
  178. var itemEnd14 = itemCount("Egg");
  179.  
  180. //After the calulation has been done, we post the results to the log.
  181. var used1 = itemStart1 - itemEnd1;
  182. var used2 = itemEnd2 - itemStart2;
  183. var used3 = itemStart3 - itemEnd3;
  184. var used4 = itemEnd4 - itemStart4;
  185. var used5 = itemStart5 - itemEnd5;
  186. var used6 = itemEnd6 - itemStart6;
  187. var used7 = itemEnd7 - itemStart7;
  188. var used8 = itemEnd8 - itemStart8;
  189. var used9 = itemEnd9 - itemStart9;
  190. var used10 = itemStart10 - itemEnd10;
  191. var used11 = itemEnd11 - itemStart11;
  192. var used12 = itemStart12 - itemEnd12;
  193. var used13 = itemEnd13 - itemStart13;
  194. var used14 = itemEnd14 - itemStart14;
  195.  
  196. Log("Barley Seed Used: " + used1);
  197. Log("Barley Gathered: " + used2);
  198. Log("Rice Seed Used: " + used3);
  199. Log("Rice Gathered: " + used4);
  200. Log("Garlic Seed Used: " + used5);
  201. Log("Garlic Gathered: " + used6);
  202. Log("Raw Goose Meat Gathered: " + used7);
  203. Log("Raw Duck Meat Gathered: " + used8);
  204. Log("Raw Chicken Gathered: " + used9);
  205. Log("Olive Sapling Used: " + used10);
  206. Log("Olive Gathered: " + used11);
  207. Log("Ground Grain Used: " + used12);
  208. Log("Fresh Fertilizer Gathered: " + used13);
  209. Log("Egg Gathered: " + used14);
  210.  
  211.  
  212. // Here is the Anti-AFK section.
  213. // The length of the AFK is determined above, in the LoopTime section.
  214. Log("Running Anti-AFK.");
  215. UpdateNoAfkState();
  216. Turn(0.5);
  217. Log("Waiting for " + seconds.ToString() + " seconds.");
  218.  
  219.  
  220. if (UseLoop) {
  221. Thread.Sleep(LoopTime);
  222.  
  223. } else {
  224. StopLoop = true;
  225. }
  226.  
  227. }
  228.  
  229. }
  230.  
  231. // Here is the section where we tell the program all of the variables it will be using.
  232. // Each line here is our different Trees, Cages, Plants, Etc.
  233. // If you want to add a new item to gather/plant first create a new List<string> here.
  234. // For example, if you want to add Aspen, you would add this line:
  235. // public List<string> Aspen = new List<string>();
  236.  
  237. // Trees
  238. public List<string> Pine = new List<string>();
  239. public List<string> Cedar = new List<string>();
  240. public List<string> MapleWoodlot = new List<string>();
  241.  
  242. // Gathering
  243. public List<string> Azalea = new List<string>();
  244. public List<string> Clover = new List<string>();
  245. public List<string> Cornflower = new List<string>();
  246. public List<string> Cotton = new List<string>();
  247. public List<string> Iris = new List<string>();
  248. public List<string> Lavender = new List<string>();
  249. public List<string> Lily = new List<string>();
  250. public List<string> Lotus = new List<string>();
  251. public List<string> Mushroom = new List<string>();
  252. public List<string> Narcissus = new List<string>();
  253. public List<string> Rose = new List<string>();
  254. public List<string> Rosemary = new List<string>();
  255. public List<string> Sunflower = new List<string>();
  256. public List<string> Thistle = new List<string>();
  257.  
  258. // Farming
  259.  
  260. public List<string> Barley = new List<string>();
  261. public List<string> Carrot = new List<string>();
  262. public List<string> Corn = new List<string>();
  263. public List<string> Cucumber = new List<string>();
  264. public List<string> Garlic = new List<string>();
  265. public List<string> Onion = new List<string>();
  266. public List<string> Potato = new List<string>();
  267. public List<string> Pumpkin = new List<string>();
  268. public List<string> Quinoa = new List<string>();
  269. public List<string> Rice = new List<string>();
  270. public List<string> Strawberry = new List<string>();
  271. public List<string> Tomato = new List<string>();
  272. public List<string> Wheat = new List<string>();
  273. public List<string> Yam = new List<string>();
  274.  
  275. //Bundles
  276. public List<string> BarleyBundle = new List<string>();
  277.  
  278. // Animals&FruitTrees
  279. public List<object> Sheep = new List<object>();
  280. public List<object> Turkey = new List<object>();
  281. public List<object> Hen = new List<object>();
  282. public List<object> ChickenCoop = new List<object>();
  283. public List<object> DuckCage = new List<object>();
  284. public List<object> OliveTree = new List<object>();
  285.  
  286. // This is the section where we tell the program exactly what it's looking for in the game.
  287. // Everything in this section must be exactly as seen in the game. For example: Use up to 2 Labor, is **NOT** the same as Use 2 Labor.
  288. // Take great care to check spelling, punctuation, and overall syntax while editing this section.
  289.  
  290. // Example for Aspen:
  291. // Aspen.Add("Aspen Tree"); (This is the name of the fully mature item)
  292. // Aspen.Add("Logging: Spend up to 20 Labor to chop down a tree."); (This is the action required to use the fully mature item)
  293. // Aspen.Add("Aspen Sapling") (This is the name of item that is used to plant our mature item)
  294. // Aspen.Add("Standart") (This is the motion type you want to use for this item, for plants, use "Standart", for bundles and cages, use "SnakeFromBorder")
  295.  
  296.  
  297. public void InitItemsList() {
  298. // Saplings
  299. Pine.Add("Pine Tree");
  300. Pine.Add("Logging: Spend up to 20 Labor to chop down a tree.");
  301. Pine.Add("Pine Sapling");
  302. Pine.Add("Standart");
  303.  
  304. Cedar.Add("Cedar Tree");
  305. Cedar.Add("Logging: Spend up to 10 Labor to chop down a tree.");
  306. Cedar.Add("Cedar Sapling");
  307. Cedar.Add("Standart");
  308.  
  309.  
  310. // Woodlot
  311. MapleWoodlot.Add("Maple Woodlot");
  312. MapleWoodlot.Add("Logging: Spend up to 200 Labor to chop down a tree.");
  313. MapleWoodlot.Add("Maple Woodlot");
  314. MapleWoodlot.Add("SnakeFromBorder");
  315.  
  316.  
  317. // Gathering
  318. Azalea.Add("Azalea");
  319. Azalea.Add("Gathering: Spend 1 Labor to gather materials.");
  320. Azalea.Add("Rose Seed");
  321. Azalea.Add("Standart");
  322.  
  323. Clover.Add("Clover");
  324. Clover.Add("Gathering: Spend 1 Labor to gather materials.");
  325. Clover.Add("Clover Seed");
  326. Clover.Add("Standart");
  327.  
  328. Cornflower.Add("Cornflower");
  329. Cornflower.Add("Gathering: Spend up to 2 Labor to gather materials.");
  330. Cornflower.Add("Cornflower Seed");
  331. Cornflower.Add("Standart");
  332.  
  333. Cotton.Add("Cotton");
  334. Cotton.Add("Gathering: Spend up to 2 Labor to gather materials.");
  335. Cotton.Add("Cotton Seed");
  336. Cotton.Add("Standart");
  337.  
  338. Iris.Add("Iris");
  339. Iris.Add("Gathering: Spend 1 Labor to gather materials.");
  340. Iris.Add("Iris Seed");
  341. Iris.Add("Standart");
  342.  
  343. Lavender.Add("Lavender");
  344. Lavender.Add("Gathering: Spend 1 Labor to gather materials.");
  345. Lavender.Add("Lavender Seed");
  346. Lavender.Add("Standart");
  347.  
  348. Lily.Add("Lily");
  349. Lily.Add("Gathering: Spend up to 2 Labor to gather materials.");
  350. Lily.Add("Lily Seed");
  351. Lily.Add("Standart");
  352.  
  353. Lotus.Add("Lotus");
  354. Lotus.Add("Gathering: Spend up to 2 Labor to gather materials.");
  355. Lotus.Add("Lotus Seed");
  356. Lotus.Add("Standart");
  357.  
  358. Mushroom.Add("Mushroom");
  359. Mushroom.Add("Gathering: Spend 1 Labor to gather materials.");
  360. Mushroom.Add("Mushroom Spore");
  361. Mushroom.Add("Standart");
  362.  
  363. Narcissus.Add("Narcissus");
  364. Narcissus.Add("Gathering: Spend 1 Labor to gather materials.");
  365. Narcissus.Add("Narcissus Seed");
  366. Narcissus.Add("Standart");
  367.  
  368. Rose.Add("Rose");
  369. Rose.Add("Gathering: Spend 1 Labor to gather materials.");
  370. Rose.Add("Rose Seed");
  371. Rose.Add("Standart");
  372.  
  373. Rosemary.Add("Rosemary");
  374. Rosemary.Add("Gathering: Spend up to 2 Labor to gather materials.");
  375. Rosemary.Add("Rosemary Seed");
  376. Rosemary.Add("Standart");
  377.  
  378. Sunflower.Add("Sunflower");
  379. Sunflower.Add("Gathering: Spend up to 3 Labor to gather materials.");
  380. Sunflower.Add("Sunflower Seed");
  381. Sunflower.Add("Standart");
  382.  
  383. Thistle.Add("Thistle");
  384. Thistle.Add("Gathering: Spend 1 Labor to gather materials.");
  385. Thistle.Add("Thistle Seed");
  386. Thistle.Add("Standart");
  387.  
  388.  
  389. // Farming
  390. Barley.Add("Barley");
  391. Barley.Add("Farming: Spend 1 Labor to harvest crops.");
  392. Barley.Add("Barley Seed");
  393. Barley.Add("Standart");
  394.  
  395. Carrot.Add("Carrot");
  396. Carrot.Add("Farming: Spend 1 Labor to harvest crops.");
  397. Carrot.Add("Carrot Seed");
  398. Carrot.Add("Standart");
  399.  
  400. Corn.Add("Corn");
  401. Corn.Add("Farming: Spend 1 Labor to harvest crops.");
  402. Corn.Add("Corn Seed");
  403. Corn.Add("Standart");
  404.  
  405. Cucumber.Add("Cucumber");
  406. Cucumber.Add("Farming: Spend 1 Labor to harvest crops.");
  407. Cucumber.Add("Cucumber Seed");
  408. Cucumber.Add("Standart");
  409.  
  410. Garlic.Add("Garlic");
  411. Garlic.Add("Farming: Spend up to 2 Labor to harvest crops.");
  412. Garlic.Add("Garlic Seed");
  413. Garlic.Add("Standart");
  414.  
  415. Onion.Add("Onion");
  416. Onion.Add("Farming: Spend 1 Labor to harvest crops.");
  417. Onion.Add("Onion Seed");
  418. Onion.Add("Standart");
  419.  
  420. Potato.Add("Potato");
  421. Potato.Add("Farming: Spend 1 Labor to harvest crops.");
  422. Potato.Add("Potato Seed");
  423. Potato.Add("Standart");
  424.  
  425. Pumpkin.Add("Pumpkin");
  426. Pumpkin.Add("Farming: Spend up to 2 Labor to harvest crops.");
  427. Pumpkin.Add("Pumpkin Seed");
  428. Pumpkin.Add("Standart");
  429.  
  430. Quinoa.Add("Quinoa");
  431. Quinoa.Add("Farming: Spend up to 3 Labor to harvest crops.");
  432. Quinoa.Add("Quinoa Seed");
  433. Quinoa.Add("Standart");
  434.  
  435. Rice.Add("Rice Plant");
  436. Rice.Add("Farming: Spend 1 Labor to harvest crops.");
  437. Rice.Add("Rice Seed");
  438. Rice.Add("Standart");
  439.  
  440. Strawberry.Add("Strawberry");
  441. Strawberry.Add("Farming: Spend up to 2 Labor to harvest crops.");
  442. Strawberry.Add("Strawberry Seed");
  443. Strawberry.Add("Standart");
  444.  
  445. Tomato.Add("Tomato");
  446. Tomato.Add("Farming: Spend up to 2 Labor to harvest crops.");
  447. Tomato.Add("Tomato Seed");
  448. Tomato.Add("Standart");
  449.  
  450. Wheat.Add("Wheat");
  451. Wheat.Add("Farming: Spend up to 2 Labor to harvest crops.");
  452. Wheat.Add("Wheat Seed");
  453. Wheat.Add("Standart");
  454.  
  455. Yam.Add("Yam");
  456. Yam.Add("Farming: Spend up to 2 Labor to harvest crops.");
  457. Yam.Add("Yam Seed");
  458. Yam.Add("Standart");
  459.  
  460. //Bundles
  461. BarleyBundle.Add("Barley Bundle");
  462. BarleyBundle.Add("Farming: Spend 10 Labor to harvest crops.");
  463. BarleyBundle.Add("Barley Seed Bundle");
  464. BarleyBundle.Add("Standart");
  465.  
  466. //FruitTrees
  467.  
  468. // Make sure all your FruitTrees have a "Plant" List<string>, even if you don't need to plant that Tree. Otherwise it will break the collect and plant function.
  469. // create new List<String> to hold the planting information
  470. List<string> PlantOliveSapling = new List<string>();
  471. List<string> DyingOliveTree = new List<string>();
  472. List<string> FruitedOliveTree = new List<string>();
  473. // add the item name you are planting planting FIRST (yes the order is important)
  474. PlantOliveSapling.Add("Olive Sapling");
  475. // add planting algorithm SECOND (yes the order is important)
  476. PlantOliveSapling.Add("Standart");
  477. DyingOliveTree.Add("Dying Olive Tree");
  478. DyingOliveTree.Add("Gathering: Spend up to 15 Labor to gather fruit.");
  479. FruitedOliveTree.Add("Fruited Olive Tree");
  480. FruitedOliveTree.Add("Gathering: Spend up to 15 Labor to gather fruit.");
  481. // always add the "Plant" List<string> first or the PlantAnimals/CollectAnimals function won't work
  482. OliveTree.Add(PlantOliveSapling);
  483. OliveTree.Add(DyingOliveTree);
  484. OliveTree.Add(FruitedOliveTree);
  485.  
  486. // Livestock
  487. // Make sure all your Animal Object have a "Plant" List<string>, even if you don't need to plant that animal. Otherwise it will break the collect and plant function.
  488. // create new List<String> to hold the planting information
  489. List<string> PlantSheep = new List<string>();
  490. List<string> DiseasedSheep = new List<string>();
  491. List<string> HungrySheep = new List<string>();
  492. List<string> DyingSheep = new List<string>();
  493. List<string> NormalSheep = new List<string>();
  494. List<string> ThrivingSheep = new List<string>();
  495. // add the item name your planting FIRST (yes the order is important)
  496. PlantSheep.Add("Lamb");
  497. // add planting algorithm SECOND (yes the order is important)
  498. PlantSheep.Add("Standart");
  499. DiseasedSheep.Add("Diseased Sheep");
  500. DiseasedSheep.Add("Husbandry: Spend 3 Labor and 1 Livestock Supplement to treat sick livestock.");
  501. HungrySheep.Add("Hungry Sheep");
  502. HungrySheep.Add("Husbandry: Spend 2 Labor and 1 Combined Feed to feed livestock.");
  503. NormalSheep.Add("Sheep");
  504. NormalSheep.Add("Husbandry: Spend 2 Labor and 1 Combined Feed to feed livestock.");
  505. ThrivingSheep.Add("Thriving Sheep");
  506. ThrivingSheep.Add("Husbandry: Spend up to 10 Labor to shear livestock.");
  507. DyingSheep.Add("Dying Sheep");
  508. DyingSheep.Add("Husbandry: Spend up to 10 Labor to shear livestock.");
  509. Sheep.Add(PlantSheep);
  510. Sheep.Add(DiseasedSheep);
  511. Sheep.Add(HungrySheep);
  512. Sheep.Add(DyingSheep);
  513. Sheep.Add(NormalSheep);
  514. Sheep.Add(ThrivingSheep);
  515.  
  516. List<string> PlantTurkey = new List<string>();
  517. List<string> NormalTurkey = new List<string>();
  518. List<string> ThrivingTurkey = new List<string>();
  519. PlantTurkey.Add("Turkey Chick");
  520. PlantTurkey.Add("Standart");
  521. NormalTurkey.Add("Turkey");
  522. NormalTurkey.Add("Husbandry: Spend 1 Labor and 1 Ground Grain to feed livestock.");
  523. ThrivingTurkey.Add("Thriving Turkey");
  524. ThrivingTurkey.Add("Husbandry: Spend up to 10 Labor to butcher livestock.");
  525. Turkey.Add(PlantTurkey);
  526. Turkey.Add(NormalTurkey);
  527. Turkey.Add(ThrivingTurkey);
  528.  
  529. List<string> PlantHen = new List<string>();
  530. List<string> NormalHen = new List<string>();
  531. List<string> ThrivingHen = new List<string>();
  532. PlantHen.Add("Chick");
  533. PlantHen.Add("Standart");
  534. NormalHen.Add("Hen");
  535. NormalHen.Add("Husbandry: Spend 1 Labor and 1 Ground Grain to feed livestock.");
  536. ThrivingHen.Add("Thriving Hen");
  537. ThrivingHen.Add("Husbandry: Spend up to 5 Labor to gather eggs.");
  538. Hen.Add(PlantHen);
  539. Hen.Add(NormalHen);
  540. Hen.Add(ThrivingHen);
  541.  
  542. List<string> PlantChickenCoop = new List<string>();
  543. List<string> CollapsedChickenCoop = new List<string>();
  544. List<string> BrokenChickenCoop = new List<string>();
  545. List<string> SickChickenCoop = new List<string>();
  546. List<string> HungryChickenCoop = new List<string>();
  547. List<string> DyingChickenCoop = new List<string>();
  548. List<string> NormalChickenCoop = new List<string>();
  549. List<string> ThrivingChickenCoop = new List<string>();
  550. PlantChickenCoop.Add("Small Bamboo Coop");
  551. PlantChickenCoop.Add("SnakeFromBorder");
  552. CollapsedChickenCoop.Add("Collapsed Bamboo Coop");
  553. CollapsedChickenCoop.Add("Husbandry: Spend 50 Labor to butcher livestock. The fences will collapse completely afterwards.");
  554. BrokenChickenCoop.Add("Broken Chicken Coop");
  555. BrokenChickenCoop.Add("Repair the cage with 5 Labor and 2 Bamboo Stalks.");
  556. SickChickenCoop.Add("Sick Chicken Coop");
  557. SickChickenCoop.Add("Husbandry: Spend 15 Labor and 5 Livestock Supplements to treat sick livestock.");
  558. HungryChickenCoop.Add("Hungry Chicken Coop");
  559. HungryChickenCoop.Add("Husbandry: Spend 1 Labor and 3 Ground Grain to feed livestock.");
  560. NormalChickenCoop.Add("Small Chicken Coop");
  561. NormalChickenCoop.Add("Husbandry: Spend 1 Labor and 3 Ground Grain to feed livestock.");
  562. ThrivingChickenCoop.Add("Thriving Chicken Coop");
  563. ThrivingChickenCoop.Add("Husbandry: Spend up to 20 Labor to collect eggs from the cage. Has a low chance of completely shattering the cage.");
  564. DyingChickenCoop.Add("Dying Chicken Coop");
  565. DyingChickenCoop.Add("Husbandry: Spend up to 10 Labor to butcher livestock.");
  566. ChickenCoop.Add(PlantChickenCoop);
  567. ChickenCoop.Add(CollapsedChickenCoop);
  568. ChickenCoop.Add(BrokenChickenCoop);
  569. ChickenCoop.Add(SickChickenCoop);
  570. ChickenCoop.Add(HungryChickenCoop);
  571. ChickenCoop.Add(DyingChickenCoop);
  572. ChickenCoop.Add(NormalChickenCoop);
  573. ChickenCoop.Add(ThrivingChickenCoop);
  574.  
  575. List<string> PlantDuckCage = new List<string>();
  576. List<string> BrokenDuckCage = new List<string>();
  577. List<string> DiseasedDuckCage = new List<string>();
  578. List<string> HungryDuckCage = new List<string>();
  579. List<string> DyingDuckCage = new List<string>();
  580. List<string> NormalDuckCage = new List<string>();
  581. List<string> ThrivingDuckCage = new List<string>();
  582. PlantDuckCage.Add("Bamboo Duck Cage");
  583. PlantDuckCage.Add("SnakeFromBorder");
  584. BrokenDuckCage.Add("Broken Duck Cage");
  585. BrokenDuckCage.Add("Repair the cage with 5 Labor and 2 Bamboo Stalks.");
  586. DiseasedDuckCage.Add("Diseased Duck Cage");
  587. DiseasedDuckCage.Add("Husbandry: Spend 15 Labor and 5 Livestock Supplements to treat sick livestock.");
  588. HungryDuckCage.Add("Hungry Duck Cage");
  589. HungryDuckCage.Add("Husbandry: Spend 1 Labor and 3 Ground Grain to feed livestock.");
  590. NormalDuckCage.Add("Small Duck Cage");
  591. NormalDuckCage.Add("Husbandry: Spend 1 Labor and 3 Ground Grain to feed livestock.");
  592. ThrivingDuckCage.Add("Thriving Duck Cage");
  593. ThrivingDuckCage.Add("Husbandry: Spend up to 35 Labor to collect feathers from the cage. Has a low chance of shattering the cage completely.");
  594. DyingDuckCage.Add("Dying Duck Cage");
  595. DyingDuckCage.Add("Husbandry: Spend up to 10 Labor to butcher livestock.");
  596. DuckCage.Add(PlantDuckCage);
  597. DuckCage.Add(BrokenDuckCage);
  598. DuckCage.Add(DiseasedDuckCage);
  599. DuckCage.Add(HungryDuckCage);
  600. DuckCage.Add(DyingDuckCage);
  601. DuckCage.Add(NormalDuckCage);
  602. DuckCage.Add(ThrivingDuckCage);
  603. }
  604.  
  605. // Here is the function used to gather our Farming/Gathering items.
  606. public void CollectItems(List<uint> Scarecrow, List<object> Items) {
  607. foreach (uint f in Scarecrow) {
  608. Log("Farm ID: " + f);
  609. foreach (List<string> s in Items) {
  610. Log("-> Collect " + s[0]);
  611. CollectItemsAtFarm(s[0], s[1], f);
  612. }
  613. }
  614. }
  615.  
  616. // Here is the function used to gather our Animals and Fruit Trees.
  617. public void CollectAnimals(List<uint> Scarecrow, List<object> Items) {
  618. foreach (uint f in Scarecrow) {
  619. Log("Farm ID: " + f);
  620. foreach (List<object> o in Items) {
  621. foreach(List<string> s in o) {
  622. // Skip the "Plant" List<string>
  623. if (s != o[0]) {
  624. Log("-> Collect " + s[0]);
  625. CollectItemsAtFarm(s[0], s[1], f);
  626. }
  627. }
  628. }
  629. }
  630. }
  631.  
  632. // Here is the function used to plant our Animals and Fruit Trees.
  633. public void PlantAnimals(List<uint> Scarecrow, List<object> Items) {
  634. foreach (uint f in Scarecrow) {
  635. Log("Farm ID: " + f);
  636. foreach (List<object> o in Items) {
  637. foreach(List<string> s in o) {
  638. // It will only process the first List<string> in the List<object> and ignore the others hence why it's important to add the "Plant" List<string> first.
  639. if (s == o[0]) {
  640. if (s[1] == "SnakeFromBorder") {
  641. SetPlantMotionType(PlantMotionType.SnakeFromBorder);
  642. } else if (s[1] == "Standart") {
  643. SetPlantMotionType(PlantMotionType.Standart);
  644. } else if (s[1] == "SnakeFromCenter") {
  645. SetPlantMotionType(PlantMotionType.SnakeFromCenter);
  646. } else if (s[1] == "SecondStandart") {
  647. SetPlantMotionType(PlantMotionType.SecondStandart);
  648. }
  649. Log("-> Plant " + s[0]);
  650. PlantItemsAtFarm(s[0], f);
  651. }
  652. }
  653. }
  654. }
  655. }
  656.  
  657. //Here is the function used to plant our Farmed/Gathered seeds.
  658. public void PlantItems(List<uint> Scarecrow, List<object> Items) {
  659. foreach (uint f in Scarecrow) {
  660. Log("Farm ID: " + f);
  661. foreach (List<string> s in Items) {
  662. if (s[3] == "SnakeFromBorder") {
  663. SetPlantMotionType(PlantMotionType.SnakeFromBorder);
  664. } else if (s[3] == "Standart"){
  665. SetPlantMotionType(PlantMotionType.Standart);
  666. }
  667. Log("-> Plant " + s[2]);
  668. PlantItemsAtFarm(s[2], f);
  669. }
  670. }
  671. }
  672. }
  673. }
Advertisement
Add Comment
Please, Sign In to add comment