Thread Rating:
  • 5 Vote(s) - 3.4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ajaxed Moral
#1
Ajaxed Moral V1.1

V1.1
Small update, now the moral has the percent %


Screen
[Image: moralupdated.th.png]

Took me some hours but i finally finished this tool, all it does it to display the moral onmouseover a village from the map(karte).


This tool is harder to install, i'll explain bellow how to do this:
1. download the archive and uncompress it in htdocs
2. Replace this from script.js
Code:
function map_popup(title, points, owner, ally, village_groups) {
    map_move();
    
    setText(gid("info_title"), title);
    setText(gid("info_points"), points);
    if(owner != null) {
        setText(gid("info_owner"), owner);
        gid("info_owner_row").style.display = '';
        gid("info_left_row").style.display = 'none';
    }
    else {
        gid("info_owner_row").style.display = 'none';
        gid("info_left_row").style.display = '';
    }
    
    if(ally != null) {
        gid("info_ally_row").style.display = '';
        setText(gid("info_ally"), ally);
    }
    else {
        gid("info_ally_row").style.display = 'none';
    }
    
    if(village_groups) {
        gid("info_village_groups_row").style.display = '';
        setText(gid("info_village_groups"), village_groups);
    } else {
        gid("info_village_groups_row").style.display = 'none';
    }

    var info = gid("info");
    info.style.visibility = "visible";
}

With this
Code:
var xmlhttp;
function map_popup(title, points, owner, ally, village_groups,x,y,origin_id){
    map_move();
    
    //ajax moral
    xmlhttp=GetXmlHttpObject();
    var url="AlexDS_proc.php?page=1&x="+x+"&y="+y+"&id="+origin_id+"&sid="+Math.random();
    xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){gid('moral').innerHTML=xmlhttp.responseText;}}
    xmlhttp.open("GET",url,true);
    xmlhttp.send(null);
    //end of ajax moral
    
    setText(gid("info_title"), title);
    setText(gid("info_points"), points);
    if(owner != null) {
        setText(gid("info_owner"), owner);
        gid("info_owner_row").style.display = '';
        gid("info_left_row").style.display = 'none';
    }
    else {
        gid("info_owner_row").style.display = 'none';
        gid("info_left_row").style.display = '';
    }
    if(ally != null) {
        gid("info_ally_row").style.display = '';
        setText(gid("info_ally"), ally);
    }
    else {
        gid("info_ally_row").style.display = 'none';
    }
    if(village_groups) {
        gid("info_village_groups_row").style.display = '';
        setText(gid("info_village_groups"), village_groups);
    } else {
        gid("info_village_groups_row").style.display = 'none';
    }
    var info = gid("info");
    info.style.visibility = "visible";
}
function GetXmlHttpObject(){if(window.XMLHttpRequest){return new XMLHttpRequest();}if(window.ActiveXObject){return new ActiveXObject("Microsoft.XMLHTTP");}return null;}
Save and close

3. Open templates/game_map.tpl
Find
Code:
<tr id="info_village_groups_row"><td>Gruppen:</td><td id="info_village_groups">village_groups</td></tr>

After add
Code:
<tr><td>Moral</td><td id='moral'></td></tr>

Find
Code:
map_popup('{$cl_map->getVillage($x,$y,"name")}({$x}|{$y}) K{$cl_map->getcon($x,$y)}', {$cl_map->getvillage($x,$y,points)}, {$cl_map->playerinfo($x,$y)}, {$cl_map->getally($x,$y)}, false)

Replace With
Code:
map_popup('{$cl_map->getVillage($x,$y,"name")} ({$x}|{$y}) K {$cl_map->getcon($x,$y)}', {$cl_map->getvillage($x,$y,points)}, {$cl_map->playerinfo($x,$y)}, {$cl_map->getally($x,$y)}, false,{$x},{$y},{$village.id})

Save and Close

Done, you have finished Wink

Download
Download From Rapidshare
Reply
#2
Please, make a screenshot from the tool. and why do you have an instructions, when you offer to download it?

sorry for my bad englishWink

Reply
#3
Please translate this thread in German...

Google translator did'n translate it right...

sorry for my english.
Reply
#4
As requested, screenshot added, the instructions are in the first post, just read the carefully, and about translation to german, really sorry but i can't because i don't know german Sad.
Reply
#5
the percent sign is missing behind the numbers.

Reply
#6
Good Tool Wink
And good Feature, but this is a tool like a cheat tool Tongue

I will do this tool in my All in One...
Manchmal denke ich:
Reply
#7
warum soll das ein cheattool sein? das ist beim richtigen ds auch so.

Reply
#8
Sieht man das nur bei eigenen Dörfern oder auch bei anderen.
Wenn man das auch bei anderen sieht ist es ja auch ein Cheat Tool ...

Wenn man es nur bei eigenen Dörfern sieht, dann natürlich nicht.
Manchmal denke ich:
Reply
#9
beim richtig ds sieht man von jedem dorf die moral. also ist es kein cheattool.

Reply
#10
Tool updated to 1.1, just a small update added the %
It's not a cheating tool it's a premium feature in tribalwars
Reply
#11
Sorry if this thread is old, but the files are down...

And sorry for my bad english

MfG Manuel
Reply
#12
(13.09.2009, 15:55)SlimShady95 Wrote: And sorry for my bad english

MfG Manuel

1. Schreibs doch in deine sig das dein englisch so schlecht ist - dann mussts dus nicht in jeden post schreiben xD

2. "MfG" ist wirklich, wirklich, very bad english Wink
[Image: banner1.jpg?2]
Reply
#13
(13.09.2009, 17:17)benji889 Wrote:
(13.09.2009, 15:55)SlimShady95 Wrote: And sorry for my bad english

MfG Manuel

1. Schreibs doch in deine sig das dein englisch so schlecht ist - dann mussts dus nicht in jeden post schreiben xD

2. "MfG" ist wirklich, wirklich, very bad english Wink

Spam !? Big Grin

Kann das mal bitte einer hochladen?
Oder wenigstens die .php

Danke Wink

MfG Manuel
Reply
#14
Those files are down? Can anyone reupload those files?
Reply
#15
Maybe hip_hop x can upload the files that Nobody have to surch the lines in the files! It would be very much easier!

Sorry for my bad english!
Mentor gesucht:
Wenn ich dir helfe dann bewerte mich! Aber bitte POSITIV
Und wenn nicht kannst du das trotzdem machen!
Reply
#16
(11.10.2009, 08:05)Jonas1309 Wrote: Maybe hip_hop x can upload the files that Nobody have to surch the lines in the files! It would be very much easier!

Sorry for my bad english!

You miss understood the instructions.. THAT LINES you're speaking about .. are codes you need to change in the script.js file.. besides that you need to have the zip file wich has been removed from downloading Smile hoping that hiphopx will PM me the zip file through atachment.. since it has been removed due copyright claim.
Reply
#17
I'm not sure, but I think, this Tool is in Yannici's All in One..
Reply
#18
I know but i don't want the All In One , i have it already but i need only the tool!
Reply
#19
You have the all in one of Yannici?

I have that also and with myself paladin and statue also does not go
Wenn ich dir helfen konnte, bewerte mich doch bitte!

Manche Leute sagen, 20 Stunden am Tag Tetris zu summen wäre verrückt, ich frage mich nur wieso...


Reply
#20
bettdecke1 ... u done some mistakes.. because for me .. goes very well
Reply




Users browsing this thread: 1 Guest(s)