working on things,
i dont think i'll be done in time
guessing 752
Results 121 to 160 of 211
- 15 Jul. 2013 01:01am #121
- 15 Jul. 2013 01:22am #122
- 15 Jul. 2013 01:49am #123
- 15 Jul. 2013 02:04am #124
- 15 Jul. 2013 02:40am #125
57
- 15 Jul. 2013 02:45am #126
764
- 15 Jul. 2013 03:56am #127
100
- 15 Jul. 2013 04:42am #128
- 15 Jul. 2013 04:43am #129
I don't know if Tree objects, but if I may call the ruling on this, if someone makes the program, they have first priority of winning over someone guessing the number. But as the rule says, the program has a deadline, so the guesser winning after the deadline is fair and within the rules of the original post. But if the guesser guesses before the deadline, I'd say the program maker should get it if they finish before the deadline.
- 15 Jul. 2013 05:20am #130
117
- 15 Jul. 2013 06:26am #131
@gamecheif, preciate that shit, n puff puff pass back to you mah brotha. it sounds legit to me man. I was just iffy about the rules, before i got too dedicated
255Last edited by B0O8; 15 Jul. 2013 at 06:32am.
Sex is not the answer, sex is the question.YES!!! is the real answer.
- 15 Jul. 2013 06:47am #132
387
- 15 Jul. 2013 07:20am #133
Edit: I would never put a bot or any other ToS violating code on this site.
Last edited by Awesomolocity; 15 Jul. 2013 at 07:30am.
- 15 Jul. 2013 07:28am #134
XD GRATZ
- 15 Jul. 2013 07:29am #135Spoiler:Code:
// ==UserScript== // @author Awesomolocity // @description Wins a contest lol // @name Contest Winner // @include http://www.gaiaonline.com/forum/* // @include http://gaiaonline.com/forum/* // @requre http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js // ==/UserScript== //Used jQuery because I'm lazy, and it looks pretty. //Lol. //Should I turn this into a giant class? //I have like no experience with classes, really. o_O //I should do that as a side project... function post(id){ $.ajax({ type: 'GET', url: 'http://www.gaiaonline.com/forum/compose/quickreply/new/'+ id +'/', dataType: 'json', //async: false, }).done(function(json){ if(json["show_captcha"]===true){ var captcha=window.showModalDialog('data:text/html;base64,PGh0bWw+CjxoZWFkPjwvaGVhZD4KPGJvZHk+CjxzY3JpcHQ+CmRvY3VtZW50LndyaXRlKCJEYW0gQ2FwdGNoYTo8YnIvPiIrd2luZG93LmRpYWxvZ0FyZ3VtZW50cyk7Cjwvc2NyaXB0Pgo8YnIvPgo8aW5wdXQgaWQ9ImNhcHRjaGEiIHR5cGU9InRleHQiLz4KPGlucHV0IGlkPSJzdWJtaXQiIHR5cGU9ImJ1dHRvbiIgdmFsdWU9IlN1Ym1pdCIgb25jbGljaz0id2luZG93LnJldHVyblZhbHVlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2NhcHRjaGEnKS52YWx1ZTsgd2luZG93LmNsb3NlKCk7Ij48YnIvPgo8aW5wdXQgdHlwZT0iYnV0dG9uIiB2YWx1ZT0iSSBjYW4gbm90IHJlYWQgdGhhdCIgb25jbGljaz0id2luZG93LnJldHVyblZhbHVlID0gJ25ldyc7IHdpbmRvdy5jbG9zZSgpOyI+PGJyLz4KPGlucHV0IHR5cGU9ImJ1dHRvbiIgdmFsdWU9IkkgZG8gbm90IGhhdmUgdGltZSBmb3IgdGhpcy4iIG9uY2xpY2s9IndpbmRvdy5yZXR1cm5WYWx1ZSA9ICcnOyB3aW5kb3cuY2xvc2UoKTsiPgo8L2JvZHk+CjwvaHRtbD4=','<img src="'+json['captcha_img']+'"/>',"dialogwidth: 350; dialogheight: 150; resizable: yes"); if(!captcha || captcha.length==0){ var abort=true; } else if(captcha=='new'){ var abort=true; setTimeout('post('+id+')',0); } else{ abort=false; var captchaKey=json["captcha_challenge"]; } } else{ var captcha=''; abort=false; } if(abort===false){ if(!captchaKey){ captchaKey=''; } var pc = 1; if(GM_getValue(id)){ pc = GM_getValue(id)+1; } GM_setValue(id, pc); var post = '[align=center]:ninja:\n'+ pc +'[/align]';//format post a little. Lol. $.ajax({ method: 'POST', dataType: 'json', async: false, data: 'nonce='+json['nonce']+'&recaptcha_response_field='+escape(captcha)+'&recaptcha_challenge_field='+captchaKey+'&message='+escape(post)+'&action_submit=submit', url: 'http://www.gaiaonline.com/forum/compose/ajaxentry/new/'+id+'/' }).done(function(data){ if(data['status']===true){ alert('victory'); } else{ if(confirm('Failed to complete post. Gaia said:\n\t"'+data['message']+'"\nWould you like to try again?')===true){ setTimeout('post('+id+')',0); } } }); } }); } function forumScanner(){ var thread; $.ajax({ type: 'GET', url: 'http://www.gaiaonline.com/mobileapp/forums/show/f.23', async: false, dataType: 'html', }).done(function(r){ var keywords = ['give away', 'giveaway', 'givaway', 'give-away', 'giving away'], threads = new Array(); //Array can be extended or condensed. Depends on what you want to do. xP $(r).find('.topic-left a').each(function(){ var $title = $(this).text(); var $id = $(this).attr('href').split('http://www.gaiaonline.com/mobileapp/forums/show/t.')[1] for(var i = 0; i<keywords.length; i++){ var keyword = keywords[i]; if($title.indexOf(keyword) != -1){ threads.push($id); } } }); if(threads.length > 0){ thread = threads[0]; } else{ thread = 36828231;//Use as default in case no giveaways are found. Feel free to change. } }); return thread; } function main(){ var thread = forumScanner(); post(thread); var wait = Math.random() * (10000 - 2500) + 2500; setTimeout("location.reload(true);",wait); } main();
Tampermonkey users might need to actually add in the jQuery library manually. (jQuery.com for link)
Got lazy on timing.
Still should have better error handling for when you're posting too fast.
Want to add cleverbot conversations, but...got lazy. xP
IS THERE A SPOILER TAG? Lol.Last edited by T3h Mule; 15 Jul. 2013 at 07:34am.
- 15 Jul. 2013 07:32am #136
- 15 Jul. 2013 07:32am #137
- 15 Jul. 2013 07:35am #138
- 15 Jul. 2013 03:26pm #139
Unless someone else posts some source, then in about 4 1/2 hours it looks like you will win.
A few points though. I believe from my testing with quick reply is it will only want a captcha if you aren't verified, otherwise it has never asked me for it (not 100% sure I could be wrong). There is also a much better way to getting forum topics through a JSON return, which would make getting thread IDs incredibly simple.
Other than that it looks fine, and you'll most likely win it now.
Edit: Since you actually posted source, I'm going to close down the guessing of numbers now. It's strictly a source code contest.
- 15 Jul. 2013 03:38pm #140
I've gotten captchas on quick reply before. It's kinda rare, but it happens.
I actually didn't think about doing it the way you mentioned (though I may have found it; I'll ask if what I thought you meant was right after the contest ends). BUT the mobile API generates (a very small amount, but...real nonetheless) gold when you use it. Using the code I posted would not only get gold from posting, but it would also get gold from the mobile API.
Also, still working on the bot. Making tweaks here and there, just in case someone else submits something.
Edit: Did this because lol.
Spoiler:Code:function forumScanner(){ var thread; $.ajax({ type: 'GET', url: 'http://www.gaiaonline.com/forum/pulse?id=23&ts='+ new Date().getTime(), async: false, dataType: 'json', }).done(function(r){ var keywords = ['give away', 'giveaway', 'givaway', 'give-away', 'giving away'], threads = new Array(); //Array can be extended or condensed. Depends on what you want to do. xP for(var x in r){ var title = r[x].topic; var id = r[x].url.split('t.')[1]; for(var i = 0; i<keywords.length;i++){ var keyword = keywords[i]; if(title.indexOf(keyword) != -1){ threads.push(id); } } } if(threads.length > 0){ thread = threads[0]; } else{ thread = 36828231;//Use as default in case no giveaways are found. Feel free to change. } }); return thread; }
Last edited by T3h Mule; 15 Jul. 2013 at 04:11pm.
D: I CAN'T THINK OF ANYTHING CLEVER
- 15 Jul. 2013 05:04pm #141
Is anyone else going to post anything, or do we have a winner
- 15 Jul. 2013 05:16pm #142
There should be a way to automatically parse returns such as Forum Pulse, especially in what you are using. I know in Python I was able to read Forum Pulse to a dictionary using simplejson (the default JSON module only works on well formed JSON).
Edit: jQuery.parseJSON/Last edited by Tree; 15 Jul. 2013 at 05:20pm.
- 15 Jul. 2013 05:23pm #143
- 15 Jul. 2013 05:26pm #144
- 15 Jul. 2013 05:32pm #145
111 ftw
Sex is not the answer, sex is the question.YES!!! is the real answer.
- 15 Jul. 2013 05:34pm #146
- 15 Jul. 2013 06:16pm #147
- 15 Jul. 2013 06:17pm #148
- 15 Jul. 2013 06:30pm #149
1 1/2 hour until the deadline to submit and code is hit.
- 15 Jul. 2013 06:38pm #150
- 15 Jul. 2013 06:43pm #151
- 15 Jul. 2013 07:03pm #152
- 15 Jul. 2013 07:39pm #153
Final code...for now.
Spoiler:Code:// ==UserScript== // @author T3h Mule // @description Wins a contest lol // @name Contest Winner // @version 0.1.0 // @include http://www.gaiaonline.com/forum/* // @include http://gaiaonline.com/forum/* // @requre http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js // ==/UserScript== //Used jQuery because I'm lazy, and it looks pretty. //Lol. //Should I turn this into a giant class? //I have like no experience with classes, really. o_O //I should do that as a side project... function post(id){ $.ajax({ type: 'GET', url: 'http://www.gaiaonline.com/forum/compose/quickreply/new/'+ id +'/', dataType: 'json', //async: false, }).done(function(json){ if(json["show_captcha"]===true){ var captcha=window.showModalDialog('data:text/html;base64,PGh0bWw+CjxoZWFkPjwvaGVhZD4KPGJvZHk+CjxzY3JpcHQ+CmRvY3VtZW50LndyaXRlKCJEYW0gQ2FwdGNoYTo8YnIvPiIrd2luZG93LmRpYWxvZ0FyZ3VtZW50cyk7Cjwvc2NyaXB0Pgo8YnIvPgo8aW5wdXQgaWQ9ImNhcHRjaGEiIHR5cGU9InRleHQiLz4KPGlucHV0IGlkPSJzdWJtaXQiIHR5cGU9ImJ1dHRvbiIgdmFsdWU9IlN1Ym1pdCIgb25jbGljaz0id2luZG93LnJldHVyblZhbHVlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2NhcHRjaGEnKS52YWx1ZTsgd2luZG93LmNsb3NlKCk7Ij48YnIvPgo8aW5wdXQgdHlwZT0iYnV0dG9uIiB2YWx1ZT0iSSBjYW4gbm90IHJlYWQgdGhhdCIgb25jbGljaz0id2luZG93LnJldHVyblZhbHVlID0gJ25ldyc7IHdpbmRvdy5jbG9zZSgpOyI+PGJyLz4KPGlucHV0IHR5cGU9ImJ1dHRvbiIgdmFsdWU9IkkgZG8gbm90IGhhdmUgdGltZSBmb3IgdGhpcy4iIG9uY2xpY2s9IndpbmRvdy5yZXR1cm5WYWx1ZSA9ICcnOyB3aW5kb3cuY2xvc2UoKTsiPgo8L2JvZHk+CjwvaHRtbD4=','<img src="'+json['captcha_img']+'"/>',"dialogwidth: 350; dialogheight: 150; resizable: yes"); if(!captcha || captcha.length==0){ var abort=true; } else if(captcha=='new'){ var abort=true; setTimeout('post('+id+')',0); } else{ abort=false; var captchaKey=json["captcha_challenge"]; } } else{ var captcha=''; abort=false; } if(abort===false){ if(!captchaKey){ captchaKey=''; } var pc = 1; if(GM_getValue(id)){ pc = GM_getValue(id)+1; } GM_setValue(id, pc); var post = '[align=center]:ninja:\n'+ pc +'[/align]';//format post a little. Lol. $.ajax({ method: 'POST', dataType: 'json', async: false, data: 'nonce='+json['nonce']+'&recaptcha_response_field='+escape(captcha)+'&recaptcha_challenge_field='+captchaKey+'&message='+escape(post)+'&action_submit=submit', url: 'http://www.gaiaonline.com/forum/compose/ajaxentry/new/'+id+'/' }).done(function(data){ if(data['status']===true){ //alert('victory'); Debug. Whoops. } else{ if(confirm('Failed to complete post. Gaia said:\n\t"'+data['message']+'"\nWould you like to try again?')===true){ setTimeout('post('+id+')',0); } } }); } }); } function forumScanner(){ var thread; $.ajax({ type: 'GET', url: 'http://www.gaiaonline.com/mobileapp/forums/show/f.23', async: false, dataType: 'html', }).done(function(r){ var keywords = ['give away', 'giveaway', 'givaway', 'give-away', 'giving away'], threads = new Array(); //Array can be extended or condensed. Depends on what you want to do. xP $(r).find('.topic-left a').each(function(){ var $title = $(this).text(); var $id = $(this).attr('href').split('http://www.gaiaonline.com/mobileapp/forums/show/t.')[1] for(var i = 0; i<keywords.length; i++){ var keyword = keywords[i]; if($title.indexOf(keyword) != -1){ threads.push($id); } } }); if(threads.length > 0){ thread = threads[0]; } else{ thread = 36828231;//Use as default in case no giveaways are found. Feel free to change. } }); return thread; } function main(){ var thread = forumScanner(); post(thread); var wait = Math.random() * (10000 - 2500) + 2500;//Between 2.5 and 10 seconds. Can be modified as you wish. Protip: Change the values a bit, so that everyone isn't posting at the same rate. setTimeout(main, wait); } main();
Fixed the refresher so that the page doesn't have to reload.
Optional: Use forum pulse instead of mobile API
Spoiler:Code:function forumScanner(){ var thread; $.ajax({ type: 'GET', url: 'http://www.gaiaonline.com/forum/pulse?id=23&ts='+ new Date().getTime(), async: false, dataType: 'json', }).done(function(r){ var keywords = ['give away', 'giveaway', 'givaway', 'give-away', 'giving away'], threads = new Array(); //Array can be extended or condensed. Depends on what you want to do. xP for(var x in r){ var title = r[x].topic; var id = r[x].url.split('t.')[1]; id = id.split('/')[0]; for(var i = 0; i<keywords.length;i++){ var keyword = keywords[i]; if(title.indexOf(keyword) != -1){ threads.push(id); } } } if(threads.length > 0){ thread = threads[0]; } else{ thread = 36828231;//Use as default in case no giveaways are found. Feel free to change. } }); return thread; }
Tampermonkey users will need to include jQuery manually into the file. Check jquery.com for the link. Not sure about Firefox users. xD Didn't test in Firefox.Last edited by T3h Mule; 15 Jul. 2013 at 07:42pm.
D: I CAN'T THINK OF ANYTHING CLEVER
- 15 Jul. 2013 07:58pm #154
- 15 Jul. 2013 08:00pm #155
- 15 Jul. 2013 08:03pm #156
- 15 Jul. 2013 08:09pm #157
- 15 Jul. 2013 08:09pm #158
- 15 Jul. 2013 08:13pm #159
You won anyways since you actually submitted something. About to message you the account info.
For those curious, here's how I'd do it in Python (without any of the selection process, just the two functions)
First function uses forum pulse to get all the thread IDs through a generator, then you just use the post with session (it's copy pasted from a program I made so session would be a requests session) thread id, and the message.
Code:import requests import simplejson as json def get_threads(forum_id): uri = 'http://www.gaiaonline.com/forum/pulse?id={}'.format(forum_id) for thread_info in json.loads(requests.get(uri).content): yield thread_info['tid'] def post(session, tid, message): uri = 'http://www.gaiaonline.com/forum/compose/{}/new/{}' thread_info = session.get(uri.format('quickreply', tid)).json() post_data = { 'nonce': thread_info['nonce'], 'message': message, 'action_submit': 'submit', } session.post(uri.format('ajaxentry', tid), data=post_data).json()
Last edited by Tree; 15 Jul. 2013 at 08:17pm.
- 15 Jul. 2013 08:33pm #160
should this thread be moved now?