Changeset 19 for minimanager/scripts
- Timestamp:
- Aug 13, 2007, 9:05:34 PM (17 years ago)
- Location:
- minimanager/scripts
- Files:
-
- 16 added
- 4 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/scripts/config.sample.php
r14 r19 9 9 */ 10 10 11 $version = "0.1.3d"; 12 13 //---- MySQL Configuration ---- 11 $version = "0.1.4a"; 12 13 //---- SQL Configuration ---- 14 15 /* SQL server type : 16 * "MySQL" - Mysql 17 * "PgSQL" - PostgreSQL 18 * "MySQLi" - MySQLi 19 * "SQLLite" - SQLLite 20 */ 21 $db_type = "MySQL"; 22 14 23 $realm_db = Array( 15 24 'addr' => "127.0.0.1:3306", //SQL server IP:port this realmd located on 16 'user' => " mangos", //SQL server login this realmd located on17 'pass' => " mangos", //SQL server pass this realmd located on25 'user' => "root", //SQL server login this realmd located on 26 'pass' => "pass", //SQL server pass this realmd located on 18 27 'name' => "realmd", //realmd DB name 19 28 'encoding' => "utf8" //SQL connection encoding … … 24 33 'id' => 1, //Realm ID 25 34 'addr' => "127.0.0.1:3306", //SQL server IP:port this DB located on 26 'user' => " mangos", //SQL server login this DB located on27 'pass' => " mangos", //SQL server pass this DB located on35 'user' => "root", //SQL server login this DB located on 36 'pass' => "pass", //SQL server pass this DB located on 28 37 'name' => "mangos", //World Database name 29 38 'encoding' => "utf8", //SQL connection encoding 30 'db_rev' => "SDB rev.2 02" //db rev. used39 'db_rev' => "SDB rev.24" //db rev. used 31 40 ), 32 41 ); … … 39 48 'term_type' => "SSH", //Terminal type - ("SSH"/"Telnet") 40 49 'term_port' => 22, //Terminal port 41 'rev' => "rev.42 03", //Mangos rev. used50 'rev' => "rev.4285", //Mangos rev. used 42 51 'both_factions' => false //Allow to see opponent faction characters. Affects only players. 43 52 ), … … 47 56 48 57 //---- Mail configuration ---- 49 $admin_mail = " noname@company.com"; //mail used for bug reports and other user contact58 $admin_mail = "root@admin.com"; //mail used for bug reports and other user contact 50 59 51 60 $mailer_type = "smtp"; // type of mailer to be used("mail", "sendmail", "smtp") 52 $from_mail = " noname@company.com"; //all emails will be sent from this email61 $from_mail = "mail@mail.com"; //all emails will be sent from this email 53 62 //smtp server config 54 63 $smtp_cfg = array( 55 'host' => "smtp. company.com", //smtp server64 'host' => "smtp.mail.com", //smtp server 56 65 'port' => 25, //port 57 66 'user' => "", //username - use only if auth. required … … 73 82 74 83 //---- Layout configuration ---- 75 $title = " WoW server";84 $title = "MiniManager for MaNgOs srv."; 76 85 $itemperpage = 25; 77 86 78 87 $css_template = "Sulfur"; //file/folder name of css tamplate to use from templates directory by default 79 88 $language = "enUS"; //default site language 80 $site_encoding = "iso-8859- 2"; //default encoding89 $site_encoding = "iso-8859-1"; //default encoding 81 90 82 91 //---- IRC Options ------ -
minimanager/scripts/del_lib.php
r5 r19 16 16 global $mangos_db, $realm_db, $user_lvl, $user_id, $tab_del_user_mangos; 17 17 18 $ mysql_01 = new MySQL;19 $ mysql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']);20 $query = $ mysql_01->query("SELECT account,online FROM `character` WHERE guid ='$guid' LIMIT 1");21 $owner_acc_id = $ mysql_01->result($query, 0, 'account');22 $ mysql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);23 $query1 = $ mysql_01->query("SELECT gmlevel FROM account WHERE id ='$owner_acc_id'");24 $owner_gmlvl = $ mysql_01->result($query1, 0, 'gmlevel');18 $sql_01 = new SQL; 19 $sql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']); 20 $query = $sql_01->query("SELECT account,online FROM `character` WHERE guid ='$guid' LIMIT 1"); 21 $owner_acc_id = $sql_01->result($query, 0, 'account'); 22 $sql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 23 $query1 = $sql_01->query("SELECT gmlevel FROM account WHERE id ='$owner_acc_id'"); 24 $owner_gmlvl = $sql_01->result($query1, 0, 'gmlevel'); 25 25 unset($query1); 26 26 27 27 if (($user_lvl > $owner_gmlvl)||($owner_acc_id == $user_id)) { 28 $ mysql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']);28 $sql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']); 29 29 30 if (!$ mysql_01->result($query, 0, 'online')){30 if (!$sql_01->result($query, 0, 'online')){ 31 31 foreach ($tab_del_user_mangos as $value){ 32 $query = $ mysql_01->query("DELETE FROM {$value[0]} WHERE {$value[1]} = '$guid'");32 $query = $sql_01->query("DELETE FROM {$value[0]} WHERE {$value[1]} = '$guid'"); 33 33 } 34 34 35 $ mysql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);36 $query_2 = $ mysql_01->query("SELECT numchars FROM realmcharacters WHERE acctid ='$owner_acc_id' AND realmid = '$realm'");37 $chars_in_acc = $ mysql_01->result($query_2, 0, 'numchars');35 $sql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 36 $query_2 = $sql_01->query("SELECT numchars FROM realmcharacters WHERE acctid ='$owner_acc_id' AND realmid = '$realm'"); 37 $chars_in_acc = $sql_01->result($query_2, 0, 'numchars'); 38 38 if ($chars_in_acc) $chars_in_acc--; 39 39 else $chars_in_acc = 0; 40 $query_2 = $ mysql_01->query("UPDATE realmcharacters SET numchars='$chars_in_acc' WHERE acctid ='$owner_acc_id' AND realmid = '$realm'");40 $query_2 = $sql_01->query("UPDATE realmcharacters SET numchars='$chars_in_acc' WHERE acctid ='$owner_acc_id' AND realmid = '$realm'"); 41 41 42 $ mysql_01->close();42 $sql_01->close(); 43 43 return true; 44 44 } 45 45 } 46 $ mysql_01->close();46 $sql_01->close(); 47 47 return false; 48 48 } … … 55 55 $del_char = 0; 56 56 57 $ mysql_01 = new MySQL;58 $ mysql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);59 $query = $ mysql_01->query("SELECT gmlevel,online FROM account WHERE id ='$acc_id'");60 $gmlevel = $ mysql_01->result($query, 0, 'gmlevel');57 $sql_01 = new SQL; 58 $sql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 59 $query = $sql_01->query("SELECT gmlevel,online FROM account WHERE id ='$acc_id'"); 60 $gmlevel = $sql_01->result($query, 0, 'gmlevel'); 61 61 62 62 if (($user_lvl > $gmlevel)||($acc_id == $user_id)) { 63 if (!$ mysql_01->result($query, 0, 'online')){63 if (!$sql_01->result($query, 0, 'online')){ 64 64 foreach ($mangos_db as $db){ 65 $ mysql_01->connect($db['addr'], $db['user'], $db['pass'], $db['name']);66 $result = $ mysql_01->query("SELECT guid FROM `character` WHERE account='$acc_id'");67 while ($row = $ mysql_01->fetch_array($result)) {65 $sql_01->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 66 $result = $sql_01->query("SELECT guid FROM `character` WHERE account='$acc_id'"); 67 while ($row = $sql_01->fetch_array($result)) { 68 68 foreach ($tab_del_user_mangos as $value) 69 $query = $ mysql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$row[0]'");69 $query = $sql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$row[0]'"); 70 70 $del_char++; 71 71 } 72 72 } 73 73 74 $ mysql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);74 $sql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 75 75 76 76 foreach ($tab_del_user_realmd as $value){ 77 $query = $ mysql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$acc_id'");77 $query = $sql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$acc_id'"); 78 78 } 79 if ($ mysql_01->affected_rows()) {80 $ mysql_01->close();79 if ($sql_01->affected_rows()) { 80 $sql_01->close(); 81 81 return array(true,$del_char); 82 82 } 83 83 } 84 84 } 85 $ mysql_01->close();85 $sql_01->close(); 86 86 return array(false,$del_char); 87 87 } … … 95 95 require_once("scripts/defines.php"); 96 96 97 $ mysql_01 = new MySQL;98 $ mysql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']);99 $query = $ mysql_01->query("DELETE FROM guild WHERE guildid = '$guid'");100 $query = $ mysql_01->query("DELETE FROM guild_rank WHERE guildid = '$guid'");97 $sql_01 = new SQL; 98 $sql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']); 99 $query = $sql_01->query("DELETE FROM guild WHERE guildid = '$guid'"); 100 $query = $sql_01->query("DELETE FROM guild_rank WHERE guildid = '$guid'"); 101 101 102 102 //clean data inside character.data field 103 $temp = $ mysql_01->query("SELECT guid FROM guild_member WHERE guildid = '$guid'");104 while ($guild_member = $ mysql_01->fetch_row($temp)){105 $char_data = $ mysql_01->query("SELECT data FROM `character` WHERE guid = '$guild_member[0]'");106 $data = $ mysql_01->result($char_data, 0, 'data');103 $temp = $sql_01->query("SELECT guid FROM guild_member WHERE guildid = '$guid'"); 104 while ($guild_member = $sql_01->fetch_row($temp)){ 105 $char_data = $sql_01->query("SELECT data FROM `character` WHERE guid = '$guild_member[0]'"); 106 $data = $sql_01->result($char_data, 0, 'data'); 107 107 $data = explode(' ',$data); 108 108 $data[CHAR_DATA_OFFSET_GUILD_ID] = 0; 109 109 $data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 110 110 $data = implode(" ",$data); 111 $query = $ mysql_01->query("UPDATE `character` SET data = '$data' WHERE guid = '$guild_member[0]'");111 $query = $sql_01->query("UPDATE `character` SET data = '$data' WHERE guid = '$guild_member[0]'"); 112 112 } 113 113 114 $query = $ mysql_01->query("DELETE FROM guild_member WHERE guildid = '$guid'");114 $query = $sql_01->query("DELETE FROM guild_member WHERE guildid = '$guid'"); 115 115 116 if ($ mysql_01->affected_rows()){117 $ mysql_01->close();116 if ($sql_01->affected_rows()){ 117 $sql_01->close(); 118 118 return true; 119 119 } else { 120 $ mysql_01->close();120 $sql_01->close(); 121 121 return false; 122 122 } -
minimanager/scripts/gen_lib.php
r5 r19 14 14 global $lang_global, $mangos_db, $realm_id; 15 15 16 $ mysql_0 = new MySQL;17 $ mysql_0->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name'],true);16 $sql_0 = new SQL; 17 $sql_0->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 18 18 19 $result = $ mysql_0->query("SELECT MAX(`id`) FROM item_text");20 $item_page_id = ($ mysql_0->result($result, 0)) + 1;21 $result = $ mysql_0->query("INSERT INTO item_text (id, text) VALUES ($item_page_id,'$body')");19 $result = $sql_0->query("SELECT MAX(`id`) FROM item_text"); 20 $item_page_id = ($sql_0->result($result, 0)) + 1; 21 $result = $sql_0->query("INSERT INTO item_text (id, text) VALUES ($item_page_id,'$body')"); 22 22 23 $result = $ mysql_0->query("SELECT MAX(`id`) FROM mail");24 $mail_id = ($ mysql_0->result($result, 0)) + 1;23 $result = $sql_0->query("SELECT MAX(`id`) FROM mail"); 24 $mail_id = ($sql_0->result($result, 0)) + 1; 25 25 26 26 $item_guid = ($item) ? gen_item_instance($to, $item, $stack) : 0; 27 27 28 $sql = "INSERT INTO mail (id,messageType,sender,receiver,subject,itemTextId,item_guid,item_template,expire_time,deliver_time,money,cod,checked) 29 VALUES ($mail_id, 0, '$from', '$to', '$subject', '$item_page_id', '$item_guid', '$item', '".(time() + (30*24*3600))."','".(time()+5)."', '$gold', 0, 0)"; 30 $result = $mysql_0->query($sql); 28 $result = $sql_0->query("INSERT INTO mail (id,messageType,sender,receiver,subject,itemTextId,item_guid,item_template,expire_time,deliver_time,money,cod,checked) 29 VALUES ($mail_id, 0, '$from', '$to', '$subject', '$item_page_id', '$item_guid', '$item', '".(time() + (30*24*3600))."','".(time()+5)."', '$gold', 0, 0)"); 31 30 32 31 if ($result) { 33 $ mysql_0->close();32 $sql_0->close(); 34 33 return $mail_id; 35 34 } else { 36 $ mysql_0->close();35 $sql_0->close(); 37 36 return 0; 38 37 } … … 45 44 global $lang_global, $mangos_db, $realm_id; 46 45 47 $ mysql_1 = new MySQL;48 $ mysql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name'],true);46 $sql_1 = new SQL; 47 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 49 48 50 $result = $ mysql_1->query("SELECT MAX(guid) FROM item_instance");51 $guid = $ mysql_1->result($result, 0) + 1;49 $result = $sql_1->query("SELECT MAX(guid) FROM item_instance"); 50 $guid = $sql_1->result($result, 0) + 1; 52 51 53 $result = $ mysql_1->query("SELECT flags,stackable,MaxDurability,spellcharges_1,spellcharges_2,52 $result = $sql_1->query("SELECT flags,stackable,MaxDurability,spellcharges_1,spellcharges_2, 54 53 spellcharges_3,spellcharges_4,spellcharges_5 FROM item_template 55 54 WHERE entry = '$item_id'"); 56 $item_template = $ mysql_1->fetch_row($result);55 $item_template = $sql_1->fetch_row($result); 57 56 58 57 if ($item_template[1] <= 1) $stack = 1; … … 86 85 $data = implode(" ",$item_data); 87 86 88 $result = $ mysql_1->query("INSERT INTO item_instance (guid, owner_guid, data) VALUES ($guid, '$owner','$data')");87 $result = $sql_1->query("INSERT INTO item_instance (guid, owner_guid, data) VALUES ($guid, '$owner','$data')"); 89 88 90 89 if ($result) { 91 $ mysql_1->close();90 $sql_1->close(); 92 91 return $guid; 93 92 } else { 94 $ mysql_1->close();93 $sql_1->close(); 95 94 return 0; 96 95 } -
minimanager/scripts/get_lib.php
r5 r19 14 14 global $lang_global, $realm_db; 15 15 16 $ mysql_0 = new MySQL;17 $ mysql_0->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);18 19 $result = $ mysql_0->query("SELECT name FROM `realmlist` WHERE id = '$realm_id'");20 $realm_name = $ mysql_0->result($result, 0);21 22 $ mysql_0->close();16 $sql_0 = new SQL; 17 $sql_0->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 18 19 $result = $sql_0->query("SELECT name FROM `realmlist` WHERE id = '$realm_id'"); 20 $realm_name = $sql_0->result($result, 0); 21 22 $sql_0->close(); 23 23 return $realm_name; 24 24 } … … 30 30 global $lang_global, $mangos_db, $realm_id; 31 31 if($item_id){ 32 $ mysql_1 = new MySQL;33 $ mysql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);34 35 $result = $ mysql_1->query("SELECT name FROM item_template WHERE entry = '$item_id'");36 $item_name = ($ mysql_1->num_rows($result) == 1) ? $mysql_1->result($result, 0,"name") : "ItemID: $item_id Not Found" ;37 38 $ mysql_1->close();32 $sql_1 = new SQL; 33 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 34 35 $result = $sql_1->query("SELECT name FROM item_template WHERE entry = '$item_id'"); 36 $item_name = ($sql_1->num_rows($result) == 1) ? $sql_1->result($result, 0,"name") : "ItemID: $item_id Not Found" ; 37 38 $sql_1->close(); 39 39 return $item_name; 40 40 } else return NULL; … … 47 47 global $lang_global, $lang_item, $lang_id_tab, $mangos_db, $realm_id, $itemset_id; 48 48 if($item_id){ 49 $ mysql_1 = new MySQL;50 $ mysql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);49 $sql_1 = new SQL; 50 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 51 51 52 $result_1 = $ mysql_1->query("SELECT stat_type1,stat_value1,stat_type2,stat_value2,stat_type3,stat_value3,stat_type4,52 $result_1 = $sql_1->query("SELECT stat_type1,stat_value1,stat_type2,stat_value2,stat_type3,stat_value3,stat_type4, 53 53 stat_value4,stat_type5,stat_value5,stat_type6,stat_value6,stat_type7,stat_value7,stat_type8, 54 54 stat_value8,stat_type9,stat_value9,stat_type10,stat_value10,armor,holy_res,fire_res,nature_res, … … 60 60 spellcharges_4,spellcharges_5,AllowableClass,socketColor_1,socketColor_2,socketColor_3,RandomProperty,RandomSuffix 61 61 FROM item_template WHERE entry = '$item_id' LIMIT 1"); 62 if ($item = $ mysql_1->fetch_row($result_1)) {62 if ($item = $sql_1->fetch_row($result_1)) { 63 63 $tooltip = ""; 64 64 … … 439 439 switch ($item[$p]) { 440 440 case 1: 441 $tooltip .= "<img src='img/socket_meta.gif' class='no_border'alt='' /><font color='gray'> {$lang_item['socket_meta']}</font><br />";441 $tooltip .= "<img src='img/socket_meta.gif' alt='' /><font color='gray'> {$lang_item['socket_meta']}</font><br />"; 442 442 break; 443 443 case 2: 444 $tooltip .= "<img src='img/socket_red.gif' class='no_border'alt='' /><font color='red'> {$lang_item['socket_red']}</font><br />";444 $tooltip .= "<img src='img/socket_red.gif' alt='' /><font color='red'> {$lang_item['socket_red']}</font><br />"; 445 445 break; 446 446 case 4: 447 $tooltip .= "<img src='img/socket_yellow.gif' class='no_border'alt='' /><font color='yellow'> {$lang_item['socket_yellow']}</font><br />";447 $tooltip .= "<img src='img/socket_yellow.gif' alt='' /><font color='yellow'> {$lang_item['socket_yellow']}</font><br />"; 448 448 break; 449 449 case 8: 450 $tooltip .= "<img src='img/socket_blue.gif' class='no_border'alt='' /><font color='blue'> {$lang_item['socket_blue']}</font><br />";450 $tooltip .= "<img src='img/socket_blue.gif' alt='' /><font color='blue'> {$lang_item['socket_blue']}</font><br />"; 451 451 break; 452 452 default: … … 595 595 $tooltip .= "<br /><font color='orange'>{$lang_item['item_set']} : ".get_itemset_name($item[55])." ($item[55])</font>"; 596 596 } 597 if ($item[54]) $tooltip .= "<br /><font color='orange'>'' $item[54]''</font>";597 if ($item[54]) $tooltip .= "<br /><font color='orange'>''".str_replace("\"", " '", $item[54])."''</font>"; 598 598 599 599 } else $tooltip = "Item ID: $item_id Not Found" ; 600 600 601 $ mysql_1->close();601 $sql_1->close(); 602 602 return $tooltip; 603 603 } else return(NULL); -
minimanager/scripts/global_lib.php
r5 r19 137 137 } 138 138 139 //########################################################################################## 140 function aasort(&$array, $field, $order = false){ 141 if(is_string($field)) $field = "'$field'"; 142 $order = ($order ? '<' : '>'); 143 usort($array, 144 create_function('$a, $b', 145 'return ($a['.$field.'] == $b['.$field.'] ? 0 :($a['.$field.'] '.$order.' $b['.$field.']) ? 1 : -1);') 146 ); 147 } 139 148 ?> -
minimanager/scripts/id_tab.php
r5 r19 185 185 //////////////////////////////////////////////////////////////////////////////////////////////// 186 186 //get zone name by mapid and players x,y 187 // Y1 ,Y2,X1,X2 - Upper left Y Coord of Box, Lower Right Y Coord of Box, Lower Right X Coord of Box, Upper Left X Coord of Box 188 $zone_0 = Array( //Azeroth 189 0 => Array(700,10,1244,1873,$lang_id_tab['undercity'],1497), 190 1 => Array(-840,-1330,-5050,-4560,$lang_id_tab['ironforge'],1537), 191 2 => Array(1190,200,-9074,-8280,$lang_id_tab['stormwind_city'],1519), 192 3 => Array(-2170,-4400,-7348,-6006,$lang_id_tab['badlands'],3), 193 4 => Array(-500,-4400,-4485,-2367,$lang_id_tab['wetlands'],11), 194 5 => Array(2220,-2250,-15422,-11299,$lang_id_tab['stranglethorn_vale'],33), 195 6 => Array(-1724,-3540,-9918,-8667,$lang_id_tab['redridge_mountains'],44), 196 7 => Array(-2480,-4400,-6006,-4485,$lang_id_tab['loch_modan'],38), 197 8 => Array(662,-1638,-11299,-9990,$lang_id_tab['duskwood'],10), 198 9 => Array(-1638,-2344,-11299,-9918,$lang_id_tab['deadwind_pass'],41), 199 10 => Array(834,-1724,-9990,-8526,$lang_id_tab['elwynn_forest'],12), 200 11 => Array(-500,-3100,-8667,-7348,$lang_id_tab['burning_steppes'],46), 201 12 => Array(-608,-2170,-7348,-6285,$lang_id_tab['searing_gorge'],51), 202 13 => Array(2000,-2480,-6612,-4485,$lang_id_tab['dun_morogh'],1), 203 14 => Array(-1575,-5425,-432,805,$lang_id_tab['the_hinterlands'],47), 204 15 => Array(3016,662,-11299,-9400,$lang_id_tab['westfall'],40), 205 16 => Array(600,-1575,-1874,220,$lang_id_tab['hillsbrad_foothills'],267), 206 17 => Array(-2725,-6056,805,3800,$lang_id_tab['eastern_plaguelands'],139), 207 18 => Array(-850,-2725,805,3400,$lang_id_tab['western_plaguelands'],28), 208 19 => Array(2200,600,-900,1525,$lang_id_tab['silverpine_forest'],130), 209 20 => Array(2200,-850,1525,3400,$lang_id_tab['tirisfal_glades'],85), 210 21 => Array(-2250,-3520,-12800,-10666,$lang_id_tab['blasted_lands'],4), 211 22 => Array(-2344,-4516,-11070,-9600,$lang_id_tab['swamp_of_sorrows'],8), 212 23 => Array(-1575,-3900,-2367,-432,$lang_id_tab['arathi_highlands'],45), 213 24 => Array(600,-1575,220,1525,$lang_id_tab['alterac_mountains'],36) 187 $zone_id = Array( 188 //Azeroth 189 1497 => Array($lang_id_tab['undercity'],1497), 190 1537 => Array($lang_id_tab['ironforge'],1537), 191 1519 => Array($lang_id_tab['stormwind_city'],1519), 192 3 => Array($lang_id_tab['badlands'],3), 193 11 => Array($lang_id_tab['wetlands'],11), 194 33 => Array($lang_id_tab['stranglethorn_vale'],33), 195 44 => Array($lang_id_tab['redridge_mountains'],44), 196 38 => Array($lang_id_tab['loch_modan'],38), 197 10 => Array($lang_id_tab['duskwood'],10), 198 41 => Array($lang_id_tab['deadwind_pass'],41), 199 12 => Array($lang_id_tab['elwynn_forest'],12), 200 46 => Array($lang_id_tab['burning_steppes'],46), 201 51 => Array($lang_id_tab['searing_gorge'],51), 202 1 => Array($lang_id_tab['dun_morogh'],1), 203 47 => Array($lang_id_tab['the_hinterlands'],47), 204 40 => Array($lang_id_tab['westfall'],40), 205 267 => Array($lang_id_tab['hillsbrad_foothills'],267), 206 139 => Array($lang_id_tab['eastern_plaguelands'],139), 207 28 => Array($lang_id_tab['western_plaguelands'],28), 208 130 => Array($lang_id_tab['silverpine_forest'],130), 209 85 => Array($lang_id_tab['tirisfal_glades'],85), 210 4 => Array($lang_id_tab['blasted_lands'],4), 211 8 => Array($lang_id_tab['swamp_of_sorrows'],8), 212 45 => Array($lang_id_tab['arathi_highlands'],45), 213 36 => Array($lang_id_tab['alterac_mountains'],36), 214 //Kalimdor 215 1657 => Array($lang_id_tab['darnassus'],1657), 216 1638 => Array($lang_id_tab['thunder_bluff'],1638), 217 1637 => Array($lang_id_tab['orgrimmar'],1637), 218 493 => Array($lang_id_tab['moonglade'],493), 219 1377 => Array($lang_id_tab['silithus'],1377), 220 618 => Array($lang_id_tab['winterspring'],618), 221 490 => Array($lang_id_tab['un_goro_crater'],490), 222 361 => Array($lang_id_tab['felwood'],361), 223 16 => Array($lang_id_tab['azshara'],16), 224 440 => Array($lang_id_tab['tanaris'],440), 225 15 => Array($lang_id_tab['dustwallow_marsh'],15), 226 215 => Array($lang_id_tab['mulgore'],215), 227 357 => Array($lang_id_tab['feralas'],357), 228 405 => Array($lang_id_tab['desolace'],405), 229 400 => Array($lang_id_tab['thousand_needles'],400), 230 14 => Array($lang_id_tab['durotar'],14), 231 331 => Array($lang_id_tab['ashenvale'],331), 232 148 => Array($lang_id_tab['darkshore'],148), 233 141 => Array($lang_id_tab['teldrassil'],141), 234 406 => Array($lang_id_tab['stonetalon_mountains'],406), 235 17 => Array($lang_id_tab['the_barrens'],17), 236 //Outland 237 3703 => Array($lang_id_tab['shattrath_city'],3703), 238 3487 => Array($lang_id_tab['silvermoon_city'],3487), 239 3523 => Array($lang_id_tab['netherstorm'],3523), 240 3519 => Array($lang_id_tab['terokkar_forest'],3519), 241 3518 => Array($lang_id_tab['nagrand'],3518), 242 3525 => Array($lang_id_tab['bloodmyst_isle'],3525), 243 3522 => Array($lang_id_tab['blades_edge_mountains'],3522), 244 3520 => Array($lang_id_tab['shadowmoon_valley'],3520), 245 3557 => Array($lang_id_tab['the_exodar'],3557), 246 3521 => Array($lang_id_tab['zangarmarsh'],3521), 247 3483 => Array($lang_id_tab['hellfire_peninsula'],3483), 248 3524 => Array($lang_id_tab['azuremyst_isle'],3524), 249 3433 => Array($lang_id_tab['ghostlands'],3433), 250 3430 => Array($lang_id_tab['eversong_woods'],3430) 214 251 ); 215 252 216 $zone_1 = Array( //Kalimdor 217 0 => Array(2698,2030,9575,10267,$lang_id_tab['darnassus'],1657), 218 1 => Array(326,-360,-1490,-910,$lang_id_tab['thunder_bluff'],1638), 219 2 => Array(-3849,-4809,1387,2222,$lang_id_tab['orgrimmar'],1637), 220 3 => Array(-1300,-3250,7142,8500,$lang_id_tab['moonglade'],493), 221 4 => Array(2021,-400,-9000,-6016,$lang_id_tab['silithus'],1377), 222 5 => Array(-2259,-7000,4150,8500,$lang_id_tab['winterspring'],618), 223 6 => Array(-400,-2094,-8221,-6016,$lang_id_tab['un_goro_crater'],490), 224 7 => Array(-590,-2259,3580,7142,$lang_id_tab['felwood'],361), 225 8 => Array(-3787,-8000,1370,6000,$lang_id_tab['azshara'],16), 226 9 => Array(-1900,-5500,-10475,-6825,$lang_id_tab['tanaris'],440), 227 10 => Array(-2478,-5500,-5135,-2330,$lang_id_tab['dustwallow_marsh'],15), 228 11 => Array(360,-1536,-3474,-412,$lang_id_tab['mulgore'],215), 229 12 => Array(4000,-804,-6828,-2477,$lang_id_tab['feralas'],357), 230 13 => Array(3500,360,-2477,372,$lang_id_tab['desolace'],405), 231 14 => Array(-804,-5500,-6828,-4566,$lang_id_tab['thousand_needles'],400), 232 15 => Array(-3758,-5500,-1300,1370,$lang_id_tab['durotar'],14), 233 16 => Array(1000,-3787,1370,4150,$lang_id_tab['ashenvale'],331), 234 17 => Array(2500,-1300,4150,8500,$lang_id_tab['darkshore'],148), 235 18 => Array(3814,-1100,8600,11831,$lang_id_tab['teldrassil'],141), 236 19 => Array(3500,-804,-412,3580,$lang_id_tab['stonetalon_mountains'],406), 237 20 => Array(-804,-4200,-4566,1370,$lang_id_tab['the_barrens'],17) 238 ); 239 240 $zone_530 = Array( //Outland 241 0 => Array(6135.25,4829,-2344.78,-1473.95,$lang_id_tab['shattrath_city'],3703), 242 1 => Array(-6400.75,-7612.20,9346.93,10153.70,$lang_id_tab['silvermoon_city'],3487), 243 2 => Array(5483.33,-91.66,1739.58,5456.25,$lang_id_tab['netherstorm'],3523), 244 3 => Array(7083.33,1683.33,-4600,-999.99,$lang_id_tab['terokkar_forest'],3519), 245 4 => Array(10295.83,4770.83,-3641.66,41.66,$lang_id_tab['nagrand'],3518), 246 5 => Array(-10075,-13337.49,-2933.33,-758.33,$lang_id_tab['bloodmyst_isle'],3525), 247 6 => Array(8845.83,3420.83,791.66,4408.33,$lang_id_tab['blades_edge_mountains'],3522), 248 7 => Array(4225,-1275,-5614.58,-1947.91,$lang_id_tab['shadowmoon_valley'],3520), 249 8 => Array(-11066.36,-12123.13,-4314.37,-3609.68,$lang_id_tab['the_exodar'],3557), 250 9 => Array(9475,4447.91,-1416.66,1935.41,$lang_id_tab['zangarmarsh'],3521), 251 10 => Array(5539.58,375,-1962.49,1481.25,$lang_id_tab['hellfire_peninsula'],3483), 252 11 => Array(-10500,-14570.83,-5508.33,-2793.75,$lang_id_tab['azuremyst_isle'],3524), 253 12 => Array(-5283.33,-8583.33,6066.66,8266.66,$lang_id_tab['ghostlands'],3433), 254 13 => Array(-4487.5,-9412.5,7758.33,11041.66,$lang_id_tab['eversong_woods'],3430) 255 ); 256 257 // Y1 ,Y2,X1,X2 - Upper left Y Coord of Box, Lower Right Y Coord of Box, Upper Left X Coord of Box, Lower Right X Coord of Box 258 function get_zone_name($map_id,$player_x,$player_y){ 259 global $zone_0,$zone_1,$zone_530; 260 switch ($map_id) { 261 case 0: 262 for ($i=0; $i < count($zone_0); $i++) 263 if (($zone_0[$i][2] < $player_x) && ($zone_0[$i][3] > $player_x) && ($zone_0[$i][1] < $player_y) && ($zone_0[$i][0] > $player_y)) return ($zone_0[$i][4]); 264 break; 265 case 1: 266 for ($i=0; $i < count($zone_1); $i++) 267 if (($zone_1[$i][2] < $player_x) && ($zone_1[$i][3] > $player_x) && ($zone_1[$i][1] < $player_y) && ($zone_1[$i][0] > $player_y)) return ($zone_1[$i][4]); 268 break; 269 case 530: 270 for ($i=0; $i < count($zone_530); $i++) 271 if (($zone_530[$i][2] < $player_x) && ($zone_530[$i][3] > $player_x) && ($zone_530[$i][1] < $player_y) && ($zone_530[$i][0] > $player_y)) return ($zone_530[$i][4]); 272 break; 273 274 default: 275 return(" "); 276 } 253 function get_zone_name($id){ 254 global $zone_id; 255 if( isset($zone_id[$id])) return $zone_id[$id][0]; 256 else return(" "); 277 257 } 278 258
Note:
See TracChangeset
for help on using the changeset viewer.