if (player->getClass() == 1)  //判断玩家的职业
    1 战士
    2 圣骑
    3 猎人
    4 盗贼
    5 牧师
    6 死亡骑士
    7 萨满
    8 法师
    9 术士
    11 德鲁伊
 
player->SaveRecallPosition(); //保存你当前的位置到数据库。。 涉及命令 .recall
 
 
player->TeleportTo(0, -8855.95f, 599.54f, 92.06f, 0.0f);  //中的传送函数
传送中对应为
(Map Id, X Cords, Y Cords, Z Cords, Orientation);
   地图     X坐标      Y坐标    Z坐标      方位
你可以用GM命令 .gps来获得当前的坐标位置
 
if (player->getLevel() == 80) //获得玩家的角色等级
 
 
player->AddItem(2586, 1);  //给角色增加物品2586这个物品
 
/*
This will add the player an item.
player->AddItem(itemid, ammount); //给角色增加物品2586这个物品,ammount 增加对应物品的数量
Should be self explanitory. 
*/
 
player->DestroyItemCount(2586, 1, true);//删除角色的物品 1个。
 
/*
This will destroy an item if the player has it.
player->DestroyItemCount(ItemId, AmmountToDestroy, return value); //删除指定数量的物品ItemId 物品ID,AmmountToDestroy删除数量
*/
 
if(player->GetSession()->GetSecurity() >= 1) // Greater than    // 获得角色的GM会员等级
if(player->GetSession()->GetSecurity() <= 1) // Lesser than // 获得角色的GM会员等级
if(player->GetSession()->GetSecurity() == 1) // Equals To // 获得角色的GM会员等级
 
/* 
Above will check to see if the player is a specific gm level.
*/
 
player->SetAtLoginFlag(AT_LOGIN_CHANGE_FACTION); //这个是登录后,可以修改阵营的函数
 
// Will initiate a faction change.
 
player->SetAtLoginFlag(AT_LOGIN_RENAME);//这个是登录后,可以修改角色名称的函数
 
// Will initiate a name change.
 
player->SetAtLoginFlag(AT_LOGIN_CHANGE_RACE);//这个是登录后,可以修改角色种族的函数
 
// Will initiate a race change
 
player->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE);    //这个就是登录后,可以修改角色外貌的函数
 
// Will initiate a character customization.
 
player->GetSession()->SendShowBank(player->GetGUID()); //打开玩家的银行
 
/*
Will send a bank window.
*/
 
if (player->isInCombat())   //判断角色是否在战斗中
 
// Checks to see if the player is in combat.
 
if (player->isMoving())//判断角色是否在移动,跑动,走动中
 
// Checks to see if the player is moving.
 
if (player->isInFlight())//判断角色是否在飞行状态
 
// Checks to see if the player is on a flight path.
以上都是一些做仿官方的常用函数。。当然Trinity端和Mangos端中都是类似的函数,脚本中也尝尝用到