Jump to content

Search the Community

Showing results for tags 'C++'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Rules
    • News/Announcements
    • Forum Rules
  • General
    • General Chat
    • Introduce Yourself
    • Forum Suggestion/Bug Reporting
  • World of Warcraft Emulation
    • Emulation Releases
    • Support
    • Tutorials
    • Model Editing
    • Emulation Chat
    • Requests
  • World of Warcraft Private Servers
    • Advertise Your Server
    • Recruitment
  • World of Warcraft Emulation Marketplace
    • For Sale
    • Wanted
    • Hosting
  • World of Warcraft General
    • Retail Discussions
    • Class Discussions
    • PVP
    • PVE

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 34 results

  1. ------------------------------|@Edit: leveling up bug FIXED-- |@Edit2: Profession's bug FIXED-|------------------------------|Patch for latest rev. of TrinityCore.Yes, it works in Eluna.Bug of battleground's chat fixed.How to install:Extract the CrossFactionBattlegrounds2.rar, copy and paste in your Source folder;Open Git Bash and navigate to your Source folder;Use the command: patch -p1 <CrossFactionBattlegrounds.patchCompile and enjoy.If you already applied the first patch that I posted, you gonna need it to remove it. Here is the OLD patch.Credits: Lille Carl, Noffearr, PrivateDonut, Quadral and samy27x.
  2. FULL credit goes to Tommy from Emudevs.com for writing this. I'm simply sharing it. #1. Configuration Option Go into World.h and add: CONFIG_CROSSFACTIONBG inside of: Code: enum WorldBoolConfigs Now head into your World.cpp and add: m_bool_configs[CONFIG_CROSSFACTIONBG] = sConfigMgr->GetBoolDefault("MixedBGs", true); Around line #1191 where all the other options are loading. #2. Player source & header file We will be doing the Player files. To start, open up Player.h and Player.cpp. Once you have those opened; Go on line #1061 and above line #1066 add: Code: //CROSSFACION BG START private: bool m_ForgetBGPlayers; bool m_ForgetInListPlayers; public: typedef std::vector<uint64> FakePlayers; void FitPlayerInTeam(bool action); void DoForgetPlayersInList(); void DoForgetPlayersInBG(Battleground* pBattleGround); uint8 GetFakeRaceOrRace(); void SetForgetBGPlayers(bool tralse) { m_ForgetBGPlayers = tralse; } bool ShouldForgetBGPlayers() { return m_ForgetBGPlayers; } void SetForgetInListPlayers(bool tralse) { m_ForgetInListPlayers = tralse; } bool ShouldForgetInListPlayers() { return m_ForgetInListPlayers; } bool SendBattleGroundChat(uint32 msgtype, std::string message); void MorphFit(bool value); bool TeamIsBGTeam() { return GetBGTeam() == GetTeam(); } FakePlayers m_FakePlayers; //CROSSFACION BG END Now go to line #1887 and above that add: Code: TeamId GetBGTeamId() const { return GetBGTeam() == ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE; } That should be all of Player.h. Go to Player.cpp.. I guess on any line under a function of your choice add: (In Player.cpp) Code: /*#################################################################################### ###############################CROSSFACTION BATTLEGROUNDS############################# ####################################################################################*/ void Player::FitPlayerInTeam(bool action) { ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(GetFakeRaceOrRace()); if(rEntry && !TeamIsBGTeam() && action) setFaction(rEntry->FactionID); else setFactionForRace(getRace()); if (action) SetForgetBGPlayers(true); else SetForgetInListPlayers(true); MorphFit(action); if (GetBattleground() && action) ChatHandler(GetSession()).PSendSysMessage("You are playing for the %s%s in %s!", GetBGTeam() == ALLIANCE ? "|cff0000FFalliance|r" : "|cffFF0000horde|r", GetBattleground()->GetName()); } uint8 Player::GetFakeRaceOrRace() { if(!TeamIsBGTeam()) return GetBGTeam() == ALLIANCE ? RACE_HUMAN : RACE_BLOODELF; else return getRace(); } void Player::DoForgetPlayersInList() { // m_FakePlayers is filled from a vector within the battleground // they were in previously so all players that have been in that BG will be invalidated. for (FakePlayers::const_iterator itr = m_FakePlayers.begin(); itr != m_FakePlayers.end(); ++itr) { WorldPacket data(SMSG_INVALIDATE_PLAYER, 8); data << *itr; GetSession()->SendPacket(&data); if (Player* pPlayer = ObjectAccessor::FindPlayer(*itr)) GetSession()->SendNameQueryOpcode(*itr); } m_FakePlayers.clear(); } void Player::DoForgetPlayersInBG(Battleground* pBattleGround) { if (!pBattleGround || pBattleGround->isArena()) return; for (Battleground::BattlegroundPlayerMap::const_iterator itr = pBattleGround->GetPlayers().begin(); itr != pBattleGround->GetPlayers().end(); ++itr) { // Here we invalidate players in the bg to the added player WorldPacket data1(SMSG_INVALIDATE_PLAYER, 8); data1 << itr->first; GetSession()->SendPacket(&data1); GetSession()->SendNameQueryOpcode(itr->first); if (Player* pPlayer = ObjectAccessor::FindPlayer(itr->first)) { // Here we invalidate the player added to players in the bg WorldPacket data2(SMSG_INVALIDATE_PLAYER, 8); data2 << GetGUID(); pPlayer->GetSession()->SendPacket(&data2); pPlayer->GetSession()->SendNameQueryOpcode(GetGUID()); } } } bool BattlegroundQueue::CheckCrossFactionMatch(BattlegroundBracketId bracket_id, Battleground* bg) { TC_LOG_DEBUG("misc", "BattleGroundQueue::CheckCrossFactionMatch"); if (bg->isArena()) return false; // Only do this if crossbg's are enabled. // Here we will add all players to selectionpool, later we check if there are enough and launch a bg. FillXPlayersToBG(bracket_id, bg, true); uint8 MPT = bg->GetMinPlayersPerTeam(); if (m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() < MPT || m_SelectionPools[TEAM_HORDE].GetPlayerCount() < MPT) { TC_LOG_DEBUG("misc", "Not enough players. Has: %u Need: %u", m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() + m_SelectionPools[TEAM_HORDE].GetPlayerCount(), MPT * 2); return false; } return true; } // This function will invite players in the least populated faction, which makes battleground queues much faster. // This function will return true if cross faction battlegrounds are enabled, otherwise return false, // which is useful in FillPlayersToBG. Because then we can interrupt the regular invitation if cross faction bg's are enabled. bool BattlegroundQueue::FillXPlayersToBG(BattlegroundBracketId bracket_id, Battleground* bg, bool start) { if (sWorld->getBoolConfig(CONFIG_CROSSFACTIONBG)) { int32 aliFree = start ? bg->GetMinPlayersPerTeam() : bg->GetFreeSlotsForTeam(ALLIANCE); int32 hordeFree = start ? bg->GetMinPlayersPerTeam() : bg->GetFreeSlotsForTeam(HORDE); // Empty selection pools. They will be refilled from queued groups. m_SelectionPools[TEAM_ALLIANCE].Init(); m_SelectionPools[TEAM_HORDE].Init(); int32 valiFree = aliFree; int32 vhordeFree = hordeFree; int32 diff = 0; TC_LOG_DEBUG("misc", "valiFree: %u vhordeFree: %u", valiFree, vhordeFree); for (GroupsQueueType::iterator itr = m_QueuedGroups[bracket_id][BG_QUEUE_MIXED].begin(); itr != m_QueuedGroups[bracket_id][BG_QUEUE_MIXED].end(); ++itr) { if ((*itr)->IsInvitedToBGInstanceGUID) continue; diff = abs(valiFree - vhordeFree); bool moreAli = valiFree < vhordeFree; if (diff > 0) (*itr)->Team = moreAli ? HORDE : ALLIANCE; bool alliance = (*itr)->Team == ALLIANCE; if (m_SelectionPools[alliance ? TEAM_ALLIANCE : TEAM_HORDE].AddGroup((*itr), alliance ? aliFree : hordeFree)) { uint8 GSize = (*itr)->Players.size(); alliance ? valiFree -= GSize : vhordeFree -= GSize; } } return true; } return false; } bool Player::SendBattleGroundChat(uint32 msgtype, std::string message) { float distance = msgtype == CHAT_MSG_SAY ? sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY) : sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_YELL); if (Battleground* pBattleGround = GetBattleground()) { for (Battleground::BattlegroundPlayerMap::const_iterator itr = pBattleGround->GetPlayers().begin(); itr != pBattleGround->GetPlayers().end(); ++itr) { if (Player* pPlayer = ObjectAccessor::FindPlayer(itr->first)) { if (GetDistance2d(pPlayer->GetPositionX(), pPlayer->GetPositionY()) <= distance) { if (GetBGTeam() == pPlayer->GetBGTeam()) { WorldPacket data; ChatHandler::BuildChatPacket(data, ChatMsg(msgtype), LANG_UNIVERSAL, pPlayer, NULL, message); pPlayer->GetSession()->SendPacket(&data); } else if (msgtype != CHAT_MSG_EMOTE) { WorldPacket data; ChatHandler::BuildChatPacket(data, ChatMsg(msgtype), pPlayer->GetTeam() == ALLIANCE ? LANG_ORCISH : LANG_COMMON, pPlayer, NULL, message); pPlayer->GetSession()->SendPacket(&data); } } } } return true; } else return false; } void Player::MorphFit(bool value) { if (!TeamIsBGTeam() && value) { if (GetBGTeam() == ALLIANCE) { if (getGender() == GENDER_MALE) { SetDisplayId(19723); SetNativeDisplayId(19723); } else { SetDisplayId(19724); SetNativeDisplayId(19724); } } else { if (getGender() == GENDER_MALE) { SetDisplayId(20578); SetNativeDisplayId(20578); } else { SetDisplayId(20579); SetNativeDisplayId(20579); } } } else InitDisplayIds(); } #3. Unit.cpp & Handlers QueryHandler.cpp In QueryHandler.cpp under SendNameQueryOpcode(uint64 guid), change: (On line #51) Code: data << uint8(nameData->m_race); to: Code: data << uint8(player ? player->GetFakeRaceOrRace() : nameData->m_race); MiscHandler.cpp Under void WorldSession::HandleTimeSyncResp(WorldPacket& recvData) add: Code: Battleground* bg = _player->GetBattleground(); if (bg) { if (_player->ShouldForgetBGPlayers()) { _player->DoForgetPlayersInBG(bg); _player->SetForgetBGPlayers(false); } } else if (_player->ShouldForgetInListPlayers()) { _player->DoForgetPlayersInList(); _player->SetForgetInListPlayers(false); } Above or below line: #1418 ChatHandler.cpp Inside of void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) add: Code: if (!GetPlayer()->IsGameMaster()) if (GetPlayer()->SendBattleGroundChat(type, msg)) return; Above line #251 CharacterHandler.cpp Inside of void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) Under line #1031 add: Code: if (sWorld->getBoolConfig(CONFIG_CROSSFACTIONBG)) { float x = pCurrChar->GetPositionX(); float y = pCurrChar->GetPositionY(); float z = pCurrChar->GetPositionZ(); uint32 hm = pCurrChar->m_homebindMapId; float hx = pCurrChar->m_homebindX; float hy = pCurrChar->m_homebindX; float hz = pCurrChar->m_homebindX; if (z+1 < pCurrChar->GetMap()->GetHeight(x, y, MAX_HEIGHT) && pCurrChar->GetMap()->IsOutdoors(x, y, z)) pCurrChar->TeleportTo(hm, hx, hy, hz, 0); } if (pCurrChar->GetBattleground() && !pCurrChar->GetBattleground()->isArena()) pCurrChar->FitPlayerInTeam(true); else pCurrChar->FitPlayerInTeam(false); Unit.cpp Inside of void Unit::RestoreFaction() On line #15921, replace: Code: ToPlayer()->setFactionForRace(getRace()); with Code: ToPlayer()->setFactionForRace(ToPlayer()->GetFakeRaceOrRace()); #4. BattlegroundQueue.cpp & BattlegroundQueue.h Open BattlegroundQueue.h.. Inside of enum BattlegroundQueueGroupTypes under BG_QUEUE_NORMAL_HORDE = 3, add: Code: BG_QUEUE_MIXED = 4 It should look like this now: Code: enum BattlegroundQueueGroupTypes { BG_QUEUE_PREMADE_ALLIANCE = 0, BG_QUEUE_PREMADE_HORDE = 1, BG_QUEUE_NORMAL_ALLIANCE = 2, BG_QUEUE_NORMAL_HORDE = 3, BG_QUEUE_MIXED = 4 }; On line #65 replace #define BG_QUEUE_GROUP_TYPES_COUNT 4 with: (Just change the 4 to a 5) Code: #define BG_QUEUE_GROUP_TYPES_COUNT 5 Now, under line #75 add: Code: bool FillXPlayersToBG(BattlegroundBracketId bracket_id, Battleground* bg, bool start = false);bool CheckCrossFactionMatch(BattlegroundBracketId bracket_id, Battleground* bg); You're done with BattlegroundQueue.h. Open up and go to BattlegroundQueue.cpp.. On line #840, replace: Code: if (CheckNormalMatch(bg_template, bracket_id, MinPlayersPerTeam, MaxPlayersPerTeam)|| (bg_template->isArena() && CheckSkirmishForSameFaction(bracket_id, MinPlayersPerTeam))) with: Code: if (CheckNormalMatch(bg_template, bracket_id, MinPlayersPerTeam, MaxPlayersPerTeam)|| (bg_template->isArena() && CheckSkirmishForSameFaction(bracket_id, MinPlayersPerTeam))|| CheckCrossFactionMatch(bracket_id, bg_template)) On line #747, replace: Code: if (m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].empty() && m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].empty() && m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE].empty() && m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].empty()) return; with: Code: if (m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].empty() && m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].empty() && m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE].empty() && m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].empty() && m_QueuedGroups[bracket_id][BG_QUEUE_MIXED].empty()) return; On line #501 add: Code: if (!bg->isArena()) if (FillXPlayersToBG(bracket_id, bg, false)) return; On line #313, replace: Code: for (uint32 j = index; j < BG_QUEUE_GROUP_TYPES_COUNT; j += BG_TEAMS_COUNT) with: Code: for (uint32 j = 0; j < BG_QUEUE_GROUP_TYPES_COUNT; ++j) On line #298, replace: Code: TC_LOG_ERROR("bg.battleground", "BattlegroundQueue: couldn't find player %s (GUID: %u)", playerName.c_str(), GUID_LOPART(guid)); with: Code: TC_LOG_DEBUG("bg.battleground", "BattlegroundQueue: couldn't find player %s (GUID: %u)", playerName.c_str(), GUID_LOPART(guid)); READ CAREFULLY: Inside of GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, BattlegroundTypeId BgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 arenateamid) On line #143 replace: Code: ginfo->Team = leader->GetTeam(); with: Code: ginfo->Team = leader->GetBGTeam(); Above line #157 add: Code: if (sWorld->getBoolConfig(CONFIG_CROSSFACTIONBG) && ArenaType == 0) index = BG_QUEUE_MIXED; ON LINE #200 replace: Code: if (Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(ginfo->BgTypeId)) { char const* bgName = bg->GetName(); uint32 MinPlayers = bg->GetMinPlayersPerTeam(); uint32 qHorde = 0; uint32 qAlliance = 0; uint32 q_min_level = bracketEntry->minLevel; uint32 q_max_level = bracketEntry->maxLevel; GroupsQueueType::const_iterator itr; for (itr = m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_ALLIANCE].begin(); itr != m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_ALLIANCE].end(); ++itr) if (!(*itr)->IsInvitedToBGInstanceGUID) qAlliance += (*itr)->Players.size(); for (itr = m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_HORDE].begin(); itr != m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_HORDE].end(); ++itr) if (!(*itr)->IsInvitedToBGInstanceGUID) qHorde += (*itr)->Players.size(); // Show queue status to player only (when joining queue) if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY)) { ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0); } // System message else { sWorld->SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0); } } with: Code: if (Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(ginfo->BgTypeId)) { if (sWorld->getBoolConfig(CONFIG_CROSSFACTIONBG)) { char const* bgName = bg->GetName(); uint32 MinPlayers = bg->GetMinPlayersPerTeam()*2; uint32 qPlayers = 0; uint32 q_min_level = bracketEntry->minLevel; uint32 q_max_level = bracketEntry->maxLevel; for (GroupsQueueType::const_iterator itr = m_QueuedGroups[bracketId][BG_QUEUE_MIXED].begin(); itr != m_QueuedGroups[bracketId][BG_QUEUE_MIXED].end(); ++itr) if (!(*itr)->IsInvitedToBGInstanceGUID) qPlayers += (*itr)->Players.size(); if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY)) ChatHandler(leader->GetSession()).PSendSysMessage("Queue status for %s (Lvl: %u to %u) Queued players: %u (Need at least %u more)", bgName, q_min_level, q_max_level, qPlayers, MinPlayers - qPlayers); else { std::ostringstream ss; ss << "|cffff0000[BG Queue Announcer]:|r " << bgName << " -- [" << q_min_level << "-" << q_max_level << "]" << qPlayers << "/" << MinPlayers; sWorld->SendGlobalText(ss.str().c_str(), NULL); } } else { char const* bgName = bg->GetName(); uint32 MinPlayers = bg->GetMinPlayersPerTeam(); uint32 qHorde = 0; uint32 qAlliance = 0; uint32 q_min_level = bracketEntry->minLevel; uint32 q_max_level = bracketEntry->maxLevel; GroupsQueueType::const_iterator itr; for (itr = m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_ALLIANCE].begin(); itr != m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_ALLIANCE].end(); ++itr) if (!(*itr)->IsInvitedToBGInstanceGUID) qAlliance += (*itr)->Players.size(); for (itr = m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_HORDE].begin(); itr != m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_HORDE].end(); ++itr) if (!(*itr)->IsInvitedToBGInstanceGUID) qHorde += (*itr)->Players.size(); // Show queue status to player only (when joining queue) if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY)) { ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0); } // System message else { sWorld->SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0); } } } And that should be it! Enjoy.
  3. Credit goes to Parranoia for this script. This script automatically generates a list of every enchant you are able to use based on your level and the item level of the slot you clicked on. Dynamic pages are also created to allow you to go through the large lists of enchants. As far as I know there aren't any missing enchants that I could see. Note: This script does not enchant things like leg armors or librams, only things that would normally be found in the enchanting profession. http://pastebin.com/G79k5NKj
  4. Hello All, I know a lot of people have problems with applying this script, so I am writing a guide on how to manually add the 1v1 arena script! This will work with the latest version of TrinityCore (335.58). Any problems, just reply in the thread or start a support thread. Enjoy ------------ /src/server/game/Battlegrounds/ArenaTeam.cpp Find: case ARENA_TEAM_2v2: return 0; case ARENA_TEAM_3v3: return 1; case ARENA_TEAM_5v5: return 2; Replace with: case ARENA_TEAM_2v2: return 0; case ARENA_TEAM_3v3: return 1; case ARENA_TEAM_5v5: return 2; case ARENA_TEAM_1v1: return 3; // Custom 1v1 Arena Rated Find: // Type penalties for teams < 5v5 if (Type == ARENA_TEAM_2v2) points *= 0.76f; else if (Type == ARENA_TEAM_3v3) points *= 0.88f; Replace with: // Type penalties for teams < 5v5 if (Type == ARENA_TEAM_2v2) points *= 0.76f; else if (Type == ARENA_TEAM_3v3) points *= 0.88f; else if (Type == ARENA_TEAM_1v1) //Custom 1v1 Arena Rated points *= 0.70f; /src/server/game/Battlegrounds/ArenaTeam.h Find: enum ArenaTeamTypes{ ARENA_TEAM_2v2 = 2, ARENA_TEAM_3v3 = 3, ARENA_TEAM_5v5 = 5}; Replace with: enum ArenaTeamTypes{ ARENA_TEAM_1v1 = 1, //Custom 1v1 Rated Arena ARENA_TEAM_2v2 = 2, ARENA_TEAM_3v3 = 3, ARENA_TEAM_5v5 = 5}; Find: #define MAX_ARENA_SLOT 3 // 0..2 slots Replace with: #define MAX_ARENA_SLOT 4 // 0..3 slots /src/server/game/Battlegrounds/Battleground.cpp Find: // After 1 minute or 30 seconds, warning is signaled else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_SECOND] && !(m_Events & BG_STARTING_EVENT_2)) { Add before: // 1v1 Arena - Start arena after 15s, when all players are in arena if(GetArenaType() == ARENA_TYPE_1v1 && GetStartDelayTime() > StartDelayTimes[BG_STARTING_EVENT_THIRD] && (m_PlayersCount[0] + m_PlayersCount[1]) == 2) SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_THIRD]); /src/server/game/Battlegrounds/Battleground.h Find: enum ArenaType{ ARENA_TYPE_2v2 = 2, ARENA_TYPE_3v3 = 3, ARENA_TYPE_5v5 = 5}; Replace with: enum ArenaType{ ARENA_TYPE_1v1 = 1, ARENA_TYPE_2v2 = 2, ARENA_TYPE_3v3 = 3, ARENA_TYPE_5v5 = 5}; /src/server/game/Battlegrounds/BattlegroundMgr.cpp Find: for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_5v5; ++qtype) Replace with: for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_1v1; ++qtype) Find: uint32 maxPlayersPerTeam = 0; switch (arenaType) { case ARENA_TYPE_2v2: maxPlayersPerTeam = 2; break; case ARENA_TYPE_3v3: maxPlayersPerTeam = 3; break; case ARENA_TYPE_5v5: maxPlayersPerTeam = 5; break; } Replace with: uint32 maxPlayersPerTeam = 0; switch (arenaType) { case ARENA_TYPE_2v2: maxPlayersPerTeam = 2; break; case ARENA_TYPE_3v3: maxPlayersPerTeam = 3; break; case ARENA_TYPE_5v5: maxPlayersPerTeam = 5; break; case ARENA_TYPE_1v1: maxPlayersPerTeam = 1; break; } Find: BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgType Scroll down a little until you see the "switch (arenaType)" Find: switch (arenaType) { case ARENA_TYPE_2v2: return BATTLEGROUND_QUEUE_2v2; case ARENA_TYPE_3v3: return BATTLEGROUND_QUEUE_3v3; case ARENA_TYPE_5v5: return BATTLEGROUND_QUEUE_5v5 default: return BATTLEGROUND_QUEUE_NONE; } Replace with: switch (arenaType) { case ARENA_TYPE_2v2: return BATTLEGROUND_QUEUE_2v2; case ARENA_TYPE_3v3: return BATTLEGROUND_QUEUE_3v3; case ARENA_TYPE_5v5: return BATTLEGROUND_QUEUE_5v5; case ARENA_TYPE_1v1: return BATTLEGROUND_QUEUE_1v1; default: return BATTLEGROUND_QUEUE_NONE; } Find: BattlegroundMgr::BGTemplateId(BattlegroundQueueTypeId Scroll down until you see "switch (bgQueueTypeId)" Find: switch (bgQueueTypeId) { case BATTLEGROUND_QUEUE_WS: return BATTLEGROUND_WS; case BATTLEGROUND_QUEUE_AB: return BATTLEGROUND_AB; case BATTLEGROUND_QUEUE_AV: return BATTLEGROUND_AV; case BATTLEGROUND_QUEUE_EY: return BATTLEGROUND_EY; case BATTLEGROUND_QUEUE_SA: return BATTLEGROUND_SA; case BATTLEGROUND_QUEUE_IC: return BATTLEGROUND_IC; case BATTLEGROUND_QUEUE_RB: return BATTLEGROUND_RB; case BATTLEGROUND_QUEUE_2v2: case BATTLEGROUND_QUEUE_3v3: case BATTLEGROUND_QUEUE_5v5: return BATTLEGROUND_AA; default: return BattlegroundTypeId(0); // used for unknown template (it existed and do nothing) } Replace with: switch (bgQueueTypeId) { case BATTLEGROUND_QUEUE_WS: return BATTLEGROUND_WS; case BATTLEGROUND_QUEUE_AB: return BATTLEGROUND_AB; case BATTLEGROUND_QUEUE_AV: return BATTLEGROUND_AV; case BATTLEGROUND_QUEUE_EY: return BATTLEGROUND_EY; case BATTLEGROUND_QUEUE_SA: return BATTLEGROUND_SA; case BATTLEGROUND_QUEUE_IC: return BATTLEGROUND_IC; case BATTLEGROUND_QUEUE_RB: return BATTLEGROUND_RB; case BATTLEGROUND_QUEUE_2v2: case BATTLEGROUND_QUEUE_3v3: case BATTLEGROUND_QUEUE_5v5: case BATTLEGROUND_QUEUE_1v1: return BATTLEGROUND_AA; default: return BattlegroundTypeId(0); // used for unknown template (it existed and do nothing) } Find: BattlegroundMgr::BGArenaType(BattlegroundQueueTypeId Underneath you'll find "switch (bgQueueTypeId)" Find: switch (bgQueueTypeId) { case BATTLEGROUND_QUEUE_2v2: return ARENA_TYPE_2v2; case BATTLEGROUND_QUEUE_3v3: return ARENA_TYPE_3v3; case BATTLEGROUND_QUEUE_5v5: return ARENA_TYPE_5v5; default: return 0; } Replace with: switch (bgQueueTypeId) { case BATTLEGROUND_QUEUE_2v2: return ARENA_TYPE_2v2; case BATTLEGROUND_QUEUE_3v3: return ARENA_TYPE_3v3; case BATTLEGROUND_QUEUE_5v5: return ARENA_TYPE_5v5; case BATTLEGROUND_QUEUE_1v1: return ARENA_TYPE_1v1; default: return 0; } /src/server/game/Entities/Object/Updates/UpdateFields.h Find: PLAYER_FIELD_COMBAT_RATING_1 = UNIT_END + 0x043B, // Size: 25, Type: INT, Flags: PRIVATE PLAYER_FIELD_ARENA_TEAM_INFO_1_1 = UNIT_END + 0x0454, // Size: 21, Type: INT, Flags: PRIVATE PLAYER_FIELD_HONOR_CURRENCY = UNIT_END + 0x0469, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_FIELD_ARENA_CURRENCY = UNIT_END + 0x046A, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_FIELD_MAX_LEVEL = UNIT_END + 0x046B, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_FIELD_DAILY_QUESTS_1 = UNIT_END + 0x046C, // Size: 25, Type: INT, Flags: PRIVATE PLAYER_RUNE_REGEN_1 = UNIT_END + 0x0485, // Size: 4, Type: FLOAT, Flags: PRIVATE PLAYER_NO_REAGENT_COST_1 = UNIT_END + 0x0489, // Size: 3, Type: INT, Flags: PRIVATE PLAYER_FIELD_GLYPH_SLOTS_1 = UNIT_END + 0x048C, // Size: 6, Type: INT, Flags: PRIVATE PLAYER_FIELD_GLYPHS_1 = UNIT_END + 0x0492, // Size: 6, Type: INT, Flags: PRIVATE PLAYER_GLYPHS_ENABLED = UNIT_END + 0x0498, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_PET_SPELL_POWER = UNIT_END + 0x0499, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_END = UNIT_END + 0x049A Replace with: PLAYER_FIELD_COMBAT_RATING_1 = UNIT_END + 0x043B, // Size: 25, Type: INT, Flags: PRIVATE PLAYER_FIELD_ARENA_TEAM_INFO_1_1 = UNIT_END + 0x0454, // Size: 21, Type: INT, Flags: PRIVATE PLAYER_FIELD_HONOR_CURRENCY = UNIT_END + 0x0469, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_FIELD_ARENA_CURRENCY = UNIT_END + 0x046A, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_FIELD_MAX_LEVEL = UNIT_END + 0x046B, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_FIELD_DAILY_QUESTS_1 = UNIT_END + 0x046C, // Size: 25, Type: INT, Flags: PRIVATE PLAYER_RUNE_REGEN_1 = UNIT_END + 0x0485, // Size: 4, Type: FLOAT, Flags: PRIVATE PLAYER_NO_REAGENT_COST_1 = UNIT_END + 0x0489, // Size: 3, Type: INT, Flags: PRIVATE PLAYER_FIELD_GLYPH_SLOTS_1 = UNIT_END + 0x048C, // Size: 6, Type: INT, Flags: PRIVATE PLAYER_FIELD_GLYPHS_1 = UNIT_END + 0x0492, // Size: 6, Type: INT, Flags: PRIVATE PLAYER_GLYPHS_ENABLED = UNIT_END + 0x0498, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_PET_SPELL_POWER = UNIT_END + 0x0499, // Size: 1, Type: INT, Flags: PRIVATE PLAYER_END = UNIT_END + 0x049A /src/server/game/Miscellaneous/SharedDefines.h Find: enum BattlegroundQueueTypeId{ BATTLEGROUND_QUEUE_NONE = 0, BATTLEGROUND_QUEUE_AV = 1, BATTLEGROUND_QUEUE_WS = 2, BATTLEGROUND_QUEUE_AB = 3, BATTLEGROUND_QUEUE_EY = 4, BATTLEGROUND_QUEUE_SA = 5, BATTLEGROUND_QUEUE_IC = 6, BATTLEGROUND_QUEUE_RB = 7, BATTLEGROUND_QUEUE_2v2 = 8, BATTLEGROUND_QUEUE_3v3 = 9, BATTLEGROUND_QUEUE_5v5 = 10, MAX_BATTLEGROUND_QUEUE_TYPES}; Replace with: enum BattlegroundQueueTypeId{ BATTLEGROUND_QUEUE_NONE = 0, BATTLEGROUND_QUEUE_AV = 1, BATTLEGROUND_QUEUE_WS = 2, BATTLEGROUND_QUEUE_AB = 3, BATTLEGROUND_QUEUE_EY = 4, BATTLEGROUND_QUEUE_SA = 5, BATTLEGROUND_QUEUE_IC = 6, BATTLEGROUND_QUEUE_RB = 7, BATTLEGROUND_QUEUE_2v2 = 8, BATTLEGROUND_QUEUE_3v3 = 9, BATTLEGROUND_QUEUE_5v5 = 10, BATTLEGROUND_QUEUE_1v1 = 11, MAX_BATTLEGROUND_QUEUE_TYPES}; That's the manual edits done! Now to add the 1v1.cpp script: http://pastebin.com/xSsrHh88 And add the creature to the DB: REPLACE INTO `creature_template` VALUES (190016, 0, 0, 0, 0, 0, 29348, 0, 0, 0, '1v1 Rated Arena', 'WoW-BB', 'Speak', 50001, 71, 71, 2, 35, 35, 3, 1, 1.14286, 1.25, 1, 124, 256, 0, 783, 1, 2000, 0, 1, 2, 2048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 138936390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168000, 190000, '', 0, 3, 1, 1.56, 1.56, 1.56, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 'npc_1v1arena', 12340); If you followed these steps completely, you should have a working 1v1 arena script! UPDATE I have updated the entire post. I have replaced the pastebin script with a completely fresh script and have also provided a fresh creature.
  5. This script will allow you to bet an amount of gold when dueling players. The winner will receive the gold amount set at the beginning of the duel. Credit to Rochet2 for editing the script Parranoia for creating it and Faiver for also updating it. // _ ______ _ _____ ___ // | | /| / / __ \ | /| / / _ )/ _ ) ___ _______ _// | |/ |/ / /_/ / |/ |/ / _ / _ |/ _ \/ __/ _ `/// |__/|__/\____/|__/|__/____/____(_)___/_/ \_, /// /___/ // Script shared from WoWBB.org// Blood Money Duels// Original code by Parranoia from AC-web// Updated by Faiver from Emudevs// Edited by Rochet2// Original thread: http://www.ac-web.org/forums/showthread.php?156980-C-Blood-Money-Duels// Set USE_TOKEN to 1 if you want to have it use tokens in place of gold#define USE_TOKEN 0#define TOKEN_ID 29434#include "ScriptPCH.h"class BloodMoney{public: // Read write lock and guards typedef boost::shared_mutex LockType; typedef boost::shared_lock<LockType> ReadGuard; // Lock for read access: ReadGuard guard(_lock); typedef boost::unique_lock<LockType> WriteGuard; // Lock for write access: WriteGuard guard(_lock); typedef boost::upgrade_lock<LockType> RWRead; // Lock for read access before writing: RWRead read(_lock); typedef boost::upgrade_to_unique_lock<LockType> RWWrite; // Lock for write access before writing: RWWrite write(read); // Data definitions struct MoneyInfo { MoneyInfo() : challenger(0), amount(0), accepted(false) { } uint32 challenger; uint32 amount; bool accepted; }; typedef std::list<MoneyInfo> MoneyList; typedef std::unordered_map<uint32, MoneyList> MoneyListMap; // Returns a copy or empty list MoneyList GetMoneyList(uint32 targetGUID) { ReadGuard guard(_lock); MoneyListMap::const_iterator it = _listMap.find(targetGUID); if (it != _listMap.end()) return it->second; return MoneyList(); } // Finds a challenge and removes it, then returns the challenge amount. Otherwise returns 0 and does nothing uint32 GetAndRemoveChallenge(uint32 targetGUID, uint32 challengerGUID) { RWRead read(_lock); MoneyListMap::iterator it = _listMap.find(targetGUID); if (it == _listMap.end()) return 0; MoneyList& list = it->second; for (MoneyList::iterator itr = list.begin(); itr != list.end(); ++itr) { if (itr->challenger != challengerGUID) continue; if (!itr->accepted) return 0; uint32 amount = itr->amount; RWWrite write(read); list.erase(itr); if (list.empty()) _listMap.erase(targetGUID); return amount; } return 0; } bool IsChallenged(uint32 targetGUID) { ReadGuard guard(_lock); return _listMap.find(targetGUID) != _listMap.end(); } bool HasChallenger(uint32 targetGUID, uint32 challengerGUID) { ReadGuard guard(_lock); MoneyListMap::const_iterator it = _listMap.find(targetGUID); if (it == _listMap.end()) return false; const MoneyList& list = it->second; for (MoneyList::const_iterator itr = list.begin(); itr != list.end(); ++itr) if (itr->challenger == challengerGUID) return true; return false; } bool AddChallenger(uint32 targetGUID, uint32 challengerGUID, uint32 amount) { MoneyInfo moneyInfo; moneyInfo.challenger = challengerGUID; moneyInfo.amount = amount; moneyInfo.accepted = false; RWRead read(_lock); if (HasChallenger(targetGUID, challengerGUID)) return false; if (HasChallenger(challengerGUID, targetGUID)) return false; RWWrite write(read); _listMap[targetGUID].push_back(moneyInfo); return true; } bool RemoveChallenger(uint32 targetGUID, uint32 challengerGUID) { RWRead read(_lock); MoneyListMap::iterator it = _listMap.find(targetGUID); if (it == _listMap.end()) return false; MoneyList &list = it->second; for (MoneyList::iterator it = list.begin(); it != list.end(); ++it) { if (it->challenger != challengerGUID) continue; RWWrite write(read); list.erase(it); if (list.empty()) _listMap.erase(targetGUID); return true; } return false; } bool AcceptChallenge(uint32 targetGUID, uint32 challengerGUID) { RWRead read(_lock); MoneyListMap::iterator it = _listMap.find(targetGUID); if (it == _listMap.end()) return false; MoneyList &list = it->second; for (MoneyList::iterator itr = list.begin(); itr != list.end(); ++itr) { if (itr->challenger != challengerGUID) continue; // Already accepted, internal error if (itr->accepted) return false; RWWrite write(read); itr->accepted = true; return true; } return false; } // Used to lock for using GetMap access LockType& GetLock() { return _lock; } // Access map directly, remember to use lock to guard the read and write MoneyListMap& GetMap() { return _listMap; }private: MoneyListMap _listMap; LockType _lock;};static BloodMoney bloodMoney;class npc_blood_money : public CreatureScript{public: npc_blood_money() : CreatureScript("npc_blood_money") { } enum Sender { SENDER_CLOSE, SENDER_CHALLENGE, SENDER_ACCEPT, SENDER_DECLINE, }; bool OnGossipHello(Player* player, Creature* creature) override { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_BATTLE, "Challenge a Player", SENDER_CHALLENGE, 0); if (bloodMoney.IsChallenged(player->GetGUIDLow())) { BloodMoney::MoneyList list = bloodMoney.GetMoneyList(player->GetGUIDLow()); for (BloodMoney::MoneyList::const_iterator it = list.begin(); it != list.end(); ++it) { // Skip accepted entries if (it->accepted) continue; if (Player* plr = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, it->challenger))) {#if(USE_TOKEN == 1) char msg[100]; sprintf(msg, "Accept %s's Challenge of %u tokens", plr->GetName().c_str(), it->amount); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, msg, SENDER_ACCEPT, it->challenger); sprintf(msg, "Decline %s's Challenge of %u tokens", plr->GetName().c_str(), it->amount); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, msg, SENDER_DECLINE, it->challenger);#else char msg[100]; sprintf(msg, "Accept %s's Challenge of %ug", plr->GetName().c_str(), it->amount); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, msg, SENDER_ACCEPT, it->challenger); sprintf(msg, "Decline %s's Challenge of %ug", plr->GetName().c_str(), it->amount); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, msg, SENDER_DECLINE, it->challenger);#endif } } } player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Nevermind", SENDER_CLOSE, 0); player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); return true; } bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) { player->PlayerTalkClass->ClearMenus(); switch (sender) { case SENDER_ACCEPT: if (bloodMoney.AcceptChallenge(player->GetGUIDLow(), action)) { if (Player* challenger = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, action))) creature->Whisper(player->GetName() + " has accepted your challenge!", LANG_UNIVERSAL, challenger, true); } else { player->GetSession()->SendNotification("Internal error, try again"); } break; case SENDER_DECLINE: if (bloodMoney.RemoveChallenger(player->GetGUIDLow(), action)) { if (Player* challenger = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, action))) creature->Whisper(player->GetName() + " has declined your challenge!", LANG_UNIVERSAL, challenger, true); } break; case SENDER_CHALLENGE:#if(USE_TOKEN == 1) player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 5 tokens", GOSSIP_SENDER_MAIN, 5, "", 0, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 10 tokens", GOSSIP_SENDER_MAIN, 10, "", 0, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 15 tokens", GOSSIP_SENDER_MAIN, 15, "", 0, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 25 tokens", GOSSIP_SENDER_MAIN, 25, "", 0, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 50 tokens", GOSSIP_SENDER_MAIN, 50, "", 0, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 100 tokens", GOSSIP_SENDER_MAIN, 100, "", 0, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 150 tokens", GOSSIP_SENDER_MAIN, 150, "", 0, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 200 tokens", GOSSIP_SENDER_MAIN, 200, "", 0, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 250 tokens", GOSSIP_SENDER_MAIN, 250, "", 0, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 500 tokens", GOSSIP_SENDER_MAIN, 500, "", 0, true);#else player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 5g", GOSSIP_SENDER_MAIN, 5, "", 5 * GOLD, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 10g", GOSSIP_SENDER_MAIN, 10, "", 10 * GOLD, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 15g", GOSSIP_SENDER_MAIN, 15, "", 15 * GOLD, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 25g", GOSSIP_SENDER_MAIN, 25, "", 25 * GOLD, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 50g", GOSSIP_SENDER_MAIN, 50, "", 50 * GOLD, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 100g", GOSSIP_SENDER_MAIN, 100, "", 100 * GOLD, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 150g", GOSSIP_SENDER_MAIN, 150, "", 150 * GOLD, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 200g", GOSSIP_SENDER_MAIN, 200, "", 200 * GOLD, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 250g", GOSSIP_SENDER_MAIN, 250, "", 250 * GOLD, true); player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 500g", GOSSIP_SENDER_MAIN, 500, "", 500 * GOLD, true);#endif player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); return true; default: player->CLOSE_GOSSIP_MENU(); return true; } OnGossipHello(player, creature); return true; } bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, const char* code) { player->PlayerTalkClass->ClearMenus(); std::string targetName(code); if (player->GetName() == targetName) { player->GetSession()->SendNotification("You can not challenge yourself"); OnGossipSelect(player, creature, SENDER_CHALLENGE, GOSSIP_ACTION_INFO_DEF); return true; } Player* target = sObjectAccessor->FindPlayerByName(targetName); if (!target) { player->GetSession()->SendNotification("Challenged player not logged in"); OnGossipSelect(player, creature, SENDER_CHALLENGE, GOSSIP_ACTION_INFO_DEF); return true; } if (player->GetGUID() == target->GetGUID()) { player->GetSession()->SendNotification("You can not challenge yourself"); OnGossipSelect(player, creature, SENDER_CHALLENGE, GOSSIP_ACTION_INFO_DEF); return true; } if (target->GetZoneId() != player->GetZoneId()) { player->GetSession()->SendNotification("%s is not in same zone", target->GetName().c_str()); OnGossipSelect(player, creature, SENDER_CHALLENGE, GOSSIP_ACTION_INFO_DEF); return true; }#if (USE_TOKEN == 1) if (!player->HasItemCount(TOKEN_ID, action)) { player->GetSession()->SendNotification("You do not have enough tokens"); OnGossipSelect(player, creature, SENDER_CHALLENGE, GOSSIP_ACTION_INFO_DEF); return true; } if (!target->HasItemCount(TOKEN_ID, action)) { player->GetSession()->SendNotification("%s does not have enough tokens", target->GetName().c_str()); OnGossipSelect(player, creature, SENDER_CHALLENGE, GOSSIP_ACTION_INFO_DEF); return true; }#else if (target->GetMoney() < action * GOLD) { player->GetSession()->SendNotification("%s does not have enough money", target->GetName().c_str()); OnGossipSelect(player, creature, SENDER_CHALLENGE, GOSSIP_ACTION_INFO_DEF); return true; } if (player->GetMoney() < action * GOLD) { player->GetSession()->SendNotification("You do not have enough money"); OnGossipSelect(player, creature, SENDER_CHALLENGE, GOSSIP_ACTION_INFO_DEF); return true; }#endif if (!bloodMoney.AddChallenger(target->GetGUIDLow(), player->GetGUIDLow(), action)) { player->GetSession()->SendNotification("One of you already challenged the other"); OnGossipSelect(player, creature, SENDER_CHALLENGE, GOSSIP_ACTION_INFO_DEF); return true; } creature->Whisper(player->GetName() + " has requested a Blood Money duel with you!", LANG_UNIVERSAL, target, true); player->CLOSE_GOSSIP_MENU(); return true; }};class BloodMoneyReward : public PlayerScript{public: BloodMoneyReward() : PlayerScript("BloodMoneyReward") { } void OnDuelEnd(Player* winner, Player* loser, DuelCompleteType type) { if (type != DUEL_WON) return; // Loser challenged winner uint32 amount = bloodMoney.GetAndRemoveChallenge(winner->GetGUIDLow(), loser->GetGUIDLow()); // Winner challenged loser if (!amount) amount = bloodMoney.GetAndRemoveChallenge(loser->GetGUIDLow(), winner->GetGUIDLow()); // No challenges if (!amount) return;#if (USE_TOKEN == 1) if (!winner->HasItemCount(TOKEN_ID, amount)) { winner->AddAura(15007, winner); // Apply Rez sickness for possible cheating ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system."); ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. Don't worry you did not lose any tokens because of this."); } else if (!loser->HasItemCount(TOKEN_ID, amount)) { loser->AddAura(15007, loser); // Apply Rez sickness for possible cheating ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system."); ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. Don't worry you did not lose any tokens because of this."); } else { winner->AddItem(TOKEN_ID, amount); loser->DestroyItemCount(TOKEN_ID, amount, true); ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFCongratulations on winning %u tokens!", amount); }#else int32 money = amount * GOLD; if (winner->GetMoney() < money) { winner->AddAura(15007, winner); // Apply Rez sickness for possible cheating ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system."); ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. Don't worry you did not lose any money because of this."); } else if (loser->GetMoney() < money) { loser->AddAura(15007, loser); // Apply Rez sickness for possible cheating ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. He did not have enough money to pay off the bet."); ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system."); } else { winner->ModifyMoney(money); loser->ModifyMoney(-money); ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFCongratulations on winning %ug!", amount); }#endif }};void AddSC_npc_blood_money(){ new BloodMoneyReward(); new npc_blood_money();} Enjoy
  6. Vitalis - a custom 80 private WotLK 3.3.5a server https://vitalis-wow.com WE ARE HIRING! SQL Developer C++ Developer Web Developer If you are able to fill any these roles, please join our Discord to discuss your potential position. Other positions can be discussed further. These positions are NOT PAID! Please connect to our Discord to learn more about the project and ask us questions. A little bit about our server and our idea... Vitalis is a 3.3.5 Custom Level 80 realm which enables our players to begin exploring fast paced custom content Travel through custom tiers, world bosses, raids, dungeons and custom events while feeling the benefits of WotLK and more! Start with 36 slot bags and 5000g 2500 Custom Items Respeccing is free Instant 80 Cosmetic items drop from bosses/elites/rares Transmog and custom transmog items Custom dungeons/raids All classes available for each race Custom World Bosses Custom Item Sets Custom Leveling Items Custom Currency Custom Season 9 Items Mall area to teleport to Donation NPCs Cross-faction grouping/guilds world PVP enabled AND MUCH, MUCH MORE! Please connect to our Discord to learn more about the project and ask us questions.
  7. The Darkmoon Faire scripts didn't work on my realm, so we made this script for the "Blastenheimer 5000 Ultra Cannon" and "Tonk Controller" I don't know if its bugged on all trinity cores but if you need the fix to get them working, here it is. It's not working with the blizzlike routes for the "Blastenheimer 5000 Ultra Cannon". Just shoots you just a random direction. Besides that it should work fine. Have fun Pastebin: http://pastebin.com/BMUVa881 Full credits go to Sopse.
  8. C++ Remove Player Resurrect Timer and Spawning at GY This is only a small edit, but is handy for those fun servers! This simple core edit removes players resurrect time and also makes players resurrect where they die. Remove Resurrect timer (in seconds): Open > Player.cpp Find (line 145): static uint32 copseReclaimDelay[MAX_DEATH_COUNT] = { 30, 60, 120 }; Replace: static uint32 copseReclaimDelay[MAX_DEATH_COUNT] = { 0 }; Remove resurrecting at GY's: Find (line 5512): TeleportTo(ClosestGrave->map_id, ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, GetOrientation()); Replace: //TeleportTo(ClosestGrave->map_id, ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, GetOrientation());
  9. Morphs into different races but keeps the gear you wear. Hi, the title explains a lot. :: NPC is supposed to morph the player into racial morphs :: I`ll release my first self made script, it's nothing special but for someone like me who's a bloody noob in C++ it's something cool. Changed WOTLK pastebin: http://pastebin.com/XG0iuWm4 - (Updated & buggs are fixed, everything works fine with the latest TrinityCore, tested: 12/4/2015 2:29) Unchanged Cataclysm pastebin: http://pastebin.com/ErZ2AHH8 - (Updated) For bugg reports please answer to this thread. If the link is outdated answer to this thread. [Trinity] How to add a C++ script to your core. Credit to - Ant i-
  10. Hi guys, This little script here will give the player a set amount of gold (10 in this example) when they right click the item. It will also send them a little message telling them how much they received. The item will be destroyed after it's used. They cannot use it whilst in combat, bg, arena or whilst flying. Note: The SQL query will replace the following item in the DB - http://www.wowhead.com/item=25419/unmarked-bag-of-gems. This is done so you don't need a custom patch to use it! C++ http://pastebin.com/jiM9ACC4 SQL REPLACE INTO `item_template` VALUES (25419, 15, 0, -1, 'Bag of Gold 10', 2588, 7, 134221824, 0, 1, 0, 1, 0, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33227, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, 'A bag containing 10 gold!', 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 'bag_of_gold10', 0, 0, 0, 0, 0, 12340);
  11. Here is a script of a Store NPC. It allows you to set several categories and several items in each category. When you talk to the NPC, you will first see how much coins you have and then, below, all the categories. When you click on a cateogory, it will display all the items available in this category on the following form: [price] ItemName (x quantity) Price is the amount of coins required to purchase the item ItemName is the name of the item. When you create your store you just have to put the item entry and it will find its name Quantity is the quantity of the item that the player will receive if it makes the purchase Once its done, the player can click on the item he wants to purchase it. This store is managed through the database so you will have to define items and categories in the database. When you add a new item, you will just have to give its entry and the script will find its name based on that. There is an equipment level constraint that you can apply if you want: for each item, you can set the required average item level for the players. If their item level is below that constraint, they won't see the item. When you add an item in the store, you can choose how much items the player will receive if it makes the purchase. The script and all the details and explainations is available on the Maelstrom-Scripts repo. Posted by BluntShadow so credit to him! Enjoy.
  12. This simple script can make any npc within the specified range, whisper a player on their first login. This is especially useful when it comes to servers with custom starter npcs. The whisper is delayed by 2.5seconds so the npc whispers After the player have joined chat channels, etc etc.. All you need to edit is 89999 & 25.0f in this line: if (Creature* creature = player->FindNearestCreature(89999, 25.0f)) 89999 Being the ID of your npc and 25.0f being the max range to search for your npc. aswell as the whisper message in this line: creature->Whisper("PSSST Hey you!..Yes You! Come to me!", LANG_UNIVERSAL, player); If you wish to delay the whisper more or less than it is now, edit the "2500" in the following line: player->m_Events.AddEvent(this, player->m_Events.CalculateTime(2500)); This time is in Miliseconds, meaning 1000 = 1 second. Full Script: #include "Creature.h"#include "Define.h"#include "EventProcessor.h"#include "Player.h"#include "ScriptMgr.h"#include "SharedDefines.h"class DelayedWhisper : public BasicEvent{public: DelayedWhisper(Player* player) : BasicEvent(), player(player) { player->m_Events.AddEvent(this, player->m_Events.CalculateTime(2500)); } bool Execute(uint64, uint32) override { if (Creature* creature = player->FindNearestCreature(89999, 25.0f)) { creature->Whisper("PSSST Hey you!..Yes You! Come to me!", LANG_UNIVERSAL, player); } return true; } Player* player;};class FirstLogin : public PlayerScript{public: FirstLogin() : PlayerScript("FirstLogin") {} void OnLogin(Player* player, bool firstLogin) override { if (!firstLogin) return; new DelayedWhisper(player); }};void AddSC_FirstLogin(){ new FirstLogin();} Credits: Rochet2 for whisper delay. Coth for idea and original script.
  13. Fully credit goes to Rochet2. I didnt probably release this on AC web yet so I thought I would do it now .. Also, this was updated today. Ppl have asked once in a while if you could dress NPCs some gear and items etc. Usually people answer that you need to make a patch or similar. Through some core editing and the mage spell "mirror image" (not actually using the spell, but the packet and flags) I made it possible to dress NPCs with gear. Its a rather simple idea. You can make an NPC, set the displays of items you want him to have and his race and gender (defines displayID) as well as facial features and skin color. All this is done in the database. The values for skins and features range from 0 to 12 or something .. not quite sure how many there are. Read more & get it: http://rochet2.github.io/Dress%20NPCs.html."
  14. Hello everyone! Today i am gonna share script , which is called : "CROSSFACTION BGs" Script work for LATEST REV of TrinityCore 3.3.5 ****************ATTENTION************************ THIS SCRIPT NEED TO BE ADDED MANUALLY , NOT WITH GIT BASH. ------------------------------------------------------------------------------------------------------------------------------- SCRIPT LINK ENJOY!
  15. Download change to .patch and git apply http://pastebin.com/0L6e1zxw I'm Mithos Thanks Noffear for Fix.
  16. Hello Everyone ! I am today releasing my script ( maybe someone made it but however i made this mine ) ! I am using this script for my VIP ACCESS Token. The script works for OregonCore/Mangos and maybe TrinityCore This script is promoting your account on level 1 ( i set it to LEVEL 1 because in my server is level 1 VIP ACCOUNT ) + It learns some spells while clicking right click on VIP ACCESS TOKEN ! And it kick you from server , when you login again you'll be VIP I am using this script for TBC! Here's the script ! #include "ScriptPCH.h"#include <cstring>#include "Chat.h"#include "Player.h"bool VIP_Access_OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& /*targets*/){ if(!pPlayer) return false; if(!pItem) return false; if(pPlayer->GetSession()->GetSecurity() == SEC_PLAYER) //Sec Player is VIP(in my server) { pPlayer->DestroyItemCount(pItem->GetEntry(), 1, true); LoginDatabase.PExecute("INSERT INTO account_access VALUES('%u', '1', '1')", pPlayer->GetSession()->GetAccountId()); pPlayer->learnSpell(46804); pPlayer->learnSpell(32636); pPlayer->learnSpell(35466); pPlayer->learnSpell(37805); pPlayer->learnSpell(37806); pPlayer->learnSpell(37807); pPlayer->SaveToDB(); pPlayer->GetSession()->KickPlayer(); return true; } else { pPlayer->GetSession()->SendNotification("|cffff0000You already have a VIP Access!"); return false; }}void AddSC_VIP_Access(){ Script *newscript; newscript = new Script; newscript->Name = "VIP Access"; newscript->pItemUse = &VIP_Access_OnUse; newscript->RegisterSelf();} IMPORTANT INFORMATION! LoginDatabase.PExecute("INSERT INTO account_access VALUES('%u', '1', '1')", pPlayer->GetSession()->GetAccountId()); As you see here ! . '1' MEANS THE LEVEL , It means GM LEVEL like , GM LEVEL 1 , GM LEVEL 2 , GM LEVEL 3 . Just write the number. I hope i helped ! IF you like this thread you can give me REP
  17. Hi Everyone ! I am sharing today 1 SCRIPT ! For TrinityCore 335. Revision : c61fac843b86 #include "ScriptPCH.h"#include "Channel.h"class System_Censure : public PlayerScript{public: System_Censure() : PlayerScript("System_Censure") {} void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg) { CheckMessage(player, msg, lang, NULL, NULL, NULL, NULL); } void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) { CheckMessage(player, msg, lang, receiver, NULL, NULL, NULL); } void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Group* group) { CheckMessage(player, msg, lang, NULL, group, NULL, NULL); } void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Guild* guild) { CheckMessage(player, msg, lang, NULL, NULL, guild, NULL); } void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Channel* channel) { CheckMessage(player, msg, lang, NULL, NULL, NULL, channel); } void CheckMessage(Player* player, std::string& msg, uint32 lang, Player* /*receiver*/, Group* /*group*/, Guild* /*guild*/, Channel* channel) { //if (player->isGameMaster() || lang == LANG_ADDON) //return; // transform to lowercase (for simpler checking) std::string lower = msg; std::transform(lower.begin(), lower.end(), lower.begin(), ::tolower); uint8 cheksSize = 11;//Change these if you want to add more words to the array. std::string checks[11];//Change these if you want to add more words to the array. // Strony (Sites) checks[0] = "http://"; checks[1] = ".com"; checks[2] = ".www"; checks[3] = ".net"; checks[4] = ".org"; checks[5] = ".ru"; checks[6] = "www."; checks[7] = "wow-"; checks[8] = "-wow"; checks[9] = ".pl"; checks[10] = "lumiawow"; for (int i = 0; i < cheksSize; ++i) if (lower.find(checks[i]) != std::string::npos) { msg = ""; ChatHandler(player->GetSession()).PSendSysMessage("Advertising and vulgar behavior is not allowed!"); return; } }};void AddSC_System_Censure(){ new System_Censure();} It works on my trinitycore perfect! I hope i helped !
  18. More or less, what this does is: When arena start, players will get something like raid ready check from fake player called "Arena". If all players press "Yes" button, arena time will decrease. It is something like arena crystals but with nice interface. Coded and compiled with 6-7 months old trinity core, but since most of code is handled by sending packets, I believe it will work just fine. http://pastebin.com/BbzXXus9 Screenshot: Credits: The Zxtreme
  19. This script will reset all of your cooldowns when the duel ends. You will get full HP and mana too. http://pastebin.com/ecpQYgkw
  20. Credits to PrestonParsons for updating the script and AlexeWarr for creating it. The zone has been changed to Gurubash Arena and has a different display. Script: http://pastebin.com/18S33Sw9 How to compile: http://collab.kpsn.org/display/tc/CustomScript ---------------------------------- **How to make your own** ** gmi_themes ** ID - 1 (for Gmi_templates) NAME - Party (Show on Gossip) Available - 1 (enable to show on gossip list when you speak the NPC) ---------------------------------------------------------------------------------- ** gmi_templates ** ID 1 from gmi_themes for gossip you made in gmi_themes entry 203034 for big tree gobject pos_x pos_y ..... those x,y,z,o is for where you want to put gobject to (have to be in arena) pos_z pos_o ----------------------------------------- How to change the zone Line 51 if (creature->GetZoneId() != 33) **Change number 33 to anything from zone ID) then compile but when you made the xyzo different places, it's wont work at all. you have to redesign the theme again
  21. Type: Creature Script Author: Dimitrij " Dway" Fedoryno (I would like to thank Nerdox for assistance in finding coords) Translation: Czech Language: C++ Script Includes: 1) Teleports (for cataclysm teleports uncomment Cataclysm Raids section) - Raids > VANILLA/TBC/WOTLK/Cataclysm - Dungeons > VANILLA/TBC/WOTLK (Cataclysm dungeons are not included) - Cities (filtered if player is horde or aliance) 2) Character tools - Reset HP - Reset Mana - Reset Sated - Combat Stop - Reset Cooldowns 3) Level 80 boost (uncomment case GOSSIP_ACTION_INFO_DEF+1000 for works ingame) - If you want show level 80 boost only on level 1 uncomment if on lide 40-46 > Preview: 4) Character Customization - Change faction = 50k g (price is editable) - Change race = 25k g (price is editable) Installation 1) Navigate to /src/server/scripts/Custom/ in your core directory. 2) Create file npc_teleporter.cpp 3) Open file /src/server/scripts/Custom/CMakeLists.txt > remove comment ("#") from lines where are #file(GLOB_RECURSE sources_Custom Custom/*.cpp Custom/*.h) and #${sources_Custom} > Preview: 4) Navigate to /src/server/game/Scripting/ in your core directory and open ScriptLoader.cpp. 5) Find the place where is a custom script declared (bottom of file) and declare teleporter script. > Preview: 6) Now compile the core. Thanks for reading! If you like the script, you can download it. Credit to TheDway
  22. This script is a fix for the quest: Good Help is Hard to Find Core version: 4.3.4 Script Language: C++ Emulator: TrinityCore C++ Script: /* * Copyright (C) 2011-2015 Project SkyFire <http://www.projectskyfire.org/> * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2015 MaNGOS <http://getmangos.com/> * Copyright (C) 2006-2014 ScriptDev2 <https://github.com/scriptdev2/scriptdev2/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" /*#### ## npc_defiant_troll (http://www.wowhead.com/quest=14069) ####*/ enum DefiantTrollEnum { DEFFIANT_KILL_CREDIT = 34830, SPELL_LIGHTNING_VISUAL = 45870, SPELL_ENRAGE = 45111, QUEST_GOOD_HELP_IS_HARD_TO_FIND = 14069, GO_DEPOSIT = 195489, SAY_WORK = 0 }; class npc_defiant_troll : public CreatureScript { public: npc_defiant_troll() : CreatureScript("npc_defiant_troll") { } CreatureAI* GetAI(Creature* creature) const override { return new npc_defiant_trollAI(creature); } struct npc_defiant_trollAI : public ScriptedAI { npc_defiant_trollAI(Creature* creature) : ScriptedAI(creature) { } uint32 rebuffTimer; bool work; void Reset() override { rebuffTimer = 0; work = false; me->CastSpell(me, SPELL_ENRAGE, true); } void MovementInform(uint32 /*type*/, uint32 id) override { if (id == 1) work = true; } bool IsWorking() const { return work; } void UpdateAI(uint32 diff) override { if (IsWorking()) me->HandleEmoteCommand(EMOTE_ONESHOT_WORK_MINING); if (rebuffTimer <= diff) { Reset(); switch (urand(0, 2)) { case 0: me->HandleEmoteCommand(EMOTE_STATE_EXCLAIM); break; case 1: me->HandleEmoteCommand(EMOTE_STATE_DANCE); break; case 2: me->HandleEmoteCommand(EMOTE_ONESHOT_NONE); break; } rebuffTimer = 120000; // Rebuff again in 2 minutes } else rebuffTimer -= diff; if (!UpdateVictim()) return; //DoMeleeAttackIfReady(); } }; bool OnGossipHello(Player* player, Creature* creature) override { if (player->GetQuestStatus(QUEST_GOOD_HELP_IS_HARD_TO_FIND) == QUEST_STATUS_INCOMPLETE && !CAST_AI(npc_defiant_troll::npc_defiant_trollAI, creature->AI())->IsWorking()) { player->CastSpell(creature, SPELL_LIGHTNING_VISUAL, true); player->KilledMonsterCredit(DEFFIANT_KILL_CREDIT, creature->GetGUID()); creature->AI()->Talk(SAY_WORK); creature->RemoveAllAuras(); if (GameObject* deposit = creature->FindNearestGameObject(GO_DEPOSIT, 20)) creature->GetMotionMaster()->MovePoint(1, deposit->GetPositionX() - 1.0f, deposit->GetPositionY(), deposit->GetPositionZ()); if (player->GetQuestStatus(QUEST_GOOD_HELP_IS_HARD_TO_FIND) == QUEST_STATUS_COMPLETE) player->RemoveAura(SPELL_LIGHTNING_VISUAL); player->CLOSE_GOSSIP_MENU(); return true; } player->CLOSE_GOSSIP_MENU(); return false; } }; void AddSC_kezan() { new npc_defiant_troll(); } SQL: UPDATE `creature_template` SET `ScriptName` = 'npc_defiant_troll' WHERE `entry` = 34830; DELETE FROM `creature_text` WHERE `entry` = 34830; INSERT INTO `creature_text`(`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES (34830, 0, 0, 'Oops, break''s over.', 14, 0, 100, 0, 0, 0, 'defiant troll says'), (34830, 0, 1, 'Don''t tase me, mon!', 14, 0, 100, 0, 0, 0, 'defiant troll says'), (34830, 0, 2, 'I report you to HR!', 14, 0, 100, 0, 0, 0, 'defiant troll says'), (34830, 0, 3, 'Work was bettah in da Undermine!', 14, 0, 100, 0, 0, 0, 'defiant troll says'), (34830, 0, 4, 'I''m going. I''m going!', 14, 0, 100, 0, 0, 0, 'defiant troll says'), (34830, 0, 5, 'Sorry, mon. It won''t happen again.', 14, 0, 100, 0, 0, 0, 'defiant troll says'), (34830, 0, 6, 'What I doin'' wrong? Don''t I get a lunch and two breaks a day, mon?', 14, 0, 100, 0, 0, 0, 'defiant troll says'), (34830, 0, 7, 'Ouch! Dat hurt!', 14, 0, 100, 0, 0, 0, 'defiant troll says'); Enjoy Script made by Lionzero
  23. I know a lot of people use DBC editing to make a zone a sanctuary, but here is a simple C++ edit that will give you exactly the same results (and it's much easier to edit etc). This will allow dueling in the specified zone, but disables PvP between factions (great for a mall). Open -> Player.cpp: Find: (around line 7636) if (area && area->IsSanctuary()) // in sanctuary Replace with: if (area && area->IsSanctuary() || GetAreaId() == 100) // Replace the 100 with your area ID Just change the 100 to whatever area ID you wish to use. (Use .gps in the area you wish to make a sanctuary and replace it with the ID above). That's all folks
  24. Credit to Ghostcrawler336 for creating this. I'm just sharing it Script Details - When you talk to this NPC you will see two menus show up. Menus - Buff Me! Never Mind The "Buff Me!" menu is setup class wise, so a class won't get a buff he doesn't need. The "Never Mind" menu will close the vendor if clicked on. Buffs - Prayer of Fortitude Prayer of Spirit Prayer of Shadow Protection Greater Blessing of Kings Arcane Intellect Mark of the Wild Script - Script - Pastebin
×
×
  • Create New...