Trying to teach meself a bit of programming. Since I already know a bit
of notetab light's script (from when I did my LP), I decided to use that. I
know it is horribly clunky compared to Python and other real languages,
but it allows easy file, text managing and interface with other proggies
without editing memory.
Proggy is just an autoroller that simulates keypresses. Its main function is
to allow autorolling wizard PC's until one gets a starting teleport book. I
*think* you can use it to search for any item, though I have only used it
for teleport books personally.
BEFORE RUNNING THIS SCRIPT, YOU MUST EDIT YOUR CFG FILE
The 'name' setting must be 'speedwiz' for script to work, other lines can
be changed to taste, but they must be set to SOMETHING for roller to work.
name = speedwiz
race = gray elf
class = wizard
sex = female
Questioned_Attributes = false
Of course you have to have Notetab Light installed. You must create a 'clip'
into which you can paste the script. Just right click in the left-hand panel
and chose 'new clip', paste, save it, then double click it. I don't have any
idea if it will work on PC's that have high security settings regarding what
programs can save/create/edit files. Actually, I don't have any idea if it
will work on other PC's at all, use it at yer own risk
EDIT: Currently, it only works with winbeta4. I had to impliment a few
delays in script execution to allow for application launching and such. On
slower computers these delays will need to be increased.
Code:
:StartRoller
^!Set %Warn%=^?[IF YOU HAVE NOT EDITED YOUR CFG, CHOSE CANCEL]
^!Set %Loops%=^?[how many rolls per run? recommend 5=5]
^!Set %Item%=^?[needed item=spellbook of Teleportation]
^!Set %Index%=0
^!Set %Path%=^?[(T=D)Adom_winbeta4.exe path=]
^!IfFileExist ^%Path%adom_dat\savedg\speedwiz.svg SaveExists ELSE LoopStart
:SaveExists
^!Continue speedwiz.svg file already exists. To delete it and run roller chose 'continue', else cancel to exit.
^!DeleteFile "^%Path%adom_dat\savedg\speedwiz.svg"
^!DeleteFile "^%Path%speedwiz.vlg"
:LoopStart
^!Inc %Index%
^!If ^%Index% > ^%Loops% EndLoop
:RollCharacter
^!ChDir "^%Path%"
^!Shell "^%Path%Adom_winbeta4.exe"
^!Delay 1
^!FocusApp "ADOM 1.1.1 (C) 1994-2002 by Thomas Biskup-Windows Beta 4"
^!KeyboardDelay 10
^!Keyboard # g s s+o +o +o )Sy #
:CheckForItem
^!Open "^%Path%speedwiz.vlg"
^!Find "^%Item%" CIWS
^!Set %ItemExists%=^$GetSelection$
^!If ^%ItemExists% <> "^%Item%" NoItem ELSE ItemFound
:ItemFound
^!Delay=10
^!Close "^%Path%speedwiz.vlg" Discard
^!Info item was found, character is saved as 'speedwiz'
^!Goto Exit
:NoItem
^!Delay 1
^!Close "^%Path%speedwiz.vlg" Discard
^!DeleteFile "^%Path%adom_dat\savedg\speedwiz.svg"
^!DeleteFile "^%Path%speedwiz.vlg"
^!GoTo LoopStart
:EndLoop
^!Continue Item wasn't found. Chose 'continue' to roll again, else cancel to exit.
^!Goto StartRoller
:EXIT