Crafts Pricing

by Esano

Back to Mechanic's Corner.

Aoife2010-07-23 01:17:15
You carefully study a tailoring pattern.
Item: Suit Type: Greatrobes Org: Public
Commodities: cloth 70 silk 20 silver 10
Estimated production cost: 4950 gp.


happy.gif Awesome, thank you!
Aubrey2010-07-23 03:08:16
QUOTE (Noola @ Jul 22 2010, 09:00 PM) <{POST_SNAPBACK}>
Not me! I like being able to manually set it. Cause I can set the prices myself instead of having it just go off what it sees or something. For my profits!


Uh yeah I don't mean having it automatically update when I do wares. I mean an alias like SETPRICE STEEL 150 instead of having to search for the trigger in my client and edit the code that way. That's not really lazy. You should see some of the basic stuff Sylphas uses coding to do. happy.gif
Unknown2010-07-23 03:37:06
I do believe I may have to translate this for mudlet. Though I may very well make it update from an alias as well as browsing the comm cache... perhaps with a config option to add a profit margin automagically if it does so. Either X gold per comm, or a markup %.


Also, I really ought to skillflex into a design tradeskill. looks way fun.
Sylphas2010-07-23 04:07:17
Setting it from an alias would be a lot simpler if the cost table was in a seperate lua file. You could just do:
CODE
^SETPRICE (\\w+) (\\d+)$

comms = %2
Note("%1 price set to: %2g")


But since it's in the trigger, it will reinitialize the table each time, so that won't work until you pull it out.
Esano2010-07-23 04:21:04
I probably will work at expanding this at one point, yes. At the moment, you can just make do - it's not that difficult to alter the pricing as is, and I set the defaults to Mag's commshop prices (hence gems at 160+ instead of 108). When I do improve it, I'll have to make it into a plugin, and depending upon the time I spend on it, may charge a few credits. Regardless of whether I do or not, I'll leave this free version up.
Nariah2010-07-23 23:48:29
I hope you're happy, you made me hop on my despised MushClient JUST to use this. scream.gif
Neos2010-07-24 01:03:33
QUOTE (demonnic @ Jul 22 2010, 11:37 PM) <{POST_SNAPBACK}>
I do believe I may have to translate this for mudlet. Though I may very well make it update from an alias as well as browsing the comm cache... perhaps with a config option to add a profit margin automagically if it does so. Either X gold per comm, or a markup %.


Also, I really ought to skillflex into a design tradeskill. looks way fun.


Yes. It will save me the trouble of floundering around trying to convert it myself. You are more experienced in the lua-fu than I.
Aubrey2010-07-24 02:29:26
QUOTE (Esano @ Jul 23 2010, 12:21 AM) <{POST_SNAPBACK}>
I probably will work at expanding this at one point, yes. At the moment, you can just make do - it's not that difficult to alter the pricing as is, and I set the defaults to Mag's commshop prices (hence gems at 160+ instead of 108). When I do improve it, I'll have to make it into a plugin, and depending upon the time I spend on it, may charge a few credits. Regardless of whether I do or not, I'll leave this free version up.


Would be nice if Aubrey could buy those cheap comms. Just sayin. ninja.gif I actually have wished for a long time now that I hadn't used her free reincarnation, but I can't afford the arti to change back, so I guess she'll have to Mag-shop via someone else for now. sad.gif

EDIT: I was mistaken about the cost of a dagger. Aubrey actually had that amount of credits already. And is now furrikin! Guess I'll have to make a new avatar soon.
Esano2010-07-26 12:12:37
An improved version of this is now available here for a small fee. I will not be taking down this script - but I do advise you to look at the new one!
Aubrey2010-07-29 21:28:12
If only I could get it to save the info when I close MUSH...
Anisu2010-07-29 21:40:58
QUOTE (Aubrey @ Jul 29 2010, 11:28 PM) <{POST_SNAPBACK}>
If only I could get it to save the info when I close MUSH...

create an alias to save all relevant info to mushclient variables and another one to load them up again?
Aubrey2010-07-29 22:57:46
QUOTE (Anisu @ Jul 29 2010, 05:40 PM) <{POST_SNAPBACK}>
create an alias to save all relevant info to mushclient variables and another one to load them up again?


I'm not an expert with MUSH, especially when it comes to all this "save this to that folder, this has to point to that directory" stuff. Sylphas did make those aliases for me but they don't work. Apparently Esano doesn't use Treant, and I do, so everything points to my Treant folder except this, which points to the MUSH folder. Sylphas and I are both at a loss for how to fix it.

EDIT: It worked with the basic/free version, but when I bought the new one it didn't.

Also, I see you there Esano! ninja.gif
Unknown2010-07-29 23:04:59
This only "points to" the MUSHclient folder if that's where you saved it. If you save a plugin into your Treant folder and install it from there, it still works just fine.
Aubrey2010-07-29 23:10:35
QUOTE (Zarquan @ Jul 29 2010, 07:04 PM) <{POST_SNAPBACK}>
This only "points to" the MUSHclient folder if that's where you saved it. If you save a plugin into your Treant folder and install it from there, it still works just fine.


Pretty sure that's what I did, since that's what I do with everything. huh.gif I can delete it and start over I guess.
Esano2010-07-29 23:10:38
To clarify, it's a problem with saving the state of the plugin. The default path of ./worlds/plugins doesn't exist, so I had Aubrey add it (and the /state folder beneath that). Apparently this didn't fix the problem, however.
Unknown2010-07-29 23:14:52
MUSHclient 4.54 has an issue with saving plugin states that is fixed for the upcoming 4.55 release. Don't know if that's your issue or not, though. If you're using an older version of MUSHclient, you just need to create the "state" folder under the Treant folder.
Aubrey2010-07-29 23:33:43
I'm using version 4.43.

I have C:\\Treant\\worlds\\plugins\\state and nothing in the folder. The XML is just under C:\\Treant like my other plugins. I tried it with the XML in the state folder too, and that didn't work either (in fact that made nothing in Treant work).

I get this 2 or 3 or more times when I close MUSH:

QUOTE
Unable to create the plugin save state file: C:\\Program Files (x86)\\MUSHclient\\worlds\\plugins\\state\\381839147e58131fc4204503-4e54f8ca79a0d844136edffa-state.xml


I don't get it, if all the other XML files in the C:\\Treant folder work, and the state folder never existed there before, why is it a problem now? Although I did notice it's trying to look in Program Files (x86), when my MUSH is saved in Program Files. (the one without the x86) Would that make a difference? Although the others came with lua files and this one didn't... I feel so ignorant.
Esano2010-07-29 23:43:13
Oh. I didn't realise it was trying to save to Program Files, not your treant folder. It'll be related to permissions, probably. Go to File -> Global Preferences -> Plugins -> Plugin Directory and navigate to the plugins (not state) folder you made under Treant. Try that.
Aubrey2010-07-29 23:45:34
QUOTE (Esano @ Jul 29 2010, 07:43 PM) <{POST_SNAPBACK}>
Oh. I didn't realise it was trying to save to Program Files, not your treant folder. It'll be related to permissions, probably. Go to File -> Global Preferences -> Plugins -> Plugin Directory and navigate to the plugins (not state) folder you made under Treant. Try that.


Aha that looks more logical. Now it says

QUOTE
Line 26: C:\\Treant\\worlds\\plugins\\constants.lua was not found. (include file not loaded)


but at least it did move it where I told it to, so apparently we're on the right track!


EDIT That's what it said when I tried to reinstall the plugin. But when I closed the world, it didn't give an error message. And when I reopened it, it shows the prices I set before closing. So it seems to work! Thank you both for your help, sorry to be a pain.
Esano2010-07-29 23:48:00
That's a fairly minor thing. I'll send you a file without that constants.lua requirement.