TWLan Forum
Ajaxed Moral - Printable Version

+- TWLan Forum (https://twlan.org)
+-- Forum: Legacy (https://twlan.org/forumdisplay.php?fid=61)
+--- Forum: TWLan 1.x (DSLan) (https://twlan.org/forumdisplay.php?fid=62)
+---- Forum: Deutsche Community (https://twlan.org/forumdisplay.php?fid=65)
+----- Forum: Spielerprojekte (https://twlan.org/forumdisplay.php?fid=9)
+------ Forum: Tools und Spielerprojekte (https://twlan.org/forumdisplay.php?fid=10)
+------ Thread: Ajaxed Moral (/showthread.php?tid=1881)

Pages: 1 2


Ajaxed Moral - hip_hop_x - 08.08.2009

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


RE: Ajaxed Moral - Black Arrow - 08.08.2009

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


RE: Ajaxed Moral - knollenmax - 08.08.2009

Please translate this thread in German...

Google translator did'n translate it right...

sorry for my english.


RE: Ajaxed Moral - hip_hop_x - 08.08.2009

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.


RE: Ajaxed Moral - Black Arrow - 08.08.2009

the percent sign is missing behind the numbers.


RE: Ajaxed Moral - Yannici - 08.08.2009

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...


RE: Ajaxed Moral - Black Arrow - 08.08.2009

warum soll das ein cheattool sein? das ist beim richtigen ds auch so.


RE: Ajaxed Moral - Yannici - 08.08.2009

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.


RE: Ajaxed Moral - Black Arrow - 08.08.2009

beim richtig ds sieht man von jedem dorf die moral. also ist es kein cheattool.


RE: Ajaxed Moral - hip_hop_x - 08.08.2009

Tool updated to 1.1, just a small update added the %
It's not a cheating tool it's a premium feature in tribalwars


RE: Ajaxed Moral - SlimShady95 - 13.09.2009

Sorry if this thread is old, but the files are down...

And sorry for my bad english

MfG Manuel


RE: Ajaxed Moral - benji889 - 13.09.2009

(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


RE: Ajaxed Moral - SlimShady95 - 14.09.2009

(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


RE: Ajaxed Moral - Arthas - 10.10.2009

Those files are down? Can anyone reupload those files?


RE: Ajaxed Moral - Jonas1309 - 11.10.2009

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!


RE: Ajaxed Moral - m1cr0 - 11.10.2009

(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.


RE: Ajaxed Moral - knollenmax - 11.10.2009

I'm not sure, but I think, this Tool is in Yannici's All in One..


RE: Ajaxed Moral - Arthas - 11.10.2009

I know but i don't want the All In One , i have it already but i need only the tool!


RE: Ajaxed Moral - Bettdecke1 - 14.10.2009

You have the all in one of Yannici?

I have that also and with myself paladin and statue also does not go


RE: Ajaxed Moral - m1cr0 - 14.10.2009

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