#!/bin/bash ###################################################################### # Artemis Nebula MkClicks script, (C) 2015-2020 Nosey Nick Waterman, # https://noseynick.org/artemis/nebula/ # All wrong righted, all rights reserved. Licensed under thev GNU # Affero General Public License v3.0 https://www.gnu.org/licenses/agpl.txt # with Commons Clause https://commonsclause.com/ v1.0 ###################################################################### banner Making click utils # shellcheck disable=SC1090 # Don't need to parse when shellchecking: . ~/bin/conf.sh nebula mkclick # eval $(xdotool search "Game Window" getwindowgeometry --shell) # and calculate these relative to $WIDTH, $HEIGHT where appropriate # see screenshots/*.png ++++++++++++++++++++++++++++++++++++++++++++++++++ # 13,527 - 207,561 on nebula (+8+27) # 5,500 - 200,535 av 102,517 windo @1280x700: # ~ 167,599 in gimp (+65+82) mkclick SERVER 100 560 # "Start Server" button # 900,70 - 1220,101 av 1060,85 windo @1280x700: mkclick game-solo 1000 110 # 900,154 - 1220,185 av 1060,170 windo @1280x700: mkclick game-pvp 1000 200 # 900,238 - 1220,269 av 1060,253 windo @1280x700: mkclick game-coop 1000 280 # 900,322 - 1220,353 av 1060,337 windo @1280x700: mkclick game-scripted 1000 370 ###################################################################### # ASSUMING SOLO: mkpair () { # given y coord, make a PAIR of buttons for the -/+: # 900-931 av 915 windo @1280x700: mkclick "$1-" 930 "$2" # 1189-1220 av 1204 windo @1280x700: mkclick "$1+" 1210 "$2" } # remember you begin on level1, so click 7x for level8: # 110-141 av 125 windo @1280x700: mkpair level 150 # Diff level # Seige > SingFront > DblFront > DeepStrike > Peace > BorderWar* > Infest # BUT BorderWar mucks up other buttons: # 151-182 av 166 windo @1280x700: mkpair type 200 # Scenario ++++++++++++++++++++++++++++++++++++++++ # default NONE. click + for few/some/lots/many (or terrain- for many): # 212-243 av 227 mkpair terrain 255 # 246-277 av 261 mkpair lethal 290 # lethal terrain # 280-311 av 295 mkpair friendly 325 # Friendly Ships # 314-345 av 329 mkpair monsters 360 # 348-379 av 363 mkpair anomalies 395 mkclick time+10 1075 430 mkclick time+ 1105 430 mkclick time-10 1075 485 mkclick time- 1105 485 mkclick custom 1000 454 # BUT you're on your own after that! mkclick start 1200 700 # start game mkclick endsim 250 180 sleep 0.2 key --delay 200 Escape case "$NAME" in 275*|276*|277*|278*|279*|28*|29*) # future-proofing ;-) mkclick AI 250 180 sleep 0.2 \ keydown --delay 200 ctrl+alt key --delay 200 a keyup --delay 200 ctrl+alt;; *) mkclick AI 250 180 sleep 0.2 key --delay 200 e ;; esac # mkclick pause 250 140 # BUT NEED TO HIT ESC FIRST mkclick endgame 1200 700 # end game mkclick quit 100 700 click --delay 100 1 sleep 0.2 # Back / Exit to windows (may need click-quit twice) mkclick FPS 250 180 sleep 0.2 \ keydown --delay 200 alt key --delay 200 f keyup alt nebula ManyManyMany nebula test11