It is currently 16 Apr 2024, 06:50
   
Text Size

Pricing (Scripts and Notes)

Moderators: charmer, CCGHQ Admins

Pricing (Scripts and Notes)

Postby woogerboy21 » 07 Mar 2010, 04:38

"Contributors Price Scripts" | Open

"Import Prices Usage" | Open
Support for the per site .lua based scripts I have written has been dropped for the time being.
I have attached (and plan to maintain) the "Import Prices.lua" script.This pricing script is designed for individuals to create or collect there own pricing information in whatever means they so choose and import that information into the magic album application. To do so create the file "cardprices.txt" in the root folder of the magic album application. Inside the file each line represents a card and its associated information.
The expected line format is as follows:
(cardname{tab}cardprice{tab}setname{tab}cardlanguage{tab}cardversion{tab}foil/nonfoil{tab}cardnotes)

Valid complete example line:
Abuna Acolyte 0.24 Scars of Mirrodin English * nonfoil cardnote
Abuna Acolyte 0.24 Scars of Mirrodin English 0 nonfoil cardnote

Valid part-complete example line:
Abuna Acolyte 0.24 Scars of Mirrodin

Invalid line examples:
Abuna Acolyte 0.24 SOM eng 0 nonfoil
Abuna Acolyte 0.24 eng 0 nonfoil


Requirements:
setname must match setnames defined in "tab" table inside the script
cardlanguage must match a language defined in the suplang table inside the script
price values must not contain commas
you must define a card name
you must define a card price
you must define a card set name
all other values if not present will use default values listed below

Defaults:
cardlanguage will default to english (eng)
cardversion will default to * (all versions)
cardfoiling will default to nonfoil


"Available External Pricing Collection Scripts" | Open
  • None


Requested
  • None

In Development
  • None

Known Bugs!
    None

NOTE:
  • Contributor pricing scripts are supported by the original contributor
  • Pricing scripts have only been verified to collect most recent standard format sets
  • You can have multiple copies of the import prices script
  • Make sure when you have multiple copies, to name them different and edit each to pointing to a different pricing file
  • MA Version 1.5 or newer is required

"Release Notes" | Open
Release 2.2 (01/29/2014)
  • Added support for sets up through "Born of the Gods" (It's been a while since this has been updated!)
Release 2.1 (9/22/2012)
  • Added support for the DD: Izzet vs. Golgari
Release 2.0 (8/23/2012)
  • Added support for the FTV: Realms Set
Attachments
Import Prices 22.zip
(4.57 KiB) Downloaded 630 times
Import Prices 21.zip
(4.42 KiB) Downloaded 633 times
Import Prices 20.zip
(4.4 KiB) Downloaded 591 times
Last edited by woogerboy21 on 29 Jan 2014, 21:01, edited 94 times in total.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby woogerboy21 » 07 Mar 2010, 15:25

Goblin Hero wrote:How? Site doesn't include one big file with all the prices.
Try using there regular site rather than the mobile version. I found this to be an easier solution. The url is something like this:

Code: Select all
http://www.mtgmintcard.com/mtg_search_result.php?edition=WorldWake&search_result=400
First section of url code:
Code: Select all
 http://www.mtgmintcard.com/mtg_search_result.php?edition=
Variable would be set name:
Code: Select all
WorldWake
Final section of url code:
Code: Select all
&search_result=400
With the final section number at the end of the final url code being the number of results you would like to return. I don't recall if I had to update the string parsing code though for there full site. :D
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby Goblin Hero » 07 Mar 2010, 16:21

woogerboy21 wrote:
Goblin Hero wrote:How? Site doesn't include one big file with all the prices.
Try using there regular site rather than the mobile version. I found this to be an easier solution. The url is something like this:
Standard page is ~900Kb size, several mobile pages for the same set are ten times smaller. Not sure what will be quicker.
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1992
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 218 times
Been thanked: 351 times

Re: Card Pricing

Postby woogerboy21 » 11 Mar 2010, 06:00

I think I have finally managed to get a LUA script working for prices! My first victim is http://www.mtgfanatic.com. I know I have bugged you alot Goblin Hero but thought I would post this question.

Were would you like pricing scripts placed or sent for possible inclusion in the MA application?

(oh and btw, the script I sent you to take a look at for this site. scrap it)

Thanks,
Wooger
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby Goblin Hero » 11 Mar 2010, 06:22

woogerboy21 wrote:Were would you like pricing scripts placed or sent for possible inclusion in the MA application?
Place it on the forum. After testing I'll add it to official distribution.
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1992
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 218 times
Been thanked: 351 times

Re: Card Pricing

Postby woogerboy21 » 11 Mar 2010, 13:04

Alright. Take a look at the script and let me know what you think. Just learning LUA (as you know) so it might not be pretty. If you have any recommendations let me know.

Also is there a list of what extensions are allowed in the forum? Its telling me .LUA isnt allowed (which is understandable) but also .txt is not allowed.

Thanks,
Wooger

Edit: Also if you like the way the code works, I have found the method used in it to identify the name / cost from a site works for a number of sites and could be easily reproduced for the other sites. :D
Attachments
MTGFanatic.zip
MA LUA MTG Fanatic Pricing Script
(1.9 KiB) Downloaded 731 times
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby goldaar » 12 Mar 2010, 06:44

I don't think it's implemented yet, but I thought I would ask anyway, is there a way to flip between price data without actually editing the files, it only seems to take the CSV at the top, with no way of using a different price csv.
goldaar
 
Posts: 13
Joined: 18 Dec 2009, 04:19
Has thanked: 0 time
Been thanked: 0 time

Re: Card Pricing

Postby Goblin Hero » 12 Mar 2010, 07:23

goldaar wrote:I don't think it's implemented yet, but I thought I would ask anyway, is there a way to flip between price data without actually editing the files, it only seems to take the CSV at the top, with no way of using a different price csv.
It's not implemented yet. But it's the next feature to do. You will be able to display price you want or min or max or avg value.
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1992
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 218 times
Been thanked: 351 times

Re: Card Pricing

Postby goldaar » 13 Mar 2010, 20:59

Ahh cool beans, thanks for the quick reply. Will the pricing be saved in inventory with this update?
goldaar
 
Posts: 13
Joined: 18 Dec 2009, 04:19
Has thanked: 0 time
Been thanked: 0 time

Re: Card Pricing

Postby woogerboy21 » 14 Mar 2010, 22:36

Will you be able to have the price data exported to a csv file when you choose to export your inventory list? :) It is kind of a bummer to make an inventory of a collection and goto export it to a csv and there is no price values in the csv.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby Goblin Hero » 15 Mar 2010, 06:34

woogerboy21 wrote:Will you be able to have the price data exported to a csv file when you choose to export your inventory list? :)
Thank you for your gift ;) Marked this as a high priority task.
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1992
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 218 times
Been thanked: 351 times

Re: Card Pricing

Postby woogerboy21 » 15 Mar 2010, 11:59

Goblin Hero wrote:
woogerboy21 wrote:Will you be able to have the price data exported to a csv file when you choose to export your inventory list? :)
Thank you for your gift ;) Marked this as a high priority task.
Your welcoe. I don't know if many say it but I personally find your application useful so keep up the good work.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby woogerboy21 » 17 Mar 2010, 03:00

Nice update. Course could you explain the ma.SetPBar function? Looks like the first value is the value to write to the log file, and the second is the location of the progress bar to display. Is this correct or is there more?

Edit:
Also whats the deal with the price selection? (Maximum/Average/Minimum)?
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby Goblin Hero » 17 Mar 2010, 07:01

woogerboy21 wrote:Course could you explain the ma.SetPBar function?
First argument is the text to display inside progress bar, second - percentage from 0 to 100.
ma.Log function now writes text to Magic Album.log. All script errors also would be saved there. IO library is enabled.
woogerboy21 wrote:Also whats the deal with the price selection? (Maximum/Average/Minimum)?
If you have several prices MA will calculate and display max/min/avg value using all the available prices.
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1992
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 218 times
Been thanked: 351 times

Re: Card Pricing

Postby woogerboy21 » 17 Mar 2010, 12:11

Goblin Hero wrote:If you have several prices MA will calculate and display max/min/avg value using all the available prices.
How would you assign several prices to a single card? Do you pass in single prices over and over using the ma.SetPrice function or do you pass in multiple prices seperated by some value using the ma.SetPrice function? Or some other way?

edit:
Goblin Hero wrote:First argument is the text to display inside progress bar, second - percentage from 0 to 100.
Also if the first argument is the text to display inside the progress bar I am not seeing any text in the progress bar for the mtgmintcard lua script that is being passed it. Are you, or bug?
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Next

Return to Magic Album

Who is online

Users browsing this forum: No registered users and 14 guests


Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 14 guests

Login Form