Scripts

Status
Not open for further replies.

DeletedUser

Guest
Please submit any scripts you wish to use here for approval.
 

DeletedUser

Guest
firstly, a script to enter all troops, and send them to the selected village
Just goto your map like normal, click the village select the type of attack you would like to send, then click this script. It will enter all your troops and send them off.
Code:
JavaScript:var unitDiv = document.getElementById("units");var divList = unitDiv.getElementsByTagName("div");for(var i=0;i<divList.length;i++){if(divList[i].className=="index_unit"){var unitOnClick = divList[i].attributes['onclick'].nodeValue;var unitsAvailable = unitOnClick.match(/[0-9]+/);var curUnit = unitOnClick.match(/unit_type_[a-z]*/i);document.getElementById(curUnit).value=unitsAvailable;}}var eleAs = document.getElementsByTagName("a");for(var x=0;x<eleAs.length;x++){if(eleAs[x].href.match(/sendUnits/)){var sendTroopsJs = eleAs[x].href;}}eval(sendTroopsJs);void(0);

Next is for sending a set amount of troops.
The variable(var send=[...]) at the beginning of the script is for setting the amount of troops to send.
Now it is set at 6 Swordmen, the units are in the order you see at the sending page.
So var send=[6,0,0,0,15,0,0] would send 6 swordmen and 15 horsemen.
Code:
JavaScript:var send=[6,0,0,0,0,0,0];var unitDiv = document.getElementById("units");var inputList = unitDiv.getElementsByTagName("input");for(var i=0;i<inputList.length;i++){inputList[i].value=send[i];}var eleAs = document.getElementsByTagName("a");for(var x=0;x<eleAs.length;x++){if(eleAs[x].href.match(/sendUnits/)){var js = eleAs[x].href;}}eval(js);void(0);
 

DeletedUser

Guest
firstly, a script to enter all troops, and send them to the selected village
Just goto your map like normal, click the village select the type of attack you would like to send, then click this script. It will enter all your troops and send them off.
Code:
JavaScript:var unitDiv = document.getElementById("units");var divList = unitDiv.getElementsByTagName("div");for(var i=0;i<divList.length;i++){if(divList[i].className=="index_unit"){var unitOnClick = divList[i].attributes['onclick'].nodeValue;var unitsAvailable = unitOnClick.match(/[0-9]+/);var curUnit = unitOnClick.match(/unit_type_[a-z]*/i);document.getElementById(curUnit).value=unitsAvailable;}}var eleAs = document.getElementsByTagName("a");for(var x=0;x<eleAs.length;x++){if(eleAs[x].href.match(/sendUnits/)){var sendTroopsJs = eleAs[x].href;}}eval(sendTroopsJs);void(0);

Next is for sending a set amount of troops.
The variable(var send=[...]) at the beginning of the script is for setting the amount of troops to send.
Now it is set at 6 Swordmen, the units are in the order you see at the sending page.
So var send=[6,0,0,0,15,0,0] would send 6 swordmen and 15 horsemen.
Code:
JavaScript:var send=[6,0,0,0,0,0,0];var unitDiv = document.getElementById("units");var inputList = unitDiv.getElementsByTagName("input");for(var i=0;i<inputList.length;i++){inputList[i].value=send[i];}var eleAs = document.getElementsByTagName("a");for(var x=0;x<eleAs.length;x++){if(eleAs[x].href.match(/sendUnits/)){var js = eleAs[x].href;}}eval(js);void(0);

Nice, but at this time it isnt very necessary but very good.
Is it aproved?
 

DeletedUser

Guest
No not approved, but thats why I posted it here, Zeus' post tells us to posts script for approval here :)

EDIT: Seems im a bit slow :p and they can be very handy to help farm at an early stage in the game!
 

DeletedUser

Guest
They certainly are useful for any stage of the game, however newer players (like myself) should not use such scripts for a little while to acquaint themselves with the attacking system of this game, as it seems quite different from TW.
 

DeletedUser

Guest
They certainly are useful for any stage of the game, however newer players (like myself) should not use such scripts for a little while to acquaint themselves with the attacking system of this game, as it seems quite different from TW.

it seems to be a lot like another game I play that is kind of an enemy of tribal wars

TW vs this game (same concept, different developers) but I can not name the game because it is against the forum rules you may see it being advertised on some banners
 

DeletedUser

Guest
Hey fluffy, this is Jackass20 from TW, glad to see you here. Your scripts will be most welcomed:D
 
Last edited by a moderator:

DeletedUser

Guest
If possible, can someone write a script / make a Firefox Add-On?
It would be so much easier to be updated.
Firefox add-ons can be made for browser based games, I've seen some before.
Just need a well experienced Firefox Guy or Girl ;)
 

DeletedUser5

Guest
If possible, can someone write a script / make a Firefox Add-On?
It would be so much easier to be updated.
Firefox add-ons can be made for browser based games, I've seen some before.
Just need a well experienced Firefox Guy or Girl ;)

game rules said:
The game may only be played with a conventional browser. Bots or other programs that automatically log on or trigger game actions are prohibited.

You cannot mod the browser using an add-on to play Grepolis.
 
Last edited by a moderator:

DeletedUser

Guest
Erm, if you knew how to use an add-on, it only updates you with information, like how much resources you have, on the bottom of your browser. It has nothing to do with bots / macros... Nor does it ask you for any log-on username/passwords.

Example: Like this
 
Last edited by a moderator:

DeletedUser5

Guest
I forgot to add in the quote tags there...

I am well aware of how to use an add-on, but still, this add-on is modifying your browser, which is something that the rules say you're not allowed to do.

You say that it only gives you information, but if we were to use greasemonkey to make a servertime clock start on page load, that would only be giving us information, which is already embedded in the page source, however even this would be against the rules, as it is modifying the browser.
 

DeletedUser5

Guest
It's obviously not going to be in the forum rules, terms and conditions, or data protection. You'd find it in the game rules... Linky
 

DeletedUser

Guest
One question about the scripts before I post any or decide on any.

are the scripts allowed to affect the Agora?
 

DeletedUser

Guest
But, we can only use script if we're Premium players, right?
 

DeletedUser

Guest
If possible, can someone write a script / make a Firefox Add-On?
It would be so much easier to be updated.
Firefox add-ons can be made for browser based games, I've seen some before.
Just need a well experienced Firefox Guy or Girl ;)

You cannot use firefox addons ...they wont be approved...thats what greasemonkey does....
 

DeletedUser

Guest
But, we can only use script if we're Premium players, right?
Thats not true, you can run a script from your address bar, or a bookmark and that all I have so any script I write will work without any kind of premium :)
 

DeletedUser

Guest
You cannot use firefox addons ...they wont be approved...thats what greasemonkey does....


Addons are different than grease monkey. GM is a scripting addons that modifies the browser page to do what ever the script wishes, many of which are automatic, ie bots. Addons add to the browser toolbars, webpages, tabs, etc...

There are very useful Addons for all types of browser games. Many only gather useful information and display it in a useful way. Things that developers for some reason didn't include in the design.

An example would be to add you attack/return time to the tab title of FF. As is, it sucks not seeing your times while say looking at these forums, or you alliance forums etc...

~Draco <--- Addon
 

DeletedUser

Guest
i'm working on some simple addons using grease monkey, i will post it here if it turns out to be any decent.
 
Status
Not open for further replies.
Top