Conquer Club

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.

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

Postby judge_reinhold on Fri Mar 20, 2015 9:08 pm

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);
}
});
});
Colonel judge_reinhold
 
Posts: 110
Joined: Sun Sep 02, 2012 10:59 pm
Location: meat

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

Postby Metsfanmax on Fri Mar 20, 2015 9:38 pm

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
Sergeant 1st Class Metsfanmax
 
Posts: 6722
Joined: Wed Apr 11, 2007 11:01 pm

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

Postby nietzsche on Sat Mar 21, 2015 1:23 am

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
User avatar
General nietzsche
 
Posts: 4597
Joined: Sun Feb 11, 2007 1:29 am
Location: Fantasy Cooperstown

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

Postby judge_reinhold on Sat Mar 21, 2015 12:44 pm

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.
Colonel judge_reinhold
 
Posts: 110
Joined: Sun Sep 02, 2012 10:59 pm
Location: meat

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

Postby judge_reinhold on Sat Mar 21, 2015 12:46 pm

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.
Colonel judge_reinhold
 
Posts: 110
Joined: Sun Sep 02, 2012 10:59 pm
Location: meat

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

Postby JamesKer1 on Sat Mar 21, 2015 4:52 pm

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
Private JamesKer1
 
Posts: 1338
Joined: Fri Jun 24, 2011 9:47 am
Location: Good ol' Kentucky

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

Postby dgz345 on Sat Apr 04, 2015 8:36 am

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.
User avatar
Lieutenant dgz345
 
Posts: 1362
Joined: Thu Oct 07, 2010 10:53 am

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

Postby Army of GOD on Sat Apr 04, 2015 9:42 pm

can you make a script that plays all my games for me?
mrswdk is a ho
User avatar
Lieutenant Army of GOD
 
Posts: 7189
Joined: Tue Feb 24, 2009 4:30 pm

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

Postby Metsfanmax on Sat Apr 04, 2015 9:45 pm

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
Sergeant 1st Class Metsfanmax
 
Posts: 6722
Joined: Wed Apr 11, 2007 11:01 pm

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

Postby DoomYoshi on Sun Apr 05, 2015 5:43 pm

This is actually the perfect implementation. It gives the same benefit and doesn't give extra games.
░▒▒▓▓▓▒▒░
User avatar
Captain DoomYoshi
 
Posts: 10723
Joined: Tue Nov 16, 2010 9:30 pm
Location: Niu York, Ukraine

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

Postby owenshooter on Mon Apr 13, 2015 1:16 pm

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"
User avatar
Lieutenant owenshooter
 
Posts: 13078
Joined: Wed Mar 07, 2007 6:01 pm
Location: Deep in the Heart of Tx


Return to Tools Development

Who is online

Users browsing this forum: No registered users