It is currently 18 Apr 2024, 07:54
   
Text Size

Pricing (Scripts and Notes)

Moderators: charmer, CCGHQ Admins

Re: Card Pricing

Postby rjp14 » 27 Jul 2010, 04:47

If I'm thinking about this right you would need to use an escape character to indicate that you are looking for a % sign.

I've linked the lua pattern guide below. Have a look at chapter 20.

http://www.lua.org/pil/20.2.html

I am by no means an expert on lua however I have done some simple modding with it.

Anyway give '^%' a try and see if it works.

**Of course I could have completely misunderstood what you are saying and in that case sorry.
Last edited by rjp14 on 27 Jul 2010, 04:51, edited 1 time in total.
rjp14
 
Posts: 67
Joined: 13 Jul 2010, 03:34
Has thanked: 0 time
Been thanked: 0 time

Re: Card Pricing

Postby woogerboy21 » 27 Jul 2010, 04:51

rjp14 wrote:If I'm thinking about this right you would need to use an escape character to indicate that you are looking for a % sign.

I've linked the lua pattern guide below. Have a look at chapter 20.

http://www.lua.org/pil/20.2.html

I am by no means an expert on lua however I have done some simple modding with it.

Anyway give '^%' a try and see if it works.
I'll try it, though I was reading the line:
The character `%´ works as an escape for those magic characters. So, '%.' matches a dot; '%%' matches the character `%´ itself
So expecting to have to use `%%` to escape the magic character and match the `&` by iteself :(.... i'll try your idea as well.
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 rjp14 » 27 Jul 2010, 04:54

Hope it works for you. Anyway I'm over due for hitting the sack. So have a good one. :)
rjp14
 
Posts: 67
Joined: 13 Jul 2010, 03:34
Has thanked: 0 time
Been thanked: 0 time

Re: Card Pricing

Postby woogerboy21 » 27 Jul 2010, 05:17

rjp14 wrote:Hope it works for you. Anyway I'm over due for hitting the sack. So have a good one. :)
Sadly that does not appear to be the solution. How ever using the \" inside a string does appear to break the " to allow for "'s to be inside the string and pattern matching to occur for quotes. But the program still crashes no matter how I try and break the % control character. It acting as though if the & character is anywere in the pattern the application crashes. I wonder if this is a bug?

edit:
it looks like all the other pricing sites do not contain that character in the patterns located for the card to price pattern. it just so happens the 3 sites you posted all use them :( ... horay for your luck. if i could figure out how to break that character properly things should start working.
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 » 27 Jul 2010, 07:44

woogerboy21 wrote:I try and break the % character in the string like the LUA documentation says all it does is crash the magic album applicatoin.
Could you please create a minimum script which causes MA crash? Just several lines, no downloading and other stuff. I'll try to investigate the problem.
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 » 27 Jul 2010, 12:14

Goblin Hero wrote:
woogerboy21 wrote:I try and break the % character in the string like the LUA documentation says all it does is crash the magic album applicatoin.
Could you please create a minimum script which causes MA crash? Just several lines, no downloading and other stuff. I'll try to investigate the problem.
Here is it, though I am not to sure it is completly right since I am not confident I am breaking the control character in the script correctly. Take a look and let me know if you see anything wrong. It definatly crashes the ma app every time it runs on my end.

edit:
a brief description of what appears to be happening is the html page responds with a line that contains the character '%'. For example the line:
Code: Select all
<span style='font-size:84%'>
And when you attempt to pattern match across the character % the application crashes. I can't figure out if its something to do with the application or if its the method for breaking the % character I am using. As indicated by the documentation I would expect to use '%%' to search for the character % in the string but if I do so the ma application crashes.
Attachments
testscript.zip
(260 Bytes) Downloaded 323 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 Goblin Hero » 27 Jul 2010, 17:03

woogerboy21 wrote:I can't figure out if its something to do with the application or if its the method for breaking the % character I am using.
Bug in ma.Log(). Use exe attached.
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 rjp14 » 27 Jul 2010, 19:50

FYI tip of the day is messed up when I updated the .exe with the new one.
rjp14
 
Posts: 67
Joined: 13 Jul 2010, 03:34
Has thanked: 0 time
Been thanked: 0 time

Re: Card Pricing

Postby woogerboy21 » 27 Jul 2010, 22:27

Goblin Hero wrote:
woogerboy21 wrote:I can't figure out if its something to do with the application or if its the method for breaking the % character I am using.
Bug in ma.Log(). Use exe attached.
Well good news is it didnt crash and appears to be pattern matching properly Yippee! Bad news is as rjp14 stated there seems to be something missing with just downloading and using the .exe from the rar file. Screenshot attached.
Attachments
error.screenshot.jpg
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 » 28 Jul 2010, 05:19

Alright here they are. Its been a long couple days working on this but I think I am getting the hang of pattern matching in Lua. I quickly gathered some prices and verified some with small spot checks. Once again the scripts include url structure data filled in for M10,M11 and the Zendikar block. The rest of the structure still needs filled in. Also it appears that if a site does not have a card in stock it wont get listed so you end up with missing prices (mainly on foils.) Nothing I can do about that really. If they don't give me a price to work with I cant do anything about that.

Check them out and let me know if you run into any problems. You will need to be running Magic Album version 1.1.1.43 at minimum. Otherwise any lower version of the application will just crash when these scripts are ran.

edit:
i should go back on my older scripts and update them since I have learned alot since writting them. If anyone needs one specifically updated just let me know and I will make it a priority. Otherwise it will just happen when it happens.
Attachments
OldSchoolGaming.zip
(2.38 KiB) Downloaded 306 times
GamingEtc.zip
(2.37 KiB) Downloaded 325 times
ChannelFireball.zip
(2.39 KiB) Downloaded 314 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 Goblin Hero » 28 Jul 2010, 09:47

About tips: you're using development beta, do not expect everything worked :) I've not included text files with the tips. Everything will be ok in public release.
woogerboy21: could you please gather the latest versions of all your price scripts. I'll include them into next public release (planned next week, so you have some time to polish your work).
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 » 28 Jul 2010, 11:49

Goblin Hero wrote:About tips: you're using development beta, do not expect everything worked :) I've not included text files with the tips. Everything will be ok in public release.
woogerboy21: could you please gather the latest versions of all your price scripts. I'll include them into next public release (planned next week, so you have some time to polish your work).
Will do, give me atleast through the weekend to take a look at what I have and clean things up. :)
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 » 28 Jul 2010, 13:16

Oh Goblin Hero, I don't know if I found another bug or not but I noticed that with larger patterns (or blocks of data) that attempt to get written with the ma.Log routine it crashes the ma application. It makes troubleshooting larger patterns troublesome. I have attached a script that will show you the problem. I don't know if its an issue with the routine or simply something to do with the size of the pattern block identified (like a buffer overflow issue).
Attachments
ma.crasher.zip
(668 Bytes) Downloaded 328 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 Goblin Hero » 29 Jul 2010, 08:53

woogerboy21 wrote:I noticed that with larger patterns (or blocks of data) that attempt to get written with the ma.Log routine it crashes the ma application.
Aha. Here's another update. Logged text should be < 10000 symbols now.
Attachments
Magic Album.rar
(164.68 KiB) Downloaded 311 times
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 » 29 Jul 2010, 15:42

AsBest wrote:What about MOTL prices import?
http://www.magictraders.com/pricelists/
Don't think I have forgot about this. It looks like you can infact search for prices based on set. And using the newest price script code structure I have been using I think it will be possible. Give me time to finish updating the current set of scripts and then I will see about getting things working with this site :)

GrimNotepad wrote:I will work on this in the next week or so and see if i can get a working script for MOTL going.
Ever get anything working on this? I have an idea with the code structure im using. It should 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

PreviousNext

Return to Magic Album

Who is online

Users browsing this forum: No registered users and 11 guests


Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 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 11 guests

Login Form