Pricing (Scripts and Notes)
by Goblin Hero
Moderators: charmer, CCGHQ Admins
Re: Card Pricing
by 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.
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
by woogerboy21 » 27 Jul 2010, 04:51
I'll try it, though I was reading the line: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.
So expecting to have to use `%%` to escape the magic character and match the `&` by iteself .... i'll try your idea as well.The character `%´ works as an escape for those magic characters. So, '%.' matches a dot; '%%' matches the character `%´ itself
-
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
by 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
by woogerboy21 » 27 Jul 2010, 05:17
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?rjp14 wrote:Hope it works for you. Anyway I'm over due for hitting the sack. So have a good one.
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.
-
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
by Goblin Hero » 27 Jul 2010, 07:44
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.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.
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
-
Goblin Hero - Site Admin
- Posts: 1992
- Joined: 23 Oct 2005, 09:37
- Location: Russia
- Has thanked: 218 times
- Been thanked: 351 times
Re: Card Pricing
by woogerboy21 » 27 Jul 2010, 12:14
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.Goblin Hero wrote: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.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.
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%'>
- Attachments
-
- testscript.zip
- (260 Bytes) Downloaded 323 times
-
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
by Goblin Hero » 27 Jul 2010, 17:03
Bug in ma.Log(). Use exe attached.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.
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
-
Goblin Hero - Site Admin
- Posts: 1992
- Joined: 23 Oct 2005, 09:37
- Location: Russia
- Has thanked: 218 times
- Been thanked: 351 times
Re: Card Pricing
by 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
by woogerboy21 » 27 Jul 2010, 22:27
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.Goblin Hero wrote:Bug in ma.Log(). Use exe attached.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.
-
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
by 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.
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
-
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
by 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).
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.
-
Goblin Hero - Site Admin
- Posts: 1992
- Joined: 23 Oct 2005, 09:37
- Location: Russia
- Has thanked: 218 times
- Been thanked: 351 times
Re: Card Pricing
by woogerboy21 » 28 Jul 2010, 11:49
Will do, give me atleast through the weekend to take a look at what I have and clean things up.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).
-
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
by 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
-
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
by Goblin Hero » 29 Jul 2010, 08:53
Aha. Here's another update. Logged text should be < 10000 symbols now.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.
- 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.
-
Goblin Hero - Site Admin
- Posts: 1992
- Joined: 23 Oct 2005, 09:37
- Location: Russia
- Has thanked: 218 times
- Been thanked: 351 times
Re: Card Pricing
by woogerboy21 » 29 Jul 2010, 15:42
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
Ever get anything working on this? I have an idea with the code structure im using. It should workGrimNotepad wrote:I will work on this in the next week or so and see if i can get a working script for MOTL going.
-
woogerboy21 - HQ Team Member
- Posts: 1136
- Joined: 19 Jul 2009, 00:15
- Location: USA
- Has thanked: 21 times
- Been thanked: 152 times
Who is online
Users browsing this forum: No registered users and 11 guests