Moderator: Tech Team
lackattack wrote:Let me throw in some incentive - free premium membership* to the contributors of an AJAX-compatible GM script that can replace Tr0y's & BOB**, so I can move everyone onto AJAX
* Main contributor(s) will get 12 months, secondary contributors according to their contribution
** Colourblind feature is now core, no need to replace that
lackattack wrote:Let me throw in some incentive - free premium membership* to the contributors of an AJAX-compatible GM script that can replace Tr0y's & BOB**, so I can move everyone onto AJAX
* Main contributor(s) will get 12 months, secondary contributors according to their contribution
** Colourblind feature is now core, no need to replace that
lackattack wrote:Let me throw in some incentive - free premium membership* to the contributors of an AJAX-compatible GM script that can replace Tr0y's & BOB**, so I can move everyone onto AJAX
* Main contributor(s) will get 12 months, secondary contributors according to their contribution
** Colourblind feature is now core, no need to replace that
AAFitz wrote:There will always be cheaters, abusive players, terrible players, and worse. But we have every right to crush them.
MeDeFe wrote:This is a forum on the internet, what do you expect?
Ishiro wrote:While some things need to wait for turns to test... here is a hint, posting a chat message to yourself in a non-team game goes through the ajax routines to update the chat log.
Starting over reworking the script from the ground up, I've got the clock and player stats working. Text map and map inspect are halfway there.
Ishiro wrote:While some things need to wait for turns to test... here is a hint, posting a chat message to yourself in a non-team game goes through the ajax routines to update the chat log.
Starting over reworking the script from the ground up, I've got the clock and player stats working. Text map and map inspect are halfway there.
nmhunate wrote:Speak English... It is the language that God wrote the bible in.
PerkinsRooster wrote:I concur. The only thing I really miss is the territory counter. And yes, I do know how to count myself.
nmhunate wrote:Speak English... It is the language that God wrote the bible in.
(you need to talk to whoever wrote the XML for the Italy Map OR Pearl Harbor Map for the new XML)
(this is only an approximation - not the exact code)
<bonuses>
<bonus:+1>
<territory:Napoli>
<territory:Palermo>
</bonus>
<bonus:+1>
<territory:Napoli>
<territory:Roma>
</bonus>
<bonus:+1>
<territory:Napoli>
<territory:Torino>
</bonus>
<bonus:+1>
<territory:Napoli>
<territory:Venezia>
</bonus>
<bonus:+1>
<territory:Palermo>
<territory:Roma>
</bonus>
<bonus:+1>
<territory:Palermo>
<territory:Torino>
</bonus>
<bonus:+1>
<territory:Palermo>
<territory:Venezia>
</bonus>
<bonus:+1>
<territory:Roma>
<territory:Torino>
</bonus>
<bonus:+1>
<territory:Roma>
<territory:Venezia>
</bonus>
<bonus:+1>
<territory:Torino>
<territory:Venezia>
</bonus>
// negative because of overlap with 3 terrs
<bonus:-1>
<territory:Napoli>
<territory:Palermo>
<territory:Roma>
</bonus>
<bonus:-1>
<territory:Napoli>
<territory:Palermo>
<territory:Torino>
</bonus>
<bonus:-1>
<territory:Napoli>
<territory:Palermo>
<territory:Venezia>
</bonus>
<bonus:-1>
<territory:Napoli>
<territory:Roma>
<territory:Torino>
</bonus>
<bonus:-1>
<territory:Napoli>
<territory:Roma>
<territory:Venezia>
</bonus>
<bonus:-1>
<territory:Napoli>
<territory:Torino>
<territory:Venezia>
</bonus>
<bonus:-1>
<territory:Palermo>
<territory:Roma>
<territory:Torino>
</bonus>
<bonus:-1>
<territory:Palermo>
<territory:Roma>
<territory:Venezia>
</bonus>
<bonus:-1>
<territory:Palermo>
<territory:Torino>
<territory:Venezia>
</bonus>
<bonus:-1>
<territory:Roma>
<territory:Torino>
<territory:Venezia>
</bonus>
// back to positive because of dual overlap with 4 or 5 terrs
<bonus:+1>
<territory:Napoli>
<territory:Palermo>
<territory:Roma>
<territory:Torino>
</bonus>
<bonus:+1>
<territory:Napoli>
<territory:Palermo>
<territory:Roma>
<territory:Venezia>
</bonus>
<bonus:+1>
<territory:Napoli>
<territory:Palermo>
<territory:Torino>
<territory:Venezia>
</bonus>
<bonus:+1>
<territory:Palermo>
<territory:Roma>
<territory:Torino>
<territory:Venezia>
</bonus>
//function dave()
//{
// alert("dave");
//}
//
//var newHandleResponse = unsafeWindow.handleResponse;
//var contents = ""+newHandleResponse;
//alert(newHandleResponse);
//start = contents.substring(0,28);
//middle = "dave();";
//end = contents.substring(28, contents.length);
//alert(start);
//alert(middle);
//alert(end);
var newhandleResponse = unsafeWindow.handleResponse;
unsafeWindow.handleResponse = function() {
//put all your new code here
return newhandleResponse();
}
Ishiro wrote:A dummy function would be great, especially if lack coded it to always be called last as a clean up once he's done all his stuff.
If you want to override lack's handleResponse, you can either:
a) copy his entire function and make the changes you need to it (this is what I'm currently working on).
pros: lets you place new code exactly where it is needed.
cons: it replaces lack's function and so if he makes changes to that function you will be ignoring it until you update your script.
b) make a copy of his function and throw in your own code like this:
- Code: Select all
var newhandleResponse = unsafeWindow.handleResponse;
unsafeWindow.handleResponse = function() {
//put all your new code here
return newhandleResponse();
}
pros: doesn't replace lack's code, so when he makes changes you won't be ignoring his new code.
cons: as I've mentioned before, the handleResponse function is called 4 or 5 times per action, so BOB executes 4 or 5 times making it slow and actually breaking the map (it "freezes", stops updating with the AJAX).
Users browsing this forum: No registered users