lib/travian_bot/application.rb in travian_bot-0.2.4 vs lib/travian_bot/application.rb in travian_bot-0.3.0
- old
+ new
@@ -14,18 +14,23 @@
# Is executed by the travinbot shell script.
def run!(*arguments)
h1('Welcome to your TravianBot')
@game = login
- current_building_queue
- current_troop_movements
- current_avaible_buildings
+ #current_building_queue
+ #current_troop_movements
+ #current_avaible_buildings
h2('Custom actions actions')
- text 'closest_adventure'
- command = gets
- start_closest_adventure @game if command == 'closest_adventure'
+ text '1 => closest_adventure'
+ new_line
+
+ command = gets.chomp
+ if '1'.eql?(command)
+ h2 'Start the closest adventure'
+ puts start_closest_adventure(@game)
+ end
@game.quit
return 1
end
@@ -36,10 +41,11 @@
buildings.each do |building|
text building.to_s
end
new_line
+ sleep(3)
end
def current_building_queue
@game ||= login
h2('Current building queue')
@@ -51,10 +57,11 @@
buildings.each do |building|
text building.to_s
end
end
new_line
+ sleep(3)
end
def current_troop_movements
@game ||= login
h2('Current troop movement')
@@ -66,9 +73,10 @@
troops.each do |troop|
text troop.to_s
end
end
new_line
+ sleep(3)
end
end
end
end