Jump to content

twister7

Members
  • Posts

    5
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

twister7's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. I've rewritten the race/class count script, now it's both code-efficient and fast, for 0.12 just replace the "$n <= 11" with "$n <= 10" in the second loop and delete the Death Knight row. Enjoy :-) <? require_once('config.php'); mysql_connect("$ip", "$user", "$pass"); mysql_select_db ("$mangoscharacters"); $race = array(); $class = array(); for($n=1; $n <= 11; $n++){ $sql = "SELECT COUNT(race) FROM `characters` WHERE `race`=".$n; $query = mysql_query($sql); $race[$n] = mysql_result($query, 0); mysql_free_result($query); } for($n=1; $n <= 11; $n++){ $sql = "SELECT COUNT(class) FROM `characters` WHERE `class`=".$n; $query = mysql_query($sql); $class[$n] = mysql_result($query, 0); mysql_free_result($query); } echo "Humans: ".$race[1]." "; echo "Dwarves: ".$race[3]." "; echo "Night Elf: ".$race[4]." "; echo "Gnome: ".$race[7]." "; echo "Draenei: ".$race[11]." "; echo "Orc: ".$race[2]." "; echo "Undead: ".$race[5]." "; echo "Tauren: ".$race[6]." "; echo "Troll: ".$race[8]." "; echo "Blood Elf: ".$race[10]." "; echo "Druid: ".$class[11]." "; echo "Hunter: ".$class[3]." "; echo "Mage: ".$class[8]." "; echo "Paladin: ".$class[2]." "; echo "Priest: ".$class[5]." "; echo "Rogue: ".$class[4]." "; echo "Shaman: ".$class[7]." "; echo "Warlock: ".$class[9]." "; echo "Warrior: ".$class[1]." "; echo "Death Knight: ".$class[6]." "; ?>
  2. Read my first post, that is what I did... but you can still turn the PvP ON... Thanks for help Still cannot find the solution...
  3. void Player::Update( uint32 p_time ) { if(!IsInWorld()) return; if(GetZoneId() == 3317) UpdatePvP(false, true); // undelivered mail Still nothing... BTW I cant write "player->" cause it wasn't declared UpdatePvP(false, true); - UpdatePvP(bool state, bool ovrride) = ovrride means you dont have to wait 15min in friendly territory so it continues to SetPvP(false);
  4. Ok thanks, but where to put it? I tried Player::UpdateZone: if(GetZoneId() == 3317) UpdatePvP(false, true); but its not working
  5. Hi, I'm trying to make a Sanctuary zone, I've read a few posts so that is what I did: if([color=Red]([/color]zone->IsSanctuary()[color=Red]) || GetAreaId() == 3317[/color]) // in sanctuary { SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY); pvpInfo.inNoPvPArea = true; CombatStopWithPets(); } (red parts added) Everything works fine, but the problem is, that I can turn my PvP on... Any ideas?
×
×
  • 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