Jump to content

Playerbot (archive)


Recommended Posts

Ty for trying to help. I still get the 3 errors it is most definately something i am doing wrong. It worked for others so i am sure it is a great fix for now. Chathandler remains to be my main problem.

ChatHandler.cpp

..\\..\\src\\game\\ChatHandler.cpp(41) : error C2059: syntax error : '<<'

..\\..\\src\\game\\ChatHandler.cpp(41) : error C2143: syntax error : missing ';' before '/'

..\\..\\src\\game\\ChatHandler.cpp(41) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

..\\..\\src\\game\\ChatHandler.cpp(43) : error C2143: syntax error : missing ';' before '{'

..\\..\\src\\game\\ChatHandler.cpp(43) : error C2447: '{' : missing function header (old-style formal list?)

..\\..\\src\\game\\ChatHandler.cpp(63) : error C2059: syntax error : '=='

..\\..\\src\\game\\ChatHandler.cpp(65) : error C2059: syntax error : 'bad suffix on number'

..\\..\\src\\game\\ChatHandler.cpp(65) : error C2143: syntax error : missing ';' before '/'

..\\..\\src\\game\\ChatHandler.cpp(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

..\\..\\src\\game\\ChatHandler.cpp(65) : error C2086: 'int src' : redefinition

..\\..\\src\\game\\ChatHandler.cpp(41) : see declaration of 'src'

..\\..\\src\\game\\ChatHandler.cpp(68) : error C2143: syntax error : missing ';' before '{'

..\\..\\src\\game\\ChatHandler.cpp(68) : error C2447: '{' : missing function header (old-style formal list?)

Chat.cpp

CharacterHandler.cpp

ChannelMgr.cpp

ChannelHandler.cpp

Channel.cpp

CalendarHandler.cpp

BattleGroundWS.cpp

BattleGroundSA.cpp

BattleGroundRV.cpp

BattleGroundRL.cpp

BattleGroundNA.cpp

BattleGroundMgr.cpp

BattleGroundHandler.cpp

Generating Code...

Compiling...

BattleGroundEY.cpp

BattleGroundDS.cpp

BattleGroundBE.cpp

BattleGroundAV.cpp

BattleGroundAB.cpp

BattleGroundAA.cpp

BattleGround.cpp

AuctionHouseHandler.cpp

ArenaTeamHandler.cpp

AchievementMgr.cpp

Generating Code...

Build log was saved at "file://c:\\Documents and Settings\\Kristie Meyerhoffer\\Desktop\\Mangos,SD2,Acid Source\\Mangos\\win\\VC90\\game__Win32_Release\\BuildLog.htm"

game - 12 error(s), 0 warning(s)

------ Build started: Project: mangosd, Configuration: Release Win32 ------

Compiling...

WorldRunnable.cpp

WheatyExceptionReport.cpp

RASocket.cpp

Master.cpp

Main.cpp

CliRunnable.cpp

Generating Code...

Compiling resources...

Microsoft ® Windows ® Resource Compiler Version 6.1.6723.1

Copyright © Microsoft Corporation. All rights reserved.

Linking...

LINK : fatal error LNK1181: cannot open input file '.\\game__win32_release\\game.lib'

Build log was saved at "file://c:\\Documents and Settings\\Kristie Meyerhoffer\\Desktop\\Mangos,SD2,Acid Source\\Mangos\\win\\VC90\\mangosd__Win32_Release\\BuildLog.htm"

mangosd - 1 error(s), 0 warning(s)

------ Build started: Project: script, Configuration: Release Win32 ------

Compiling...

sc_default.cpp

system.cpp

ScriptMgr.cpp

Generating Code...

Linking...

LINK : fatal error LNK1181: cannot open input file 'mangosd.lib'

Build log was saved at "file://c:\\Documents and Settings\\Kristie Meyerhoffer\\Desktop\\Mangos,SD2,Acid Source\\Mangos\\win\\VC90\\script__Win32_Release\\BuildLog.htm"

script - 1 error(s), 0 warning(s)

========== Build: 8 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

Link to comment
Share on other sites

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

Ty for trying to help. I still get the 3 errors it is most definately something i am doing wrong. It worked for others so i am sure it is a great fix for now. Chathandler remains to be my main problem.

ChatHandler.cpp

..\\..\\src\\game\\ChatHandler.cpp(41) : error C2059: syntax error : '<<'

..\\..\\src\\game\\ChatHandler.cpp(41) : error C2143: syntax error : missing ';' before '/'

..\\..\\src\\game\\ChatHandler.cpp(41) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

..\\..\\src\\game\\ChatHandler.cpp(43) : error C2143: syntax error : missing ';' before '{'

..\\..\\src\\game\\ChatHandler.cpp(43) : error C2447: '{' : missing function header (old-style formal list?)

..\\..\\src\\game\\ChatHandler.cpp(63) : error C2059: syntax error : '=='

..\\..\\src\\game\\ChatHandler.cpp(65) : error C2059: syntax error : 'bad suffix on number'

..\\..\\src\\game\\ChatHandler.cpp(65) : error C2143: syntax error : missing ';' before '/'

..\\..\\src\\game\\ChatHandler.cpp(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

..\\..\\src\\game\\ChatHandler.cpp(65) : error C2086: 'int src' : redefinition

..\\..\\src\\game\\ChatHandler.cpp(41) : see declaration of 'src'

..\\..\\src\\game\\ChatHandler.cpp(68) : error C2143: syntax error : missing ';' before '{'

..\\..\\src\\game\\ChatHandler.cpp(68) : error C2447: '{' : missing function header (old-style formal list?)

Chat.cpp

CharacterHandler.cpp

ChannelMgr.cpp

ChannelHandler.cpp

Channel.cpp

CalendarHandler.cpp

BattleGroundWS.cpp

BattleGroundSA.cpp

BattleGroundRV.cpp

BattleGroundRL.cpp

BattleGroundNA.cpp

BattleGroundMgr.cpp

BattleGroundHandler.cpp

Generating Code...

Compiling...

BattleGroundEY.cpp

BattleGroundDS.cpp

BattleGroundBE.cpp

BattleGroundAV.cpp

BattleGroundAB.cpp

BattleGroundAA.cpp

BattleGround.cpp

AuctionHouseHandler.cpp

ArenaTeamHandler.cpp

AchievementMgr.cpp

Generating Code...

Build log was saved at "file://c:\\Documents and Settings\\Kristie Meyerhoffer\\Desktop\\Mangos,SD2,Acid Source\\Mangos\\win\\VC90\\game__Win32_Release\\BuildLog.htm"

game - 12 error(s), 0 warning(s)

------ Build started: Project: mangosd, Configuration: Release Win32 ------

Compiling...

WorldRunnable.cpp

WheatyExceptionReport.cpp

RASocket.cpp

Master.cpp

Main.cpp

CliRunnable.cpp

Generating Code...

Compiling resources...

Microsoft ® Windows ® Resource Compiler Version 6.1.6723.1

Copyright © Microsoft Corporation. All rights reserved.

Linking...

LINK : fatal error LNK1181: cannot open input file '.\\game__win32_release\\game.lib'

Build log was saved at "file://c:\\Documents and Settings\\Kristie Meyerhoffer\\Desktop\\Mangos,SD2,Acid Source\\Mangos\\win\\VC90\\mangosd__Win32_Release\\BuildLog.htm"

mangosd - 1 error(s), 0 warning(s)

------ Build started: Project: script, Configuration: Release Win32 ------

Compiling...

sc_default.cpp

system.cpp

ScriptMgr.cpp

Generating Code...

Linking...

LINK : fatal error LNK1181: cannot open input file 'mangosd.lib'

Build log was saved at "file://c:\\Documents and Settings\\Kristie Meyerhoffer\\Desktop\\Mangos,SD2,Acid Source\\Mangos\\win\\VC90\\script__Win32_Release\\BuildLog.htm"

script - 1 error(s), 0 warning(s)

========== Build: 8 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

Again.. easy fix. When you cut and moved the header file, you left the >>>>>>>>> lines (should be 2 of them) and the line marked ======= delete these full lines and you will be fine

Link to comment
Share on other sites

To be more specific on the fix for ChatHandler.cpp:

<<<<<<< HEAD:src/game/ChatHandler.cpp   <--- Delete Line
bool WorldSession::ProcessChatmessageFurtherAfterSecurityChecks(std::string& msg, uint32 lang)
{
   if (lang != LANG_ADDON)
   {
       // strip invisible characters for non-addon messages
       if(sWorld.getConfig(CONFIG_CHAT_FAKE_MESSAGE_PREVENTING))
           stripLineInvisibleChars(msg);

       if (sWorld.getConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY) && GetSecurity() < SEC_MODERATOR
               && !ChatHandler(this).isValidChatMessage(msg.c_str()))
       {
           sLog.outError("Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName(),
                   GetPlayer()->GetGUIDLow(), msg.c_str());
           if (sWorld.getConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_KICK))
               KickPlayer();
           return false;
       }
   }

   return true;
}
=======   <--- Delete Line
// Playerbot mod   <---Move to headers section
#include "PlayerbotAI.h"   <---Move to headers section
>>>>>>> 2243f3c3ec59852bd219a80c45995b907d28a6f6:src/game/ChatHandler.cpp  <--- Delete Line

Link to comment
Share on other sites

first of all, excellent job those who worked on playerbot, collinsp, rrtn, winslow, xeqt... if i miss anyone else please forgive me

i've been trying my hand at some programming, i really have no background to start with but this has been a great learning experience

heres my limited tinkering with playerbot:

git://github.com/illustri/mangos.git illustri

http://github.com/illustri/mangos/commits/illustri

its based on winslow's repository with some removed/added features, my documentation is poor atm but ill work on it

right now im trying to implement class specific openers, like warrior charge or rogue cheapshot

if anyones interested please take a look, i initially started this for myself but i thought others might benefit from my efforts

Link to comment
Share on other sites

first of all, excellent job those who worked on playerbot, collinsp, rrtn, winslow, xeqt... if i miss anyone else please forgive me

i've been trying my hand at some programming, i really have no background to start with but this has been a great learning experience

heres my limited tinkering with playerbot:

git://github.com/illustri/mangos.git illustri

http://github.com/illustri/mangos/commits/illustri

its based on winslow's repository with some removed/added features, my documentation is poor atm but ill work on it

right now im trying to implement class specific openers, like warrior charge or rogue cheapshot

if anyones interested please take a look, i initially started this for myself but i thought others might benefit from my efforts

missing SQL =) for Playerbot pls Upload

Link to comment
Share on other sites

People hi! Back from the grave, I am. Hope I can catch up with the progress and be of some use again. Will test a rev asap I can get it to compile. Problem is, right now, that I merged in an up-to-date version of MaNGOS (r8512). As always I patched it with SD2 on my side. Now it seems the WorldSocket::_recvQueue is messed up?!?! It complains 'bout the declaration gets no method called empty() what should not be true cause ACE_Based::LockedQueue is derived from std::queue which in deed should have a method called empty(). I'm still testing around with this having another clone of the original mangos repos - there it worked. Will patch this next with a clean diff of playerbot and test it again. Then again with SD2. Something is definetly wrong.

Btw.: how can I undo a commit/push to the git repos? Accidently happend and I think my merge shouldn't be there until I cleared out why it's not working...

Link to comment
Share on other sites

i've been trying to implement the rogue bot beginning combat with a cheapshot, heres what i have so far:

void PlayerbotRogueAI::DoNextCombatManeuver(Unit *pTarget)
{
   if( !pTarget )
       return;
   PlayerbotAI* ai = GetAI();
   if (!ai)
       return;

   ai->SetInFront( pTarget );
   Player *m_bot = GetPlayerBot();
   Unit* pVictim = pTarget->getVictim();
float targetDist = m_bot->GetDistance( pTarget );
if (targetDist>ATTACK_DISTANCE)
{
 m_bot->Attack(pTarget, false);
 ai->DoCombatMovement(); //<-- this function call is moved here from playerbotai::Donextcombatmaneuver
 return;
}
//rogue stealth cheapshot opener
if (CHEAP_SHOT>0 && ai->GetEnergyAmount()>=60)
 ai->CastSpell(CHEAP_SHOT);
m_bot->Attack(pTarget, true);


...


void PlayerbotRogueAI::DoNonCombatActions()
{
   Player * m_bot = GetPlayerBot();
   if (!m_bot)
       return;
//roguebot casts stealth when not in combat, so can start stealth requiring ability in combat
if (STEALTH>0 && !m_bot->HasAura( STEALTH, 0 ))
 GetAI()->CastSpell(STEALTH, *m_bot);

what happens so far: the bot moves to melee range of a mob, but does no action (gives botout: SMSG_CAST_FAILED)

seems like ai->CastSpell(CHEAP_SHOT); is failing for some reason

anyone interest can take a look at my changelog at http://github.com/illustri/mangos/commits/illustri and see where im going

Link to comment
Share on other sites

Hey mates :) Any support regarding the above problems would be nice. Patched a standard mangos clone I made with a patch I generated from playerbot repository. Getting the compile error again. This is the error:

src/game/WorldSession.cpp: In member function ‘bool WorldSession::Update(uint32)’:
src/game/WorldSession.cpp:291: error: ‘class ACE_Based::LockedQueue<WorldPacket*, ACE_Thread_Mutex, std::Deque<WorldPacket*, std::allocator<WorldPacket*> > >’ has no member named ‘empty’
src/game/WorldSession.cpp:293: error: no matching function for call to ‘ACE_Based::LockedQueue<WorldPacket*, ACE_Thread_Mutex, std::Deque<WorldPacket*, std::allocator<WorldPacket*> > >::next()’
src/game/../shared/LockedQueue.h:62: note: candidates are: bool ACE_Based::LockedQueue<T, LockType, StorageType>::next(T&) [with T = WorldPacket*, LockType = ACE_Thread_Mutex, StorageType = std::Deque<WorldPacket*, std::allocator<WorldPacket*> >]

Seems it can not find std::Deque::empty() from templates StorageType...

Checked within the patch file what was changed by it. Mostly there are additions to the code. No header files were changed in a way it should affect this stuff...

[EDIT/UPDATE]:

Ok... found it. Seems someone updated ACE and modified the LockedQueue stuff since last merge (before mine). There is indeed no empty() anymore, regardless of what VS9 and IntelliSense think. Packets are pulled by next(packet) and then deleted. Will update playerbot code in WorldSession.cpp asap and push it to repos.

Link to comment
Share on other sites

@Runsttren

i don't mind at all, but i'm afraid at the moment my code is far from working as intended.. as previously posted I got the rogue bot to stealth up to the mob but I can't seem to get it to cast cheapshot before it is attacked, im still working it out

as for warrior charge, the bot casts charge but does not update its position, i think i might have to use a hack such as calling relocate() to actually put the bot next to the mob

i'll keep updating on my progress

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use