twister7
Members-
Posts
5 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Everything posted by twister7
-
|PHP| Interesting Scripts for your Website
twister7 replied to Auntie Mangos's topic in Old3rd party projects
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]." "; ?> -
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...
-
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);
-
Ok thanks, but where to put it? I tried Player::UpdateZone: if(GetZoneId() == 3317) UpdatePvP(false, true); but its not working
-
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?
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®