Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: mac scripting: become a legendary thrower in twenty keys  (Read 2634 times)

numerobis

  • Bay Watcher
    • View Profile
mac scripting: become a legendary thrower in twenty keys
« on: February 26, 2008, 09:31:00 pm »

A script for the mac.  Usage: start your adventurer.  Leave town.  Drop everything.  Then stand on a pebble or peat or whatever -- something inexaustible that you can throw.  Then, set this script running, and come back in 15 minutes (the 2s delay per toss seems to be required: otherwise, it sometimes misses a key, and that is all sorts of bad).  Note: during those 15 minutes, you CANNOT USE YOUR COMPUTER.  Or, more precisely, you can't switch the window focus.

That said, you can select the terminal you're running the script from and ^c it without issue.  If I knew more applescript, I'd throw a check in there to quit if you change focus.

If the sandy loam is actually choice 'b' and choice 'a' is to set the tree on fire, change 'grabbable'.  If you want something short of legendary, reduce the 'legendary' variable.  I actually don't know how many tosses are needed; 300 isn't it (that's merely professional).

#! /usr/bin/osascript

set legendary to 400
set grabbable to "a"
set throwable to "a"
tell application "Dwarf Fortress"
 activate
 repeat legendary times
 tell application "System Events" to keystroke "g"
 tell application "System Events" to keystroke grabbable
 tell application "System Events" to keystroke "t"
 tell application "System Events" to keystroke throwable
 tell application "System Events" to key code 126
 tell application "System Events" to keystroke return
 delay 2
 end repeat
end tell

Logged

Cosmonot

  • Bay Watcher
    • View Profile
Re: mac scripting: become a legendary thrower in twenty keys
« Reply #1 on: February 26, 2008, 10:43:00 pm »

I think this should be in the Bug Reports forum. Although everyone knows about it already.

[ February 26, 2008: Message edited by: Cosmonot ]

Logged
Kobolds carry copper crossbows.

numerobis

  • Bay Watcher
    • View Profile
Re: mac scripting: become a legendary thrower in twenty keys
« Reply #2 on: February 26, 2008, 10:46:00 pm »

Oh please; it's not nearly as ridiculous as "pick nose" in Hero's Quest II.
Logged

umiman

  • Bay Watcher
  • Voice Fetishist
    • View Profile
Re: mac scripting: become a legendary thrower in twenty keys
« Reply #3 on: February 26, 2008, 11:55:00 pm »

quote:
Originally posted by benoit.hudson:
<STRONG>Oh please; it's not nearly as ridiculous as "pick nose" in Hero's Quest II.</STRONG>

Do tell. :P

numerobis

  • Bay Watcher
    • View Profile
Re: mac scripting: become a legendary thrower in twenty keys
« Reply #4 on: February 27, 2008, 12:52:00 am »

quote:
Originally posted by umiman:
<STRONG>
Do tell. :P</STRONG>

You could 'pick nose'.  It gave you lockpicking, strength, and dexterity.  If you did it while sneaking, you'd get sneaking and endurance.  So if you picked your nose a few hundred times, that made you invincible.

Logged

Ioric Kittencuddler

  • Bay Watcher
  • Multiclass Bard/Kitten trainer
    • View Profile
Re: mac scripting: become a legendary thrower in twenty keys
« Reply #5 on: February 27, 2008, 02:53:00 am »

Awesome...
Logged
Come see the MOST interesting Twitter account on the internet!  Mine!

Don't worry!  Be happy!  It's the law!

briktal

  • Bay Watcher
    • View Profile
Re: mac scripting: become a legendary thrower in twenty keys
« Reply #6 on: February 27, 2008, 09:53:00 am »

But, it was also possible to fail, resulting in your immediate death.
Logged

Slappy Moose

  • Bay Watcher
    • View Profile
Re: mac scripting: become a legendary thrower in twenty keys
« Reply #7 on: February 27, 2008, 10:16:00 am »

quote:
Originally posted by briktal:
<STRONG>But, it was also possible to fail, resulting in your immediate death.</STRONG>

Are you serious?

That game sounds awesome.

Logged
Zaneg Thazor: Armok Reincarnate Story http://www.bay12games.com/forum/index.php?topic=19291.msg196691#msg196691

[Healthcare Update Thread] Personally, I can't wait for doctors to get possessed and start surgically attaching axes to champion soldier's arms.

Hyperturtle

  • Bay Watcher
    • View Profile
Re: mac scripting: become a legendary thrower in twenty keys
« Reply #8 on: February 27, 2008, 11:01:00 am »

wasn't that the game where if you were stupid enough to walk in front of the dart board at the thieves guild, you got hit by a dart and died, and the game asks if perhaps its was a "fatal error"?
Logged
igless

Silveron

  • Bay Watcher
  • Arichect of Destruction
    • View Profile
Re: mac scripting: become a legendary thrower in twenty keys
« Reply #9 on: February 27, 2008, 12:19:00 pm »

quote:
Originally posted by Hyperturtle:
<STRONG>wasn't that the game where if you were stupid enough to walk in front of the dart board at the thieves guild, you got hit by a dart and died, and the game asks if perhaps its was a "fatal error"?</STRONG>

You might be thinking of "So you want to be a Hero?

Logged