|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Sun Jan 19, 2014 2:02 am
help makeing a script with a possible database variable?! |
Hi all, I want to thank you all ahead of time for any help!!!
In essence my mud has a crafting system, and the system has a "satchel" that stores all of the various components you need to craft. some of which are "assembled".
So I need a script to speed up the assembling process because there can be upwards of 500 items a time, and I have to "unstash" each and every item to assemble it.
Which is wildly time consuming. So, the essence of the script is as follows: "unstash "component name", "assemble" component name, "stash all" will work for putting
things back in the satchel.
capture ================================================================
Code: |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Showing only those objects that contain the string 'soul'
Component Name | T | L | S | G | A | P | C | W |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Essence Of Soul | 14 | 0 | 3 | 3 | 0 | 8 | 0 | 0 |
Fragment Of Soul | 35 | 2 | 8 | 6 | 10 | 4 | 2 | 3 |
Heart Of Soul | 4 | 0 | 0 | 0 | 4 | 0 | 0 | 0 |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
You have 922/999 items in your satchel.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
*urk the spacing is way off there, I'm not sure how to remove mud format to this forum*
script=====================================================
&component ~|&total~|&legendary~|&superior~|&good~|&average~|&poor~|&crude~|&worthless~|
comp.name=%1
comp.total=%2
comp.legendary=%3
comp.superior=%4
comp.good=%5
comp.average=%6
comp.poor=%7
comp.crude=%8
comp.worthless=%9
#IF (@comp.average > 4) {#5 us %lower(@comp.average);#5 assemble %lower(@comp.name);sta}
#switch (@comp.legendary > 4) {#5 us %lower(@comp.legendary)} (@comp.superior > 4) {#5 us %lower(@comp.superior);#5 assemble %lower(@component);stash }
i attempted to capture this many ways, i don't know a better way if anyone can come up with a better, i'm all ears.
the script has #IF's and #switch in it because I was testing to see what would or could work with the capture itself. NOT the database variable i created, I was in the middle of "fiddling" with the %db, %ismember, %beget functions to see if i could create what i needed that way as well, i wont ad it as I'm plenty embarrassed enough.
SO the script function is as follows IF any of the item qualities are above 4 and are either a fragment or an essence i need a script to "unstash" them, "assemble" them, and then stash all. very simple on that end, i just don't know the correct way to do this, i have made some simplistic aliases to do this, but i'd prefer a one button push to make this faster, and as well to learn more scripting:)
as i said, i appreciate any and all comments, help etc!!! ty all. |
|
|
|
Llohr Apprentice
Joined: 17 May 2005 Posts: 108
|
Posted: Sat Mar 15, 2014 11:28 pm |
I think I understand what you want, but I have a question or two before I know for sure what you need.
First off, do all components begin with "Essence of," "Fragment of," or "Heart of?" If I understand you correctly, that is the case, and you want to ignore the "Heart of" section
entirely.
Secondly, do you want all of your components stored in a single variable? Or are there few enough types of components that each one can have its own? Either works with a datarecord variable, it's simply a matter of deciding between having string lists or single values for each key in the datarecord. Different functions/commands are necessary depending on which way it's done.
Also, it'd be very helpful for some complete examples of the syntax you use to unstash and assemble and so forth. Pretend you don't have any aliases or what-have-you for unstashing/assembling/restashing, and show me how you'd unstash and assemble a few different items from your satchel example.
That's probably enough to be going on with. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|