Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Forging, OHE script

  1. Default Forging, OHE script

    Here's a simple script to forge dagger-blades of bronze. It'll go get money when you run out, and all that great stuff. It doesn't currently buy new glyphs, but that's an easy fix. If you want it to forge something else, the relevant parts should be easy enough to find (the amount withdrawn, the order #, etc). Enjoy.

    Note: Not Wizard-FE-compatible, since it uses the wait functionality of SF to pass RT. Works only in the Landing. Have your forging-hammer either in your hands or on your belt, and make sure you have a belt slot to wear it with (or else it'll hang when cutting bars). Don't have random crap in your hands (bars or the hammer should work, anything else is no go). Start in the forge (when I'm not lazy, I'll allow it to be started from the stall or the workshop).

    Code:
    counter set 0
    
    glance:
    match trashblade dagger-blade in your left
    match gethammer nothing in your right hand
    match gethammer down at your empty hands
    match getbar and nothing in your left hand.
    match stare and a bronze bar in your left hand.
    match stare and a flattened bronze bar in your left
    match swap bronze bar in your right
    match swap forging-hammer in your left
    match 1sttongs scribed bronze bar in your left hand.
    match 2ndtongs hammered bronze bar in your left hand.
    match glance wait...
    put glance
    matchwait
    
    gethammer:
    match nohammer Remove what?
    match nohammer You aren't wearing that
    match glance forging-hammer from your belt
    put remove forging-hammer
    matchwait
    goto error
    
    getbar:
    
    match getbucket you see a cork plug.
    match nogetbucket and some water.
    match pullplug you see 
    put look in trough
    matchwait
    
    pullplug:
    put pull plug
    waitfor You pull the drain plug
    put drop oil
    goto getbucket
    
    getbucket:
    put get bucket
    nogetbucket:
    wait
    match getmorebars Get what?
    match glance You remove a
    match nogetbucket ...wait
    put get bronze bar from back
    matchwait
    goto error
    
    swap:
    put swap
    match swap ...wait
    match glance You swap a
    matchwait
    goto error
    
    stare:
    put artisan skills
    wait
    match trashbar Before the design is complete
    match 1sttongs Your material is marked with
    match stare ...wait
    put stare blade-glyph
    matchwait
    goto error
    
    1sttongs:
    wait
    match 1sttongs ...wait
    match 2ndtongs You finish this round
    match rentexpire The tongs don't budge!
    put get tongs
    matchwait
    goto error
    
    2ndtongs:
    wait 
    match 2ndtongs ...wait
    match glance You sigh, then return the 
    match glance With a satisfying * HISS
    match glance The steady ring of hammer on bronze ends abruptly
    match rentexpire The tongs don't budge!
    put get tongs
    matchwait
    goto error
    
    error:
    echo funky shit
    end:
    exit
    
    getmorebars:
    move go door
    move out
    getmorebarsstall:
    put order 2
    wait
    match rentexpiregetbars But you do not have enough silver!
    match getmorebars2 Samilla exclaims, "Sold for 90 silvers!"
    put buy
    matchwait
    
    getmorebars2:
    match rentexpire You don't have enough silver
    match barcutting Realizing you still have some time remaining,
    match barcutting the clerk collects 300 silvers from you 
    put put my bar in my backpack
    wait
    put go workshop
    matchwait
    goto end
    
    nohammer:
    echo Wear your forging-hammer before starting
    goto end
    
    rentexpire:
    put put bar in my back
    move go door
    move out
    rentexpireoutside:
    move south
    move south
    move south
    move out
    move south
    move west
    move south
    move west
    move west
    move west
    move west
    move go bank
    move go arch
    put deposit all
    wait
    put withdraw 400
    put check balance
    wait
    move go arch
    move out
    move east
    move east
    move east
    move east
    move north
    move east
    move north
    move go gate
    move north
    move north
    move north
    move go workshop
    insideworkshop:
    move go door
    goto glance
    goto error
    
    trashblade:
    move go door
    put put dagger-blade in bin
    move go door
    goto glance
    
    trashbar:
    move go door
    put put bar in bin
    move go door
    goto glance
    
    rentexpiregetbars:
    move south
    move south
    move south
    move out
    move south
    move west
    move south
    move west
    move west
    move west
    move west
    move go bank
    move go arch
    put deposit all
    wait
    put withdraw 400
    put check balance
    wait
    move go arch
    move out
    move east
    move east
    move east
    move east
    move north
    move east
    move north
    move go gate
    move north
    move north
    move north
    goto getmorebarsstall
    
    barcutting:
    counter set 15
    put wear forging-hammer
    wait
    
    put get bar from my backpack
    pokecutter:
    put swap
    wait
    #match pullcutterlast 3lb. piece and a 3lb. piece
    match pullcutterlast 3lb. piece and a 4lb. piece
    match pullcutterlast 3lb. piece and a 5lb. piece
    match pullcutter 3lb. piece and a
    match pushcutter lb. piece and a
    match error 2lb. piece
    match slabweight%c You've just reset the slab-cutter
    put poke slab-cutter
    matchwait
    
    pullcutter:
    put pull slab-cutter
    wait
    put put my second bar in my backpack
    counter subtract 3
    goto pokecutter
    
    slabweight6:
    pullcutterlast:
    put pull slab-cutter
    wait
    put put my bar in my backpack
    put put my bar in my backpack
    goto insideworkshop
    
    slabweight15:
    slabweight14:
    slabweight13:
    slabweight12:
    slabweight11:
    slabweight10:
    slabweight9:
    slabweight8:
    slabweight7:
    pushcutter:
    match pullcutterlast 3lb. piece and a 3lb. piece
    match pullcutterlast 3lb. piece and a 4lb. piece
    match pullcutterlast 3lb. piece and a 5lb. piece
    match pullcutter 3lb. piece and a
    match pushcutter lb. piece and a
    match error 2lb. piece
    put push slab-cutter
    matchwait
    
    slabweight5:
    slabweight4:
    slabweight3:
    slabweight2:
    slabweight1:
    echo fm: Error cutting bar
    exit
    #########################################################
    Last edited by Gammit; 05-26-2007 at 03:44 PM.

  2. Default

    Note that I haven't exhaustively tested this yet, so it might hang on things. The fixes should be easy enough to figure out; I doubt I severely screwed anything up.

  3. Default

    Ok, scratch that, I forgot to put in the bar-cutting code. I'll add that now.

  4. Default

    Done.

  5. Default

    Added a line of code to prevent it from hanging when there's a scribed bar in the hand, rent expires, and the new forge has an empty trough.

  6. #6

    Default

    Not slamming you, or your code, but how the hell does SF read that huge block of text? I thought it had to be broke down to single command per line in SF?

    Finis
    Silence is Golden,
    Duct Tape is Silver,
    Gorilla Tape Guarantees SILENCE!

    <img src=http://forum.gsplayers.com/image.php?type=sigpic&userid=1100&dateline=1188445084 border=0 alt= />

  7. Default

    One more tiny change for a case that I'm way too drunk to explain, and that you'll probably never see.

  8. Default

    Quote Originally Posted by FinisWolf
    Not slamming you, or your code, but how the hell does SF read that huge block of text? I thought it had to be broke down to single command per line in SF?
    Not entirely sure I understand the question. Perhaps you're confusing a macro with a script?

  9. #9
    Join Date
    Jan 2004
    Location
    New York, NY
    Posts
    18,210

    Default

    How is this not compatible with Wizard FE? There's a wait function in that scripting language too.
    A.M.D.G.

    Quote Originally Posted by Gan View Post
    D TEAM UNITE! YOUR HEAD CHEERLEADER IS CALLING, HIS ATTEMPTED RESCUE OF THEe IS FAILING.

  10. #10

    Default

    <<Not slamming you, or your code, but how the hell does SF read that huge block of text?>>

    <<Not entirely sure I understand the question.>>

    Allow me to rephrase this for you.

    WHAT THE FUCK ARE YOU TALKING ABOUT?
    Razzle them. Dazzle them. Razzle dazzle them.

    Tisket is the best.


Posting Permissions

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