Page 1 of 26 12311 ... LastLast
Results 1 to 10 of 253

Thread: Alchemy Script of Doom!!!1!one

  1. Default Alchemy Script of Doom!!!1!one

    The alchemy script is getting to be near complete. The old alchemy script has been renamed to alchemy-old on the repository, and alchemy-new is renamed to just alchemy.

    How the script works:

    Everything is a recipe. In addition to the 190 recipes that give ranks, there are 428 support recipes. Many of these are one-step recipes for buying, foraging, grinding, extracting, distilling, or killing (either for skins or things like essence of fire).

    The script makes recipes recursively. When it can't find an ingredient on you, it looks for recipes to make that ingredient. For example, if a recipe requires ground tkaro and you don't have any, it will find the recipe for making ground tkaro, which requires tkaro root. If you don't have any tkaro root, it looks for a recipe for tkaro root, which is a simple forage recipe. Or, if you're making something that requires an ayanad crystal, and you only have a n'ayanad crystal, it will break the n'ayanad crystal down into a t'ayanad crystal, s'ayanad crystal, and two ayanad crystals, and then do the original recipe.

    The script attempts to find cheapest/fastest combination of recipes to do a task. The estimated cost is the cost of whatever needs to be bought, plus the cost of the pawnshop-style ingredients at the alchemist. If you have an ingredient on you, its cost is zero, unless it's a pawnshop-style ingredient. The time estimate includes travel time to and from forage locations, hunting grounds, and shops, the roundtime for all the alchemy commands, and an estimated time needed to forage or hunt.

    The script learns how long it takes you to forage or hunt for each ingredient by keeping track of the total time spent foraging or hunting, and the total number of ingredients found for each ingredient. By default, everything is set to 1 second and 1 ingredient, which encourages the script to try new things and find out what is really the fastest.

    The cost-per-second setting is used to combine the estimated cost and time into a value it can compare against other recipes to pick the best recipe (;alchemy set cost-per-second 15). The default value is 15, meaning the script would rather spend 899 silvers to buy an ingredient than spend 60 seconds foraging or hunting for it, and it would rather spend 60 seconds foraging or hunting than spend 901 silvers to buy.

    How to get started:

    The script does not buy alchemy equipment. So if you haven't already, go buy a cauldron, mortar, pestle (put the pestle inside the mortar), small crystal flask, and (clouded|warped|chipped|tapered|smoky|thick|slende r) glass vial. Also, get a large bank note and put it in one of your containers.

    The script uses three containers. Set them up with:

    ;set change alchemysack <container>
    ;set change lootsack <container>
    ;set change herbsack <container>

    The script will look in all three containers for anything it needs. It will put away herbs in your herbsack; alchemy equipment, reagents, and bank notes in your alchemysack; and alchemy products that can't be used as an ingredient in your lootsack.

    If you want the script to collect skins or hunt for other ingredients, you need to set up an attack script (;alchemy set attack-script <scriptname>). The attack script is given the ids of any npcs in the room that are supposed to have the ingredient you're looking for. The attack script needs to kill them, handle looting, and exit. There are a couple global variables that the attack script can set.

    $alchemy_abort_room = true

    If the attack script does this, the alchemy script will ignore any npcs in the room and move to the next.

    $alchemy_abort_hunt = true

    If the attack script does this, the alchemy script will end the hunt.

    You can also set before-hunt-script, after-hunt-script, before-forage-script, and after-forage-script.

    “;alchemy help” should be pretty self-explanatory, except maybe a couple things.

    ;alchemy need – This finds every ingredient that can be used in any recipe you can get ranks for, and creates a regex that can be accessed with UserVars.needed_reagents or viewed with “;set list”. This regex is used by loot-be-gone to automatically exclude reagents you need from being sold, and by “;alchemy buy” to know what to buy.

    ;alchemy buy – This buys pawnshop-style reagents from the alchemist. It buys at most 20 of each reagent you need and puts them in jars if you have them.

    If you're using “;alchemy auto”, then needed_reagents is automatically set if it's missing and each time the script gains a ranks for you.

    What's left to do:

    Many recipes are untested. There are likely errors and typos somewhere. Some recipes did not have the last rank it would give ranks on virilneus.com and krakiipedia.com. Pretty much any recipe with a range of 10 ranks is not correct.

    The script knows that it should forage every ingredient that is foragable, and it knows what npc to kill for every skin, but it doesn't necessarily know where to find those things. It relies on tags in the map database. Likewise, it knows the full inventory for every guild shop. It knows if something is only available in certain towns and/or to certain professions. However, it doesn't know where every guild shop is, or every training cauldron, workshop, training administrator, etc. until the map database is fixed up.

    Refract code was added, but not really tested. Also, I had to guess which time you can refract sunlight and moonlight.

    The buy-crap, throw-away-crap, and sell-crap settings are only used in auto mode. Use throw-away-crap and sell-crap at your own risk. They pretty much only throw away and sell the stuff I needed them to, and it's possible it'll throw away something you don't want it to. It could be fixed up slightly by editing the script, but I plan on moving this function out of the alchemy script and into loot-be-gone.

    If any recipe is missing from the script, I don't know what it is.
    Get Lich - Vote for Gemstone (topmudsites.com)

  2. #2

    Default

    If this works and gets me mastered I'll be donating again soon.

  3. #3

    Default

    Quote Originally Posted by Swami71 View Post
    If this works and gets me mastered I'll be donating again soon.
    Agreed. Thanx Tillman.

  4. #4

    Default

    Everything is a recipe, lol, I love the design of this script.
    Quote Originally Posted by TheEschaton View Post
    Are our lives now so fragmented and depersonalized that things we should already be doing, like saving those in danger and feeding the homeless, have suddenly become the actions of heroes?

    -TheE-

  5. #5

    Default

    Woah, awesome. Totally needed and greatly appreciated.

  6. #6

    Default

    Are there towns/guilds that this script works better with. It wasn't working so well in illy.

  7. Default

    It should work in every town for a Wizard in Shattered, cause I'm a Wizard in Shattered. Other than that, it depends on the map database, and I haven't been keeping track of what's been done.
    Get Lich - Vote for Gemstone (topmudsites.com)

  8. Default

    If the script doesn't work in the town you want, here's how to fix it.

    First, the guild probably needs to be mapped or remapped. If you're not sure if your guild has been mapped properly, go to the training administrator and type:

    Code:
    ;e echo Room.current.location
    If that doesn't echo your town name, it needs to be mapped. See the lrn2map thread on how to do that. You should have a training cauldron task when mapping the guild, otherwise they won't let you in there while mapping and the alchemy script won't know where it is when you get the task.

    Then, several rooms need tags added to them.

    <profession> alchemy administrator
    The place where you get new tasks.
    <profession> alchemy guildmaster
    The place where you get promoted
    <profession> alchemy cleaning supplies
    The place where you get a cleaning rag, broom, and dust pan.
    <profession> alchemy masters
    The place where you ask a guild master about training.
    <profession> alchemy training cauldron
    The place with the training cauldron. That is, the room you end up in after typing "go cauldrons"
    <profession> alchemy workshop
    Each of the alchemy workshops that have a crucible, assembly, and such.
    <profession> alchemy shop
    The place where you buy cauldrons and things.
    <town> <profession> alchemy shop
    Same room as <profession> alchemy shop.

    <town> should be an exact match for one of these: Icemule Trace, Kharam-Dzu, Wehnimer's Landing, River's Rest, Zul Logoth, Ta'Illistim, Ta'Vaalor, Solhaven

    <profession> should be all lowercase.

    Here's some more tags that might be useful:

    alchemy sea water
    This is where you fill a flask with sea water. It is already set for Wehnimer's and Teras. I don't know where the room is in any other towns.

    trash
    This is used in auto mode if you use the throw-away-crap setting. Mostly prevents the buildup of ground herbs and tinctures.

    reagent shop
    This is the room next to the consignment room where you buy reagents pawnshop-style. I'm not sure if any towns are missing it.

    The lrn2map thread tells how to add tags. You might want to type:

    Code:
    ;e echo Room.current.tags
    to make sure you're not adding a that that's already there.

    If you have to map your guild, you can add the tags directly to the map database before you send it to me. If you didn't have to map your guild, you can just post the name of the tag, the room number, and the game instance it's for in the lrn2map thread and it'll get added before the next upload.
    Get Lich - Vote for Gemstone (topmudsites.com)

  9. #9

    Default

    [alchemy: error: you are too poor for alchemy]
    [alchemy: error: failed to buy: wizard alchemy shop]

    standing in Ta'Illistim wizard alchemy shop with a 450k note and it says this
    pls fix

    note: room is tagged wizard alchemy shop
    note : wayto.inspect was done
    Last edited by Aethor; 01-12-2011 at 01:44 PM.
    Current
    Kitac, halfling cleric
    Marchese dwarven empath
    Chuco, halfling wizard
    Ex-Player of Aethor Whiteaxe, Giantman Cleric

  10. #10

    Default

    script doesnt recognize garland of sovine cloves
    Current
    Kitac, halfling cleric
    Marchese dwarven empath
    Chuco, halfling wizard
    Ex-Player of Aethor Whiteaxe, Giantman Cleric

Similar Threads

  1. Alchemy and attack script
    By Eddge in forum The Lich Project
    Replies: 0
    Last Post: 06-03-2021, 11:34 AM
  2. ;Alchemy script
    By Eoghain in forum Scripting Discussion
    Replies: 0
    Last Post: 12-23-2017, 01:55 AM
  3. alchemy script
    By goremouth in forum The Lich Project
    Replies: 2
    Last Post: 07-15-2011, 12:30 PM
  4. Auto alchemy script! (for use with :alchemy)
    By badzmarket in forum The Lich Project
    Replies: 3
    Last Post: 11-01-2010, 04:35 PM
  5. Alchemy boiling script
    By garlandor in forum Scripting Discussion
    Replies: 3
    Last Post: 05-08-2008, 06:21 PM

Tags for this Thread

Posting Permissions

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