魔兽世界经典旧世私服搭建教程

一、背景

60魔兽经典旧世是最经典的版本,遗憾的是60年代时还在大学读书,穷得很,买不起点卡,后来工作了,大概70年代开始玩的。

多年以前,玩游戏时,一直非常期望能够自己控制角色的属性级别,得到各种装备。

多年以后,在这款纯粹的开源服务器问世后,终于如愿以偿。

直到如今,都2023年,魔兽世界游戏的服务端源码项目在开源界依然非常活跃。

让我们重温经典吧。

二、demo

客户端下载wow-1.12.3版本,只需要修改一处配置文件realmlist.wtf

SET realmlist wow.whyalive.org

指向上面的服务器地址即可。


测试帐号:
test1/123
wow/123

如果你懒得DIY自行编译安装,可以用上面给的demo账号和环境,下载客户端,修改配置文件,就可以登录游戏了。
 

三、客户端

魔兽世界经典旧世客户端1.12.3下载

四、服务器端

下面的编译安装过程比较多,但我已经尽可能完整的整理出来。基本上没有疏漏。

1、编译服务端有版本要求

env version
os CentOS 6.5
elf-wow master
gcc 4.9.3
cmake 3.5
boost 1.60
dbc and map 1.12.3
wow client 1.12.3

2、升级cmake

mkdir -p /usr/local/src/wow/

cd /usr/local/src/wow/

wget --no-check-certificate \

https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz


tar -zxvf cmake-3.5.2.tar.gz

cd cmake-3.5.2

./configure --prefix=/usr/local/cmake-3.5.2

make -j16

make install

 3、升级GCC

yum -y install glibc-devel.i686

tar -jxvf gcc-4.8.2.tar.bz2

cd gcc-4.8.2

./contrib/download_prerequisites

mkdir build

cd build

../configure --prefix=/usr/local/gcc-4.8.2

make -j16

make install

4、安装boost

在centos6.5上用yum安装的boost版本太低,必须重新编译安装。

最好直接安装在默认路径。

wget http://netcologne.dl.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.tar.bz2
tar -jxvf boost_1_60_0.tar.bz2
cd boost_1_60_0
./bootstrap.sh
./b2
./b2 install

5、编译安装

先下载源码,
然后开始编译并安装(必须要指定环境变量LD_LIBRARY_PATH为新版本g++的库):

cd /usr/local/src/wow/
git clone https://github.com/geektcp/elf-wow.git

export LD_LIBRARY_PATH=/usr/local/gcc-4.9.3/lib64/
export BASE_DIR=/usr/local/wow_mangos_bot_2017.10.2
mkdir -p /usr/local/src/wow/ClassicWOW/build/  &&
rm -rf /usr/local/src/wow/ClassicWOW/build/*  &&
cd /usr/local/src/wow/ClassicWOW/build &&
/usr/local/cmake-3.5.2/bin/cmake ../ \
-DCMAKE_INSTALL_PREFIX=$BASE_DIR  \
-DCONF_DIR=$BASE_DIR/etc \
-DPCH=1 \
-DDEBUG=0 \
-DCMAKE_C_COMPILER=/usr/local/gcc-4.9.3/bin/gcc \
-DCMAKE_CXX_COMPILER=/usr/local/gcc-4.9.3/bin/g++ &&
time make -j16 &&
make install &&
chown -R wow.wow -R $BASE_DIR

6、地图文件生成

map文件包括maps,mmaps,vmaps,dbc四个部分。,每个文件夹下面有大量地图文件。

这些地图文件是从哪里来的呢?

是从客户端的安装文件里面的抽取出来的。

抽取方式,先从服务器端的源码里面找到如下目录:

ls /usr/local/src/wow/mangos-classic/contrib/extractor_binary

ad.exe

ExtractResources.sh

MoveMapGen.exe

MoveMapGen.sh

offmesh.txt

README.txt

vmap_assembler.exe

vmapExtractor.exe

注意上面这几个exe文件,只有我用的这个版本才有,最新的cmangos-classic没有对应的可执行文件,而这几个可执行文件是用来生成map文件的,而服务器端启动时必须依赖map文件。

网上找到的下载1.12版本的map文件很难找到,没有下载地址,有也是无效的链接,或者下载下来不能用的。

将上米娜的exe文件都拷贝windows环境的wow客户端下,跟wow.exe同一级目录

然后依次直接按如下步骤运行:

1、生成dbcmaps文件

ad.exe

2、创建vmaps空文件夹并生成文件

md vmaps

vmap_assembler.exe Buildings vmaps

3、创建mmpas文件夹并生成文件,这一步可能要很久,一两个小时。

md mmaps

MoveMapGen.exe

 最后,如过不想一步一步完成,可以使用批处理(写入到generateMap.bat文件中)

ad.exe

md vmaps

vmap_assembler.exe Buildings vmaps

md mmaps

MoveMapGen.exe

7、数据库初始化

wow mangos classic经典版本的数据库数据来源于:

/usr/local/src/wow/mangos-classic/sql

另一部分存在于源码目录下:

git clone git://github.com/cmangos/classic-db.git

创建数据库账号:

grant all on *.* to mangos@'%' IDENTIFIED by 'mangos';

创建wow数据库:

CREATE DATABASE `mangos` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE `realmd` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

然后进入源码目录下的sql目录:

导入对应的sql到对应的数据库:

git clone

ls cmangos/mangos-classic/tree/master/sql/base

characters.sql  mangos.sql  realmd.sql

8、配置文件

mangosd.conf的关键配置项如下:

# 监听端口
WorldServerPort = 8085

# 监听网卡IP
BindIP = "0.0.0.0"

# 是否启用控制台
Console.Enable = 0

# 日志级别
LogLevel = 1

另外还有数据库连接方式的参数:

LoginDatabaseInfo     = "10.10.10.10;3310;mangos;mangos;realmd"
WorldDatabaseInfo     = "10.10.10.10;3310;mangos;mangos;mangos"
CharacterDatabaseInfo = "10.10.10.10;3310;mangos;mangos;characters"

标准可用的配置文件如下:

cat /usr/local/wow_mangos/etc/mangosd.conf |grep -v ^# |grep -v ^$ 

[MangosdConf]

ConfVersion=2015090801

RealmID = 1

DataDir = "/usr/local/wow_mangos/data/"

LogsDir = "/usr/local/wow_mangos/logs/"

LoginDatabaseInfo     = "10.10.10.10;3310;mangos;mangos;realmd"

WorldDatabaseInfo     = "10.10.10.10;3310;mangos;mangos;mangos"

CharacterDatabaseInfo = "10.10.10.10;3310;mangos;mangos;characters"

LoginDatabaseConnections = 1

WorldDatabaseConnections = 1

CharacterDatabaseConnections = 1

MaxPingTime = 30

WorldServerPort = 8085

BindIP = "0.0.0.0"

SD2ErrorLogFile = "SD2Errors.log"

UseProcessors = 0

ProcessPriority = 1

Compression = 1

PlayerLimit = 100

SaveRespawnTimeImmediately = 1

MaxOverspeedPings = 2

GridUnload = 1

LoadAllGridsOnMaps = ""

GridCleanUpDelay = 300000

MapUpdateInterval = 100

ChangeWeatherInterval = 600000

PlayerSave.Interval = 900000

PlayerSave.Stats.MinLevel = 0

PlayerSave.Stats.SaveOnlyOnLogout = 1

vmap.enableLOS = 1

vmap.enableHeight = 1

vmap.ignoreSpellIds = "7720"

vmap.enableIndoorCheck = 1

DetectPosCollision = 1

TargetPosRecalculateRange = 1.5

mmap.enabled = 1

mmap.ignoreMapIds = ""

UpdateUptimeInterval = 10

MaxCoreStuckTime = 0

AddonChannel = 1

CleanCharacterDB = 1

LogSQL = 1

PidFile = ""

LogLevel = 1

LogTime = 0

LogFile = "Server.log"

LogTimestamp = 0

LogFileLevel = 0

LogFilter_TransportMoves = 1

LogFilter_CreatureMoves = 1

LogFilter_VisibilityChanges = 1

LogFilter_Weather = 1

LogFilter_DbStrictedCheck = 1

LogFilter_Pathfinding = 1

LogFilter_MapsLoading = 1

LogFilter_EventAiDev = 1

LogFilter_PeriodicAffects = 0

LogFilter_PlayerMoves = 1

LogFilter_SQLText = 1

LogFilter_AIAndMovegens = 0

LogFilter_PlayerStats = 0

LogFilter_Damage = 0

LogFilter_Combat = 0

LogFilter_SpellCast = 0

WorldLogFile = ""

WorldLogTimestamp = 0

DBErrorLogFile = "DBErrors.log"

EventAIErrorLogFile = "EventAIErrors.log"

CharLogFile = "Char.log"

CharLogTimestamp = 0

CharLogDump = 0

GmLogFile = ""

GmLogTimestamp = 0

GmLogPerAccount = 0

RaLogFile = ""

LogColors = ""

GameType = 1

RealmZone = 1

DBC.Locale = 255

DeclinedNames = 0

StrictPlayerNames = 0

StrictCharterNames = 0

StrictPetNames = 0

MinPlayerName = 2

MinCharterName = 2

MinPetName = 2

CharactersCreatingDisabled = 0

CharactersPerAccount = 50

CharactersPerRealm = 10

SkipCinematics = 0

MaxPlayerLevel = 60

StartPlayerLevel = 1

StartPlayerMoney = 0

MaxHonorPoints = 75000

StartHonorPoints = 0

MinHonorKills = 15

MaintenanceDay = 3

InstantLogout = 1

AllFlightPaths = 0

AlwaysMaxSkillForLevel = 0

ActivateWeather = 1

CastUnstuck = 1

MaxSpellCastsInChain = 20

RabbitDay = 0

Instance.IgnoreLevel = 0

Instance.IgnoreRaid = 0

Instance.ResetTimeHour = 4

Instance.UnloadDelay = 1800000

Quests.LowLevelHideDiff = 4

Quests.HighLevelHideDiff = 7

Quests.IgnoreRaid = 0

Guild.EventLogRecordsCount = 100

TimerBar.Fatigue.GMLevel = 4

TimerBar.Fatigue.Max = 60

TimerBar.Breath.GMLevel = 4

TimerBar.Breath.Max = 60

TimerBar.Fire.GMLevel = 4

TimerBar.Fire.Max = 1

MaxPrimaryTradeSkill = 2

TradeSkill.GMIgnore.MaxPrimarySkillsCount = 4

TradeSkill.GMIgnore.Level = 4

TradeSkill.GMIgnore.Skill = 4

MinPetitionSigns = 9

MaxGroupXPDistance = 74

MailDeliveryDelay = 3600

MassMailer.SendPerTick = 10

PetUnsummonAtMount = 0

Event.Announce = 0

BeepAtStart = 1

ShowProgressBars = 0

WaitAtStartupError = 0

Motd = "Welcome to the Continued Massive Network Game Object Server."

PlayerCommands = 1

AllowTwoSide.Accounts = 0

AllowTwoSide.Interaction.Chat = 0

AllowTwoSide.Interaction.Channel = 0

AllowTwoSide.Interaction.Group = 0

AllowTwoSide.Interaction.Guild = 0

AllowTwoSide.Interaction.Trade = 0

AllowTwoSide.Interaction.Auction = 0

AllowTwoSide.Interaction.Mail = 0

AllowTwoSide.WhoList = 0

AllowTwoSide.AddFriend = 0

TalentsInspecting = 1

ThreatRadius = 100

Rate.Creature.Aggro = 1

CreatureRespawnAggroDelay = 5000

CreatureFamilyFleeAssistanceRadius = 30

CreatureFamilyAssistanceRadius = 10

CreatureFamilyAssistanceDelay = 1500

CreatureFamilyFleeDelay = 7000

WorldBossLevelDiff = 3

Corpse.EmptyLootShow = 1

Corpse.Decay.NORMAL = 300

Corpse.Decay.RARE = 900

Corpse.Decay.ELITE = 600

Corpse.Decay.RAREELITE = 1200

Corpse.Decay.WORLDBOSS = 3600

Rate.Corpse.Decay.Looted = 0.0

Rate.Creature.Normal.Damage = 1

Rate.Creature.Elite.Elite.Damage = 1

Rate.Creature.Elite.RAREELITE.Damage = 1

Rate.Creature.Elite.WORLDBOSS.Damage = 1

Rate.Creature.Elite.RARE.Damage = 1

Rate.Creature.Normal.SpellDamage = 1

Rate.Creature.Elite.Elite.SpellDamage = 1

Rate.Creature.Elite.RAREELITE.SpellDamage = 1

Rate.Creature.Elite.WORLDBOSS.SpellDamage = 1

Rate.Creature.Elite.RARE.SpellDamage = 1

Rate.Creature.Normal.HP = 1

Rate.Creature.Elite.Elite.HP = 1

Rate.Creature.Elite.RAREELITE.HP = 1

Rate.Creature.Elite.WORLDBOSS.HP = 1

Rate.Creature.Elite.RARE.HP = 1

ListenRange.Say = 40

ListenRange.TextEmote = 40

ListenRange.Yell = 300

GuidReserveSize.Creature = 100

GuidReserveSize.GameObject = 100

ChatFakeMessagePreventing = 0

ChatStrictLinkChecking.Severity = 0

ChatStrictLinkChecking.Kick = 0

ChatFlood.MessageCount = 10

ChatFlood.MessageDelay = 1

ChatFlood.MuteTime = 10

Channel.SilentlyGMJoin = 0

GM.LoginState            = 2

GM.Visible               = 2

GM.AcceptTickets         = 2

GM.Chat                  = 2

GM.WhisperingTo          = 2

GM.InGMList.Level        = 3

GM.InWhoList.Level       = 3

GM.LogTrade              = 1

GM.StartLevel            = 1

GM.LowerSecurity         = 0

GM.InvisibleAura         = 31748

Visibility.GroupMode = 0

Visibility.Distance.Continents    = 90

Visibility.Distance.Instances     = 120

Visibility.Distance.BG            = 180

Visibility.Distance.InFlight      = 100

Visibility.Distance.Grey.Unit   = 1

Visibility.Distance.Grey.Object = 10

Visibility.RelocationLowerLimit    = 10

Visibility.AIRelocationNotifyDelay = 1000

Rate.Health = 1

Rate.Mana = 1

Rate.Rage.Income = 1

Rate.Rage.Loss = 1

Rate.Focus = 1

Rate.Loyalty = 1

Rate.Energy = 1

Rate.Skill.Discovery = 1

Rate.Drop.Item.Poor = 1

Rate.Drop.Item.Normal = 1

Rate.Drop.Item.Uncommon = 1

Rate.Drop.Item.Rare = 1

Rate.Drop.Item.Epic = 1

Rate.Drop.Item.Legendary = 1

Rate.Drop.Item.Artifact = 1

Rate.Drop.Item.Referenced = 1

Rate.Drop.Money = 1

Rate.XP.Kill    = 1

Rate.XP.Quest   = 1

Rate.XP.Explore = 1

Rate.Rest.InGame = 1

Rate.Rest.Offline.InTavernOrCity = 1

Rate.Rest.Offline.InWilderness = 1

Rate.Damage.Fall = 1

Rate.Auction.Time = 1

Rate.Auction.Deposit = 1

Rate.Auction.Cut = 1

Auction.Deposit.Min = 0

Rate.Honor = 1

Rate.Mining.Amount = 1

Rate.Mining.Next   = 1

Rate.Talent = 1

Rate.Reputation.Gain = 1

Rate.Reputation.LowLevel.Kill    = 0.2

Rate.Reputation.LowLevel.Quest   = 1

Rate.InstanceResetTime = 1

SkillGain.Crafting = 1

SkillGain.Defense = 1

SkillGain.Gathering = 1

SkillGain.Weapon = 1

SkillChance.Orange = 100

SkillChance.Yellow = 75

SkillChance.Green  = 25

SkillChance.Grey   = 0

SkillChance.MiningSteps   = 0

SkillChance.SkinningSteps = 0

SkillFail.Loot.Fishing = 0

SkillFail.Gain.Fishing = 0

SkillFail.Possible.FishingPool = 1

DurabilityLossChance.Damage = 0.5

DurabilityLossChance.Absorb = 0.5

DurabilityLossChance.Parry  = 0.05

DurabilityLossChance.Block  = 0.05

Death.SicknessLevel = 11

Death.CorpseReclaimDelay.PvP = 1

Death.CorpseReclaimDelay.PvE = 1

Death.Bones.World = 1

Death.Bones.Battleground = 1

Death.Ghost.RunSpeed.World = 1.0

Death.Ghost.RunSpeed.Battleground = 1.0

Battleground.CastDeserter = 1

Battleground.QueueAnnouncer.Join = 0

Battleground.QueueAnnouncer.Start = 0

Battleground.ScoreStatistics = 0

Battleground.InvitationType = 0

BattleGround.PrematureFinishTimer = 300000

BattleGround.PremadeGroupWaitForMatch = 0

OutdoorPvp.SIEnabled = 1

OutdoorPvp.EPEnabled = 1

Network.Threads = 1

Network.OutKBuff = -1

Network.OutUBuff = 65536

Network.TcpNodelay = 1

Network.KickOnBadPacket = 0

Console.Enable = 0

Ra.Enable = 0

Ra.IP = 0.0.0.0

Ra.Port = 3443

Ra.MinLevel = 3

Ra.Secure = 1

Ra.Stricted = 1

SOAP.Enabled = 0

SOAP.IP = 10.10.10.10

SOAP.Port = 7878

CharDelete.Method = 0

CharDelete.MinLevel = 0

CharDelete.KeepDays = 30

 

 

cat /usr/local/wow_mangos/etc/realmd.conf |grep -v ^# |grep -v ^$ 

[RealmdConf]

ConfVersion=2010062001

LoginDatabaseInfo = "10.10.10.10;3310;mangos;mangos;realmd"

LogsDir = ""

MaxPingTime = 30

RealmServerPort = 3724

BindIP = "0.0.0.0"

PidFile = ""

LogLevel = 0

LogTime = 0

LogFile = "Realmd.log"

LogTimestamp = 0

LogFileLevel = 0

LogColors = ""

UseProcessors = 0

ProcessPriority = 1

WaitAtStartupError = 0

RealmsStateUpdateDelay = 20

WrongPass.MaxCount = 0

WrongPass.BanTime = 600

WrongPass.BanType = 0

9、启动服务器

cat /usr/local/wow_mangos/bin/startup.sh

启动脚本内容如下:

#!/bin/sh
# usage : sh shutdown.sh
# author : nagle
# date   : Sat Jan 21 16:10:11 CST 2017
# website:  https://github.com/geektcp

base_dir=`dirname $0`/..

cd $base_dir/bin/

export LD_LIBRARY_PATH=/usr/local/gcc-4.9.3/lib64/:$base_dir/lib

nohup $base_dir/bin/realmd 2>&1 >> $base_dir/logs/nohup_realmd.out &

$base_dir/bin/mangosd

cat /usr/local/wow_mangos/bin/shutdown.sh

关闭脚本内容:

#!/bin/sh
# usage : sh shutdown.sh
# author : nagle
# date   : Sat Jan 21 16:10:11 CST 2017
# website: https://github.com/geektcp

ps -ef |grep wow_mangos |grep wow|grep -v grep |grep -v local|awk '{print $2}' |xargs -t -i kill -9 {}

alais环境变量(方便启动,可以忽略):

cat ~/.bash_profile

alias startmangos='screen -S thy -X screen su - wow -c /usr/local/wow_mangos/bin/startup.sh'

alias stopmanos='screen -S thy -X screen su - wow -c /usr/local/wow_mangos/bin/shutdown.sh'

10、创建账号

如果启动mangosd服务端时,配置文件指定了启用控制台,那么可以在控制台输入命令:

account create nagle 123

即可创建一个帐号为nagle,密码为123的帐号了。

另外通过数据库也可以创建账号,对应的sql语句是:

SET
@username = "test1",
@password = "123",
@email = "[email protected]",
@expansion = 0,  -- 0表示经典旧时, 1表示70年代,一次类推
@gmlevel = 0,   -- 0 = player, 1=GM, 2=Moderator, 3=Admin, 4=Console
@realmid = 1;
 
INSERT INTO account
(username, sha_pass_hash, gmlevel, email, expansion, active_realm_id)
VALUES (
UPPER(@username),
(SHA1(CONCAT(UPPER(@username),
':', UPPER (@password))) ),
@gmlevel,
@email,
@expansion,
@realmid
);


INSERT INTO `realmd`.`realmcharacters` (`realmid`, `acctid`) VALUES ('1', '5');

11、客户端连接

找到wow.exe同一级目录下的配置文件,没有用记事本新建一个,重命名为realmlist.wtf

写入内容(其中如果不是默认端口3724,可以在后面添加端口,比如:13724):

SET realmlist wow.whyalive.org

三、扩展功能

这个版本支持机器人,也是可以自行创建若干玩家一起玩。

常用配置项

开启所有飞行点

AllFlightPaths=1

机器人用法

对应的机器人命令:

Commands:
=========

/s .bot add BOTNAME (add character to world)
/s .bot remove BOTNAME
/invite BOTNAME (bot will auto accept invite)
/t BOTNAME orders combat COMBATSORDER [TARGET] (assign combat orders like healing, assisting or tanking to a bot, see below for detailled explanations)


For a full list of commands, use '/t BOTNAME help' or various subcommands e.g. '/t BOTNAME help auction remove'.

Note that these commands work both in whisper and in party chat (assuming the bot is in the party). Any command in party chat will be obeyed by all bots in the party (if applicable).

/t BOTNAME attack (bot will attack selected target, similar to the way a pet can attack)
/t BOTNAME follow (orders bot to follow player; will also revive bot if dead or teleport bot if far away)
/t BOTNAME follow far (increases the bots follow distance from the player)
/t BOTNAME follow near (decreases the bots follow distance from the player)
/t BOTNAME follow reset (resets the bots follow distance to the config default setting. this commmand will be phased out)
/t BOTNAME follow auto (turns off auto variable follow distance which is ON by default)
/t BOTNAME follow info (Shows Automatic Follow Distance, toggle status ON or OFF)
/t BOTNAME orders delay <0-10> (sets the amount of time the bot will wait before engaging your target or tank's target in combat)
/t BOTNAME stay   (bot will remain at its current position)
/t BOTNAME assist (you'll need to be attacking something and the bot only does melee atm)
/t BOTNAME spells (replies with all spells known to bot)
/t BOTNAME neutralize (bot will try to neutralize/crowd control its master's target: polymorph, shackle, hibernate...)
/t BOTNAME pull (bot will try pull it's master's target if it has already tank orders)
/t BOTNAME cast <SPELLID | (part of) SPELLNAME | [SPELLLINK]>
/t BOTNAME craft < alchemy | a >                  (List all learnt alchemy [RECIPE]..)
                 < blacksmithing | b >            (List all learnt blacksmith [RECIPE]..)
                 < cooking | c >                  (List all learnt cooking [RECIPE]..)
                 < engineering | e >              (List all learnt engineering [RECIPE]..)
                 < firstaid | f >                 (List all learnt firstaid [RECIPE]..)
                 < leatherworking | l >           (List all learnt leatherworking [RECIPE]..)
                 < magic | m >                    (List all learnt enchanting [RECIPE]..)
                 < smelting | s >                 (List all learnt mining [RECIPE]..)
                 < tailoring | t >                (List all learnt tailoring [RECIPE]..)
/t BOTNAME craft [RECIPE] (craft any recipe that consumes reagents)
/t BOTNAME craft [RECIPE] all (craft all instances of a particular recipe, indicated by it's [charge])
/t BOTNAME process < disenchant | d > [ITEM LINK] (disenchants green [ITEM LINK] or better)
/t BOTNAME process < mill | m > [ITEM LINK] (grinds 5 herbs [ITEM LINK] to produce pigments)
/t BOTNAME process < prospect | p > [ITEM LINK] (searches 5 metal ore [ITEM LINK] for precious gems)
/t BOTNAME enchant (lists all enchantments [SPELLLINK] learnt by the bot)
/t BOTNAME enchant [SPELLLINK][ITEM LINK] (enchants selected tradable [ITEM LINK] either equipped or in bag)
/t BOTNAME use [ITEM LINK] (use item on self. If item hold quest, it will be accepted. If inventory item is lootable, it will be looted)
/t BOTNAME use [ITEM LINK] TARGET (use item on selected unit)
/t BOTNAME use [ITEM LINK][EQUIPPED ITEM LINK] (use item on equipped item)
/t BOTNAME use [ITEM LINK][GAMEOBJECT LINK] (use item on gameobject)
/t BOTNAME equip [ITEM LINK]
/t BOTNAME equip auto (*toggle* auto equip acquired items based on usefulness)
/t BOTNAME equip info (Show auto equip toggle status ON or OFF)
/t BOTNAME equip auto <on | off | once> (explicitly turn auto equip ON or OFF, or run autoequip once after which it will turn off)
/t BOTNAME reset (will reset states, orders and loot list)
/t BOTNAME stats (bot shows available money, free inventory space and estimated item repair costs)
/t BOTNAME survey (bot shows all available gameobjects, within a local perimeter around the bot)
/t BOTNAME find [GAMEOBJECT LINK] (bot will travel to the gameobject location and then wait)
/t BOTNAME get [GAMEOBJECT LINK] (bot will fetch the selected gameobject and then return to the player)
/t BOTNAME quest (Shows bot's current quests)
/t BOTNAME quest < add | a > [QUESTLINK] (Adds a quest)
/t BOTNAME quest < drop | d > [QUESTLINK] (Drop a quest)
/t BOTNAME quest < end | e > (Turns in a completed quest)
/t BOTNAME quest < end | e > (Turns in a completed quest)
/t BOTNAME quest < report | r > (bot reports all items, creatures or gameobjects needed to finish quests)
/t BOTNAME quest fetch (bot will automatically check for and accept all acceptable quests from target questgiver)
/t BOTNAME orders (Shows bot's combat orders)
/t BOTNAME pet abandon (abandon current active hunter pet)
/t BOTNAME pet tame TARGET (tame selected creature, if bot has 'tame beast' spell in spellbook)
/t BOTNAME pet spells (Shows spells known to bot's pet. Autocast spells will be shown in green)
/t BOTNAME pet cast <SPELLID | (part of) SPELLNAME | [SPELLLINK]>
/t BOTNAME pet toggle <SPELLID | (part of) SPELLNAME | [SPELLLINK]> (Toggle autocast for a given spell)
/t BOTNAME pet state (Shows current react mode of bot's pet)
/t BOTNAME pet react <(a)ggressive | (d)efensive | (p)assive> (Set bot's pet reaction mode)
/t BOTNAME collect (shows collect subcommand options and current collect status)
/t BOTNAME collect <subcommand(s)> (subcommands can be alone or together [none combat loot objects profession quest])
/t BOTNAME sell [ITEM LINK] (bot will sell item(s) with nearest vendor)
/t BOTNAME sell all (causes bot(s) to sell all normal(white) useless items. type .help for details (based on a number of comparisons)
/t BOTNAME buy [ITEM LINK] (bot buy item(s) from selected vendor)
/t BOTNAME drop [ITEM LINK] (bot will drop item immediately, permanently destroying it)
/t BOTNAME auction (bot will display all it's active owned auctions. Auction info will include an [AUCTION LINK] )
/t BOTNAME auction add [ITEM LINK] (bot will add item to it's m_itemIds, for later auction)
/t BOTNAME auction remove [AUCTION LINK] (bot will add auctionid to it's m_auctions, for later auction cancellation)
/t BOTNAME mail inbox [MAILBOX] (Lists all bot mail from selected [MAILBOX])
/t BOTNAME mail getcash [MAIL ID].. (gets all cash from selected [MAIL ID])
/t BOTNAME mail getitem [MAIL ID].. (gets all items from selected [MAIL ID])
/t BOTNAME mail delete [MAIL ID].. (delete all bot mail selected [MAIL ID])
/t BOTNAME repair [ITEM LINK] (bot will seek out armourer and repair selected items specified by [ITEM LINK] )
/t BOTNAME repair all (bot(s) will seek out armourer and repair all damaged items equipped, or in bags )
/t BOTNAME talent (Lists bot(s) active talents [TALENT LINK] & glyphs [GLYPH LINK], unspent talent points & cost to reset all talents)
/t BOTNAME talent learn [TALENT LINK} .. (Learn selected talent from bot client 'inspect' dialog -> 'talent' tab or from talent command (shift click icon or link))
/t BOTNAME talent reset (Resets all talents)
/t BOTNAME talent spec (Lists talent specs available to this bot's class, with #, to use below)
/t BOTNAME talent spec # (If valid, uses this # talent spec for this bot (see # from talent spec above))
/t BOTNAME bank  (Lists bot(s) bank balance)
/t BOTNAME bank deposit [Item Link][Item Link] .. (Deposit item(s) in bank)
/t BOTNAME bank withdraw [Item Link][Item Link] ..  (Withdraw item(s) from bank. ([Item Link] from bank))
/t BOTNAME skill (lists all [PROFESSION LINK] bot Primary profession skills)
/t BOTNAME skill learn (lists [TRAINING LINK] available class, weapon & profession (Primary or Secondary) skills & spells, from selected trainer)
/t BOTNAME skill learn [TRAINING LINK] (learn selected skill or spell, from selected trainer)
/t BOTNAME skill unlearn [PROFESSION LINK] (unlearn selected primary profession skill & all associated spells)
/t BOTNAME skill fetch (bot will automatically check for and learn all available skills/spells from the targeted trainer)
/t BOTNAME help (lists all the commands above and how they work. Except for the ".bot command" ones.)
/t BOTNAME gm check talent spec (Does a validity check on all talentspecs in the database, only works for GMs or higher)
/t BOTNAME resumeorders (causes bot or party to restore previous combat orders)

Shortcuts:
c = cast
e = equip
u = use

Gameobject interaction with bots:
=================================

  The bot(s) can interact with gameobjects. This is particularly useful, in order to complete 'gather' type
  quests (e.g Milly's harvest in Northshire). The bot(s) can also harvest 'ore deposits' and 'herbs'

  Four commands have been introduced 'collect', 'survey, 'find' & 'get', to facilitate this feature.

  The 'collect' command provides a way to have a bot automatically get loot or objects in the world.
  The command by itself gives you a display of what settings the bots have. Defaults are stored in
  the playerbot.conf. The subcommands do the actual work:
    combat - bot will loot after combat for the options that are set
    loot - bot will grab all loot available from corpse
    quest - bot will grab all quest items on corpse
    profession - bot will grab any profession related item that the bot has from corpse
    skin - if you have skinning, and corpse has been looted, bot will skin corpse. Most of
        the time you may want this option and the loot option enabled, but if you are grabbing
        the stuff as you are going around, the bot will skin afterwards.
    objects - bot will collect things that are specified by the survey and get <shift-click> commands
    distance:<value> - bot will loot objects in the specified distance value
    none - removes any collect options that have been set

  The 'survey' command provides the means for bot(s) to detect gameobjects in the world. It can be used to detect
  available gameobjects local to a single bot, or more effectively (wider area) those for a party of bots.

  Suggestion: setup the 'survey' command as an assigned macro button, on the client (e.g /p survey). You can
  then quickly refresh the gameobject list.

  Gameobject list [GAMEOBJECT LINK] (Currently bots can only interact with ore, herb and needed quest items)
  ---------------

  [Copper Vein][Silverleaf][Earthroot][Milly's Harvest][Battered Chest][Food Crate]

  Then, use the 'find' or 'get' commands to interect with the gameobject.

  Using the gameobject list information, it is possible to locate and/or fetch each of the gameobjects. To select
  a [GAMEOBJECT LINK], hold down the shift key and click on the relevant link with your mouse.

Creature interaction with bots:
===============================

  The bot(s) can now interact directly with creatures. This will enable bot(s) to independently contact NPCs, without
  the need for player's selection. This opens up new possiblities for bot/NPC commerce.

  Each bot will maintain it's own item list (m_itemIds - This is a list of paired data). The first component (UNIT_NPC_FLAG)
  dictates what is to done with the second component (itemid).

  Each bot will also maintain it's own active auction list (m_auctions - This is a list of paired data). The first component
  (ActionFlags) dictates the action to be performed on the second component (auctionid).

  While(m_itemIds not empty)
  {
      bot will scan for surrounding creatures (findNearbyCreature()) who can service m_itemIds
      if(found)
          Search is carried out for all itemids that can be processed by this creature.
          if(processed successfully)
              This instance of the data pair (npcflag,itemid) will be removed from m_itemIds
              While(m_auctions not empty)
                  process contained auctionids according to ActionFlag & then update m_auctions
  }

  Please note that bot(s) m_itemIds & m_auctions will be emptied, when bot(s) are dismissed.

Repair with bots:
=================

  Bots will now automatically unequip worn items before they break, and will
  notify the master of worn items.  They will not equip worn items (less than 10% of max durability)

  Bot can now repair <all or selected> items - equipped or in bags. If the bot is
  a member of a guild, then the guild fund is used for repairs. If not, the bots own
  gold supply is used. If the bot cannot pay for the repair, they remain damaged.

  The new 'stats' command provides useful information to help in the repair decision.

  First:  Money available to bot(s)
  Second: Free inventory slots for bot(s)
  Third:  Estimated (excludes NPC reputation discount) item damage cost for bot(s).

Combat Orders explained:
========================

  There are primary and secondary commands which can be combined. In this way it is
  possible to define a bot to assist the main tank and also protect the healer, making
  combat management much easier.
  There are three levels of combat orders: primary, secondary and resist to a elemental damage school
  The commands assist and protect require a target parameter or a friendly player
  selected by bots master.
  Available Combat Orders:
    combat tank         primary     try to bind all targets involved in combat by gaining highest threat
    combat assist       primary     do damage on selected targets attacker without getting highest threat
    combat heal         primary     concentrate on healing - no offensive spells, try to keep threat low
    combat nodispell    secondary   concentrate on healing - no offensive spells, try to keep threat low but will not dispel friendlies
    combat protect      secondary   if target of protect get's directly attacked gain higher threat on attacker
    combat passive      primary     bot will not engage combat: no attack or spell cast
    combat resistfire   secondary   bot will try to equip resist fire equipment and use resist fire spells/auras
    combat resistfrost  secondary   bot will try to equip resist frost equipment and use resist frost spells/auras
    combat resistnature secondary   bot will try to equip resist nature equipment and use resist nature spells/auras
    combat resistshadow secondary   bot will try to equip resist shadow equipment and use resist shadow spells/auras
    
    combat reset       -       clear out assist and protect targets and set combat order to nothing
  Examples:
    /t TheTank orders combat tank
    /t MyHealer orders combat heal
    /t TheBrutal orders combat assist TheTank
    /t TheBrutal orders combat protect MyHealer
    /t TheBrutal orders delay 2
    /t TheTank orders combat resistfire

Trading with bots:
==================

To trade items/money with your bot simply initiate a trade and the bot will tell you how much money and items are available. To request an item simple whisper the bot and shift click the link of the item you would like. You can link multiple items on the same line. You can also request money in the following manner when the trade window is open:
/w BOTNAME 10g <-- request that the bot give you 10 gold
/w BOTNAME 6g500s25c <-- request 6 gold, 500 silver, and 25 copper

A bot is also able to show an item in its 'Will not be traded' slot. The item can be either
in its bags or be equipped and even be soulbound. Using this you can cast spells/enchantments
on soulbound items ('nt' stands for 'not trading').
/w BOTNAME nt [Enchantable Soulbound Item]

More Information:
=================

If specifying a spell substring, the spell chosen will be in priority of exact name match, highest spell rank, and spell using no reagents. Case does not matter. Here's some examples:
/t BOTNAME c greater heal
/t BOTNAME cast pain
/w BOTNAME c poly
/w BOTNAME cast fort
/t BOTNAME cast <SPELLID>
- OR -
/w BOTNAME c <SPELLID>

Also all commands can be broadcast to the party. For example:
/p follow
/p spells

To use or equip items for your bot say:
/w BOTNAME use [ITEMLINK1][ITEMLINK2]
/w BOTNAME equip [ITEMLINK1][ITEMLINK2]
- OR -
/w BOTNAME u [ITEMLINK1][ITEMLINK2]
/w BOTNAME e [ITEMLINK1] [ITEMLINK2]

If you inspect your bot, your bot will tell you what items you have in your inventory that you can equip. To create a link in the chat window, hold the shift key and press the left mouse button when clicking the link.

魔兽世界登录后,在聊天窗口输入指令。

查看机器人状态:

/t 夜之眼 stats

/t 夜之眼 info

召唤机器人:

.bot add 夜之眼

.bot add 索拉查的笛声

保持位置不动:

/t 夜之眼 stay

/t 索拉查的笛声 stay

/t 夜之眼 cast 1243

.bot remove 索拉查的笛声

.bot add 小牛

.bot add 塞拉摩

.bot add 爱在西元前

/t 爱在西元前 orders combat heal

/t 塞拉摩 orders combat protect

/t 小牛 orders combat resistfire

/t 小牛 orders combat assist

.bot remove 夜之眼

.bot remove 索拉查的笛声

/t 夜之眼 orders combat heal

/t 夜之眼 help

/t 夜之眼 follow near

/t 夜之眼 follow far

/t 索拉查的笛声 follow near

/t 索拉查的笛声 follow near

/t 索拉查的笛声 follow info

/t 爱在西元前 orders combat attack

.bot remove  爱在西元前

.bot remove 塞拉摩

常用GM命令

21级血杀斧:

.additem 13016

盾牌24级:

.additem 12997

.additem 13032

学会所有法术:

.learn all

传送

传送门

添加传送门(如果对应的id不存在,或者填错了,就会增加一个空的物体):

.gobject add [entry]

删除传送门:

.gobject delete [guid]

entry是物体模板id,可以按同一个模块添加多个同样的物体,

所以删除时必须删除物体id

添加物体后,控制台界面(聊天窗口)会返回GUID信息,这个GUID就是物体的id,根据这个id删除物体即可。

传送门entry对应 表是gameobject_template

传送门guid对应的表是gameobject

查看guid和entry对应关系:

SELECT t.entry,t.name,o.id, o.guid,

o.position_x,o.position_y,o.position_z,o.map

FROM gameobject o,gameobject_template t

WHERE o.id=[entry]

比如:

SELECT t.entry,t.name,o.id, o.guid,

o.position_x,o.position_y,o.position_z,o.map

FROM gameobject o,gameobject_template t

WHERE o.id =176499

序号

添加物体

命令

备注

0

删除传送门

.gobject delete 90007

 

1

奥格瑞玛传送门

.gobject add 176499

 

2

暴风传送门

.gobject add 176296

 

3

铁炉堡传送门

.gobject add 176497

 

4

达纳苏斯传送门

.gobject add 176498

 

5

奥格玛传送门

.gobject add 176499

 

6

雷霆崖传送门

.gobject add 176500

 

7

幽暗城传送门

.gobject add 176501

 

8

末日传送门

.gobject add 177193

 

9

半人马传送门01

.gobject add 178386

 

10

集合石传送门

.gobject add 179944

 

11

卡拉赞传送门

.gobject add 181146

 

12

暗夜村落传送门

.gobject add 182061

 

13

部落营地传送门

.gobject add 182060

 

14

黑石塔之传送门

.gobject add 184247

 

15

召唤传送门(黄球)

.gobject add 181810

 

16

玛拉顿的传送门

.gobject add 178400

 

.gobject activate 90072

坐标

序号

目的地

命令

备注

1

奥格瑞玛鸟点

.go 1652 -4331 62 1

主城

2

奥格 武器大师

.go 1637 2091 -4822 1

主城

3

幽暗城门口

.go 1909 235 53 0

主城

4

幽暗城鸟点

.go 1567 268 -43 0

主城

5

雷霆崖

.go -1391 140 23 1

主城

6

暴风城门口

.go -9065 434 94 0

主城

7

暴风城银行

.go -8832 627 94 0

主城

8

铁炉堡门口

.go -5032 -819 495 0

主城

9

铁炉堡银行

.go -4927 -947 502 0

主城

10

铁炉堡最高峰(屋顶)

.go -4866 -1445 580 0

主城

11

达纳苏斯

.go 9961 2055 1329 1

主城

12

GM岛

.go 16222.1 16252.1 12.5872 1

主城

13

藏宝海湾

.go -14302 518 9 0

副城

14

棘齿城

.go -977 -3788 6 1

副城

15

牛头出生地

.go -2254 -758 8.2 1

 

16

塔伦米尔:

.go -36 -927 55 0

 

17

陶拉祖营地:

.go -2375 -1880 96 1

 

18

灰谷:

.go 2324 -1668 125 1

 

19

千针石林山顶

.go -4885 -1596 101 1

 

四、常见问题

编译安装通常是正常的,问题往往处在map文件的获取,及map文件和当前编译版本不匹配,或者是数据库表,由于不完整,或者不同版本杂乱在一起导致没法正常启动。

猜你喜欢

转载自blog.csdn.net/chiwang_andy/article/details/130029032