[help] Grand Reset Ranking MMW 0.8
tomassk89 Дата: Четверг, 17.10.2013, 18:07 | Сообщение # 1
Рядовой
Группа: Пользователи
Сообщений: 9
Статус: Оффлайн
Может у кого завалялся Ранкинг Модуль где Гранд Ресет Тоже показывает?
Реклама
webmous Дата: Четверг, 17.10.2013, 18:42 | Сообщение # 2
Лейтенант
Группа: Проверенные
Сообщений: 48
Статус: Оффлайн
колонка гранд ресета как называется?
www.data.ru.com
tomassk89 Дата: Четверг, 17.10.2013, 19:34 | Сообщение # 3
Рядовой
Группа: Пользователи
Сообщений: 9
Статус: Оффлайн
ja vot etot modulj ispoljzuju
<?php // Install query: // ALTER TABLE Character add gr_count int not null default 0 function _gr(){ global $GR; $GR["level"] = 400; // need lvl, 0 - any lvl O_o $GR["resets"] = 100; // resets need for each gr, 0 - any resets $GR["credits"] = -700; // Above zero - users paying credits, below zero - get for gr. 0 - nothing $GR["resets_reset"] = TRUE; // CLEAN OR NO ( TRUE OR FALSE ) $GR["inventory"] = FALSE; // Clean inventory YES or NO ( TRUE or FALSE ) $GR["stats_reset"] = TRUE; // Reset or NO stats(points, TRUE or FALSE) $GR["mode"] = "HI"; // GR mode. "LO" or "HI" - LOW or HIGH } if( $_SESSION["set_lang"] == "Russian" ) set_rus(); else set_eng(); // Default Stats (after GR) $GR_DS = array(28, 25, 10, 28, 35); // str dex vit ene cmd echo "<center> <a><b>Grand Reset</b></a> <br>"; //Data Capture $account = clean_var(stripslashes($login)); $query = mssql_query("exec XCredits '".$account."',0;"); $char_info = mssql_query("SELECT AccountID ,Money, cLevel, Reset, gr_count FROM Character WHERE Name='". $char_set ."'"); $char_info = mssql_fetch_array($char_info); $credits_ = mssql_query("SELECT credits FROM MEMB_CREDITS WHERE memb___id='". $char_info["AccountID"] ."'"); if( mssql_num_rows($credits_) != 1 ) $credits[0] = 0; else $credits = mssql_fetch_row($credits_); //// _gr(); NEED_SET(); if( isset( $_POST["gr_button"] ) ) do_gr($char_set); _gr(); NEED_SET(); ?> <br> <table class="sort-table" border="0" cellpadding="0" cellspacing="0"> <thead><tr> <td colspan="2" align="center"> <?=mmw_lang_need?> </td> </tr></thead> <? if( $GR["level"] > 0 ) { ?> <tr> <td align="right"><?=ucfirst(mmw_lang_level)?></td> <td align="left"> <?=($char_info["cLevel"] >= $GR["level"]) ? "ok" : mmw_lang_more ." ". ($GR["level"] - $char_info["cLevel"])?> </td> </tr> <? } if( $GR["money"] > 0 ) { ?> <tr> <td align="right"><?=ucfirst(mmw_lang_money)?></td> <td align="left"> <?=$m_need?> </td> </tr> <? } if( $GR["resets"] > 0 ) { ?> <tr> <td align="right"> Resets </td> <td align="left"> <?=$res_need?> </td> </tr> <? } if( $GR["credits"] > 0 ) {?> <tr> <td align="right"><?=ucfirst(mmw_lang_credits_)?></td> <td align="left"><?=$cr_need?> </td> </tr> <? } ?> <tr> <td colspan="2" align="right"> <center> <form action="" method="POST" name="gr_form"> <input type="submit" value=" <?=mmw_lang_try?> " name="gr_button"> </form> </center> </td> </tr> </table> <br> <a><b><?=mmw_lang_requirements?></b></a><br> <? if( $GR["money"] > 0 ) echo "<a>". mmw_lang_need_money_t . $GR["money"] ."</a><br>"; else if( $GR["money"] < 0 ) echo "<a>". mmw_lang_gift ."- ". -$GR["money"] ." ". mmw_lang_zen ."</a><br>"; if( $GR["credits"] > 0 ) echo "<a>". mmw_lang_need_credits_t . $GR["credits"] ."</a><br>"; else if( $GR["credits"] < 0 ) echo "<a>". mmw_lang_gift ."- ". -$GR["credits"] ." ". mmw_lang_credits__ ."</a><br>"; ?> <a><?=mmw_lang_need_level_t . $GR["level"] ?></a><br> <a><?=mmw_lang_need_resets_t . $GR["resets"] ?></a><br><br> <a><?=$char_set ." - ". $char_info[4] ." [GR]" ?></a><br> </center> <? function do_gr($char_set){ global $GR, $GR_DS, $okey_start, $okey_end, $die_start, $die_end, $char_info, $credits, $GR_T; $error = FALSE; if( !isset($char_set) || !$char_set ){ echo "You havent a character"; return -1; } if( $GR_T["resets_need"] > 0) { echo $die_start . ucfirst(mmw_lang_need) ." ". mmw_lang_more ." ". $GR_T["resets_need"] . " resets". $die_end; $error = TRUE; } if( $char_info["cLevel"] < $GR["level"] ) { echo $die_start . ucfirst(mmw_lang_need) ." ". mmw_lang_more ." ". ($GR["level"] - $char_info["cLevel"]) . " lvls". $die_end; $error = TRUE; } if( $status > 0 ) { echo $die_start . mmw_lang_login_off . $die_end; $error = TRUE; } if( $GR_T["credits_need"] > 0) { echo $die_start . mmw_lang_more ." ". $GR_T["credits_need"] . mmw_lang_credits__ . $die_end; $error = TRUE; } if( $_SESSION["user"] != $char_info["AccountID"] ) { $error = TRUE; echo "What?!?<br>"; } if( $error ) return -1; /////// /////// if( $GR["inventory"] ) $cln_inv = ", [inventory]=CONVERT(varbinary(1080), null)"; else $cln_inv = NULL; if( $GR["stats_reset"] ) $cln_stat = ", [Strength]='". $GR_DS[0] ."', [Dexterity]='". $GR_DS[1] ."', [Vitality]='". $GR_DS[2] ."', [Energy]='". $GR_DS[3] ."', [Leadership]='". $GR_DS[4] ."'"; else $cln_stat = ""; if( $GR["resets_reset"] ) $cln_res = ", [Reset] = '0'"; else $cln_res = ""; $Q1 = "UPDATE Character SET [cLevel]='1', [Experience]='0' $cln_inv $cln_stat $cln_res, [Money]='". -$GR_T["money_need"] ."', [gr_count]=[gr_count]+1 WHERE [Name] = '". $char_set ."' "; $char_info[4] += 1; mssql_query($Q1); if( $GR["credits"] < 0 ) mssql_query("UPDATE MEMB_CREDITS SET [credits] = [credits] + '". -$GR["credits"] ."' WHERE [memb___id] = '". $char_info["AccountID"] ."'"); elseif( $GR["credits"] > 0 ) mssql_query("UPDATE MEMB_CREDITS SET [credits] = [credits] - '". $GR["credits"] ."' WHERE [memb___id] = '". $char_info["AccountID"] ."'"); echo $okey_start . mmw_lang_complete . $okey_end; return 0; } function NEED_SET(){ global $GR, $GR_T, $char_info, $credits, $res_need, $cr_need; if( ( $GR["mode"] == "LO" && $GR["resets_reset"] == FALSE ) || ($GR["resets_reset"] == TRUE && $GR["mode"] == "LO" ) ){ $GR_T["resets_need"] = $GR["resets"] - ( $char_info["Reset"] - $GR["resets"]*$char_info[4] ); if( $GR["resets_reset"] == TRUE && $GR["mode"] == "LO" ) $GR_T["resets_need"] -= $GR["resets"]*$char_info[4]; else $GR["resets"] *= $char_info[4]+1; } if( $GR["mode"] == "HI" && $GR["resets_reset"] == TRUE ) $GR["resets"] *= $char_info[4] + 1; $GR_T["resets_need"] = $GR["resets"] - $char_info["Reset"]; if( $GR["mode"] == "HI" && $GR["resets_reset"] == FALSE ) { $error = TRUE; echo "RESET SETTINS ERROR!<br> Please Contact Administrator"; exit(); } if( $GR["mode"] == "HI" ) { $GR["money"] *= $char_info[4] + 1; $GR["credits"] *= $char_info[4] + 1; } $GR_T["money_need"] = $GR["money"] - $char_info["Money"]; $GR_T["credits_need"] = $GR["credits"] - $credits[0]; if( $GR_T["resets_need"] <= 0) $res_need = "ok"; else $res_need = mmw_lang_more ." ". $GR_T["resets_need"]; if( $GR_T["money_need"] <= 0) $m_need = "ok"; else $m_need = mmw_lang_more ." ". $GR_T["money_need"]; if( $GR_T["credits_need"] <= 0) $cr_need = "ok"; else $cr_need = mmw_lang_more ." ". $GR_T["credits_need"]; } // a1 = b - ( r - b*g); LOW && FALSE // a2 = b - r; LOW TRUE // a3 = b*(b+1) - r; HI TRUE // a2 = b - ( r - bg) - bg function set_rus(){ define("mmw_lang_credits_", "Кредитов"); define("mmw_lang_more", "еще"); define("mmw_lang_money", "Деньги"); define("mmw_lang_try", "Grand Reset"); define("mmw_lang_complete", "Готово!"); define("mmw_lang_zen", "Zen"); define("mmw_lang_need_money_t", "Необходимо Zen - "); define("mmw_lang_need_resets_t", "Необходимо ресетов - "); define("mmw_lang_need_level_t", "Необходим уровень - "); define("mmw_lang_gift", "В подарок "); define("mmw_lang_need_credits_t", "Необходимо кредитов - "); define("mmw_lang_requirements", "Требования"); define("mmw_lang_credits__", " кредитов"); } function set_eng(){ define("mmw_lang_credits_", "Credits"); define("mmw_lang_more", "more"); define("mmw_lang_money", "Money"); define("mmw_lang_try", "Grand reset"); define("mmw_lang_complete", "Completed!"); define("mmw_lang_zen", "Zen"); define("mmw_lang_need_money_t", "Need Zen - "); define("mmw_lang_need_resets_t", "Need resets - "); define("mmw_lang_need_level_t", "Need level - "); define("mmw_lang_gift", "Gift "); define("mmw_lang_need_credits_t", "Need Credits - "); define("mmw_lang_requirements", "Requirements"); define("mmw_lang_credits__", " Credits"); } ?>
webmous Дата: Четверг, 17.10.2013, 19:40 | Сообщение # 4
Лейтенант
Группа: Проверенные
Сообщений: 48
Статус: Оффлайн
колонка gr_count у тебя, скинь топ где хочешь видеть гранд ресет
www.data.ru.com
Сообщение отредактировал webmous - Четверг, 17.10.2013, 19:41
tomassk89 Дата: Четверг, 17.10.2013, 19:55 | Сообщение # 5
Рядовой
Группа: Пользователи
Сообщений: 9
Статус: Оффлайн
vot pozhalsto
<?PHP if(isset($_GET['sort'])){$_POST['sort']=$_GET['sort']; $_POST['top_rank']='100';} if($_POST[top_rank] != ''){$select_top[$_POST[top_rank]]=" selected";} else{$select_top[100]=" selected";} if($_POST[top_rank] != 'all'){$select_sort[$_POST[sort]]=" selected";} else{$select_sort['all']=" selected";} ?> <table class='sort-table' align='center' border='0' cellpadding='0' cellspacing='0'> <tr> <td> <form action="?op=rankings" method="post" name="rankings"> <?echo mmw_lang_top;?>: <select name="top_rank"> <option value="10"<?echo $select_top[10];?>>10</option> <option value="25"<?echo $select_top[25];?>>25</option> <option value="50"<?echo $select_top[50];?>>50</option> <option value="100"<?echo $select_top[100];?>>100</option> </select> <?echo mmw_lang_select_sort;?>: <select name="sort"> <option value="all"<?echo $select_sort['all'];?>><?echo mmw_lang_all_characters;?></option> <option value="pk"<?echo $select_sort['pk'];?>><?echo mmw_lang_all_killers;?></option> <option value="guild"<?echo $select_sort['guilds'];?>><?echo mmw_lang_all_guilds;?></option> <?if(substr_count($mmw[statistics_char],'0,1')>0){?><option value="dw"<?echo $select_sort['dw'];?>><?echo mmw_lang_only;?> DW's-GrM's</option><?}?> <?if(substr_count($mmw[statistics_char],'16,17')>0){?><option value="dk"<?echo $select_sort['dk'];?>><?echo mmw_lang_only;?> DK's-BM's</option><?}?> <?if(substr_count($mmw[statistics_char],'32,33')>0){?><option value="elf"<?echo $select_sort['elf'];?>><?echo mmw_lang_only;?> ELF's-HE's</option><?}?> <?if(substr_count($mmw[statistics_char],'48')>0){?><option value="mg"<?echo $select_sort['mg'];?>><?echo mmw_lang_only;?> MG's-DM's</option><?}?> <?if(substr_count($mmw[statistics_char],'64')>0){?><option value="dl"<?echo $select_sort['dl'];?>><?echo mmw_lang_only;?> DL's-LE's</option><?}?> <?if(substr_count($mmw[statistics_char],'80,81')>0){?><option value="sum"<?echo $select_sort['sum'];?>><?echo mmw_lang_only;?> Sum's-Dim's</option><?}?> <?if(substr_count($mmw[statistics_char],'96,98')>0){?><option value="rf"<?echo $select_sort['rf'];?>><?echo mmw_lang_only;?> RF's-FM's</option><?}?> <option value="online"<?echo $select_sort['online'];?>><?echo mmw_lang_online_characters;?></option> <option value="3d_online"<?echo $select_sort['3d_online'];?>>3D <?echo mmw_lang_online_characters;?></option> </select> <input type="submit" name="Submit" value="<?echo mmw_lang_show_now;?>"> </form> </td> </tr> </table> <?echo $rowbr;?> <center> <? $mmw[ranking_sort] = preg_replace("/[^a-zA-Z0-9_-]/",'',$_POST[sort]); if(is_file("modules/rankings/$mmw[ranking_sort].php")) { include("modules/rankings/$mmw[ranking_sort].php"); } elseif(is_file("modules/rankings/$mmw[ranking_sort].mmw")) { mmw("modules/rankings/$mmw[ranking_sort].mmw"); } else { include("modules/rankings/character.php"); } ?> </center>
Сообщение отредактировал tomassk89 - Четверг, 17.10.2013, 19:56
webmous Дата: Четверг, 17.10.2013, 20:21 | Сообщение # 6
Лейтенант
Группа: Проверенные
Сообщений: 48
Статус: Оффлайн
:D :D лучше скинь Team Viewer в личку)
www.data.ru.com
Сообщение отредактировал webmous - Четверг, 17.10.2013, 20:27
tomassk89 Дата: Четверг, 17.10.2013, 20:22 | Сообщение # 7
Рядовой
Группа: Пользователи
Сообщений: 9
Статус: Оффлайн
zajdi v skype togda
Swoop Дата: Пятница, 18.10.2013, 18:54 | Сообщение # 8
Полковник
Группа: Модераторы
Сообщений: 232
Статус: Оффлайн
можно дописать в ручную, 2 минуты дела.
Вёрстка + натягивание вёрстки на движок сайта. Исправление шаблонов сайта. Обращаться сюда: skype: deagle19921 icq: 466-266-741
SanneA Дата: Суббота, 19.10.2013, 07:41 | Сообщение # 9
Генерал-майор
Группа: Модераторы
Сообщений: 358
Статус: Оффлайн
..\modules\rankings\Character.php Код
<?PHP // PHP Script By Vaflan // For MyMuWeb // Ver. 1.7 $top_rank = clean_var(stripslashes($_POST['top_rank'])); $race = clean_var(stripslashes($_POST['sort'])); if(empty($_POST['top_rank'])){$top_rank = '100';} if(empty($_POST['sort'])){$race = 'all';} if($mmw['gm']=='no'){$no_gm_in_top = "and ctlcode!='32' and ctlcode!='8'";} $query_race[all] = "Select TOP $top_rank Name,Class,cLevel,Reset,AccountID,gr_count from Character where class>='0' $no_gm_in_top order by reset desc, clevel desc"; $query_race[dw] = "Select TOP $top_rank Name,Class,cLevel,Reset,AccountID,gr_count from Character where class>='0' and class<='15' $no_gm_in_top order by reset desc, clevel desc"; $query_race[dk] = "Select TOP $top_rank Name,Class,cLevel,Reset,AccountID,gr_count from Character where class>='16' and class<='31' $no_gm_in_top order by reset desc, clevel desc"; $query_race[elf] = "Select TOP $top_rank Name,Class,cLevel,Reset,AccountID,gr_count from Character where class>='32' and class<='47' $no_gm_in_top order by reset desc, clevel desc"; $query_race[mg] = "Select TOP $top_rank Name,Class,cLevel,Reset,AccountID,gr_count from Character where class>='48' and class<='63' $no_gm_in_top order by reset desc, clevel desc"; $query_race[dl] = "Select TOP $top_rank Name,Class,cLevel,Reset,AccountID,gr_count from Character where class>='64' and class<='79' $no_gm_in_top order by reset desc, clevel desc"; $query_race[sum] = "Select TOP $top_rank Name,Class,cLevel,Reset,AccountID,gr_count from Character where class>='80' and class<='95' $no_gm_in_top order by reset desc, clevel desc"; $query_race[rf] = "Select TOP $top_rank Name,Class,cLevel,Reset,AccountID,gr_count from Character where class>='96' and class<='112' $no_gm_in_top order by reset desc, clevel desc"; $result = @mssql_query($query_race[$race]); $row_num = @mssql_num_rows($result); echo "<br>".mmw_lang_top." $top_rank ".mmw_lang_characters."<br> </br> <table class='sort-table' border='0' cellpadding='0' cellspacing='0'> <thead><tr> <td>#</td> <td>".mmw_lang_character."</td> <td>".mmw_lang_grand_reset."</td> <td>".mmw_lang_reset."</td> <td>".mmw_lang_level."</td> <td>".mmw_lang_class."</td> <td>".mmw_lang_guild."</td> </tr></thead>"; if($row_num==0) { echo '<tr><td colspan="6">'.mmw_lang_no_characters.'</td></tr>'; } for($i=0; $i<$row_num; ++$i) { $rank = $i+1; $row = mssql_fetch_row($result); $status_reults = mssql_query("Select ConnectStat from MEMB_STAT where memb___id='$row[4]'"); $status = mssql_fetch_row($status_reults); $statusdc_reults = mssql_query("Select GameIDC from AccountCharacter where Id='$row[4]'"); $statusdc = mssql_fetch_row($statusdc_reults); if(empty($_SESSION['guild_'.$row[0]])) { $guild_reults = mssql_query("Select G_Name from GuildMember where Name='$row[0]'"); $_SESSION['guild_'.$row[0]] = mssql_fetch_row($guild_reults); } $guild = $_SESSION['guild_'.$row[0]]; if($status[0] == 1 && $statusdc[0] == $row[0]) {$status[0] ='<img src='.default_img('online.gif').' width=6 height=6>';} else {$status[0] ='<img src='.default_img('offline.gif').' width=6 height=6>';} echo "<tbody><tr> <td>$rank</td> <td>$status[0] <a href=?op=character&character=$row[0]>$row[0]</a></td> <td>$row[5]</td> <td>$row[3]</td> <td>$row[2]</td> <td>".char_class($row[1],off)."</td> <td><a href=?op=guild&guild=$guild[0]>$guild[0]</a></td> </tr></tbody>"; } ?> </table>
..\lang\Russian.php Код
define('mmw_lang_grand_reset',"Гранд Ресет");
Пользователь
Меню сайта
Реклама
Поиск
Наш опрос
Мини-чат
Статистика