Jump to content

Ashen

Members
  • Posts

    34
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Ashen's Achievements

Advanced Member

Advanced Member (3/3)

0

Reputation

  1. it's the same. you can create a script SQL by yourself with datasheet of the mangos database .
  2. Less variables, Less cycles unnecessary, Less execution time. if($num_online > 0) { while (($row = mysql_fetch_array($result)) != false) { echo "<tr>" . "<td>[b]" . $row['name'] . "[/b]</td>" . "<td>[b]" . $row['race'] . "[/b]</td>" . "<td>[b]" . $row['class'] . "[/b]</td>" . "<td>[b]" . $row['level'] . "[/b]</td>" . "<td>[b]" . $row['map'] . "[/b]</td>" . "<td>[b]" . $row['gender'] . "[/b]</td>" . "</tr>"; } } else { echo "<tr>" . "<td colspan='6' align='center'>No Players Online!</td>" . "</tr>"; }
  3. From DBC file. ID Name ------------------------------------------ 0 Eastern Kingdoms 1 Kalimdor 13 Testing 25 Scott Test 29 CashTest 30 Alterac Valley 33 Shadowfang Keep 34 Stormwind Stockade 35 <unused>StormwindPrison 36 Deadmines 37 Azshara Crater 42 Collin's Test 43 Wailing Caverns 44 <unused> Monastery 47 Razorfen Kraul 48 Blackfathom Deeps 70 Uldaman 90 Gnomeregan 109 Sunken Temple 129 Razorfen Downs 169 Emerald Dream 189 Scarlet Monastery 209 Zul'Farrak 229 Blackrock Spire 230 Blackrock Depths 249 Onyxia's Lair 269 Opening of the Dark Portal 289 Scholomance 309 Zul'Gurub 329 Stratholme 349 Maraudon 369 Deeprun Tram 389 Ragefire Chasm 409 Molten Core 429 Dire Maul 449 Alliance PVP Barracks 450 Horde PVP Barracks 451 Development Land 469 Blackwing Lair 489 Warsong Gulch 509 Ruins of Ahn'Qiraj 529 Arathi Basin 530 Outland 531 Ahn'Qiraj Temple 532 Karazhan 533 Naxxramas 534 The Battle for Mount Hyjal 540 Hellfire Citadel: The Shattered Halls 542 Hellfire Citadel: The Blood Furnace 543 Hellfire Citadel: Ramparts 544 Magtheridon's Lair 545 Coilfang: The Steamvault 546 Coilfang: The Underbog 547 Coilfang: The Slave Pens 548 Coilfang: Serpentshrine Cavern 550 Tempest Keep 552 Tempest Keep: The Arcatraz 553 Tempest Keep: The Botanica 554 Tempest Keep: The Mechanar 555 Auchindoun: Shadow Labyrinth 556 Auchindoun: Sethekk Halls 557 Auchindoun: Mana-Tombs 558 Auchindoun: Auchenai Crypts 559 Nagrand Arena 560 The Escape From Durnholde 562 Blade's Edge Arena 564 Black Temple 565 Gruul's Lair 566 Eye of the Storm 568 Zul'Aman 571 Northrend 572 Ruins of Lordaeron 573 ExteriorTest 574 Utgarde Keep 575 Utgarde Pinnacle 576 The Nexus 578 The Oculus 580 The Sunwell 582 Transport: Rut'theran to Auberdine 584 Transport: Menethil to Theramore 585 Magister's Terrace 586 Transport: Exodar to Auberdine 587 Transport: Feathermoon Ferry 588 Transport: Menethil to Auberdine 589 Transport: Orgrimmar to Grom'Gol 590 Transport: Grom'Gol to Undercity 591 Transport: Undercity to Orgrimmar 592 Transport: Borean Tundra Test 593 Transport: Booty Bay to Ratchet 594 Transport: Howling Fjord Sister Mercy (Quest) 595 The Culling of Stratholme 596 Transport: Naglfar 597 Craig Test 598 Sunwell Fix (Unused) 599 Halls of Stone 600 Drak'Tharon Keep 601 Azjol-Nerub 602 Halls of Lightning 603 Ulduar 604 Gundrak 605 Development Land (non-weighted textures) 606 QA and DVD 607 Strand of the Ancients 608 Violet Hold 609 Ebon Hold 610 Transport: Tirisfal to Vengeance Landing 612 Transport: Menethil to Valgarde 613 Transport: Orgrimmar to Warsong Hold 614 Transport: Stormwind to Valiance Keep 615 The Obsidian Sanctum 616 The Eye of Eternity 617 Dalaran Sewers 618 The Ring of Valor 619 Ahn'kahet: The Old Kingdom 620 Transport: Moa'ki to Unu'pe 621 Transport: Moa'ki to Kamagua 622 Transport: Orgrim's Hammer 623 Transport: The Skybreaker 624 Vault of Archavon 628 Isle of Conquest 631 Icecrown Citadel Raid 632 Forge of Souls 641 Transport: A Airship (BG) 642 Transport: H Airship (BG) 647 Transport: Orgrimmar to Thunderbluff 649 Argent Tournament Raid 650 Argent Tournament Dungeon 658 Pit Of Saron 668 Halls of Reflection 672 Transport: A Airship (ICC Raid) 673 Transport: H Airship (ICC Raid) 712 Transport: A Airship (ICC Dungeon) 713 Transport: H Airship (ICC Dungeon) 718 Transport: The Mighty Wind (ICC Raid) 723 Stormwind 724 The Ruby Sanctum
  4. <? // Include the configuration file ([i]definitions of username, password, host, ecc[/i]) into the index.php file. [b]require_once ('config.php');[/b] // Connect to the database and sets a resource link to variable "$conn". [b]$conn = mysql_connect($host, $user, $pass) or die('Connection failed: ' . mysql_error());[/b] // Selects the database such as "realmd", "mangos", ecc. [b]mysql_select_db($mangoscharacters, $conn) or die('Select DB failed: ' . mysql_error());[/b] // Executes the string query on resource link "$conn". [b]$result = mysql_query("SELECT Count(Online) FROM `characters` WHERE `online` = 1", $conn);[/b] // Splits the first row into an associative array. [b]$row = mysql_fetch_array($result);[/b] // Print to screen a value of field "count(online)". [b]echo $row["Count(Online)"];[/b] ?> You must use the script into a PHP file such as: index.php.
  5. Check BanIP (realmd database) $res = mysql_query("SELECT ip from ip_banned WHERE ip = '".$_SERVER["REMOTE_ADDR"]."' LIMIT 1"); Check BanAcc (realmd database) $res = mysql_query("SELECT a.id FROM account_banned a WHERE a.id = (SELECT b.id FROM account b WHERE username = "#username_to_upper" LIMIT 1) LIMIT 1"); PHP Check on "Num Rows" <?php if(mysql_num_rows($res) > 0) echo "Banned"; else { // other procedures.... } ?>
  6. mysql_select_db ("$mangosrealm"); <==== is this a realm database? My test :: http://img714.imageshack.us/img714/8641/votingpoints.jpg
  7. If you have problems with "mod_rewrite" you must replace all links (like in "_layout\\character\\sheet.xsl"), that point to root or character-model, from ".xml" to ".php". For example: var flashvars = { character: theCharName, modelUrl: "character-model.php?"+encodeURIComponent(charUrl), fileServer: "models/", embedlink:encodeURIComponent(embedlink), strings:stringslink, logoImg:logolink, embedded:true, loadingtxt:"<xsl:value-of select="$loc/strs/common/str[@id='loading']"/>" //" };
  8. requires no other references
  9. Remember!! You must download some dll from :: http://www.mysql.it/downloads/connector/ :: before to use the previous class
  10. Yes. The passive (ID: 66530) effect causes the bug of armor.
  11. public class SQL { // Download DLL: mysql.data (mysql site) MySql.Data.MySqlClient.MySqlConnection Conn; MySql.Data.MySqlClient.MySqlCommand Cmd; MySql.Data.MySqlClient.MySqlDataReader Reader; //=========================================================================================== ~SQL() { // Garbage Collection System.GC.Collect(System.GC.GetGeneration(this), System.GCCollectionMode.Forced); } public SQL(string address, string db, string user, string pass) { try { Conn = new MySql.Data.MySqlClient.MySqlConnection("SERVER=" + address + "; DATABASE=" + db + "; UID=" + user + "; PASSWORD=" + pass + ";"); Cmd = Conn.CreateCommand(); Cmd.CommandTimeout = 1000; } catch (MySql.Data.MySqlClient.MySqlException) { // debug } // Garbage Collection System.GC.Collect(System.GC.GetGeneration(this), System.GCCollectionMode.Forced); } //=========================================================================================== public string RunQuery(string cmdquery) { Cmd.CommandText = string.Empty; string query_result = string.Empty; int rowsAffected = 0; //----> try { Cmd.CommandText = cmdquery; //----> Conn.Open(); Reader = Cmd.ExecuteReader(); //----> while (Reader.Read()) { // [FIX] Multi-Threading - 100% CPU System.Threading.Thread.Sleep(1); if (rowsAffected > 0) query_result += ","; rowsAffected++; //----> for (int i = 0; i < Reader.FieldCount; i++) { if (i == 0) query_result += ((Reader.GetValue(i).ToString() != "") ? Reader.GetValue(i).ToString() : "Null"); else query_result += "," + ((Reader.GetValue(i).ToString() != "") ? Reader.GetValue(i).ToString() : "Null"); } } //----> if (query_result.Trim() == string.Empty) query_result = rowsAffected.ToString(); } catch (MySql.Data.MySqlClient.MySqlException) { // debug // Garbage Collection System.GC.Collect(System.GC.GetGeneration(this), System.GCCollectionMode.Forced); } //----> Conn.Close(); return query_result; } } Why not insert directly into the database instead of create a file? In this way saves time
  12. the armory needs a save command or procedure (emulator). in this way creates a copy of the character (data) in the armory (database). for example in game use the save command.
  13. Rename "includes\\classes\\configuration.php.default" to "includes\\classes\\configuration.php"
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use