Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WoWObject untiled = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Untilled Soil"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if (untiled != null) {
- Log("Tilling soil...");
- untiled.Interact();
- Thread.Sleep(500);
- }
- WoWUnit tiled = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Tilled Soil"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if ( tiled != null) {
- Log("Planting seed...");
- tiled.Target();
- Thread.Sleep(100);
- Lua.DoString("UseItemByName(80591)");
- Thread.Sleep(100);
- }
- if ( tiled == null && untiled == null ) {
- WoWUnit parched = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Parched Scallions"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if ( parched != null ) {
- Log("Found Parched Scallions");
- parched.Target();
- Lua.DoString("UseItemByName(79104)");
- }
- WoWUnit growing = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Growing Scallions"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if ( growing!= null ) {
- Log("Found Growing Scallions");
- growing.Target();
- Lua.DoString("UseItemByName(89880)");
- Thread.Sleep(100);
- }
- WoWUnit wiggling = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Wiggling Scallions"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if ( wiggling!= null ) {
- Log("Found Wiggling Scallions");
- wiggling.Interact();
- Thread.Sleep(100);
- }
- WoWUnit alluring = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Alluring Scallions"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if ( alluring != null ) {
- Log("Found Alluring Scallions");
- alluring.Interact();
- Thread.Sleep(100);
- }
- WoWUnit infested = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Infested Scallions"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if ( infested != null ) {
- Log("Found Infested Scallions");
- infested.Target();
- Lua.DoString("UseItemByName(80513)");
- Thread.Sleep(100);
- }
- WoWUnit runty = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Runty Scallions"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if ( runty != null ) {
- Log("Found Runty Scallions");
- runty.Interact();
- Thread.Sleep(1000);
- WoWMovement.Move(WoWMovement.MovementDirection.JumpAscend);
- Thread.Sleep(300);
- WoWMovement.MoveStop(WoWMovement.MovementDirection.JumpAscend);
- }
- WoWUnit wild = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Wild Scallions"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if ( wild != null ) {
- Log("Found Wild Scallions");
- wild.Interact();
- do {
- Lua.DoString("CastPetAction(1)");
- Thread.Sleep(100);
- } while (Lua.GetReturnVal<bool>("return UnitUsingVehicle(\"player\")", 0));
- Thread.Sleep(300);
- }
- WoWUnit tangled = (from o in ObjectManager.GetObjectsOfType<WoWUnit>(true,true)
- where o.Name == "Tangled Scallions"
- orderby o.Distance ascending
- select o).FirstOrDefault();
- if ( tangled != null ) {
- Log("Found Tangled Scallions");
- tangled.Interact();
- Thread.Sleep(300);
- Navigator.MoveTo(new WoWPoint(-187.7984, 627.1614, 165.5227));
- Thread.Sleep(10000);
- Navigator.MoveTo(new WoWPoint(-173.2856, 640.6902, 165.4093));
- }
- }
Add Comment
Please, Sign In to add comment