[private] Fake Script

DeletedUser

Guest
Hello,

i got a fake script that does something like this one

Its supposed to be used by my tribe with the goal that the target coordinates are all in a unified source.
Therefore the coordinates can be updated by one person for all script users and theres no need for everyone to update his fake script regularly.

This is the script:

Code:
javascript:

if(self.location.href.replace(/.*screen=([^&#]*).*/,'$1')!='place')
alert('Use this in the rally point page');
=>Make sure it runs on the rally point

else{
i=self.location.href.replace(/.*village=(n|p)?([0-9]*).*/, '$1');
if($.cookie('WTSVGFV')!=i)
{$.cookie('WTSVGFV', i);$.cookie('WTSVGFP', 0);}
=>Retrieve village id and check if it has changed since the last use, this is to ensure you dont send fakes twice

=> The following is the callback executed after the coordinates are received
WTSFNC='
if(WTSF==\'0\') => Received (null), all target coordinates have been used
{if(confirm(\'No more unique targets for this village available\\nReset current queue?\'))
$.cookie(\'WTSVGFP\',0);}
=> Ask user if the script should start over
else{WTSF=WTSF.split(\'|\');
=> Coordinates received, split them to current, xpos, ypos

$.cookie(\'WTSVGFP\',WTSF[0]);
=> Save received queue position in cookie

=>Fill out the form
document.forms[0].x.value=WTSF[1];
document.forms[0].y.value=WTSF[2];
$(\'#place_target\').find(\'input\').val(WTSF[1]+\'|\'+WTSF[2]);
document.forms[0].ram.value=1;
document.forms[0].spy.value=1;}';
=>End of Callback

$.getScript('http://localhost/twfake/?p='+$.cookie('WTSVGFP'));
=>This gets the coordinates, $.cookie('WTSVGFP') is the current queue position, see below

}void 0;

--- --- --- --- ---

=> What the $.getScript returns:

WTSF='{NEXT_QUEUE_POS}|{X_COORD}|{Y_COORD}';eval(WTSFNC);

=> WTSF is the variable the callback WTSFNC uses to fill out the form

(the script is intented for my tribe and allied, but can be publicised as it contains some examples for less error prone screen and village detection than other scripts i have seen)

- Fred
 

DeletedUser

Guest
fills in coords from a list retrieved from his server. and 1 ram + 1 spy
 
Top