سلام ، آیا این بازدید اول شماست ؟ یا
logo_forum_header

تبلیغات
×
+
سفارش تبلیغات

نمایش نتایج: از 1 به 1 از 1

موضوع: اسکریپت top برای tdb 59

  1. #1
    دستاورد ها:
    برچسب زن کلاس اول1 سال ثبت نام شده است۱۰۰۰ امتیاز

    شماره عضویت
    533
    تاریخ عضویت
    Jul 2015
    نوشته ها
    28
    نسل
    نسل مورد علاقه
    نژاد
    نژاد  مورد علاقه
    کلاس
     کلاس  مورد علاقه
    سورس
     سورس مورد علاقه
    پسندیده : 42
    مورد پسند : 38 بار در 18 پست
    سیستم عامل و مرورگر:

    اسکریپت top برای tdb 59

    درود
    اینم اسکریپت Top که شامل اسکریپت های :
    Top Arena
    Top Honot Points
    Top Killer
    Top Class
    Top Played Time
    Top Guild


    کد PHP:
    //***********************//
    //Top'S Script For TDB 59//
    //  Fixed By Hamed XIO   //
    //   Edited By Soul-A    //
    //***********************//
    class T_O_P : public CreatureScript
    {
        public:
            
    T_O_P() : CreatureScript("T_O_P") { }
            
        
    bool OnGossipHello(Player playerCreature creature)
        {
            
    player->ADD_GOSSIP_ITEM(9"Top 5 Arena Team"GOSSIP_SENDER_MAIN1);
            
    player->ADD_GOSSIP_ITEM(9"Top 5 HONOR POINTS"GOSSIP_SENDER_MAIN2);        
            
    player->ADD_GOSSIP_ITEM(9"Top 5 Killer"GOSSIP_SENDER_MAIN3);
            
    player->ADD_GOSSIP_ITEM(9"Top 5 Class"GOSSIP_SENDER_MAIN4);
            
    player->ADD_GOSSIP_ITEM(9"Top 5 Played Time"GOSSIP_SENDER_MAIN5);
            
    player->ADD_GOSSIP_ITEM(9"Top 5 Guild"GOSSIP_SENDER_MAIN6);

            
    player->PlayerTalkClass->SendGossipMenu(68creature->GetGUID());
            return 
    true;
        }

        
    bool OnGossipSelect(Player playerCreature creatureuint32 senderuint32 actions)
        {
            if (
    sender == GOSSIP_SENDER_MAIN)
            {
                
    player->PlayerTalkClass->ClearMenus();

                switch(
    actions)
                {
                    case 
    1:
                    {
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Arena Team 2v2"GOSSIP_SENDER_MAIN7);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Arena Team 3v3"GOSSIP_SENDER_MAIN8);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Arena Team 5v5"GOSSIP_SENDER_MAIN9);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Arena Points"GOSSIP_SENDER_MAIN10);
                        
    player->ADD_GOSSIP_ITEM(9"Back"GOSSIP_SENDER_MAIN1000);
                        
                        
    player->PlayerTalkClass->SendGossipMenu(68creature->GetGUID());
                        return 
    true;
                    }

                    case 
    7:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,rating FROM arena_team WHERE type='2' ORDER BY rating DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Arena Team Top 2 v 2]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string arena_team fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Team Name] |cffef1919[%s]|r, |cff448aff[Team Rating]  |cffef1919[%u]|r \n"arena_team.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;                
        
                    case 
    8:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,rating FROM arena_team WHERE type='3' ORDER BY rating DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Arena Team Top 3 v 3]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string arena_team fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Team Name] |cffef1919[%s]|r, |cff448aff[Team Rating]  |cffef1919[%u]|r \n"arena_team.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;    
        
                    case 
    9:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,rating FROM arena_team WHERE type='5' ORDER BY rating DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Arena Team Top 5 v 5]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string arena_team fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Team Name] |cffef1919[%s]|r, |cff448aff[Team Rating]  |cffef1919[%u]|r \n"arena_team.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;
                    
                    case 
    10:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,arenaPoints FROM characters ORDER BY arenaPoints DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Arena Points]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Arena Points]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    2:
                    {
                            
    player->ADD_GOSSIP_ITEM(9"HONOR POINTS"GOSSIP_SENDER_MAIN11);
                            
    player->ADD_GOSSIP_ITEM(9"Today Top 5 HONOR POINTS"GOSSIP_SENDER_MAIN12);
                            
    player->ADD_GOSSIP_ITEM(9"Yesterday Top 5 HONOR POINTS"GOSSIP_SENDER_MAIN13);
                            
    player->ADD_GOSSIP_ITEM(9"Back"GOSSIP_SENDER_MAIN1000);
                        
    player->PlayerTalkClass->SendGossipMenu(68creature->GetGUID());
                        return 
    true;
                    }                    

                    case 
    11:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalHonorPoints FROM characters ORDER BY totalHonorPoints DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Total HONOR Points]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total HONOR Points]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    12:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,todayHonorPoints FROM characters ORDER BY todayHonorPoints DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Today HONOR Points]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Today HONOR Points]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    13:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,yesterdayHonorPoints FROM characters ORDER BY yesterdayHonorPoints DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Yesterday HONOR Points]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Yesterday HONOR Points]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    3:
                    {
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Killers"GOSSIP_SENDER_MAIN14);
                        
    player->ADD_GOSSIP_ITEM(9"Today Top 5 Killers"GOSSIP_SENDER_MAIN15);
                        
    player->ADD_GOSSIP_ITEM(9"Yesterday Top 5 Killers"GOSSIP_SENDER_MAIN16);
                        
    player->ADD_GOSSIP_ITEM(9"Back"GOSSIP_SENDER_MAIN1000);
                        
                        
    player->PlayerTalkClass->SendGossipMenu(68creature->GetGUID());
                        return 
    true;
                    }
                    
                    case 
    14:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Total Kills]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    15:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,todayKills FROM characters ORDER BY todayKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Today Kills]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Today Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    16:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,yesterdayKills FROM characters ORDER BY yesterdayKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Yesterday Kills]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Yesterday Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;                

                    case 
    4:
                    {
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Warrior"GOSSIP_SENDER_MAIN17);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Paladin"GOSSIP_SENDER_MAIN18);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Hunter"GOSSIP_SENDER_MAIN19);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Rogue"GOSSIP_SENDER_MAIN20);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Priest"GOSSIP_SENDER_MAIN21);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 DeathKnight"GOSSIP_SENDER_MAIN22);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Shaman"GOSSIP_SENDER_MAIN23);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Mage"GOSSIP_SENDER_MAIN24);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Warlock"GOSSIP_SENDER_MAIN25);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Druid"GOSSIP_SENDER_MAIN26);
                        
    player->ADD_GOSSIP_ITEM(9"Back"GOSSIP_SENDER_MAIN1000);
                        
                        
    player->PlayerTalkClass->SendGossipMenu(68creature->GetGUID());
                        return 
    true;
                    }

                    case 
    17:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='1' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Warrior]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    18:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='2' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Paladin]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    19:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='3' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Hunter]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;
                    
                    case 
    20:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='4' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Rogue]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;                

                    case 
    21:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='5' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Priest]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    22:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='6' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 DeathKnight]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    23:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='7' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Shaman]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    24:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='8' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Mage]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    25:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='9' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Warlock]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    26:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totalKills FROM characters WHERE class='11' ORDER BY totalKills DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Druid]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Kills]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    5:
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,totaltime FROM characters ORDER BY totaltime DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top 5 Total Time]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string characters fields[0].GetString();
                            
    uint32 rating fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Hero Name] |cffef1919[%s]|r, |cff448aff[Total Time]  |cffef1919[%u]|r \n"characters.c_str(), rating);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;    

                    case 
    6:
                    {
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Guild Level"GOSSIP_SENDER_MAIN27);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Guild Xp"GOSSIP_SENDER_MAIN28);
                        
    player->ADD_GOSSIP_ITEM(9"Back"GOSSIP_SENDER_MAIN1000);
                        
                        
    player->PlayerTalkClass->SendGossipMenu(68creature->GetGUID());
                        return 
    true;
                    }

                    case 
    27
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,Level FROM guild ORDER BY Level DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top Guild Level]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string guild fields[0].GetString();
                            
    uint32 Level fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Guild Name] |cffef1919[%s]|r, |cff448aff[Guild Level]  |cffef1919[%u]|r \n"guild.c_str(), Level);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;

                    case 
    28
                    {
                        
    QueryResult result CharacterDatabase.Query("SELECT name,Xp FROM guild ORDER BY Xp DESC LIMIT 5");
                        if(!
    result)
                            return 
    false;

                        
    Field fields NULL;
                        
    creature->Whisper("|cffffd700[Top Guild Xp]|r"LANG_UNIVERSALplayer);
                        do
                        {
                            
    fields result->Fetch();
                            
    std::string guild fields[0].GetString();
                            
    uint32 Xp fields[1].GetUInt32();
                            
    char msg[250];
                            
    snprintf(msg250"|cff448aff[Guild Name] |cffef1919[%s]|r, |cff448aff[Guild Xp]  |cffef1919[%u]|r \n"guild.c_str(), Xp);
                            
    creature->Whisper(msgLANG_UNIVERSALplayer);
                        }
                        while(
    result->NextRow());
                        
    player->PlayerTalkClass->SendCloseGossip();
                    }
                    break;    
                    
                    case 
    1000:
                    {
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Arena Team"GOSSIP_SENDER_MAIN1);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 HONOR POINTS"GOSSIP_SENDER_MAIN2);        
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Killer"GOSSIP_SENDER_MAIN3);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Class"GOSSIP_SENDER_MAIN4);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Played Time"GOSSIP_SENDER_MAIN5);
                        
    player->ADD_GOSSIP_ITEM(9"Top 5 Guild"GOSSIP_SENDER_MAIN6);

                        
    player->PlayerTalkClass->SendGossipMenu(68creature->GetGUID());
                        return 
    true;
                    }
                }
            }
            return 
    true;
        }
        
    };

    void AddSC_Creature_Top()
    {
        new 
    T_O_P();


  2. # ADS
    سیستم تبلیغات
    تاریخ عضویت
    01/01/2014
    نوشته ها
    پستی ندارد.
     

کلمات کلیدی این موضوع

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •