Wizerk13 Super Member
Viata : Posts : 38 Milioane : 185 Reputatie : 0 Join date : 2011-04-18 Age : 27
| Subject: Adaugare Moral Pe Harta ! (Server triburile) Mon Apr 18, 2011 5:49 pm | |
| Pentru a adauga morarul pe harta va trebui sa urmariti cativa pasi: 1.Intrați în script.js din htdocs 2.Căutați următorul cod - 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"; } 3.Înlocuiți-l cu:Cod: - 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 4.Salvează și închide. 5.Intră în templates/game_map.tpl 6.Caută codul : - Code:
-
<tr id="info_village_groups_row"><td>Grupe:</td><td id="info_village_groups">village_groups</td></tr> 7.După , adăugați codul : - Code:
-
<tr><td>Moral</td><td id='moral'></td></tr> 8.Caută codul: - 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) 9.Înlocuiește-l cu: - 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}) Salvati si inchideti ! | |
|