Page 1 of 6 12345 ... LastLast
Results 1 to 10 of 53

Thread: adom wizard roller

  1. #1
    Join Date
    Mar 2008
    Location
    Kentucky
    Posts
    5,067

    Default adom wizard roller

    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
    Last edited by gut; 06-08-2010 at 01:42 AM.
    "Whip me!" pleads the adom player. The rng replies... "No."

  2. #2
    Join Date
    Dec 2008
    Location
    Moscow, Russia
    Posts
    1,729

    Default

    gut's idea inspired me to make such a proggy by myself. The idea is the same - roll PCs, save slg and check it until the needed things are achieved.

    What you can specify: race&class, month, minimum starting attributes and any number of items you need. The only bad thing is the method it uses (checking slgs) leads to poor talent choice - I can only code those which have the same key for any PC.
    The proggie itself is windows console app, it's working at least for me, but is still vulnerable to bad input. I'll be making it failproof and maybe add some other features. If anyone's interested in binary or even code (it's a bit messy C++), I can share it.
    I like my women like my ADOM loot - hunted as treasure and in extra quantity.

  3. #3
    Join Date
    Mar 2008
    Location
    Kentucky
    Posts
    5,067

    Default

    I have to admit I was hoping some talented person
    would get inspired from this
    "Whip me!" pleads the adom player. The rng replies... "No."

  4. #4
    Join Date
    Apr 2010
    Location
    Hungary
    Posts
    273

    Default

    Nice work, gut. I can't test it because I'm not using winbeta (ADOM for DOS remained from Win98 times.) Although I don't know the language I understand your code (and a bit of its syntax), but I'm not able to improve it. Could you give me some link from where I can learn a bit from this language? (I like scripts.)
    "The avatar I was... now the fool I am. Heed the warning."

  5. #5
    Join Date
    Dec 2008
    Posts
    1,467

    Default

    Hmm, this would be good for Stainless Steel man, although it is a bit scummy for my taste.

  6. #6
    Join Date
    Mar 2008
    Location
    Kentucky
    Posts
    5,067

    Default

    > Could you give me some link from where I can learn a bit from this language? (I like scripts.)

    It is the 'clip' language that is built into notetab light.
    Notetab comes with a nice help file that describes all
    you will need to get started. Also, it comes with what
    they call a 'quick list' that will generate code elements
    for you, such as loops. It is nice for when you first start,
    as it takes care of all the formatting for you.

    It is really clunky compared to python, but like I said
    previously, it allows me to easily interact with other
    proggies.
    "Whip me!" pleads the adom player. The rng replies... "No."

  7. #7
    Join Date
    May 2008
    Location
    Lithuania
    Posts
    4,280

    Default

    IIRc, nezur had roller done after similar thread. You just need to convince him to share it.
    So far rolled 15 casters with RoDS and shamelessly killed them within 200 turns. For eternium glory!
    (after 15 I stopped counting...)

  8. #8
    Join Date
    Mar 2008
    Location
    Kentucky
    Posts
    5,067

    Default

    it has item finding?
    "Whip me!" pleads the adom player. The rng replies... "No."

  9. #9
    Join Date
    May 2008
    Location
    Lithuania
    Posts
    4,280

    Default

    Quote Originally Posted by gut View Post
    it has item finding?
    If i understand right, yes. Or if no it could be easily made in. Just not sure i do recall person who had it...

    May search in between few threads i have started. something like "quest for autoroller". IIRC, he took old work and managed to speed it. From what i've heard thing should work as miracle
    So far rolled 15 casters with RoDS and shamelessly killed them within 200 turns. For eternium glory!
    (after 15 I stopped counting...)

  10. #10
    Join Date
    Dec 2008
    Location
    Moscow, Russia
    Posts
    1,729

    Default

    Here, try this thingy out. It's still not fool-proof, so please be careful when specifying items and talents. I don't guarantee this thing ever work (it works for me, but I had no time to test it properly). Please, remember it's only compatible with winbeta4.

    The zip archive contains binary + .cfg file which is necessary to work and readme with some comments.
    http://www.mediafire.com/?zwjyzmwxgoj

    EDIT: Forgot to mention rather important thing - you shouldn't have a saved character named B while using the proggy.
    Last edited by _Ln_; 06-13-2010 at 06:45 PM.
    I like my women like my ADOM loot - hunted as treasure and in extra quantity.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •