|
|
Модератор форума: LightInDarkness |
Форум Web раздел Сайты / WWW для эмуляторов [Модуль]Показ топ чаров |
[Модуль]Показ топ чаров |
Скрипт взять с сайта написанного РазАртом)
Code <?php $character_db = @mysql_query("SELECT guid FROM `".$mysql_db_characters[$realm_num]."`.`characters` ORDER BY totalKills DESC LIMIT 20", $ConnectDB[$realm_num]); $i = 0; while($result = @mysql_fetch_array($character_db)){ $char_array[$i] = $result['guid']; $i++; } $guid = $char_array[rand(0,9)]; $character_db = @mysql_fetch_array(mysql_query("SELECT gender, race, name, level, class, playerBytes, playerBytes2, totalKills FROM `".$mysql_db_characters[$realm_num]."`.`characters` WHERE guid = '$guid' LIMIT 1", $ConnectDB[$realm_num])); $character['gender'] = $character_db['gender']; $character['race'] = $character_db['race']; $character['name'] = $character_db['name']; $character['level'] = $character_db['level']; $character['class'] = $character_db['class']; $character['skincolor'] = $character_db['playerBytes'] % 256; $character['facestyle'] = ($character_db['playerBytes'] >> 8) % 256; $character['hairstyle'] = ($character_db['playerBytes'] >> 16) % 256; $character['haircolor'] = ($character_db['playerBytes'] >> 24) % 256; $character['facialhair'] = $character_db['playerBytes2'] % 256; $character['totalKills'] = $character_db['totalKills']; $armory_db = @mysql_query("SELECT * FROM `".$mysql_db_characters[$realm_num]."`.`character_inventory` WHERE guid = $guid AND bag=0", $ConnectDB[$realm_num]); if ($server_type[$realm_num] == 0) { while($result = @mysql_fetch_array($armory_db)){ if ($result['slot']==0) {$character_item[0]['item_template']=$result['item_template']; $character_item[0]['item']=$result['item'];} if ($result['slot']==1) {$character_item[1]['item_template']=$result['item_template']; $character_item[1]['item']=$result['item'];} if ($result['slot']==2) {$character_item[2]['item_template']=$result['item_template']; $character_item[2]['item']=$result['item'];} if ($result['slot']==14) {$character_item[3]['item_template']=$result['item_template']; $character_item[3]['item']=$result['item'];} if ($result['slot']==4) {$character_item[4]['item_template']=$result['item_template']; $character_item[4]['item']=$result['item'];} if ($result['slot']==3) {$character_item[5]['item_template']=$result['item_template']; $character_item[5]['item']=$result['item'];} if ($result['slot']==18) {$character_item[6]['item_template']=$result['item_template']; $character_item[6]['item']=$result['item'];} if ($result['slot']==8) {$character_item[7]['item_template']=$result['item_template']; $character_item[7]['item']=$result['item'];} if ($result['slot']==9) {$character_item[8]['item_template']=$result['item_template']; $character_item[8]['item']=$result['item'];} if ($result['slot']==5) {$character_item[9]['item_template']=$result['item_template']; $character_item[9]['item']=$result['item'];} if ($result['slot']==6) {$character_item[10]['item_template']=$result['item_template']; $character_item[10]['item']=$result['item'];} if ($result['slot']==7) {$character_item[11]['item_template']=$result['item_template']; $character_item[11]['item']=$result['item'];} if ($result['slot']==10) {$character_item[12]['item_template']=$result['item_template']; $character_item[12]['item']=$result['item'];} if ($result['slot']==11) {$character_item[13]['item_template']=$result['item_template']; $character_item[13]['item']=$result['item'];} if ($result['slot']==12) {$character_item[14]['item_template']=$result['item_template']; $character_item[14]['item']=$result['item'];} if ($result['slot']==13) {$character_item[15]['item_template']=$result['item_template']; $character_item[15]['item']=$result['item'];} if ($result['slot']==15) {$character_item[16]['item_template']=$result['item_template']; $character_item[16]['item']=$result['item'];} if ($result['slot']==16) {$character_item[17]['item_template']=$result['item_template']; $character_item[17]['item']=$result['item'];} if ($result['slot']==17) {$character_item[18]['item_template']=$result['item_template']; $character_item[18]['item']=$result['item'];} } } elseif ($server_type[$realm_num] == 1) { while($result = @mysql_fetch_array($armory_db)){ if ($result['slot']==0) {$character_item[0]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[0]['item']=$result['item'];} if ($result['slot']==1) {$character_item[1]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[1]['item']=$result['item'];} if ($result['slot']==2) {$character_item[2]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[2]['item']=$result['item'];} if ($result['slot']==14) {$character_item[3]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[3]['item']=$result['item'];} if ($result['slot']==4) {$character_item[4]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[4]['item']=$result['item'];} if ($result['slot']==3) {$character_item[5]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[5]['item']=$result['item'];} if ($result['slot']==18) {$character_item[6]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[6]['item']=$result['item'];} if ($result['slot']==8) {$character_item[7]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[7]['item']=$result['item'];} if ($result['slot']==9) {$character_item[8]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[8]['item']=$result['item'];} if ($result['slot']==5) {$character_item[9]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[9]['item']=$result['item'];} if ($result['slot']==6) {$character_item[10]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[10]['item']=$result['item'];} if ($result['slot']==7) {$character_item[11]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[11]['item']=$result['item'];} if ($result['slot']==10) {$character_item[12]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[12]['item']=$result['item'];} if ($result['slot']==11) {$character_item[13]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[13]['item']=$result['item'];} if ($result['slot']==12) {$character_item[14]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[14]['item']=$result['item'];} if ($result['slot']==13) {$character_item[15]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[15]['item']=$result['item'];} if ($result['slot']==15) {$character_item[16]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[16]['item']=$result['item'];} if ($result['slot']==16) {$character_item[17]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[17]['item']=$result['item'];} if ($result['slot']==17) {$character_item[18]['item_template']=getIEMyth($result['item'], $realm_num); $character_item[18]['item']=$result['item'];} } } $i = 0; while ($i < 19) { if (@$character_item[$i]['item_template'] > 0) { $character_item[$i]['displayid'] = getDisplayidFromTemplate($character_item[$i]['item_template'], $realm_num); } $i++; } $equip_list = ""; if (@$character_item[0]['item_template']) {$equip_list.="1,".$character_item[0]['displayid'];} if (@$character_item[2]['item_template']) {if ($equip_list) {$equip_list.=",3,".$character_item[2]['displayid'];} else {$equip_list.="3,".$character_item[2]['displayid'];}} if (@$character_item[5]['item_template']) {if ($equip_list) {$equip_list.=",4,".$character_item[5]['displayid'];} else {$equip_list.="4,".$character_item[5]['displayid'];}} if (@$character_item[4]['item_template']) {if ($equip_list) {$equip_list.=",5,".$character_item[4]['displayid'];} else {$equip_list.="5,".$character_item[4]['displayid'];}} if (@$character_item[9]['item_template']) {if ($equip_list) {$equip_list.=",6,".$character_item[9]['displayid'];} else {$equip_list.="6,".$character_item[9]['displayid'];}} if (@$character_item[10]['item_template']) {if ($equip_list) {$equip_list.=",7,".$character_item[10]['displayid'];} else {$equip_list.="7,".$character_item[10]['displayid'];}} if (@$character_item[11]['item_template']) {if ($equip_list) {$equip_list.=",8,".$character_item[11]['displayid'];} else {$equip_list.="8,".$character_item[11]['displayid'];}} if (@$character_item[7]['item_template']) {if ($equip_list) {$equip_list.=",9,".$character_item[7]['displayid'];} else {$equip_list.="9,".$character_item[7]['displayid'];}} if (@$character_item[8]['item_template']) {if ($equip_list) {$equip_list.=",10,".$character_item[8]['displayid'];} else {$equip_list.="10,".$character_item[8]['displayid'];}} if (@$character_item[17]['item_template']) {if ($equip_list) {$equip_list.=",14,".$character_item[17]['displayid'];} else {$equip_list.="14,".$character_item[17]['displayid'];}} if (@$character_item[3]['item_template']) {if ($equip_list) {$equip_list.=",16,".$character_item[3]['displayid'];} else {$equip_list.="16,".$character_item[3]['displayid'];}} if (@$character_item[6]['item_template']) {if ($equip_list) {$equip_list.=",19,".$character_item[6]['displayid'];} else {$equip_list.="19,".$character_item[16]['displayid'];}} if (@$character_item[16]['item_template']) {if ($equip_list) {$equip_list.=",21,".$character_item[16]['displayid'];} else {$equip_list.="21,".$character_item[16]['displayid'];}} $page_text = "<table border=\"0\" width=\"100%\"> <tr> <td align=\"center\" valign=\"top\"> <object id=\"wowhead\" type=\"application/x-shockwave-flash\" data=\"http://static.wowhead.com/modelviewer/ModelView.swf\" height=\"350px\" width=\"200px\"> <param name=\"quality\" value=\"high\"> <param name=\"allowscriptaccess\" value=\"always\"> <param name=\"menu\" value=\"false\"> <param value=\"transparent\" name=\"wmode\"> <param name=\"flashvars\" value=\"model=".$wh_race_array[$character['race']].$wh_gender_array[$character['gender']]."&modelType=16&equipList=".$equip_list."&ha=".$character['hairstyle']."&hc=".$character['haircolor']."&fa=".$character['facestyle']."&sk=".$character['skincolor']."&fh=".$character['facialhair']."&fc=1&mode=1&contentPath=http://static.wowhead.com/modelviewer/\"> <param name=\"movie\" value=\"http://static.wowhead.com/modelviewer/ModelView.swf\"> </object> ".$character['name']." ".$character['level']." уровня<br /> ".$character['totalKills']." PvP убийств<br /> Реалм ".$realm_title[$realm_num]."<br /> </td> </tr> </table> "; echo $page_text; ?> +string Code <?php $srt_page_title = array( "main" => "text_main", "" => "text_main" ); $str_gm_level = array("Игрок", "Модератор", "Игровой Мастер", "Ивентер", "Администратор", "Куратор"); $str_acc_expansion = array("Classic", "The Burning Crusade", "Wrath of the Lich King"); $str_class[0] = array( "", "Воин", "Паладин", "Охотник", "Разбойник", "Жрец", "Рыцарь смерти", "Шаман", "Маг", "Чернокнижник", "", "Друид"); $str_class[1] = array( "", "Воин", "Паладин", "Охотница", "Разбойница", "Жрица", "Рыцарь смерти", "Шаманка", "Маг", "Чернокнижница", "", "Друид"); $str_race[0] = array( "", "Человек", "Орк", "Дворф", "Ночной эльф", "Нежить", "Таурен", "Гном", "Тролль", "Гоблин", "Эльф крови", "Дреней", "22" => "Ворген"); $str_race[1] = array( "", "Человек", "Орк", "Дворф", "Ночная эльфийка", "Нежить", "Таурен", "Гном", "Тролль", "Гоблин", "Эльфийка крови", "Дреней", "22" => "Ворген"); $str_side = array("Альянс", "Орда"); $wh_race_array = array( "", "human", "orc", "dwarf", "nightelf", "scourge", "tauren", "gnome", "troll", "goblin", "bloodelf", "draenei", "", "", "", "", "", "", "", "", "", "", "worgen"); $wh_gender_array = array( "male", "female"); $profession_array = array( 129 => "Первая помощь", 164 => "Кузнечное дело", 165 => "Кожевночество", 171 => "Алхимия", 182 => "Травничество", 185 => "Кулинария", 186 => "Горное дело", 197 => "Портняжное дело", 202 => "Инженерное дело", 333 => "Наложение чар", 356 => "Рыбная ловля", 393 => "Снятие шкур", 755 => "Ювелирное дело", 773 => "Начертание"); $reputation_rank = array( 'Ненависть', 'Враждебность', 'Неприязнь', 'Равнодушие', 'Дружелюбие', 'Уважение', 'Почтение', 'Превознесение'); ?>
root@deqsec.ru
|
| |||
| |||