当前位置:首页>>魔兽单机>>正文
一个Trinity的PVP头衔获得NPC脚本
2013-05-14 21:46:44 作者:网络 来源: 浏览次数:0
摘要:一个Trinity的PVP头衔获得NPC脚本
 次代码是一个T端的脚本。通过击杀的角色数量等级来获得不同的头衔。

下面的Ranks就是击杀的数量。根据你的击杀数量,你可以到NPC那里去领取对应的头衔等级

#include "ScriptPCH.h"
 
enum Ranks
{
    RANK_1    = 50,
    RANK_2    = 100,
    RANK_3    = 500,
    RANK_4    = 1000,
    RANK_5    = 2000,
    RANK_6    = 4000,
    RANK_7    = 5000,
    RANK_8    = 6000,
    RANK_9    = 8000,
    RANK_10 = 10000,
    RANK_11 = 12500,
    RANK_12 = 15000,
    RANK_13 = 20000,
    RANK_14 = 25000,
};
 
class PVPTitles : public PlayerScript
{
public:
    PVPTitles() : PlayerScript("PVPTitles") { }
 
    void OnPVPKill(Player *Killer, Player *Killed) 
    {
        if (Killer->GetGUID() == Killed->GetGUID())
            return;
            
        uint32 team = killer->GetTeam();
 
        switch(Killer->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS))
        {
            case RANK_1:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(1 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_2:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(2 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_3:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(3 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_4:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(4 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_5:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(5 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_6:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(6 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_7:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(7 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_8:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(8 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_9:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(9 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_10:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(10 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_11:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(11 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_12:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(12 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_13:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(13 + (team == ALLIANCE ? 0 : 14));
                break;
            case RANK_14:
                Killer->SetTitle(sCharTitlesStore.LookupEntry(14 + (team == ALLIANCE ? 0 : 14));
                break;
        }
    }
};
 
void AddSC_PVPTitles() 
{
    new PVPTitles();
}


下面是完整的脚本代码

完整脚本代码



相关报道:

[关闭] [返回顶部]


  返回首页 | 最新资讯 | 资源下载 | 魔兽图片 | 单机文档 | 技术攻略 | 玩家视频
备案号:蜀ICP备2024062380号-1
免责声明:本网站为热爱怀旧WOW的玩家们建立的魔兽世界资料网站,仅供交流和学习使用,非盈利和商用.如有侵权之处,请联系我们,我们会在24小时内确认删除侵权内容,谢谢合作。
Copyright © 2024 - 2024 WOWAII.COM Corporation, All Rights Reserved

机器人国度