Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 6 of 6
  1. #1
    Senior Sergeant
    MikExV™'s Avatar
    Join Date
    Feb 2010
    Location
    Ohio
    Posts
    117
    Post Thanks / Like
    Rep Power
    15
    Reputation
    35

    [C++] Share Epic Scripts


    Register to remove this ad
    Well I use to be a GM on my friends server, he quit so when I told him I was starting he gave me all these scripts and now that I stoped I figured you guys may like theres, there for MaNGOS/Trinitycore
    I did not makes there all credit go's to Decy.



    Race Changer:
    Code:
    /*Made for Vigilante WoW */
    #include "precompiled.h"
    #include "sc_gossip.h"
    #include "Player.h"
    #include "GossipDef.h"
    #include "Spell.h"
    #include "World.h"
    #include "Chat.h"
    
    static uint32 eventmapid;
    static float eventx;
    static float eventy;
    static float eventz;
    bool EventToggle = false;
    
    bool GossipHello_ItemUse_GS_Changer(Player *player, Item* _Item, SpellCastTargets const& targets)
    {
        
            if(player->isInCombat())
            {
                return true;
            }
    
            if(player->isDead())
            {
                return true;
            }
    
        player->ADD_GOSSIP_ITEM( 0, "~Gender Change~"                            , 0, GOSSIP_ACTION_INFO_DEF + 5);
        player->ADD_GOSSIP_ITEM( 0, "~Race Change~"                            , 0, GOSSIP_ACTION_INFO_DEF + 2);
    
        if(player->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
        {
        player->ADD_GOSSIP_ITEM( 0, "~GM Menu~"                          , 0, GOSSIP_ACTION_INFO_DEF + 3);
        }
    
        if(EventToggle == true)
        {
        player->ADD_GOSSIP_ITEM( 0, "~Teleport Me To The Event~"                            , 0, GOSSIP_ACTION_INFO_DEF + 4);
        }
    
        player->SEND_GOSSIP_MENU(1619034,_Item->GetGUID());
        return true;
    }
    
    void SendDefaultMenu_ItemUse_GS_Changer(Player *player, Item *_Item, uint32 action, SpellCastTargets const& targets)
    {
        switch(action) 
        {
              
            case GOSSIP_ACTION_INFO_DEF + 1 :
                     player->ADD_GOSSIP_ITEM( 0, "~Gender Change~"                            , 1, GOSSIP_ACTION_INFO_DEF + 5);
                     player->ADD_GOSSIP_ITEM( 0, "~Race Change~"                            , 1, GOSSIP_ACTION_INFO_DEF + 2);
    
                        if(player->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
                        {
                             player->ADD_GOSSIP_ITEM( 0, "~GM Menu~"                          , 1, GOSSIP_ACTION_INFO_DEF + 3);
                        }
    
                        if(EventToggle == true)
                        {
                            player->ADD_GOSSIP_ITEM( 0, "~Teleport Me To The Event~"                            , 1, GOSSIP_ACTION_INFO_DEF + 4);
                        }
                     player->SEND_GOSSIP_MENU(1619034,_Item->GetGUID());
                     break;
        }
     }
    
    bool GossipSelect_ItemUse_GS_Changer(Player *player, Item *_Item, uint32 sender, uint32 action, SpellCastTargets const& targets)
    {
      switch(action) 
        {
    
    ///////////////////////////////////////////////////////START OF THE GENDER CHANGE
                    case GOSSIP_ACTION_INFO_DEF + 5 :
                         player->ADD_GOSSIP_ITEM( 0, "~Continue With The Gender Change~"                            , 1, GOSSIP_ACTION_INFO_DEF + 101);
                         player->ADD_GOSSIP_ITEM( 0, "~Main Menu~"                            , 1, GOSSIP_ACTION_INFO_DEF + 100);
                         player->SEND_GOSSIP_MENU(1619034,_Item->GetGUID());
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 101 :
                        Gender gender;
    
                        if(player->getGender() == GENDER_FEMALE)
                        {
                            gender = GENDER_MALE;
                        }
                        else
                        {
                            gender = GENDER_FEMALE;
                        }
    
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 2, gender);
                        player->SetByteValue(PLAYER_BYTES_3, 0, gender);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Gender has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    /////////////////////////////////////////////////////////END OF GENDER CHANGE
    /////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////START OF RACE CHANGE
                    case GOSSIP_ACTION_INFO_DEF + 2 :
    
                            if((player->GetTeam() == ALLIANCE && player->getRace() != RACE_DRAENEI && player->getClass() != CLASS_WARLOCK && player->getClass() != CLASS_ROGUE && player->getClass() != CLASS_DRUID) && (player->getRace() == RACE_NIGHTELF || player->getRace() == RACE_HUMAN || player->getRace() == RACE_GNOME || player->getRace() == RACE_DWARF))
                                    player->ADD_GOSSIP_ITEM( 0, "~Draenei~"                            , 1, GOSSIP_ACTION_INFO_DEF + 200);
    
                            if((player->GetTeam() == ALLIANCE && player->getRace() != RACE_DWARF && player->getClass() != CLASS_WARLOCK && player->getClass() != CLASS_SHAMAN && player->getClass() != CLASS_MAGE && player->getClass() != CLASS_DRUID) && (player->getRace() == RACE_NIGHTELF || player->getRace() == RACE_HUMAN || player->getRace() == RACE_GNOME || player->getRace() == RACE_DRAENEI))
                                    player->ADD_GOSSIP_ITEM( 0, "~Dwarf~"                            , 1, GOSSIP_ACTION_INFO_DEF + 201);
    
                            if((player->GetTeam() == ALLIANCE && player->getRace() != RACE_GNOME) && (player->getClass() == CLASS_WARRIOR || player->getClass() == CLASS_ROGUE || player->getClass() == CLASS_MAGE || player->getClass() == CLASS_WARLOCK || player->getClass() == CLASS_DEATH_KNIGHT) && (player->getRace() == RACE_NIGHTELF || player->getRace() == RACE_HUMAN || player->getRace() == RACE_DWARF || player->getRace() == RACE_DRAENEI))
                                    player->ADD_GOSSIP_ITEM( 0, "~Gnome~"                            , 1, GOSSIP_ACTION_INFO_DEF + 202);
    
                            if((player->GetTeam() == ALLIANCE && player->getRace() != RACE_HUMAN && player->getClass() != CLASS_DRUID && player->getClass() != CLASS_SHAMAN && player->getClass() != CLASS_HUNTER) && (player->getRace() == RACE_NIGHTELF || player->getRace() == RACE_GNOME || player->getRace() == RACE_DWARF || player->getRace() == RACE_DRAENEI))
                                    player->ADD_GOSSIP_ITEM( 0, "~Human~"                            , 1, GOSSIP_ACTION_INFO_DEF + 203);
    
                            if((player->GetTeam() == ALLIANCE && player->getRace() != RACE_NIGHTELF && player->getClass() != CLASS_MAGE && player->getClass() != CLASS_PALADIN && player->getClass() != CLASS_SHAMAN && player->getClass() != CLASS_WARLOCK) && (player->getRace() == RACE_HUMAN || player->getRace() == RACE_GNOME || player->getRace() == RACE_DWARF || player->getRace() == RACE_DRAENEI))
                                    player->ADD_GOSSIP_ITEM( 0, "~Night Elf~"                            , 1, GOSSIP_ACTION_INFO_DEF + 204);
    
                            if((player->GetTeam() == HORDE && player->getRace() != RACE_BLOODELF && player->getClass() != CLASS_WARRIOR && player->getClass() != CLASS_SHAMAN && player->getClass() != CLASS_DRUID) &&  (player->getRace() == RACE_ORC || player->getRace() == RACE_TAUREN || player->getRace() == RACE_TROLL || player->getRace() == RACE_UNDEAD_PLAYER))
                                    player->ADD_GOSSIP_ITEM( 0, "~Blood Elf~"                            , 1, GOSSIP_ACTION_INFO_DEF + 205);
    
                            if((player->GetTeam() == HORDE && player->getRace() != RACE_ORC && player->getClass() != CLASS_MAGE && player->getClass() != CLASS_PALADIN && player->getClass() != CLASS_PRIEST && player->getClass() != CLASS_DRUID) &&  (player->getRace() == RACE_BLOODELF || player->getRace() == RACE_TAUREN || player->getRace() == RACE_TROLL || player->getRace() == RACE_UNDEAD_PLAYER))
                                player->ADD_GOSSIP_ITEM( 0, "~Orc~"                            , 1, GOSSIP_ACTION_INFO_DEF + 206);
                            
                            if((player->GetTeam() == HORDE && player->getRace() != RACE_TAUREN) && (player->getClass() == CLASS_WARRIOR || player->getClass() == CLASS_SHAMAN || player->getClass() == CLASS_HUNTER || player->getClass() == CLASS_DRUID || player->getClass() == CLASS_DEATH_KNIGHT) && (player->getRace() == RACE_BLOODELF || player->getRace() == RACE_ORC || player->getRace() == RACE_TROLL || player->getRace() == RACE_UNDEAD_PLAYER))
                                    player->ADD_GOSSIP_ITEM( 0, "~Tauren~"                            , 1, GOSSIP_ACTION_INFO_DEF + 207);
                            
                            if((player->GetTeam() == HORDE && player->getRace() != RACE_TROLL && player->getClass() != CLASS_WARLOCK && player->getClass() != CLASS_PALADIN && player->getClass() != CLASS_DRUID) &&  (player->getRace() == RACE_BLOODELF || player->getRace() == RACE_ORC || player->getRace() == RACE_TAUREN || player->getRace() == RACE_UNDEAD_PLAYER))
                                    player->ADD_GOSSIP_ITEM( 0, "~Troll~"                            , 1, GOSSIP_ACTION_INFO_DEF + 208);
                            
                            if((player->GetTeam() == HORDE && player->getRace() != RACE_UNDEAD_PLAYER && player->getClass() != CLASS_SHAMAN && player->getClass() != CLASS_PALADIN && player->getClass() != CLASS_HUNTER && player->getClass() != CLASS_DRUID) &&  (player->getRace() == RACE_BLOODELF || player->getRace() == RACE_ORC || player->getRace() == RACE_TAUREN || player->getRace() == RACE_TROLL))
                                    player->ADD_GOSSIP_ITEM( 0, "~Undead~"                            , 1, GOSSIP_ACTION_INFO_DEF + 209);
                            
                                    
                        player->ADD_GOSSIP_ITEM( 0, "~Main Menu~"                            , 1, GOSSIP_ACTION_INFO_DEF + 100);
                        player->SEND_GOSSIP_MENU(1619034,_Item->GetGUID());
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 200 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_DRAENEI);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
        
                    case GOSSIP_ACTION_INFO_DEF + 201 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_DWARF);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 202 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_GNOME);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 203 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_HUMAN);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 204 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_NIGHTELF);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 205 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_BLOODELF);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 206 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_ORC);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 207 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_TAUREN);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 208 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_TROLL);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 209 :
                        player->SetByteValue(UNIT_FIELD_BYTES_0, 0, RACE_UNDEAD_PLAYER);
                        player->InitDisplayIds();
                        player->GetSession()->SendAreaTriggerMessage("Please Relog.");
                        player->GetSession()->SendAreaTriggerMessage("Race has been changed!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
    /////////////////////////////////////////////////////////END OF RACE CHANGE
    /////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////START OF GM MENU
    
                    case GOSSIP_ACTION_INFO_DEF + 3 :
                        if(EventToggle == false)
                        player->ADD_GOSSIP_ITEM( 0, "~Enable Event~"                            , 1, GOSSIP_ACTION_INFO_DEF + 300);
    
                        if(EventToggle == true)
                        player->ADD_GOSSIP_ITEM( 0, "~Disable Event~"                            , 1, GOSSIP_ACTION_INFO_DEF + 301);
    
                        if(EventToggle == true)
                        player->ADD_GOSSIP_ITEM( 0, "~Reset Event Coords~"                            , 1, GOSSIP_ACTION_INFO_DEF + 302);
    
                        player->ADD_GOSSIP_ITEM( 0, "~Main Menu~"                            , 1, GOSSIP_ACTION_INFO_DEF + 100);
                        player->SEND_GOSSIP_MENU(1619034,_Item->GetGUID());
                        break;
    
    /////////////////////////////////////////////////////////END OF GM MENU
    /////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////START OF EVENT TELEPORTING
    
                    case GOSSIP_ACTION_INFO_DEF + 300 :
                        EventToggle = true;
                        eventx = player->GetPositionX();
                        eventy = player->GetPositionY();
                        eventz = player->GetPositionZ();
                        eventmapid = player->GetMapId();
                        player->GetSession()->SendAreaTriggerMessage("Don't Forget To Turn The Event Off When Your Done.");
                        player->GetSession()->SendAreaTriggerMessage("Your current position is now the event teleportation area.");
                        player->GetSession()->SendAreaTriggerMessage("Player Event Teleportation Has Been Enabled.");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 301 :
                        EventToggle = false;
                        player->GetSession()->SendAreaTriggerMessage("All Event Coordinates cleared!");
                        player->GetSession()->SendAreaTriggerMessage("Player Event Teleportation Has Been Disabled.");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 302 :
                        eventx = player->GetPositionX();
                        eventy = player->GetPositionY();
                        eventz = player->GetPositionZ();
                        eventmapid = player->GetMapId();
                        player->GetSession()->SendAreaTriggerMessage("Players can now port to the new coordinates.");
                        player->GetSession()->SendAreaTriggerMessage("Event Coordinates Reset!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
                    case GOSSIP_ACTION_INFO_DEF + 4 :
                        player->TeleportTo(eventmapid, eventx, eventy, eventz, 0);
                        player->GetSession()->SendAreaTriggerMessage("Please be patient and wait for further instructions.");
                        player->GetSession()->SendAreaTriggerMessage("You were successfully teleported to the event!");
                        player->CLOSE_GOSSIP_MENU();
                        break;
    
    /////////////////////////////////////////////////////////END OF EVENT TELEPORTING
    /////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////START OF MAIN MENU
    
                    case GOSSIP_ACTION_INFO_DEF + 100 :
                        GossipHello_ItemUse_GS_Changer(player,_Item,targets);
                        break;
    /////////////////////////////////////////////////////////END OF MAIN MENU
                  }
      return true;
    }
    
    
    void AddSC_GS_Changer()
    {
        Script *newscript;
        newscript = new Script;
        newscript->Name="item_gs_changer";
        newscript->pItemUse = GossipHello_ItemUse_GS_Changer;
        newscript->pGossipSelect_Item = GossipSelect_ItemUse_GS_Changer;
        newscript->RegisterSelf();
    }
    Buffer
    Code:
    /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation; either version 2 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     */
    
    /* ScriptData
    SDName: buffnpc
    SD%Complete: 100
    SDComment: Buff Master
    SDCategory: NPC
    EndScriptData */
    
    #include "precompiled.h"
    #include "../../../../shared/Config/Config.h"
    #include "../../config.h"
    #include "ScriptedPch.h"
    #include "WorldPacket.h"
    
    bool GossipHello_BuffNPC(Player* pPlayer, Creature* pCreature)
    {
        Config SD2Config;
        if(!SD2Config.SetSource(_SCRIPTDEV2_CONFIG,true))
            error_log("SD2: Unable to open configuration file");
    
        if(SD2Config.GetBoolDefault("BuffNPC.OnlyGMs", false)) // If BuffNPC.OnlyGMs is enabled in scriptdev2.conf
            if (pPlayer->GetSession()->GetSecurity() == SEC_PLAYER)
            {
                pCreature->MonsterWhisper("Sorry, I can only Buff game masters.", pPlayer->GetGUID());
                return true;
            }
    
        bool EnableSmallBuff = SD2Config.GetBoolDefault("BuffNPC.EnableSmallBuff", true);
        bool EnableGreatBuff = SD2Config.GetBoolDefault("BuffNPC.EnableGreatBuff", true);
        bool EnableGMBuff = SD2Config.GetBoolDefault("BuffNPC.EnableGMBuff", true);
        bool EnablePlayerTools = SD2Config.GetBoolDefault("BuffNPC.EnablePlayerTools", true);
        bool EnableResSickness = SD2Config.GetBoolDefault("BuffNPC.EnableRemoveResSickness", true);
        bool EnableGivemeGold = SD2Config.GetBoolDefault("BuffNPC.EnableGivemeGold", false);
    
        // Main Menu for Alliance
        if (pPlayer->GetTeam() == ALLIANCE)
        {
        // Check config if "Small  Buff " is enabled or not
        if(EnableSmallBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Small Buff ->"              , GOSSIP_SENDER_MAIN, 1000);
        // Check config if "Great Buff" is enabled or not
        if(EnableGreatBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Great Buff ->"              , GOSSIP_SENDER_MAIN, 2000);
        // Check config if "GM Buff" is enabled or not
        if(EnableGMBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "GM Buff ->"                 , GOSSIP_SENDER_MAIN, 3000);
        // Check config if "Player Tools" is enabled or not
        if(EnablePlayerTools)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Player Tools ->"            , GOSSIP_SENDER_MAIN, 4000);
        }
        else // Main Menu for Horde
        {
        // Check config if "Small  Buff " is enabled or not
        if(EnableSmallBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Small Buff ->"              , GOSSIP_SENDER_MAIN, 1000);
        // Check config if "Great Buff" is enabled or not
        if(EnableGreatBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Great Buff ->"              , GOSSIP_SENDER_MAIN, 2000);
        // Check config if "GM Buff" is enabled or not
        if(EnableGMBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "GM Buff ->"                 , GOSSIP_SENDER_MAIN, 3000);
        // Check config if "Player Tools" is enabled or not
        if(EnablePlayerTools)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Player Tools ->"            , GOSSIP_SENDER_MAIN, 4000);
        }
    
        // Check config file if "Remove res sickness" option is enabled or not
        if(EnableResSickness)
            pPlayer->ADD_GOSSIP_ITEM( 10, "Remove Resurrect Sickness" , GOSSIP_SENDER_MAIN, 5000);
    
        pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
    
    return true;
    }
    
    void SendDefaultMenu_BuffNPC(Player* pPlayer, Creature* pCreature, uint32 uiAction)
    {
    
    // Not allow in combat
    if (pPlayer->isInCombat())
    {
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL);
        return;
    }
    
    Config SD2Config;
    if(!SD2Config.SetSource(_SCRIPTDEV2_CONFIG,true))
            error_log("SD2: Unable to open configuration file");
        bool EnableSmallBuff = SD2Config.GetBoolDefault("BuffNPC.EnableSmallBuff", true);
        bool EnableGreatBuff = SD2Config.GetBoolDefault("BuffNPC.EnableGreatBuff", true);
        bool EnableGMBuff = SD2Config.GetBoolDefault("BuffNPC.EnableGMBuff", true);
        bool EnablePlayerTools = SD2Config.GetBoolDefault("BuffNPC.EnablePlayerTools", true);
        bool EnableResSickness = SD2Config.GetBoolDefault("BuffNPC.EnableRemoveResSickness", true);
        bool EnableGivemeGold = SD2Config.GetBoolDefault("BuffNPC.EnableGivemeGold", false);
    
    //Mony Check
    if (pPlayer->GetMoney() < (SD2Config.GetFloatDefault("BuffGoldCost",0)))
    {
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->MonsterWhisper("You don't have enough money.", pPlayer->GetGUID());
        return;
    }
    
    switch(uiAction)
    {
    
    case 1000: //Small  Buff
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Mark of the Wild"                , GOSSIP_SENDER_MAIN, 1001);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Thorns"                          , GOSSIP_SENDER_MAIN, 1005);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Amplify Magic"                   , GOSSIP_SENDER_MAIN, 1010);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Arcane Intellect"                , GOSSIP_SENDER_MAIN, 1015);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Dalaran Intellect"               , GOSSIP_SENDER_MAIN, 1020);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Dampen Magic"                    , GOSSIP_SENDER_MAIN, 1025);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Blessing of Kings"               , GOSSIP_SENDER_MAIN, 1030);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Blessing of Might"               , GOSSIP_SENDER_MAIN, 1035);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Blessing of Wisdom"              , GOSSIP_SENDER_MAIN, 1040);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Divine Spirit"                   , GOSSIP_SENDER_MAIN, 1045);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Power Word: Fortitude"           , GOSSIP_SENDER_MAIN, 1050);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Shadow Protection"               , GOSSIP_SENDER_MAIN, 1055);
            pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);
    
        pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
    break;
    
    case 2000: //Great Buff
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Gift of the Wild"                , GOSSIP_SENDER_MAIN, 2001);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Arcane Brilliance"               , GOSSIP_SENDER_MAIN, 2005);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Dalaran Brilliance"              , GOSSIP_SENDER_MAIN, 2010);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Greater Blessing of Kings"       , GOSSIP_SENDER_MAIN, 2015);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Greater Blessing of Might"       , GOSSIP_SENDER_MAIN, 2020);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Greater Blessing of Sanctuary"   , GOSSIP_SENDER_MAIN, 2025);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Greater Blessing of Wisdom"      , GOSSIP_SENDER_MAIN, 2030);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Prayer of Fortitude"             , GOSSIP_SENDER_MAIN, 2035);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Prayer of Shadow Protection"     , GOSSIP_SENDER_MAIN, 2040);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Prayer of Spirit"                , GOSSIP_SENDER_MAIN, 2045);
            pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);
    
        pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
    break;
    
    case 3000: //GM  Buff
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Agamaggan's Agility"             , GOSSIP_SENDER_MAIN, 3001);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Agamaggan's Strength"            , GOSSIP_SENDER_MAIN, 3005);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Armor Magic"                     , GOSSIP_SENDER_MAIN, 3010);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Armor Penetration"               , GOSSIP_SENDER_MAIN, 3015);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Increased Stamina"               , GOSSIP_SENDER_MAIN, 3020);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Razorhide"                       , GOSSIP_SENDER_MAIN, 3025);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Rising Spirit"                   , GOSSIP_SENDER_MAIN, 3030);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Spirit of the Wind"              , GOSSIP_SENDER_MAIN, 3035);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Wisdom of Agamaggan"             , GOSSIP_SENDER_MAIN, 3040);
            pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);
    
        pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
    break;
    
    case 4000: //Player Tools
        // Check config if "Give me Gold" is enabled or not
        if(EnableGivemeGold)
            pPlayer->ADD_GOSSIP_ITEM( 5, "Give me Gold"                            , GOSSIP_SENDER_MAIN, 4001);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Give me Soul Shards"                     , GOSSIP_SENDER_MAIN, 4005);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Heal me Please"                          , GOSSIP_SENDER_MAIN, 4010);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Heal me and party members Please"        , GOSSIP_SENDER_MAIN, 4015);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Conjure Refreshment"                     , GOSSIP_SENDER_MAIN, 4020);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Conjure Mana Gem"                        , GOSSIP_SENDER_MAIN, 4025);
            pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);
    
        pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
    break;
    
    case 5005: //Back To Main Menu
        // Main Menu for Alliance
        if (pPlayer->GetTeam() == ALLIANCE)
        {
        // Check config if "Small  Buff " is enabled or not
        if(EnableSmallBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Small Buff ->"              , GOSSIP_SENDER_MAIN, 1000);
        // Check config if "Great Buff" is enabled or not
        if(EnableGreatBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Great Buff ->"              , GOSSIP_SENDER_MAIN, 2000);
        // Check config if "GM Buff" is enabled or not
        if(EnableGMBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "GM Buff ->"                 , GOSSIP_SENDER_MAIN, 3000);
        // Check config if "Player Tools" is enabled or not
        if(EnablePlayerTools)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Player Tools ->"            , GOSSIP_SENDER_MAIN, 4000);
        }
        else // Main Menu for Horde
        {
        // Check config if "Small  Buff " is enabled or not
        if(EnableSmallBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Small Buff ->"              , GOSSIP_SENDER_MAIN, 1000);
        // Check config if "Great Buff" is enabled or not
        if(EnableGreatBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Great Buff ->"              , GOSSIP_SENDER_MAIN, 2000);
        // Check config if "GM Buff" is enabled or not
        if(EnableGMBuff)
            pPlayer->ADD_GOSSIP_ITEM( 7, "GM Buff ->"                 , GOSSIP_SENDER_MAIN, 3000);
        // Check config if "Player Tools" is enabled or not
        if(EnablePlayerTools)
            pPlayer->ADD_GOSSIP_ITEM( 7, "Player Tools ->"            , GOSSIP_SENDER_MAIN, 4000);
        }
    
        // Check if Ress Sickness option is enabled in scriptdev2.conf
        if(EnableResSickness)
            pPlayer->ADD_GOSSIP_ITEM( 10, "Remove Resurrect Sickness" , GOSSIP_SENDER_MAIN, 5000);
    
        pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
    break;
    
    //////////////////////////////////////////////////Small Buff///////////////////////////////////////////////////////////////
    
    case 1001: // Buff me Mark of the Wild
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,48469,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1005: // Buff me Thorns
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,53307,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1010: // Buff me Amplify Magic
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,43017,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1015: // Buff me Arcane Intellect
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,42995,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1020: // Buff me Dalaran Intellect
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,61024,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1025: // Buff me Dampen Magic
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,43015,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1030: // Buff me Blessing of Kings
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,20217,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1035: // Buff me Blessing of Might
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,48932,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1040: // Buff me Blessing of Wisdom
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,48936,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1045: // Buff me Divine Spirit
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,48073,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1050: // Buff me Power Word: Fortitude
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,48161,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 1055: // Buff me Shadow Protection
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,48169,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    //////////////////////////////////////////////////Great Buff///////////////////////////////////////////////////////////////
    
    case 2001: // Buff me Gift of the Wild
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,48470,true);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 2005: // Buff me Arcane Brilliance
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,43002,true);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 2010: // Buff me Dalaran Brilliance
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,61316,true);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 2015: // Buff me Greater Blessing of Kings
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,25898,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 2020: // Buff me Greater Blessing of Might
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,48934,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 2025: // Buff me Greater Blessing of Sanctuary
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,25899,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 2030: // Buff me Greater Blessing of Wisdom
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,48938,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 2035: // Buff me Prayer of Fortitude
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,48162,true);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 2040: // Buff me Prayer of Shadow Protection
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,48170,true);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 2045: // Buff me Prayer of Spirit
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,48074,true);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    //////////////////////////////////////////////////GM Buff///////////////////////////////////////////////////////////////
    
    case 3001: // Buff me Agamaggan's Agility
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,17013,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 3005: // Buff me Agamaggan's Strength
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,16612,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 3010: // Buff me Armor Magic
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,58453,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 3015: // Buff me Armor Penetration
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,34106,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 3020: // Buff me Increased Stamina
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,25661,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 3025: // Buff me Razorhide
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,16610,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 3030: // Buff me Rising Spirit
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,10767,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 3035: // Buff me Spirit of the Wind
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,16618,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 3040: // Buff me Wisdom of Agamaggan
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,7764,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    //////////////////////////////////////////////////Player Tools///////////////////////////////////////////////////////////////
    
    case 4001://Give me Gold
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,46642,false); // 5000 gold
    break;
    
    case 4005://Give me Soul Shards
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,24827,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 4010: // Heal me please
        pPlayer->CLOSE_GOSSIP_MENU();
        pCreature->CastSpell(pPlayer,38588,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 4015: // Heal me and party members Please
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,53251,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 4020: // Conjure Refreshment
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,42956,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 4025: // Conjure Mana Gem
        pPlayer->CLOSE_GOSSIP_MENU();
        pPlayer->CastSpell(pPlayer,42985,false);
        pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
    break;
    
    case 5000://Remove Res Sickness
        if(!pPlayer->HasAura(SPELL_ID_PASSIVE_RESURRECTION_SICKNESS,0))
        {
            pCreature->MonsterWhisper("You don't have resurrection sickness.", pPlayer->GetGUID());
            GossipHello_BuffNPC(pPlayer, pCreature);
            return;
        }
    
        pCreature->CastSpell(pPlayer,38588,false); // Healing effect
        pPlayer->RemoveAurasDueToSpell(SPELL_ID_PASSIVE_RESURRECTION_SICKNESS);
        pPlayer->CLOSE_GOSSIP_MENU();
    break;
    
     pPlayer->CLOSE_GOSSIP_MENU();
    
    } // end of switch
    } //end of function
    
    
    
    bool GossipSelect_BuffNPC(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
    {
        // Main menu
        if (uiSender == GOSSIP_SENDER_MAIN)
        SendDefaultMenu_BuffNPC(pPlayer, pCreature, uiAction);
    
    return true;
    }
    
    void AddSC_buffnpc()
    {
        Script *newscript;
    
        newscript = new Script;
        newscript->Name = "buffnpc";
        newscript->pGossipHello = &GossipHello_BuffNPC;
        newscript->pGossipSelect = &GossipSelect_BuffNPC;
        newscript->RegisterSelf();
    }
    Player Teleporter
    Code:
    /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation; either version 2 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     */
    
    /* ScriptData
    SDName: item_custom_summon
    SD%Complete: 100
    SDComment: Summon a NPC
    SDCategory: Items
    EndScriptData */
    
    #include "precompiled.h"
    
    bool ItemUse_item_custom_summon(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets)
    {
    if ((pPlayer->isInCombat()) || (pPlayer->isInFlight()) || (pPlayer->isDead()))
    {
          pPlayer->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT, pItem, NULL);
            return false;
    }
          pPlayer->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
    {
          pPlayer->SummonCreature(90002,pPlayer->GetPositionX() ,pPlayer->GetPositionY()+5, pPlayer->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
    }
            return false;
    }
    void AddSC_item_custom_summon()
    {
        Script *newscript;
    
          newscript = new Script;
        newscript->Name="item_custom_summon";
        newscript->pItemUse = &ItemUse_item_custom_summon;
        newscript->RegisterSelf();
    }
    Rename Npc
    Code:
    * Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation; either version 2 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     */
    
    /* ScriptData
    SDName: renamenpc
    SD%Complete: 100
    SDComment: Rename Master
    SDCategory: NPC
    EndScriptData */
    
    #include "precompiled.h"
    #include <cstring>
    extern DatabaseMysql SD2Database;
    
    bool GossipHello_RenameNPC(Player* pPlayer, Creature* pCreature)
    {
        pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, "Rename? Choose yes/no", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true);
        pPlayer->ADD_GOSSIP_ITEM(0, "You're not interested.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
    
        pPlayer->PlayerTalkClass->SendGossipMenu(907,pCreature->GetGUID());
        return true;
    }
    
    bool GossipSelect_RenameNPC(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
    {
        if (uiAction == GOSSIP_ACTION_INFO_DEF+2)
        {
            pCreature->MonsterWhisper("Mh ok. See ya!", pPlayer->GetGUID());
            pPlayer->CLOSE_GOSSIP_MENU();
        }
    
        return true;
    }
    
    bool GossipSelectWithCode_RenameNPC(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction, const char* sCode)
    {
        if (uiSender == GOSSIP_SENDER_MAIN)
        {
            switch (uiAction)
            {
            case GOSSIP_ACTION_INFO_DEF+1:
                if(std::strcmp(sCode, "yes") ==0)
                {
                    pCreature->MonsterWhisper("Your nick will change on next login!", pPlayer->GetGUID());
                    pPlayer->SetAtLoginFlag(AT_LOGIN_RENAME);
                    SD2Database.PExecute("UPDATE characters.characters SET at_login = at_login | '1' WHERE guid = '%u'", pPlayer->GetGUIDLow());
    
                    pPlayer->CLOSE_GOSSIP_MENU();
                }
                else if (std::strcmp(sCode, "no") ==0)
                {
                    pCreature->MonsterWhisper("Mmm take this!", pPlayer->GetGUID());
                    pCreature->CastSpell(pPlayer, 12826, true);
                }
                pPlayer->CLOSE_GOSSIP_MENU();
    
                return true;
            }
        }
    
        return false;
    }
    
    void AddSC_renamenpc()
    {
        Script *newscript;
    
          newscript = new Script;
        newscript->Name = "renamenpc";
        newscript->pGossipHello = &GossipHello_RenameNPC;
        newscript->pGossipSelect = &GossipSelect_RenameNPC;
        newscript->pGossipSelectWithCode = &GossipSelectWithCode_RenameNPC;
        newscript->RegisterSelf();
    }
    I take no credit for any of these scripts, I didn't make them I just though people may find them useful.
    EDIT:I have not tested these scripts, but I know when I was on his server they all worked. The race changer was my favoret, but in order to not be bugged you will need a recustomise.


    › See More: [C++] Share Epic Scripts

    Just got my pc back



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Contributor
    Pedregon's Avatar
    Join Date
    Jul 2008
    Posts
    89
    Post Thanks / Like
    Rep Power
    18
    Reputation
    81
    Thanks the scripts
    + rep

    edit:

    need to spread
    Last edited by Pedregon; 22-05-10 at 10:51 PM.

  4. #3
    Senior Sergeant
    MikExV™'s Avatar
    Join Date
    Feb 2010
    Location
    Ohio
    Posts
    117
    Post Thanks / Like
    Rep Power
    15
    Reputation
    35
    Thank you, and lol yeah... I do that all the time. Going to some one but I can't do it again yet.
    Last edited by MikExV™; 24-05-10 at 06:24 AM.

    Just got my pc back

  5. #4
    Beginner

    Join Date
    May 2010
    Posts
    2
    Post Thanks / Like
    Rep Power
    15
    Reputation
    1
    Hello i use Racechanger and RenameNPC ok but i have errors .... Rename is fast ... Rename npc has SD2 script"renamenpc" and i try "RenameNPC" but npc dysfunctional... Racechanger has error
    1>..\scripts\custom\racechanger.cpp(297) : error C2039: 'pGossipSelect_Item' : is not a member of 'Script'
    1> c:\users\glararan\desktop\new mangos\9839\src\bindings\scriptdev2\include\../ScriptMgr.h(29) : see declaration of 'Script'

    My ScriptMgr.h
    //Methods to be scripted
    bool (*pGossipHello )(Player*, Creature*);
    bool (*pGOGossipHello )(Player*, GameObject*);
    bool (*pQuestAccept )(Player*, Creature*, const Quest*);
    bool (*pGossipSelect )(Player*, Creature*, uint32, uint32);
    bool (*pGOGossipSelect )(Player*, GameObject*, uint32, uint32);
    bool (*pGossipSelectWithCode )(Player*, Creature*, uint32, uint32, const char*);
    bool (*pGOGossipSelectWithCode )(Player*, GameObject*, uint32, uint32, const char*);
    bool (*pQuestSelect )(Player*, Creature*, const Quest*);
    bool (*pQuestComplete )(Player*, Creature*, const Quest*);
    uint32 (*pNPCDialogStatus )(Player*, Creature*);
    uint32 (*pGODialogStatus )(Player*, GameObject*);
    bool (*pChooseReward )(Player*, Creature*, const Quest*, uint32);
    bool (*pItemHello )(Player*, Item*, const Quest*);
    bool (*pGOHello )(Player*, GameObject*);
    bool (*pAreaTrigger )(Player*, AreaTriggerEntry*);
    bool (*pItemQuestAccept )(Player*, Item*, const Quest*);
    bool (*pGOQuestAccept )(Player*, GameObject*, const Quest*);
    bool (*pGOChooseReward )(Player*, GameObject*, const Quest*, uint32);
    bool (*pItemUse )(Player*, Item*, SpellCastTargets const&);
    bool (*pEffectDummyCreature )(Unit*, uint32, SpellEffectIndex, Creature*);
    bool (*pEffectDummyGameObj )(Unit*, uint32, SpellEffectIndex, GameObject*);
    bool (*pEffectDummyItem )(Unit*, uint32, SpellEffectIndex, Item*);
    bool (*pEffectAuraDummy )(const Aura*, bool);



    Can you post me your Scriptmgr.h for add on apply it?

  6. #5
    Senior Sergeant
    MikExV™'s Avatar
    Join Date
    Feb 2010
    Location
    Ohio
    Posts
    117
    Post Thanks / Like
    Rep Power
    15
    Reputation
    35
    No clue, it could be a script error, or you. But I said I didn't test them so I am not 100% shore.

    Just got my pc back

  7. #6
    Contributor
    LiLLeCarl's Avatar
    Join Date
    Jan 2009
    Posts
    106
    Post Thanks / Like
    Rep Power
    17
    Reputation
    84

    Register to remove this ad
    Move this thread to mangos scripts cause its made for mangos
    Whos dat "LilleCarl"

    Its LilleCarl OMGBBQLOLZXD

 

 

Visitors found this page by searching for:

armor penetration trinitycore script c

if (pPlayer-&gt;GetTeam() == HORDE)

C share

pPlayer-&gt;ModifyMoney

how to remove rez sickness trinitycore

event finding eventzz.com

trinity c remove res sickness

warcraft item SummonCreature player

trinity session-&gt;sendareatriggermessage

trinitycore script name item

c share to facebook

event finding &amp; sharing eventzz.com

trinity c removing rez sickness

script armor penetration trinity core

SetByteValue(UNIT_FIELD_BYTES_0 2

arcemu C2039: : is not a member of Player

event finding &amp; sharing eventzz.com event finding &amp; sharing eventzz.com event finding &amp; sharing eventzz.com event finding &amp; sharing eventzz.com event finding &amp; sharing eventzz.com event finding &amp; sharing eventzz.com

pQuestAccept : is not a member of Script

SEO Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 07:37 AM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org