Here is the resign button you've all been whining about

Discuss developing tools and get details on Conquer Club's API.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.
Post Reply
judge_reinhold
Posts: 110
Joined: Sun Sep 02, 2012 10:59 pm
Location: meat
Contact:

Here is the resign button you've all been whining about

Post by judge_reinhold »

Add this to your tampermonkey/greasemonkey, and voila!
It automatically deploys and ends phases. The only thing it doesn't do is handle deferred troops, as far as I know.
You have to keep the window open for it to work. Use it on your speed games and stop getting rated a deadbeat.

-jr


// ==UserScript==
// @name AutoResign
// @namespace http://www.meat.com
// @version 0.1
// @description Will deploy troops and end turn for you. Need to add handling for deferred troop deployment.
// @match *://www.conquerclub.com/game.php?game=*
// @copyright 2014+, jr hahaha ;)
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==

$(document).ready( function() {
console.log('Resign running');

/*$("#snapToChat").on('click', function() {
});*/
$("#snapshotState").after('<button id="autoResign" class="auto-resign-off" style="margin-left:12px">RESIGN</button>');
var timer = null,
interval = 3000;
var disabled = false;


$("#autoResign").on('click', function() {
$(this).toggleClass('auto-resign-off auto-resign-on');
if($(this).hasClass('auto-resign-off') ) {
$(this).html('Auto Resign - OFF');
clearInterval(timer);
timer = null;
}
if($(this).hasClass('auto-resign-on') ) {
$(this).html('Auto Resign - ON');
if(timer !== null) return;
timer = setInterval( function() {
if($("#gamebutton_waiting_begin").length > 0) {
$("#gamebutton_waiting_begin").click();
}
if($("#gamebutton_deploy").length > 0) {
$("#gamebutton_deploy").click();
}
if($("#gamebutton_assault_end").length > 0) {
$("#gamebutton_assault_end").click();
}
if($("#gamebutton_reinforce_end").length > 0) {
$("#gamebutton_reinforce_end").click();
}
$("#action_refresh").click();
},interval);
}
});
});
User avatar
Metsfanmax
Posts: 6722
Joined: Wed Apr 11, 2007 11:01 pm
Gender: Male

Re: Here is the resign button you've all been whining about

Post by Metsfanmax »

If I may suggest a slight improvement, randomly select an entry in the dropdown list for deployment so that you are less likely to favor or disfavor certain players with your automatic drops.
User avatar
nietzsche
Posts: 4597
Joined: Sun Feb 11, 2007 1:29 am
Gender: Female
Location: Fantasy Cooperstown

Re: Here is the resign button you've all been whining about

Post by nietzsche »

Please make it say gg in chat when the gamr is over.

Another useful script would be one that simply hides the games you want to deadbeat, so you basically can forget about them. Who cares about ratings.

You click on resign then the stores the game number and hides it from the active game list, and prevents popups in another speed games. It would also have to skip the games when you click on the jump to the next game. A chat message saying you are deadbeating would also be nice.
el cartoncito mas triste del mundo
judge_reinhold
Posts: 110
Joined: Sun Sep 02, 2012 10:59 pm
Location: meat
Contact:

Re: Here is the resign button you've all been whining about

Post by judge_reinhold »

Metsfanmax wrote:If I may suggest a slight improvement, randomly select an entry in the dropdown list for deployment so that you are less likely to favor or disfavor certain players with your automatic drops.


I was mainly using it for 2-player games so I didn't think of that. I did consider putting in a select box so you could choose which territory to drop on. I suppose I could do both.
judge_reinhold
Posts: 110
Joined: Sun Sep 02, 2012 10:59 pm
Location: meat
Contact:

Re: Here is the resign button you've all been whining about

Post by judge_reinhold »

nietzsche wrote:Please make it say gg in chat when the gamr is over.

Another useful script would be one that simply hides the games you want to deadbeat, so you basically can forget about them. Who cares about ratings.

You click on resign then the stores the game number and hides it from the active game list, and prevents popups in another speed games. It would also have to skip the games when you click on the jump to the next game. A chat message saying you are deadbeating would also be nice.



I'm not premium anymore so I wouldn't be able to test those extra speed game features.

It's too bad CC doesn't employ any coders, or all of this stuff would have been done years ago.
User avatar
JamesKer1
Posts: 1338
Joined: Fri Jun 24, 2011 9:47 am
Gender: Male
Location: Good ol' Kentucky

Re: Here is the resign button you've all been whining about

Post by JamesKer1 »

judge_reinhold wrote:It's too bad CC doesn't employ any coders, or all of this stuff would have been done years ago.


Try the Tech Team, whose direction this is headed.
Join CrossMapAHolics!

Stephan Wayne wrote:Every day is Fool's Day on CC.




A new era of monthly challenges has begun...
User avatar
dgz345
Posts: 1363
Joined: Thu Oct 07, 2010 10:53 am

Re: Here is the resign button you've all been whining about

Post by dgz345 »

judge_reinhold wrote:
nietzsche wrote:Please make it say gg in chat when the gamr is over.

Another useful script would be one that simply hides the games you want to deadbeat, so you basically can forget about them. Who cares about ratings.

You click on resign then the stores the game number and hides it from the active game list, and prevents popups in another speed games. It would also have to skip the games when you click on the jump to the next game. A chat message saying you are deadbeating would also be nice.



I'm not premium anymore so I wouldn't be able to test those extra speed game features.

It's too bad CC doesn't employ any coders, or all of this stuff would have been done years ago.


and im very happy you made your own userscript ;) thats how i started to learn javascript. i looked at BOB and i made a little script for me and my clan.

a resign only works in 1v1 environment kinda. otherwise i can say that it can ruin the games. and there is a reason you cant resign. but you can make this script better probably.
Army of GOD
Posts: 7192
Joined: Tue Feb 24, 2009 4:30 pm
Gender: Male

Re: Here is the resign button you've all been whining about

Post by Army of GOD »

can you make a script that plays all my games for me?
mrswdk is a ho
User avatar
Metsfanmax
Posts: 6722
Joined: Wed Apr 11, 2007 11:01 pm
Gender: Male

Re: Here is the resign button you've all been whining about

Post by Metsfanmax »

Army of GOD wrote:can you make a script that plays all my games for me?


Seeing as you inevitably stop playing all your games anyway, I'd say the judge has already done this.
User avatar
DoomYoshi
Posts: 10728
Joined: Tue Nov 16, 2010 9:30 pm
Gender: Male
Location: Niu York, Ukraine

Re: Here is the resign button you've all been whining about

Post by DoomYoshi »

This is actually the perfect implementation. It gives the same benefit and doesn't give extra games.
░▒▒▓▓▓▒▒░
User avatar
owenshooter
Posts: 13291
Joined: Wed Mar 07, 2007 6:01 pm
Gender: Male
Location: Deep in the Heart of Tx

Re: Here is the resign button you've all been whining about

Post by owenshooter »

DoomYoshi wrote:This is actually the perfect implementation. It gives the same benefit and doesn't give extra games.


i think it is horrible... play without scripts/add ons/plus-a-ma-bobs, use your BRAIN!!! it is amazing how much fun it is to count up all your
terits, figure out what needs to be done and where the bonus is that needs to be broken... this is nothing but another cheat code to dumb down
the CC masses... sigh... the black jesus just had a single tear run down his cheek...-Jésus noir

Image
Thorthoth,"Cloaking one's C&A fetish with moral authority and righteous indignation
makes it ever so much more erotically thrilling"
Post Reply

Return to “Tools Development”