Форум
/forum/
Форум
Sun, 26 Aug 2012 17:35:50 GMT
uCoz Web-Service
-
Вендор с бесплатным Т8.
/forum/15-1842-1
Sun, 26 Aug 2012 17:35:50 GMT
Форум: <a href="/forum/15">Патчи</a><br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
Вендор с бесплатным Т8. Возможно кому-нибудь понадобится как и для фан серверов, так и для обычных на Ваше усмотрение: <br /><br /> <span style="color:green">подойдет и для мангос 3.3.5</span> <br /><br /> вот и сами вендоры: <br /><br /> <!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc-->REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES (900002, 0, 0, 0, 0, 0, 29489, 0, 29489, 0, 'Server weapon aciton', 'Dew-WoW x100', '', 0, 80, 100, 0, 35, 35, 3968, 1, 1.14286, 1, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 10000000, 10000000, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, '', 1); <br /><br /> DELETE FROM `npc_vendor` WHERE (`entry`=900002); <br /> INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES <br /> (900002, 0, 18542, 0, 0, 0), <br /> (900002, 99, 39200, 0, 0, 0), <br /> (900002, 96, 39270, 0, 0, 0), <br /> (900002, 97, 39271, 0, 0, 0), <br /> (900002, 98, 39276, 0, 0, 0), <br /> (900002, 101, 39281, 0, 0, 0), <br /> (900002, 103, 39291, 0, 0, 0), <br /> (900002, 100, 39344, 0, 0, 0), <br /> (900002, 102, 39394, 0, 0, 0), <br /> (900002, 105, 39416, 0, 0, 0), <br /> (900002, 104, 39417, 0, 0, 0), <br /> (900002, 110, 39419, 0, 0, 0), <br /> (900002, 108, 39422, 0, 0, 0), <br /> (900002, 107, 39423, 0, 0, 0), <br /> (900002, 106, 39424, 0, 0, 0), <br /> (900002, 109, 39426, 0, 0, 0), <br /> (900002, 86, 45335, 0, 0, 0), <br /> (900002, 87, 45336, 0, 0, 0), <br /> (900002, 88, 45337, 0, 0, 0), <br /> (900002, 89, 45338, 0, 0, 0), <br /> (900002, 90, 45339, 0, 0, 0), <br /> (900002, 91, 45340, 0, 0, 0), <br /> (900002, 92, 45341, 0, 0, 0), <br /> (900002, 93, 45342, 0, 0, 0), <br /> (900002, 94, 45343, 0, 0, 0), <br /> (900002, 95, 45344, 0, 0, 0), <br /> (900002, 71, 45345, 0, 0, 0), <br /> (900002, 72, 45346, 0, 0, 0), <br /> (900002, 73, 45347, 0, 0, 0), <br /> (900002, 74, 45348, 0, 0, 0), <br /> (900002, 75, 45349, 0, 0, 0), <br /> (900002, 82, 45351, 0, 0, 0), <br /> (900002, 83, 45352, 0, 0, 0), <br /> (900002, 84, 45353, 0, 0, 0), <br /> (900002, 85, 45354, 0, 0, 0), <br /> (900002, 76, 45355, 0, 0, 0), <br /> (900002, 77, 45356, 0, 0, 0), <br /> (900002, 78, 45357, 0, 0, 0), <br /> (900002, 79, 45358, 0, 0, 0), <br /> (900002, 80, 45359, 0, 0, 0), <br /> (900002, 66, 45360, 0, 0, 0), <br /> (900002, 67, 45361, 0, 0, 0), <br /> (900002, 68, 45362, 0, 0, 0), <br /> (900002, 69, 45363, 0, 0, 0), <br /> (900002, 70, 45364, 0, 0, 0), <br /> (900002, 61, 45365, 0, 0, 0), <br /> (900002, 62, 45367, 0, 0, 0), <br /> (900002, 63, 45368, 0, 0, 0), <br /> (900002, 64, 45369, 0, 0, 0), <br /> (900002, 56, 45370, 0, 0, 0), <br /> (900002, 57, 45371, 0, 0, 0), <br /> (900002, 58, 45372, 0, 0, 0), <br /> (900002, 59, 45373, 0, 0, 0), <br /> (900002, 60, 45374, 0, 0, 0), <br /> (900002, 46, 45375, 0, 0, 0), <br /> (900002, 47, 45376, 0, 0, 0), <br /> (900002, 48, 45377, 0, 0, 0), <br /> (900002, 49, 45379, 0, 0, 0), <br /> (900002, 50, 45380, 0, 0, 0), <br /> (900002, 51, 45381, 0, 0, 0), <br /> (900002, 52, 45382, 0, 0, 0), <br /> (900002, 53, 45383, 0, 0, 0), <br /> (900002, 54, 45384, 0, 0, 0), <br /> (900002, 55, 45385, 0, 0, 0), <br /> (900002, 36, 45391, 0, 0, 0), <br /> (900002, 37, 45392, 0, 0, 0), <br /> (900002, 38, 45393, 0, 0, 0), <br /> (900002, 39, 45394, 0, 0, 0), <br /> (900002, 40, 45395, 0, 0, 0), <br /> (900002, 41, 45396, 0, 0, 0), <br /> (900002, 42, 45397, 0, 0, 0), <br /> (900002, 43, 45398, 0, 0, 0), <br /> (900002, 44, 45399, 0, 0, 0), <br /> (900002, 45, 45400, 0, 0, 0), <br /> (900002, 16, 45401, 0, 0, 0), <br /> (900002, 17, 45402, 0, 0, 0), <br /> (900002, 18, 45403, 0, 0, 0), <br /> (900002, 19, 45404, 0, 0, 0), <br /> (900002, 20, 45405, 0, 0, 0), <br /> (900002, 26, 45406, 0, 0, 0), <br /> (900002, 27, 45408, 0, 0, 0), <br /> (900002, 28, 45409, 0, 0, 0), <br /> (900002, 29, 45410, 0, 0, 0), <br /> (900002, 30, 45411, 0, 0, 0), <br /> (900002, 21, 45412, 0, 0, 0), <br /> (900002, 22, 45413, 0, 0, 0), <br /> (900002, 23, 45414, 0, 0, 0), <br /> (900002, 24, 45415, 0, 0, 0), <br /> (900002, 25, 45416, 0, 0, 0), <br /> (900002, 11, 45417, 0, 0, 0), <br /> (900002, 13, 45419, 0, 0, 0), <br /> (900002, 14, 45420, 0, 0, 0), <br /> (900002, 15, 45421, 0, 0, 0), <br /> (900002, 12, 45422, 0, 0, 0), <br /> (900002, 8, 45424, 0, 0, 0), <br /> (900002, 6, 45425, 0, 0, 0), <br /> (900002, 9, 45426, 0, 0, 0), <br /> (900002, 10, 45427, 0, 0, 0), <br /> (900002, 7, 45428, 0, 0, 0), <br /> (900002, 3, 45429, 0, 0, 0), <br /> (900002, 4, 45430, 0, 0, 0), <br /> (900002, 1, 45431, 0, 0, 0), <br /> (900002, 5, 45432, 0, 0, 0), <br /> (900002, 2, 45433, 0, 0, 0), <br /> (900002, 31, 45436, 0, 0, 0), <br /> (900002, 32, 45437, 0, 0, 0), <br /> (900002, 33, 45438, 0, 0, 0), <br /> (900002, 34, 45439, 0, 0, 0), <br /> (900002, 35, 45440, 0, 0, 0), <br /> (900002, 65, 46131, 0, 0, 0), <br /> (900002, 81, 46313, 0, 0, 0);<!--/uzc--></div></div><!--/uzcode--> <br /><br /> Установка: <br /> 1. скопировать в любой файл с расширением .sql <br /> 2. залить в базу <span style="color:red">Wolrd (Trinity core)</span> или <span style="color:green">Mangos (Mangos core)</span> <br /> 3. сделать рестарт сервера. <br /><br /> и можно играть)
Патчи
Dispeller
/forum/15-1842-1
-
[patch] Антимат
/forum/15-1841-1
Sun, 26 Aug 2012 17:35:26 GMT
Форум: <a href="/forum/15">Патчи</a><br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
Выкладываю для Вас патч - Антимат. <br /><br /> Что может делать скрипт: <br /><br /> фильтровать чат <br /> определять мат в чате <br /> попытки обменять персонажей <br /> оскорбление администрации <br /><br /> <!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc--> <br /> bool CheckMessage( Player* player, std::string& msg) <br /> { <br /> if( IgnoreGMFilterCheck && player->GetSession()->GetSecurity() >= SEC_MODERATOR ) <br /> return true; <br /> int val = Filter->check(msg); <br /> if( val ) <br /> { <br /> switch (val) <br /> { <br /> case 1: <br /> if( bFinePlayer ) <br /> { <br /> if( FinePlayer(player,mat_gold_amount) ) <br /> player->GetSession()->SendNotification("You lost %d gold. Swearing is not allowed",mat_gold_amount); <br /> else <br /> { <br /> PunishPlayer(player); <br /> player->GetSession()->SendNotification("Swearing is not allowed. You got punished because you have no money to pay the fine"); <br /> } <br /> } <br /> else <br /> { <br /> msg = ""; <br /> } <br /> sLog->outAntimat("[MAT] Player %s sends: %s",player->GetName(), msg.c_str()); <br /> break; <br /> case 2: <br /> if( bFinePlayer ) <br /> { <br /> if( FinePlayer(player,obmen_gold_amount) ) <br /> player->GetSession()->SendNotification("Character exchange is forbidden on this server. You lost %d gold",obmen_gold_amount); <br /> else <br /> { <br /> PunishPlayer(player); <br /> player->GetSession()->SendNotification("Character exchange is forbidden on this server. You got punished because you have no money to pay the fine"); <br /> } <br /> } <br /> player->GetSession()->m_muteTime = time(0) + 60; <br /> sLog->outAntimat("[OBMEN] Player %s sends: %s",player->GetName(), msg.c_str()); <br /> msg = ""; <br /> break; <br /> case 3: <br /> if( bFinePlayer ) <br /> { <br /> if( FinePlayer(player,jokes_gold_amount) ) <br /> player->GetSession()->SendNotification("Stupid jokes are forbidden on this server. You lost %d gold",jokes_gold_amount); <br /> else <br /> { <br /> PunishPlayer(player); <br /> player->GetSession()->SendNotification("Stupid jokes are forbidden on this server. You got punished becauseyou have no money to pay the fine"); <br /> } <br /> } <br /> player->GetSession()->m_muteTime = time(0) + 60; <br /> sLog->outAntimat("[TRASH] Player %s sends: %s",player->GetName(), msg.c_str()); <br /> msg = ""; <br /> break; <br /> case 4: <br /> if( bFinePlayer ) <br /> { <br /> if( FinePlayer(player,offence_gold_amount) ) <br /> player->GetSession()->SendNotification("Offence is not allowed on this server. You lost %d gold",offence_gold_amount); <br /> else <br /> { <br /> PunishPlayer(player); <br /> player->GetSession()->SendNotification("You got punished because you have no money to pay the fine"); <br /> } <br /> } <br /> player->GetSession()->m_muteTime = time(0) + 60; <br /> sLog->outAntimat("[OFFENCE] Player %s sends: %s",player->GetName(), msg.c_str()); <br /> msg = ""; <br /> break; <br /> } <br /> return false; <br /> } <br /> return true; <br /> }<!--/uzc--></div></div><!--/uzcode--> <br /><br /> Настройка производится в worldserver.conf <br /><br /> Вывод в antimat.log: <br /> <!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc--> <br /> 2011-08-27 15:35:34 [OBMEN] Player Test sends: обменяю паладина 6700 гс в пм <br /> 2011-08-27 15:36:35 [OFFENCE] Player Test sends: админ мудак <br /> 2011-08-27 15:37:46 [MAT] Player Test sends: mUdаК <br /> 2011-08-27 15:38:51 [OBMEN] Player Test sends: Obmenjau pа1adina в пм <br /> 2011-08-27 15:40:28 [MAT] Player Test sends: P1ZdеЦ <!--/uzc--></div></div><!--/uzcode--> <br /><br /> <a class="link" href="/go?http://narod.ru/disk/24019223001/code.zip.html" title="http://narod.ru/disk/24019223001/code.zip.html" rel="nofollow" target="_blank">Скачать патч.</a> <br /><br /> <a class="link" href="/go?http://www.trinity-core.ru/threads/wowantimat.6517/" title="http://www.trinity-core.ru/threads/wowantimat.6517/" rel="nofollow" target="_blank">Источник</a>
Патчи
Dispeller
/forum/15-1841-1
-
Аннонс При входе в игру игрока
/forum/15-1840-1
Sun, 26 Aug 2012 17:34:56 GMT
Форум: <a href="/forum/15">Патчи</a><br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
<!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc-->#include "ScriptPCH.h" <br /><br /> class Announce_OnPlayerLogin : public PlayerScript <br /> { <br /> public: <br /> Announce_OnPlayerLogin() : PlayerScript("Announce_OnPlayerLogin") {} <br /><br /> void OnLogin(Player * player) <br /> { <br /> char msg[500]; <br /> sprintf(msg, "|CFF00FF00Игрок |cffffffff%s |CFF00FF00Входит в игру!",player->GetName()); <br /> sWorld->SendWorldText(LANG_SYSTEMMESSAGE, msg); <br /> } <br /> }; <br /> void AddSC_OnLogin() <br /> { <br /> new Announce_OnPlayerLogin; <br /> } <!--/uzc--></div></div><!--/uzcode-->
Патчи
Dispeller
/forum/15-1840-1
-
[mod] Платная отправка сообщений в лфг
/forum/15-1839-1
Sun, 26 Aug 2012 17:34:27 GMT
Форум: <a href="/forum/15">Патчи</a><br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
Собственно отправка сообщения в лфг стоит определённое в конфиге количество хонора, если хонора не достаточно, то выводить об этом сообщение. <br /> <a class="link" href="/go?http://code.trinity-core.ru/1013/" title="http://code.trinity-core.ru/1013/" rel="nofollow" target="_blank">Патч.</a> <br /> <!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc-->DELETE FROM `trinity_string` WHERE `entry` = 11002; <br /> INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc8`) VALUES <br /> ('11002', 'not enought honor.', 'недостаточно хонора.');<!--/uzc--></div></div><!--/uzcode-->
Патчи
Dispeller
/forum/15-1839-1
-
[mod] External mail
/forum/15-1838-1
Sun, 26 Aug 2012 17:34:06 GMT
Форум: <a href="/forum/15">Патчи</a><br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
<!--uSpoiler--><div class="uSpoilerClosed" id="uSpoilerFzrf9b"><div class="uSpoilerButBl"><input type="button" class="uSpoilerButton" onclick="if($('#uSpoilerFzrf9b')[0]){if ($('.uSpoilerText',$('#uSpoilerFzrf9b'))[0].style.display=='none'){$('.uSpoilerText',$('#uSpoilerFzrf9b'))[0].style.display='';$('.uSpoilerButton',$('#uSpoilerFzrf9b')).val('[\–] Патч');$('#uSpoilerFzrf9b').attr('class','uSpoilerOpened');}else {$('.uSpoilerText',$('#uSpoilerFzrf9b'))[0].style.display='none';$('.uSpoilerButton',$('#uSpoilerFzrf9b')).val('[+] Патч');$('#uSpoilerFzrf9b').attr('class','uSpoilerClosed');}}" value="[+] Патч"/></div><div class="uSpoilerText" style="display:none;"><!--ust--><!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc--># HG changeset patch <br /> # User skel.wow <br /> # Date 1288423255 -10800 <br /> # Node ID c373e21d91d2fb2e51596eaa81328594e31db1c9 <br /> # Parent f3f271b3107146d076abe25d6b832f9b693953bb <br /> add external mail <br /><br /> diff -r f3f271b31071 -r c373e21d91d2 src/server/game/Mails/Mail.cpp <br /> --- a/src/server/game/Mails/Mail.cpp Sat Oct 30 09:49:41 2010 +0300 <br /> +++ b/src/server/game/Mails/Mail.cpp Sat Oct 30 10:20:55 2010 +0300 <br /> @@ -255,3 +255,86 @@ <br /> deleteIncludedItems(temp); <br /> } <br /> } <br /> + <br /> +void WorldSession::SendExternalMails() <br /> +{ <br /> + sLog.outString("EXTERNAL MAIL> Sending mails in queue..."); <br /> + QueryResult result = CharacterDatabase.Query("SELECT id,receiver,subject,message,money,item,item_count FROM mail_external"); <br /> + SQLTransaction trans = CharacterDatabase.BeginTransaction(); <br /> + if(!result) <br /> + { <br /> + sLog.outString("EXTERNAL MAIL> No mails in queue..."); <br /> +// delete result; <br /> + return; <br /> + } <br /> + else <br /> + { <br /> + uint32 last_id = 0; <br /> + MailDraft* mail = NULL; <br /> + uint32 last_receiver_guid; <br /> + <br /> + do <br /> + { <br /> + Field *fields = result->Fetch(); <br /> + uint32 id = fields[0].GetUInt32(); <br /> + uint64 receiver_guid = fields[1].GetUInt64(); <br /> + std::string subject = fields[2].GetString(); <br /> + std::string body = fields[3].GetString(); <br /> + uint32 money = fields[4].GetUInt32(); <br /> + uint32 itemId = fields[5].GetUInt32(); <br /> + uint32 itemCount = fields[6].GetUInt32(); <br /> + <br /> + Player *receiver = sObjectMgr.GetPlayer( receiver_guid ); <br /> + <br /> + if (id != last_id) <br /> + { <br /> + // send mail <br /> + if (last_id != 0) <br /> + { <br /> + sLog.outString("EXTERNAL MAIL> Sending mail to character with guid %d", last_receiver_guid); <br /> + mail->SendMailTo(trans,MailReceiver(last_receiver_guid), MailSender(MAIL_NORMAL, 0, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_RETURNED); <br /> + delete mail; <br /> + CharacterDatabase.PExecute("DELETE FROM mail_external WHERE id=%u", last_id); <br /> + sLog.outString("EXTERNAL MAIL> Mail sent"); <br /> + } <br /> + <br /> + //Create the maildraft <br /> + mail = new MailDraft( subject, body ); <br /> + <br /> + if(money) <br /> + { <br /> + sLog.outString("EXTERNAL MAIL> Adding money"); <br /> + mail->AddMoney(money); <br /> + } <br /> + } <br /> + <br /> + if (itemId) <br /> + { <br /> + sLog.outString("EXTERNAL MAIL> Adding %u of item with id %u", itemCount, itemId); <br /> + Item* mailItem = Item::CreateItem( itemId, itemCount, receiver ); <br /> + mailItem->SaveToDB(trans); <br /> + mail->AddItem(mailItem); <br /> + } <br /> + <br /> + last_id = id; <br /> + last_receiver_guid = receiver_guid; <br /> + <br /> + } <br /> + while( result->NextRow() ); <br /> + <br /> + // we only send a mail when mail_id!=last_mail_id, so we need to send the very last mail here: <br /> + if (last_id != 0) <br /> + { <br /> + // send last mail <br /> + sLog.outString("EXTERNAL MAIL> Sending mail to character with guid %d", last_receiver_guid); <br /> + <br /> + mail->SendMailTo(trans,MailReceiver(last_receiver_guid), MailSender(MAIL_NORMAL, 0, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_RETURNED); <br /> + delete mail; <br /> + CharacterDatabase.PExecute("DELETE FROM mail_external WHERE id=%u", last_id); <br /> + sLog.outString("EXTERNAL MAIL> Mail sent"); <br /> + } <br /> + } <br /> + <br /> + CharacterDatabase.CommitTransaction(trans); <br /> + sLog.outString("EXTERNAL MAIL> All Mails Sent..."); <br /> +} <br /> \ No newline at end of file <br /> diff -r f3f271b31071 -r c373e21d91d2 src/server/game/Server/WorldSession.h <br /> --- a/src/server/game/Server/WorldSession.h Sat Oct 30 09:49:41 2010 +0300 <br /> +++ b/src/server/game/Server/WorldSession.h Sat Oct 30 10:20:55 2010 +0300 <br /> @@ -261,6 +261,7 @@ <br /> } <br /> } <br /> //used with item_page table <br /> + static void SendExternalMails(); <br /> bool SendItemInfo(uint32 itemid, WorldPacket data); <br /> //auction <br /> void SendAuctionHello(uint64 guid, Creature * unit); <br /> diff -r f3f271b31071 -r c373e21d91d2 src/server/game/World/World.cpp <br /> --- a/src/server/game/World/World.cpp Sat Oct 30 09:49:41 2010 +0300 <br /> +++ b/src/server/game/World/World.cpp Sat Oct 30 10:20:55 2010 +0300 <br /> @@ -881,7 +881,10 @@ <br /> m_int_configs[CONFIG_GROUP_VISIBILITY] = sConfig.GetIntDefault("Visibility.GroupMode", 1); <br /> <br /> m_int_configs[CONFIG_MAIL_DELIVERY_DELAY] = sConfig.GetIntDefault("MailDeliveryDelay",HOUR); <br /> - <br /> + m_int_configs[CONFIG_EXTERNAL_MAIL] = sConfig.GetIntDefault("ExternalMail", 0); <br /> + m_int_configs[CONFIG_EXTERNAL_MAIL_INTERVAL] = sConfig.GetIntDefault("ExternalMailInterval", 1); <br /> + <br /> + <br /> m_int_configs[CONFIG_UPTIME_UPDATE] = sConfig.GetIntDefault("UpdateUptimeInterval", 10); <br /> if (int32(m_int_configs[CONFIG_UPTIME_UPDATE]) <= 0) <br /> { <br /> @@ -1701,7 +1704,7 @@ <br /> //one second is 1000 -(tested on win system) <br /> //TODO: Get rid of magic numbers <br /> mail_timer = ((((localtime(&m_gameTime)->tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval()); <br /> - //1440 <br /> + extmail_timer.SetInterval(m_int_configs[CONFIG_EXTERNAL_MAIL_INTERVAL] * MINUTE * IN_MILLISECONDS); //1440 <br /> mail_timer_expires = ((DAY * IN_MILLISECONDS) / (m_timers[WUPDATE_AUCTIONS].GetInterval())); <br /> sLog.outDebug("Mail timer set to: " UI64FMTD ", mail return is called every " UI64FMTD " minutes", uint64(mail_timer), uint64(mail_timer_expires)); <br /> <br /> @@ -1920,6 +1923,17 @@ <br /> if (m_gameTime > m_NextRandomBGReset) <br /> ResetRandomBG(); <br /> <br /> + /// Handle external mail <br /> + if (m_int_configs[CONFIG_EXTERNAL_MAIL] != 0) <br /> + { <br /> + extmail_timer.Update(diff); <br /> + if (extmail_timer.Passed()) <br /> + { <br /> + WorldSession::SendExternalMails(); <br /> + extmail_timer.Reset(); <br /> + } <br /> + } <br /> + <br /> /// <ul><li> Handle auctions when the timer has passed <br /> if (m_timers[WUPDATE_AUCTIONS].Passed()) <br /> { <br /> diff -r f3f271b31071 -r c373e21d91d2 src/server/game/World/World.h <br /> --- a/src/server/game/World/World.h Sat Oct 30 09:49:41 2010 +0300 <br /> +++ b/src/server/game/World/World.h Sat Oct 30 10:20:55 2010 +0300 <br /> @@ -236,6 +236,8 @@ <br /> CONFIG_START_GM_LEVEL, <br /> CONFIG_GROUP_VISIBILITY, <br /> CONFIG_MAIL_DELIVERY_DELAY, <br /> + CONFIG_EXTERNAL_MAIL, <br /> + CONFIG_EXTERNAL_MAIL_INTERVAL, <br /> CONFIG_UPTIME_UPDATE, <br /> CONFIG_SKILL_CHANCE_ORANGE, <br /> CONFIG_SKILL_CHANCE_YELLOW, <br /> @@ -793,6 +795,7 @@ <br /> time_t m_startTime; <br /> time_t m_gameTime; <br /> IntervalTimer m_timers[WUPDATE_COUNT]; <br /> + IntervalTimer extmail_timer; <br /> time_t mail_timer; <br /> time_t mail_timer_expires; <br /> uint32 m_updateTime, m_updateTimeSum; <br /> diff -r f3f271b31071 -r c373e21d91d2 src/server/worldserver/worldserver.conf.dist <br /> --- a/src/server/worldserver/worldserver.conf.dist Sat Oct 30 09:49:41 2010 +0300 <br /> +++ b/src/server/worldserver/worldserver.conf.dist Sat Oct 30 10:20:55 2010 +0300 <br /> @@ -911,6 +911,15 @@ <br /> # Mail delivery delay time for item sending <br /> # Default: 3600 sec (1 hour) <br /> # <br /> +# ExternalMail <br /> +# Enable external mail delivery from mail_external table. <br /> +# Default: 0 (disabled) <br /> +# 1 (enabled) <br /> +# <br /> +# ExternalMailInterval <br /> +# Mail delivery delay time for item sending from mail_external table, in minutes. <br /> +# Default: 1 minute <br /> +# <br /> # SkillChance.Prospecting <br /> # For prospecting skillup impossible by default, <br /> # but can be allowed as custom setting <br /> @@ -1011,6 +1020,8 @@ <br /> MaxGroupXPDistance = 74 <br /> MaxRecruitAFriendBonusDistance = 100 <br /> MailDeliveryDelay = 3600 <br /> +ExternalMail = 0 <br /> +ExternalMailInterval = 1 <br /> SkillChance.Prospecting = 0 <br /> SkillChance.Milling = 0 <br /> OffhandCheckAtSpellUnlearn = 1<!--/uzc--></div></div><!--/uzcode--><!--/ust--><!--usn(=Патч)--></div></div><!--/uSpoiler--> <br /> <!--uSpoiler--><div class="uSpoilerClosed" id="uSpoilerg47Ih_"><div class="uSpoilerButBl"><input type="button" class="uSpoilerButton" onclick="if($('#uSpoilerg47Ih_')[0]){if ($('.uSpoilerText',$('#uSpoilerg47Ih_'))[0].style.display=='none'){$('.uSpoilerText',$('#uSpoilerg47Ih_'))[0].style.display='';$('.uSpoilerButton',$('#uSpoilerg47Ih_')).val('[\–] SQL');$('#uSpoilerg47Ih_').attr('class','uSpoilerOpened');}else {$('.uSpoilerText',$('#uSpoilerg47Ih_'))[0].style.display='none';$('.uSpoilerButton',$('#uSpoilerg47Ih_')).val('[+] SQL');$('#uSpoilerg47Ih_').attr('class','uSpoilerClosed');}}" value="[+] SQL"/></div><div class="uSpoilerText" style="display:none;"><!--ust-->В базу characters <br /> <!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc-->CREATE TABLE `mail_external` ( <br /> `id` bigint(20) unsigned NOT NULL auto_increment, <br /> `receiver` bigint(20) unsigned NOT NULL, <br /> `subject` varchar(200) default 'Support Message', <br /> `message` varchar(500) default 'Support Message', <br /> `money` bigint(20) unsigned NOT NULL default '0', <br /> `item` bigint(20) unsigned NOT NULL default '0', <br /> `item_count` bigint(20) unsigned NOT NULL default '0', <br /> PRIMARY KEY (`id`) <br /> ) ENGINE=MyISAM AUTO_INCREMENT=7525 DEFAULT CHARSET=utf8;<!--/uzc--></div></div><!--/uzcode--><!--/ust--><!--usn(=SQL)--></div></div><!--/uSpoiler-->
Патчи
Dispeller
/forum/15-1838-1
-
[mod] Damage Checker (проверка урона)
/forum/15-1837-1
Sun, 26 Aug 2012 17:33:43 GMT
Форум: <a href="/forum/15">Патчи</a><br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
<!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc-->Checking the damage the player. By Rescr1pt <img src="http://s54.ucoz.net/sm/23/wink.gif" border="0" align="absmiddle" alt="wink" /> <br /> <br /> src/server/game/World/World.h | 3 +++ <br /> 1 files changed, 3 insertions(+), 0 deletions(-) <br /> <br /> diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h <br /> index 95e9fbd..c35b46d 100755 <br /> --- a/src/server/game/World/World.h <br /> +++ b/src/server/game/World/World.h <br /> @@ -317,6 +317,9 @@ enum WorldIntConfigs <br /> CONFIG_WARDEN_CLIENT_BAN_DURATION, <br /> CONFIG_WARDEN_NUM_MEM_CHECKS, <br /> CONFIG_WARDEN_NUM_OTHER_CHECKS, <br /> + CONFIG_DAMAGE_CHECKER_MAX_DAMAGE, <br /> + CONFIG_DAMAGE_CHECKER_IMMUNE_MIN_GM_LEVEL, <br /> + CONFIG_DAMAGE_CHECKER_BAN_VALUE, <br /> INT_CONFIG_VALUE_COUNT <br /> }; <br /> <br /> src/server/game/World/World.cpp | 5 +++++ <br /> 1 files changed, 5 insertions(+), 0 deletions(-) <br /> <br /> diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp <br /> index ccc8bb2..5b4e912 100755 <br /> --- a/src/server/game/World/World.cpp <br /> +++ b/src/server/game/World/World.cpp <br /> @@ -1200,6 +1200,11 @@ void World::LoadConfigSettings(bool reload) <br /> m_bool_configs[CONFIG_PDUMP_NO_PATHS] = ConfigMgr::GetBoolDefault("PlayerDump.DisallowPaths", true); <br /> m_bool_configs[CONFIG_PDUMP_NO_OVERWRITE] = ConfigMgr::GetBoolDefault("PlayerDump.DisallowOverwrite", true); <br /> <br /> + // damage checker <br /> + m_int_configs[CONFIG_DAMAGE_CHECKER_MAX_DAMAGE] = ConfigMgr::GetIntDefault("DamageChecker.MaxDamage", 50000); <br /> + m_int_configs[CONFIG_DAMAGE_CHECKER_IMMUNE_MIN_GM_LEVEL] = ConfigMgr::GetIntDefault("DamageChecker.ImmuneMinGMLevel", 1); <br /> + m_int_configs[CONFIG_DAMAGE_CHECKER_BAN_VALUE] = ConfigMgr::GetIntDefault("DamageChecker.BanValue", 3600); <br /> + <br /> // call ScriptMgr if we're reloading the configuration <br /> if (reload) <br /> sScriptMgr->OnConfigLoad(reload); <br /> src/server/game/Entities/Unit/Unit.cpp | 14 ++++++++++++++ <br /> 1 files changed, 14 insertions(+), 0 deletions(-) <br /> <br /> diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp <br /> index d71f8e8..5ea95cf 100755 <br /> --- a/src/server/game/Entities/Unit/Unit.cpp <br /> +++ b/src/server/game/Entities/Unit/Unit.cpp <br /> @@ -655,6 +655,20 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam <br /> <br /> sLog->outStaticDebug("DealDamageStart"); <br /> <br /> + // damage checker <br /> + if(GetTypeId() == TYPEID_PLAYER <br /> + && sWorld->getIntConfig(CONFIG_DAMAGE_CHECKER_MAX_DAMAGE) > 0 <br /> + && damage >= sWorld->getIntConfig(CONFIG_DAMAGE_CHECKER_MAX_DAMAGE) <br /> + && (uint8)ToPlayer()->GetSession()->GetSecurity() < sWorld->getIntConfig(CONFIG_DAMAGE_CHECKER_IMMUNE_MIN_GM_LEVEL)) <br /> + { <br /> + // punishment <br /> + uint32 banTime = sWorld->getIntConfig(CONFIG_DAMAGE_CHECKER_BAN_VALUE); <br /> + if(banTime > 0) <br /> + sWorld->BanCharacter(ToPlayer()->GetName(), secsToTimeString(banTime, true).c_str(), "Maximal damage", "Damage Checker"); <br /> + <br /> + sLog->outString("Damage Checker: Player name '%s', damage %u", ToPlayer()->GetName(), damage); <br /> + } <br /> + <br /> uint32 health = victim->GetHealth(); <br /> sLog->outDetail("deal dmg:%d to health:%d ", damage, health); <br /> <br /> src/server/worldserver/worldserver.conf.dist | 27 ++++++++++++++++++++++++++ <br /> 1 files changed, 27 insertions(+), 0 deletions(-) <br /> <br /> diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist <br /> index 5d83710..9dae019 100644 <br /> --- a/src/server/worldserver/worldserver.conf.dist <br /> +++ b/src/server/worldserver/worldserver.conf.dist <br /> @@ -25,6 +25,7 @@ <br /> # CONSOLE AND REMOTE ACCESS <br /> # CHARACTER DELETE OPTIONS <br /> # CUSTOM SERVER OPTIONS <br /> +# DAMAGE CHECKER OPTIONS <br /> # <br /> ################################################################################################### <br /> <br /> @@ -2880,3 +2881,29 @@ PlayerDump.DisallowOverwrite = 1 <br /> <br /> # <br /> ################################################################################################### <br /> + <br /> +################################################################################################### <br /> +# DAMAGE CHECKER OPTIONS <br /> +# <br /> +# DamageChecker.MaxDamage <br /> +# Maximum damage on the player. <br /> +# Default: 0 - disable <br /> + <br /> +DamageChecker.MaxDamage = 50000 <br /> + <br /> +# <br /> +# DamageChecker.ImmuneMinGMLevel <br /> +# The min level of GM, to obtain immunity from the detector. <br /> +# Default: 1 <br /> + <br /> +DamageChecker.ImmuneMinGMLevel = 1 <br /> + <br /> +# <br /> +# DamageChecker.BanValue <br /> +# Ban-time for the character (in seconds). If the BanValue is 0 or less, then only get a log. <br /> +# Default: 3600 <br /> + <br /> +DamageChecker.BanValue = 3600 <br /> + <br /> +# <br /> +###################################################################################################<!--/uzc--></div></div><!--/uzcode-->
Патчи
Dispeller
/forum/15-1837-1
-
Нордскол с 68 лвла
/forum/15-1836-1
Sun, 26 Aug 2012 17:33:22 GMT
Форум: <a href="/forum/15">Патчи</a><br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
<!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc-->diff --git a/src/game/Player.cpp b/src/game/Player.cpp <br /> --- a/src/game/Player.cpp <br /> +++ b/src/game/Player.cpp <br /> @@ -5917,6 +5917,16 @@ <br /><br /> bool Player::SetPosition(float x, float y, float z, float orientation, bool teleport) <br /> { <br /> + <br /> + if(GetMapId() == 571 && getLevel()<68) <br /> + { <br /> + switch(GetTeam()) <br /> + { <br /> + case ALLIANCE: TeleportTo(0, -8830.62f, 622.80f, 93.85f, 3.9f); break; <br /> + case HORDE: TeleportTo(1, 1629.35f, -4373.39f, 31.26f, 3.5f); break; <br /> + <br /> + } <br /> + } <br /> // prevent crash when a bad coord is sent by the client <br /> if(!Trinity::IsValidMapCoord(x,y,z,orientation)) <br /> { <!--/uzc--></div></div><!--/uzcode-->
Патчи
Dispeller
/forum/15-1836-1
-
Scourge Strike
/forum/15-1835-1
Sun, 26 Aug 2012 17:32:28 GMT
Форум: <a href="/forum/15">Патчи</a><br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
<!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc--># HG changeset patch <br /> # User illusion <br /> # Date 1325684790 -14400 <br /> # Node ID 9ce8288cd717266c016c3315f62726b59837daba <br /> # Parent b8d7bac2b8334e93908952809c1fc5a81ed0651e <br /> NR_Add GetTakenDamage function. <br /> This function returned taken damage of hit unit(crit, armor, and etc). <br /> Fix scourge strike, not fully fix. <br /><br /> diff -r b8d7bac2b833 -r 9ce8288cd717 src/server/game/Spells/Spell.cpp <br /> --- a/src/server/game/Spells/Spell.cpp Wed Jan 04 17:45:11 2012 +0400 <br /> +++ b/src/server/game/Spells/Spell.cpp Wed Jan 04 17:46:30 2012 +0400 <br /> @@ -1335,10 +1335,10 @@ <br /> <br /> // Add bonuses and fill damageInfo struct <br /> caster->CalculateSpellDamageTaken(&damageInfo, m_damage, m_spellInfo, m_attackType, target->crit); <br /> + m_taken_damage = damageInfo.damage; <br /> caster->DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb); <br /> <br /> // Send log damage message to client <br /> - <br /> if (missInfo == SPELL_MISS_REFLECT) <br /> damageInfo.attacker = unit; <br /> caster->SendSpellNonMeleeDamageLog(&damageInfo); <br /> @@ -1356,7 +1356,7 @@ <br /> } <br /> <br /> caster->DealSpellDamage(&damageInfo, true); <br /> - <br /> + <br /> // Haunt <br /> if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags[1] & 0x40000 && m_spellAura && m_spellAura->GetEffect(1)) <br /> { <br /> diff -r b8d7bac2b833 -r 9ce8288cd717 src/server/game/Spells/Spell.h <br /> --- a/src/server/game/Spells/Spell.h Wed Jan 04 17:45:11 2012 +0400 <br /> +++ b/src/server/game/Spells/Spell.h Wed Jan 04 17:46:30 2012 +0400 <br /> @@ -549,8 +549,9 @@ <br /> GameObject* focusObject; <br /> <br /> // Damage and healing in effects need just calculate <br /> - int32 m_damage; // Damge in effects count here <br /> + int32 m_damage; // Damage in effects count here <br /> int32 m_healing; // Healing in effects count here <br /> + int32 m_taken_damage; // Damage in effects count here (after armor and resist) <br /> <br /> // ****************************************** <br /> // Spell trigger system <br /> diff -r b8d7bac2b833 -r 9ce8288cd717 src/server/game/Spells/SpellScript.cpp <br /> --- a/src/server/game/Spells/SpellScript.cpp Wed Jan 04 17:45:11 2012 +0400 <br /> +++ b/src/server/game/Spells/SpellScript.cpp Wed Jan 04 17:46:30 2012 +0400 <br /> @@ -398,6 +398,16 @@ <br /> return m_spell->m_damage; <br /> } <br /> <br /> +int32 SpellScript::GetTakenDamage() <br /> +{ <br /> + if (!IsInAfterHitPhase()) <br /> + { <br /> + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetTakenDamage was called while spell not in after-hit phase!", m_scriptName, m_scriptSpellId); <br /> + return NULL; <br /> + } <br /> + return m_spell->m_taken_damage; <br /> +} <br /> + <br /> void SpellScript::SetHitDamage(int32 damage) <br /> { <br /> if (!IsInTargetHook()) <br /> diff -r b8d7bac2b833 -r 9ce8288cd717 src/server/game/Spells/SpellScript.h <br /> --- a/src/server/game/Spells/SpellScript.h Wed Jan 04 17:45:11 2012 +0400 <br /> +++ b/src/server/game/Spells/SpellScript.h Wed Jan 04 17:46:30 2012 +0400 <br /> @@ -212,6 +212,7 @@ <br /> bool IsInTargetHook() const; <br /> bool IsInHitPhase() const; <br /> bool IsInEffectHook() const; <br /> + bool IsInAfterHitPhase() const { return (m_currentScriptState == SPELL_SCRIPT_HOOK_AFTER_HIT); } <br /> private: <br /> Spell* m_spell; <br /> uint8 m_hitPreventEffectMask; <br /> @@ -302,6 +303,8 @@ <br /> int32 GetHitDamage(); <br /> void SetHitDamage(int32 damage); <br /> void PreventHitDamage() { SetHitDamage(0); } <br /> + // returns total damage of a spell (crit comprensive) <br /> + int32 GetTakenDamage(); <br /> // setter/getter for for heal done by spell to target of spell hit <br /> // returns healing calculated before hit, and real dmg done after hit <br /> int32 GetHitHeal(); <br /> diff -r b8d7bac2b833 -r 9ce8288cd717 src/server/scripts/Spells/spell_dk.cpp <br /> --- a/src/server/scripts/Spells/spell_dk.cpp Wed Jan 04 17:45:11 2012 +0400 <br /> +++ b/src/server/scripts/Spells/spell_dk.cpp Wed Jan 04 17:46:30 2012 +0400 <br /> @@ -375,6 +375,11 @@ <br /> class spell_dk_scourge_strike_SpellScript : public SpellScript <br /> { <br /> PrepareSpellScript(spell_dk_scourge_strike_SpellScript); <br /> + private: <br /> + float m_multip; <br /> + public: <br /> + spell_dk_scourge_strike_SpellScript() : m_multip(0.0f) { } <br /> + <br /> <br /> bool Validate(SpellInfo const* /*spellEntry*/) <br /> { <br /> @@ -387,8 +392,15 @@ <br /> { <br /> Unit* caster = GetCaster(); <br /> if (Unit* unitTarget = GetHitUnit()) <br /> + m_multip = GetEffectValue() * unitTarget->GetDiseasesByCaster(caster->GetGUID()); <br /> + } <br /> + <br /> + void HandleAfterHit() <br /> + { <br /> + Unit* caster = GetCaster(); <br /> + if (Unit* unitTarget = GetHitUnit()) <br /> { <br /> - int32 bp = CalculatePctN(GetHitDamage(), GetEffectValue() * unitTarget->GetDiseasesByCaster(caster->GetGUID())); <br /> + int32 bp = CalculatePctN(GetTakenDamage(), m_multip); <br /> caster->CastCustomSpell(unitTarget, DK_SPELL_SCOURGE_STRIKE_TRIGGERED, &bp, NULL, NULL, true); <br /> } <br /> } <br /> @@ -396,6 +408,7 @@ <br /> void Register() <br /> { <br /> OnEffectHitTarget += SpellEffectFn(spell_dk_scourge_strike_SpellScript::HandleDummy, EFFECT_2, SPELL_EFFECT_DUMMY); <br /> + AfterHit += SpellHitFn(spell_dk_scourge_strike_SpellScript::HandleAfterHit); <br /> } <br /> }; <!--/uzc--></div></div><!--/uzcode-->
Патчи
Dispeller
/forum/15-1835-1
-
Госсипы Мобов
/forum/15-1834-1
Sun, 26 Aug 2012 17:31:41 GMT
Форум: <a href="/forum/15">Патчи</a><br />Описание темы: C++<br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
<!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc-->player->CastSpell(player, Ид спелла, true); - Нпц кастует на вас спелл <br /> player->TeleportTo(Мапа, По иксуf, по игрикуf, по зетf, ориентацияf); - Телепортирует игрока <br /> player->ModifyMoney(в медях); - Даёт игроку бабки <br /> player->ModifyMoney(-в медях); - Отнимает бабки <br /> player->GiveXP(Количество опыта, NULL); - Даёт определённое количество опыта <br /> player->ModifyArenaPoints(сколько Арены пойнта); Даёт арены пойнты "Если поставить минут отнимает" <br /> player->ModifyHonorPoints(сколько хонор пойнта); Даёт Хонор пойнты "Если поставить минут отнимает" <br /> player->SetAtLoginFlag(AT_LOGIN_RENAME); - ренейм <br /> player->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE); - Смена внешности <br /> player->SetAtLoginFlag(AT_LOGIN_CHANGE_FACTION); - Изменяет фракцию <br /> player->SetAtLoginFlag(AT_LOGIN_CHANGE_RACE); - Изменяет рассу <br /> player->RemoveAurasDueToSpell(Ид спелла,0); - Снимает эффект Спелла <br /> player->SetHealth(pPlayer->GetMaxHealth()); - Даёт максимум Хп <br /> player->SetDisplayId(Ид морпа); - Накладывает на игрока морп <br /> player->DestroyItemCount(Ид предмета, Сколько предметов, true); - Удаляет у игрока кол-во предметов <br /> player->learnSpell(Ид спелла, true); - выучивает ид спелла <br /> if (player->GetMoney()< Сколько монет) - Проверка на деньги <br /> if (player->GetItemCount(ид итема) < кол-во) - проверка на итем <br /> if (player->getLevel() >= какой лвл) - Проверка на уровень <br /> if (player->GetArenaPoints()< кол-во) - Проверка на арена пойнты <br /> if (player->GetHonorPoints()< кол-во) - Проверка на хонор опйнты <br /> player->GiveLevel(Лвл); - Изменяет лвл<!--/uzc--></div></div><!--/uzcode-->
Патчи
Dispeller
/forum/15-1834-1
-
gm_helloy
/forum/15-1833-1
Sun, 26 Aug 2012 17:30:57 GMT
Форум: <a href="/forum/15">Патчи</a><br />Автор темы: Dispeller<br />Автор последнего сообщения: Dispeller<br />Количество ответов: 0
<!--uzcode--><div class="bbCodeBlock"><div class="bbCodeName" style="padding-left:5px;font-weight:bold;font-size:7pt">Code</div><div class="codeMessage" style="border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight<5?this.style.height:scrollHeight>200?'200px':''+(this.scrollHeight+5)+'px');"><!--uzc-->#include "ScriptPCH.h" <br /> #include "AccountMgr.h" <br /> #include "Config.h" <br /><br /> class gm_hello : public PlayerScript <br /> { <br /> public: <br /> gm_hello() : PlayerScript("gm_hello") {} <br /><br /> void OnLogin(Player* player) <br /> { <br /> if (sWorld->getBoolConfig(CONFIG_GM_SETTINGS_ON_INPUT)) <br /> { <br /> if (player->GetSession()->GetSecurity() == SEC_MODERATOR) <br /> { <br /> std::string sText = ("Модератор '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' входит в Игровой мир."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> if (player->GetSession()->GetSecurity() == SEC_EVENTER) <br /> { <br /> std::string sText = ("Эвент-мастер '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' входит в Игровой мир."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> if (player->GetSession()->GetSecurity() == SEC_GAMEMASTER) <br /> { <br /> std::string sText = ("Гейм-мастер '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' входит в Игровой мир."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> if (player->GetSession()->GetSecurity() == SEC_DEVELOPER) <br /> { <br /> std::string sText = ("Разработчик Проэкта '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' входит в Игровой мир."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> if (player->GetSession()->GetSecurity() == SEC_ADMINISTRATOR) <br /> { <br /> std::string sText = ("Куратор Проэкта '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' входит в Игровой мир."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> } <br /> } <br /><br /> void OnLogout(Player* player) <br /> { <br /> if (sWorld->getBoolConfig(CONFIG_GM_SETTINGS_ON_EXIT)) <br /> { <br /> if (player->GetSession()->GetSecurity() == SEC_MODERATOR) <br /> { <br /> std::string sText = ("Модератор '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' выходит из Игрового мира."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> if (player->GetSession()->GetSecurity() == SEC_EVENTER) <br /> { <br /> std::string sText = ("Эвент-мастер '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' выходит из Игрового мира."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> if (player->GetSession()->GetSecurity() == SEC_GAMEMASTER) <br /> { <br /> std::string sText = ("Гейм-мастер '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' выходит из Игрового мира."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> if (player->GetSession()->GetSecurity() == SEC_DEVELOPER) <br /> { <br /> std::string sText = ("Разработчик Проэкта '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' выходит из Игрового мира."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> if (player->GetSession()->GetSecurity() == SEC_ADMINISTRATOR) <br /> { <br /> std::string sText = ("Куратор Проэкта '|cFF60FF00" + std::string(player->GetSession()->GetPlayerName()) + "|r' выходит из Игрового мира."); <br /> sWorld->SendServerMessage(SERVER_MSG_STRING, sText.c_str()); <br /> } <br /> } <br /> } <br /> }; <br /><br /> void AddSC_gm_hello() <br /> { <br /> new gm_hello(); <br /> }<!--/uzc--></div></div><!--/uzcode-->
Патчи
Dispeller
/forum/15-1833-1