MasterTomas
Members-
Posts
45 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
MasterTomas's Achievements
Advanced Member (3/3)
0
Reputation
-
Yes exactly. Possible fix for this?
-
Need to enable soap first Need to convert for your site <?php function convert_charset($item) { if ($unserialize = unserialize($item)) { foreach ($unserialize as $key => $value) { $unserialize[$key] = @iconv('windows-1256', 'UTF-8', $value); } $serialize = serialize($unserialize); return $serialize; } else { return @iconv('windows-1256', 'UTF-8', $item); } } function SoapExecute($command,$host,$soapport,$username,$password) { $client = new SoapClient(NULL, array( "location" => "http://$host:$soapport/", "uri" => "urn:MaNGOS", "style" => SOAP_RPC, 'login' => $user, 'password' => $pass )); try { $result = $client->executeCommand(new SoapParam(convert_charset($command), "command")); echo "Command succeeded! Output: \\n"; echo $result; } catch (Exception $e) { echo "Command failed! Reason: \\n"; echo $e->getMessage(); } } $command = 'send item '.$result_data["name"].' "Server Gift Item" "Enjoy!!" 90000:1'; SoapExecute($command,$host,$soapport,$username,$password); $command = 'send money '.$result_data["name"].' "Server Gift Money" "Enjoy!!" 50000000'; SoapExecute($command,$host,$soapport,$username,$password); ?>
-
CastSpell: unknown spell id 58428 by caster: Player (Guid: 1314) and this error any know what is ?
-
Some ppl on my server report me killing from death players with command /cast but no work anytime, any can confirm this and how to make ? thanks
-
Is there a working 3.3.32 Rev 9729+ teleporter?
MasterTomas replied to duan3's topic in OldGeneral support
my core 9729 sd2 1675 TeleNET work well. -
@wow4 Ask you to make query??? Ask for current values only. okie are you smart now
-
9727 sd2 1671 Revision: * * 9727 08c6e32c37faa34559811b7494ae29d6e28bcffa Date 11:4:2010. Time 22:21 //===================================================== *** Hardware *** Processor: Intel(R) Core(TM)2 Quad CPU Q9450 @ 2.66GHz Number Of Processors: 4 Physical Memory: 4193296 KB (Available: 2103872 KB) Commit Charge Limit: 4194303 KB *** Operation System *** Windows Vista or Windows Server 2008 Professional (Version 6.1, Build 7600) //===================================================== Exception code: C0000005 ACCESS_VIOLATION Fault address: 004B191F 01:000B091F Z:\\MaNGOS\\Server1\\mangosd.exe Registers: EAX:F56BA8F0 EBX:FF5BF4C0 ECX:00000000 EDX:00000003 ESI:00000000 EDI:008CD470 CS:EIP:0023:004B191F SS:ESP:002B:097ABBC8 EBP:097ABBD4 DS:002B ES:002B FS:0053 GS:002B Flags:00010212 Call stack: Address Frame Function SourceFile 004B191F 00000000 std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,std::allocator<std::Pair<unsigned int const ,unsigned int> >,0> >::_Lbound+F 004ACCD5 00000000 std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,std::allocator<std::Pair<unsigned int const ,unsigned int> >,0> >::find+15 004A9599 00000000 PetAura::GetAura+19 00771B37 00000000 Pet::CastPetAura+37 00771AF3 00000000 Pet::CastPetAuras+C3 00770B65 00000000 Pet::InitPetCreateSpells+65 0076BC25 00000000 Pet::LoadPetFromDB+FB5 0087BC2E 00000000 Spell::DoSummon+19E 0087BA18 00000000 Spell::EffectSummonType+1B8 007061ED 00000000 Spell::HandleEffects+CD 006FBB6B 00000000 Spell::DoSpellHitOnUnit+6AB 006FAEDF 00000000 Spell::DoAllEffectOnTarget+22F 00701D46 00000000 Spell::handle_immediate+E6 00701B3F 00000000 Spell::cast+A5F 00702680 00000000 Spell::update+290 0070E96D 00000000 SpellEvent::Execute+2D 00904FFC 00000000 EventProcessor::Update+EC 0047DE7B 00000000 Unit::Update+3B 0050AF0C 00000000 Player::Update+EC 004D4C8B 00000000 Map::Update+DB 0069C6A8 00000000 MapManager::Update+128 00637B80 00000000 World::Update+800 0045437E 00000000 WorldRunnable::run+8E 008CD489 00000000 ACE_Based::Thread::ThreadTask+19 6E5F1B84 00000000 __WSAFDIsSet+FFFFFFFFFFFCCB4C 6FAC3433 00000000 _endthreadex+44 6FAC34C7 00000000 _endthreadex+D8 75683677 00000000 BaseThreadInitThunk+12 77939D72 00000000 RtlInitializeExceptionChain+63 77939D45 00000000 RtlInitializeExceptionChain+36 ======================== Local Variables And Parameters Call stack: Address Frame Function SourceFile 004B191F 00000000 std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,std::allocator<std::Pair<unsigned int const ,unsigned int> >,0> >::_Lbound+F Local <user defined> 'this' Local <user defined> '_Keyval' Local <user defined> '_Pnode' Local <user defined> '_Wherenode' 004ACCD5 00000000 std::_Tree<std::_Tmap_traits<unsigned int,unsigned int,std::less<unsigned int>,std::allocator<std::Pair<unsigned int const ,unsigned int> >,0> >::find+15 Local <user defined> 'this' Local <user defined> '_Keyval' Local <user defined> '_Where' 004A9599 00000000 PetAura::GetAura+19 Local <user defined> 'this' punting on symbol petEntry Local <user defined> 'itr' 00771B37 00000000 Pet::CastPetAura+37 Local <user defined> 'this' Local <user defined> 'aura' punting on symbol auraId 00771AF3 00000000 Pet::CastPetAuras+C3 Local <user defined> 'itr' Local <user defined> 'this' punting on symbol current Local <user defined> 'owner' 00770B65 00000000 Pet::InitPetCreateSpells+65 Local <user defined> 'this' 0076BC25 00000000 Pet::LoadPetFromDB+FB5 Local <user defined> 'this' Local <user defined> 'owner' punting on symbol petentry punting on symbol petnumber punting on symbol current Local <user defined> 'result' Local <user defined> 'spellInfo' punting on symbol is_temporary_summoned punting on symbol petlevel punting on symbol py Local <user defined> 'map' punting on symbol ownerid punting on symbol px Local <user defined> 'fields' punting on symbol summon_spell_id punting on symbol pz Local <user defined> 'cinfo' punting on symbol pet_number Local <user defined> 'pet_type' punting on symbol savedmana punting on symbol timediff punting on symbol guid punting on symbol savedhealth 0087BC2E 00000000 Spell::DoSummon+19E Local <user defined> 'this' Local <user defined> 'eff_idx' punting on symbol duration punting on symbol z punting on symbol pet_entry Local <user defined> 'map' Local <user defined> 'name' Local <user defined> 'spawnCreature' punting on symbol pet_number punting on symbol x punting on symbol y punting on symbol level 0087BA18 00000000 Spell::EffectSummonType+1B8 Local <user defined> 'this' Local <user defined> 'eff_idx' punting on symbol prop_id Local <user defined> 'summon_prop' 007061ED 00000000 Spell::HandleEffects+CD Local <user defined> 'this' Local <user defined> 'pUnitTarget' Local <user defined> 'pItemTarget' Local <user defined> 'pGOTarget' Local <user defined> 'i' punting on symbol DamageMultiplier punting on symbol eff 006FBB6B 00000000 Spell::DoSpellHitOnUnit+6AB punting on symbol effectNumber Local <user defined> 'this' Local <user defined> 'unit' Local <user defined> 'effectMask' Local <user defined> 'realCaster' 006FAEDF 00000000 Spell::DoAllEffectOnTarget+22F Local <user defined> 'this' Local <user defined> 'target' Local <user defined> 'unit' punting on symbol procEx Local <user defined> 'caster' Local <user defined> 'missInfo' punting on symbol mask punting on symbol procVictim Local <user defined> 'real_caster' punting on symbol procAttacker 00701D46 00000000 Spell::handle_immediate+E6 Local <user defined> 'ihit' Local <user defined> 'this' 00701B3F 00000000 Spell::cast+A5F Local <user defined> 'this' punting on symbol skipCheck Local <user defined> 'castResult' 00702680 00000000 Spell::update+290 Local <user defined> 'this' punting on symbol difftime 0070E96D 00000000 SpellEvent::Execute+2D Local <user defined> 'this' punting on symbol e_time punting on symbol p_time 00904FFC 00000000 EventProcessor::Update+EC Local <user defined> 'Event' Local <user defined> 'this' punting on symbol p_time Local <user defined> 'i' 0047DE7B 00000000 Unit::Update+3B Local <user defined> 'this' punting on symbol p_time 0050AF0C 00000000 Player::Update+EC Local <user defined> 'this' punting on symbol p_time punting on symbol now Local <user defined> 'pet' 004D4C8B 00000000 Map::Update+DB Local <user defined> 'this' Local <user defined> 't_diff' Local <user defined> 'updater' Local <user defined> 'world_object_update' Local <user defined> 'grid_object_update' 0069C6A8 00000000 MapManager::Update+128 Local <user defined> 'iter' Local <user defined> 'this' punting on symbol diff 00637B80 00000000 World::Update+800 punting on symbol i Local <user defined> 'this' punting on symbol diff 0045437E 00000000 WorldRunnable::run+8E punting on symbol diff Local <user defined> 'this' punting on symbol realCurrTime punting on symbol realPrevTime punting on symbol prevSleepTime 008CD489 00000000 ACE_Based::Thread::ThreadTask+19 punting on symbol param Local <user defined> '_task' 6E5F1B84 00000000 __WSAFDIsSet+FFFFFFFFFFFCCB4C 6FAC3433 00000000 _endthreadex+44 6FAC34C7 00000000 _endthreadex+D8 75683677 00000000 BaseThreadInitThunk+12 77939D72 00000000 RtlInitializeExceptionChain+63 77939D45 00000000 RtlInitializeExceptionChain+36 ======================== Global Variables
-
bg 32 think value is 20
-
can you say me the default min/max for this bgs?
-
how to make this to all users?
-
yes confirm me2
-
thinking 9724 fix the problem.
-
=Table `battleground_template` for id 4 have wrong min/max players per team sett ings. BG not created. =Table `battleground_template` for id 5 have wrong min/max players per team sett ings. BG not created. =Table `battleground_template` for id 6 have wrong min/max players per team sett ings. BG not created. =Table `battleground_template` for id 8 have wrong min/max players per team sett ings. BG not created. =Table `battleground_template` for id 32 have wrong min/max players per team set tings. BG not created. Any know the current mim/max players for this battleground?
-
i think is from db... if you use ytdb. They need to update the db. is joke for you
-
Auto Announcer with NextID and MangChat support
MasterTomas replied to a topic in OldCore modifications
[9723] Auto Announcer with NextID and MangChat support diff --git a/sql/broadcast/mangos_mangos_string.sql b/sql/broadcast/mangos_mangos_string.sql new file mode 100644 index 0000000..ff5dc4e --- /dev/null +++ b/sql/broadcast/mangos_mangos_string.sql @@ -0,0 +1 @@ +INSERT INTO `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES (11000, '|cffffcc00[server]: |cff00ff00%s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); \\ No newline at end of file diff --git a/sql/broadcast/realmd_broadcast_strings.sql b/sql/broadcast/realmd_broadcast_strings.sql new file mode 100644 index 0000000..5f70aa4 --- /dev/null +++ b/sql/broadcast/realmd_broadcast_strings.sql @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS `broadcast_strings` ( + `id` int(11) unsigned NOT NULL auto_increment, + `text` text NOT NULL, + `next` int(11) unsigned NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; \\ No newline at end of file diff --git a/src/game/Language.h b/src/game/Language.h index 2802c68..a505a47 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -834,6 +834,8 @@ enum MangosStrings // 10000-10999 // Use for custom patches 11000-11999 + // Broadcaster + LANG_AUTO_BROADCAST = 11000, // NOT RESERVED IDS 12000-1999999999 // `db_script_string` table index 2000000000-2000009999 (MIN_DB_SCRIPT_STRING_ID-MAX_DB_SCRIPT_STRING_ID) diff --git a/src/game/World.cpp b/src/game/World.cpp index 6bf621c..0741e61 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -60,6 +60,7 @@ #include "WaypointManager.h" #include "GMTicketMgr.h" #include "Util.h" +#include "Language.h" INSTANTIATE_SINGLETON_1( World ); @@ -94,12 +95,14 @@ World::World() m_defaultDbcLocale = LOCALE_enUS; m_availableDbcLocaleMask = 0; + + // Initialize broadcaster nextId + m_nextId = 0; for(int i = 0; i < CONFIG_UINT32_VALUE_COUNT; ++i) m_configUint32Values[i] = 0; for(int i = 0; i < CONFIG_INT32_VALUE_COUNT; ++i) - m_configInt32Values[i] = 0; for(int i = 0; i < CONFIG_FLOAT_VALUE_COUNT; ++i) m_configFloatValues[i] = 0.0f; @@ -854,6 +857,11 @@ void World::LoadConfigSettings(bool reload) sLog.outString( "WORLD: VMap support included. LineOfSight:%i, getHeight:%i",enableLOS, enableHeight); sLog.outString( "WORLD: VMap data directory is: %svmaps",m_dataPath.c_str()); sLog.outString( "WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds"); + + // Broadcaster + setConfig(CONFIG_BOOL_BROADCAST_ENABLED , "Broadcast.Enabled" , false); + setConfig(CONFIG_UINT32_BROADCAST_INTERVAL , "Broadcast.Interval" , 60000); + setConfig(CONFIG_UINT32_BROADCAST_POSITION , "Broadcast.Position" , 1); } /// Initialize the World @@ -1279,6 +1287,9 @@ void World::SetInitialWorldSettings() uint32 nextGameEvent = sGameEventMgr.Initialize(); m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event + sLog.outString("Starting Autobroadcast system..." ); + m_timers[WUPDATE_BROADCAST].SetInterval(m_configUint32Values[CONFIG_UINT32_BROADCAST_INTERVAL]); + sLog.outString( "WORLD: World initialized" ); uint32 uStartInterval = getMSTimeDiff(uStartTime, getMSTime()); @@ -1443,6 +1454,13 @@ void World::Update(uint32 diff) m_timers[WUPDATE_EVENTS].Reset(); } + ///- Process autobroadcaster + if(getConfig(CONFIG_BOOL_BROADCAST_ENABLED) && m_timers[WUPDATE_BROADCAST].Passed()) + { + m_timers[WUPDATE_BROADCAST].Reset(); + SendBroadcast(); + } + /// [/list] ///- Move all creatures with "delayed move" and remove and delete all objects with "delayed remove" sMapMgr.RemoveAllObjectsInRemoveList(); @@ -2178,3 +2196,42 @@ bool World::configNoReload(bool reload, eConfigBoolValues index, char const* fie return false; } + +// Broadcast a message +void World::SendBroadcast() +{ + std::string message; + + QueryResult *result; + if(m_nextId > 0) + result = loginDatabase.PQuery("SELECT `text`, `next` FROM `broadcast_strings` WHERE `id` = %u;", m_nextId); + else + result = loginDatabase.PQuery("SELECT `text`, `next` FROM `broadcast_strings` ORDER BY RAND();", m_nextId); + + if(!result) + return; + + Field *fields = result->Fetch(); + m_nextId = fields[1].GetUInt32(); + message = fields[0].GetString(); + + delete result, fields; + + if((getConfig(CONFIG_UINT32_BROADCAST_POSITION) & BROADCAST_LOCATION_CHAT) == BROADCAST_LOCATION_CHAT) + sWorld.SendWorldText(LANG_AUTO_BROADCAST, message.c_str()); + if((getConfig(CONFIG_UINT32_BROADCAST_POSITION) & BROADCAST_LOCATION_TOP) == BROADCAST_LOCATION_TOP) + { + WorldPacket data(SMSG_NOTIFICATION, (message.size()+1)); + data << message; + sWorld.SendGlobalMessage(&data); + } + + if((getConfig(CONFIG_UINT32_BROADCAST_POSITION) & BROADCAST_LOCATION_IRC) == BROADCAST_LOCATION_IRC) +#ifdef MANGCHAT_INSTALLED + sIRC.Send_IRC_Channel(sIRC._irc_chan[sIRC.anchn].c_str(), "\\00311[server]: " + message); +#else + sLog.outError("AutoBroadcaster: You have IRC broadcasting enabled but we couldn't detect mangchat"); +#endif + + sLog.outString("AutoBroadcast: '%s'",message.c_str()); +} \\ No newline at end of file diff --git a/src/game/World.h b/src/game/World.h index a4e4f6f..f564451 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -77,7 +77,8 @@ enum WorldTimers WUPDATE_UPTIME = 4, WUPDATE_CORPSES = 5, WUPDATE_EVENTS = 6, - WUPDATE_COUNT = 7 + WUPDATE_BROADCAST = 7, + WUPDATE_COUNT = 8 }; /// Configuration elements @@ -176,6 +177,8 @@ enum eConfigUInt32Values CONFIG_UINT32_TIMERBAR_BREATH_MAX, CONFIG_UINT32_TIMERBAR_FIRE_GMLEVEL, CONFIG_UINT32_TIMERBAR_FIRE_MAX, + CONFIG_UINT32_BROADCAST_INTERVAL, // Broadcaster + CONFIG_UINT32_BROADCAST_POSITION, // Broadcaster CONFIG_UINT32_MIN_LEVEL_STAT_SAVE, CONFIG_UINT32_VALUE_COUNT }; @@ -306,6 +309,7 @@ enum eConfigBoolValues CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_JOIN, CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_EXIT, CONFIG_BOOL_KICK_PLAYER_ON_BAD_PACKET, + CONFIG_BOOL_BROADCAST_ENABLED, // Broadcaster CONFIG_BOOL_STATS_SAVE_ONLY_ON_LOGOUT, CONFIG_BOOL_VALUE_COUNT }; @@ -380,6 +384,13 @@ enum RealmZone REALM_ZONE_CN5_8 = 37 // basic-Latin at create, any at login }; +enum BroadcastLocation +{ + BROADCAST_LOCATION_CHAT = 1, + BROADCAST_LOCATION_TOP = 2, + BROADCAST_LOCATION_IRC = 4, +}; + // DB scripting commands #define SCRIPT_COMMAND_TALK 0 // source = unit, target=any, datalong ( 0=say, 1=whisper, 2=yell, 3=emote text) #define SCRIPT_COMMAND_EMOTE 1 // source = unit, datalong = anim_id @@ -675,6 +686,10 @@ class World std::string m_DBVersion; std::string m_CreatureEventAIVersion; std::string m_ScriptsVersion; + + //Broadcaster + uint32 m_nextId; + void SendBroadcast(); }; extern uint32 realmID; diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 5d4053f..7190fde 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1451,3 +1451,26 @@ SOAP.Enabled = 0 SOAP.IP = 127.0.0.1 SOAP.Port = 7878 +################################################################################################################### +# Automatic Broadcaster +# +# Broadcast.Enabled +# Enable/Disable the broadcaster +# Default: 0 - off +# 1 - on +# +# Broadcast.Position +# Where to display the message (Just add the values for multiple) +# Default: 1 - In the in-game chat window +# 2 - In the top-middle of the screen +# 4 - In the announcements IRC channel (if mangchat is installed) +# +# Broadcast.Interval +# Interval at which to broadcast messages +# +################################################################################################################### + +Broadcast.Enabled = 1 +Broadcast.Position = 2 +Broadcast.Interval = 30000 +
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®