Jump to content
  • Announcements

    • Xmat

      Pravidlo pro postování v TTT

      Do sekce Tipy, triky, tutoriály nepatří žádné dotazy.   Postujte sem vaše návody, tipy a různé další věci jež uznáte za vhodné sdělit zdejšímu osazenstvu, ale veškeré dotazy směřujte do sekce Všeobecná diskuse.
    • Replik

      Seznam návodů a důležitých témat v této sekci

      Pro lepší přehlednost jsem vytvořil tento seznam, který vás, méně zkušené, lépe provede touto sekcí. Věřím, že zde najdete, co hledáte. Vypsané jsou návody, které jsou oficiálně uznané jako návody. Běžné diskuze, které neposkytují postupy a rady zvěřejněny nejsou.   Instalace vlastního MaNGOS Serveru Díky těmto návodům budete (měli by jste být) schopni vytvořit a následně spustit váš vlastní server. Nastavení je pro verze s i bez datadisku.   Instalace MaNGOS Serveru (bez datadisku TBC) - Autor Benny Instalace MaNGOS Serveru (s datadiskem TBC) - Autor Malfik Instalace MaNGOS Serveru v prostředí Linux - Autor charlie Instalace MaNGOS Serveru v prostředí Linux - Autor kupkoid   Chyby a jejich řešení při přihlašování k serveru - Autor Cybe   Zálohování uživatelských dat   Dávkový soubor (BAT soubor) pro vytvoření SQL záloh - Autor Replik   Kompilování - tvoření vlastních release (revizí)   Tvorba kompilací pro Win32 (MangoScript) - Autor bLuma   Ostatní - těžko zařaditelné, ale neznamená to, že nejsou dobré   VIP Systém - Autor charlie Tvorba Webových stránek pro MaNGOS - Autor zahuba Tvorba teleportačních NPC (MangoScript) - Autor Replik Registrační web (původně předělaná SPORA) Funkční pro Antrix i MaNGOS - Autor Replik Nastavení a spuštění Minimanager pro MaNGOS - Autor BlackMartin Nastavení MaNGOS Website - Autor Artorius   Samozřejmě jsou zde i jiné návody, ale tyto jsou nejvíce používané, proto věřím, že vám budou nápomocné. Tuto sekci budeme upravovat podle potřeby. Pokud by jste něco nenašli nebo si nevěděli rady, hledejte na fóru a teprve potom založte vlastní topik. Pokud nějaký autor vytvoří kvalitní návod a chtěl by ho zveřejnit i v tomto seznamu, doporučuji, aby mi napsal zprávu skrze PM.   Díky a přeji hezký den na WoWResource   Replik
    • Aristo

      Příspěvky tam, kde nemají co dělat

      Dodržujte zákaz přispívání do topiků s repaky pokud si to zakladatelé nepřejí!! Opakované psaní příspěvků bude trestáno warnem.
    • Aristo

      Používání spoilerů

      Poslední dobou má většina uživatelů fora zvláštní nutkání postovat extrémně dlouhé texty nebo kódy, které zabírají v nejedenom případu i 80% obsahu celé stránky a hodně tak zvedají nepřehlednost v topiku. Chtěl bych všechny uživatele požádat, aby při postování citací, jakýchkoliv kódů, errorů, atp... delších než 30 řádků používali funkci spoileru.   Funkci vyvoláte příkazem [spoiler] text [/spoiler]   Ukázka:  
Sign in to follow this  
...::StyX::...

Problém c++

Recommended Posts

Zdravím, při přechodu z 3.3.3a na 3.3.5a mi nejdou skompilovat scripty, které jsem měl ve staré verzi u všech scriptů mi píše tuto chybu

 

/opt/335/trinityc/src/server/scripts/Custom/doctor.cpp: In function 'void AddSC_doctor()':
/opt/335/trinityc/src/server/scripts/Custom/doctor.cpp:168: error: 'Script' was not declared in this scope
/opt/335/trinityc/src/server/scripts/Custom/doctor.cpp:168: error: 'newscript' was not declared in this scope
/opt/335/trinityc/src/server/scripts/Custom/doctor.cpp:169: error: expected type-specifier before 'Script'
/opt/335/trinityc/src/server/scripts/Custom/doctor.cpp:169: error: expected `;' before 'Script'

 

Tady je kód doktora

 

#include "ScriptPCH.h"

#define MSG1                       100001
#define MSG2                    100002

bool GossipHello_doctor(Player *player, Creature *_creature)
{
       if (player->isInCombat())
       {
           player->CLOSE_GOSSIP_MENU();
           _creature->MonsterWhisper("You are in combat. Come back later!", player->GetGUID());
           return true;
        }

        player->SEND_GOSSIP_MENU(MSG1, _creature->GetGUID());

       player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 7001);
       player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 7002);
       player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 7003);
       if ( player->GetTeam() == ALLIANCE )
       {
       player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 7004);
       }
       if ( player->GetTeam() == HORDE )
       {
       player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 7005);
       }
       player->ADD_GOSSIP_ITEM(7, "Buffs", GOSSIP_SENDER_MAIN, 7006);
       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
       return true;
}

void SendDefaultMenu_doctor(Player *player, Creature *_creature, uint32 action )
{
       switch(action)
       {

       case 7000: //Menu - Main
               player->SEND_GOSSIP_MENU(MSG1, _creature->GetGUID());

               player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 7001);
               player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 7002);
               player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 7003);
               if ( player->GetTeam() == ALLIANCE )
               {
               player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 7004);
               }
               if ( player->GetTeam() == HORDE )
               {
               player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 7005);
               }
               player->ADD_GOSSIP_ITEM(11, "Buffs", GOSSIP_SENDER_MAIN, 7006);
               player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
               break;
       case 7001: //Restore Health
               player->CLOSE_GOSSIP_MENU();
               player->SetHealth(player->GetMaxHealth());
               player->CastSpell(player,61456,false);
               _creature->MonsterWhisper("Your Health has been restored.", player->GetGUID());
               break;
       case 7002: //Restore Mana
               player->CLOSE_GOSSIP_MENU();
               player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
               player->CastSpell(player,61456,false);
               _creature->MonsterWhisper("Your Mana has been restored.", player->GetGUID());
               break;
       case 7003: //Remove Cooldown
               player->CLOSE_GOSSIP_MENU();
               player->RemoveAllSpellCooldown();
               player->CastSpell(player,75459,false);
               _creature->MonsterWhisper("Your cooldowns have been removed.", player->GetGUID());
               break;
       case 7004: //Remove Exhaustion
               player->CLOSE_GOSSIP_MENU();
               player->RemoveAurasDueToSpell(57723);
               player->CastSpell(player,61456,false);
               _creature->MonsterWhisper("Exhaustion has been removed.", player->GetGUID());
               break;
       case 7005: //Remove Sated
               player->CLOSE_GOSSIP_MENU();
               player->RemoveAurasDueToSpell(57724);
               player->CastSpell(player,61456,false);          
               _creature->MonsterWhisper("Sated has been removed.", player->GetGUID());
               break;
       case 7006:
               player->SEND_GOSSIP_MENU(MSG2, _creature->GetGUID());
               player->ADD_GOSSIP_ITEM(5, "Arcane Intellect", GOSSIP_SENDER_MAIN, 9001);
               player->ADD_GOSSIP_ITEM(5, "Mark of the Wild", GOSSIP_SENDER_MAIN, 9002);
               player->ADD_GOSSIP_ITEM(5, "Thorns", GOSSIP_SENDER_MAIN, 9003);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Sanctuary", GOSSIP_SENDER_MAIN, 9004);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Might", GOSSIP_SENDER_MAIN, 9005);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Kings", GOSSIP_SENDER_MAIN, 9006);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Wisdom", GOSSIP_SENDER_MAIN, 9007);
               player->ADD_GOSSIP_ITEM(5, "Divine Spirit", GOSSIP_SENDER_MAIN, 9008);
               player->ADD_GOSSIP_ITEM(5, "Shadow Protection", GOSSIP_SENDER_MAIN, 9009);
               player->ADD_GOSSIP_ITEM(5, "Power Word: Fortitude", GOSSIP_SENDER_MAIN, 9010);
               player->ADD_GOSSIP_ITEM(11, "<- Back to Main Page", GOSSIP_SENDER_MAIN, 7000);
               player->ADD_GOSSIP_ITEM(11, "Close menu", GOSSIP_SENDER_MAIN, 9011);
               player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
               break;
       case 9001: // Buff me Arcane Intellect
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,42995,false);
               break;
       case 9002: // Buff me Mark of the Wild
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48469,false);
               break;
       case 9003: // Buff me Thorns
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,53307,false);
               break;
       case 9004: // Buff me Greater Blessing of Sanctuary
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,25899,false);
               break;
       case 9005: // Buff me Greater Blessing of Might
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48934,false);
               break;
       case 9006: // Buff me Greater Blessing of Kings
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,25898,false);
               break;
       case 9007: // Buff me Greater Blessing of Wisdom
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48938,false);
               break;
       case 9008: // Buff me Divine Spirit
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48073,false);
               break;
       case 9009: // Buff me Power Word: Fortitude
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48169,false);
               break;
       case 9010: // Buff me Shadow Protection
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48161,false);
               break;
       case 9011: //Close menu
               player->CLOSE_GOSSIP_MENU();
               break;
       default:
               break;
       }

}

bool GossipSelect_doctor(Player *player, Creature *_creature, uint32 sender, uint32 action)
{

       if (player->isInCombat())
       {
           player->CLOSE_GOSSIP_MENU();
           _creature->MonsterWhisper("You are in combat. Come back later!", player->GetGUID());
           return true;
       }

         // Main menu
         if (sender == GOSSIP_SENDER_MAIN)
         SendDefaultMenu_doctor( player, _creature, action );

return true;
}

void AddSC_doctor(){
       Script* newscript;
       newscript = new Script; 
       newscript->Name = "doctor";
       newscript->pGossipHello = &GossipHello_doctor;
       newscript->pGossipSelect = &GossipSelect_doctor;
       newscript->RegisterSelf();
        newscript->pItemHello = NULL;
        newscript->pGOHello = NULL;
        newscript->pAreaTrigger = NULL;
        newscript->pItemQuestAccept = NULL;
        newscript->pGOQuestAccept = NULL;
        newscript->pGOChooseReward = NULL;
}

 

 

Díky za radu

Share this post


Link to post
Share on other sites

Skús to takto:

 

 

#include "ScriptPCH.h"

#define MSG1                    100001
#define MSG2                    100002

bool GossipHello_doctor(Player *player, Creature *_creature)
{
       if (player->isInCombat())
       {
           player->CLOSE_GOSSIP_MENU();
           _creature->MonsterWhisper("You are in combat. Come back later!", player->GetGUID());
           return true;
        }

        player->SEND_GOSSIP_MENU(MSG1, _creature->GetGUID());

       player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 7001);
       player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 7002);
       player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 7003);
       if ( player->GetTeam() == ALLIANCE )
       {
       player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 7004);
       }
       if ( player->GetTeam() == HORDE )
       {
       player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 7005);
       }
       player->ADD_GOSSIP_ITEM(7, "Buffs", GOSSIP_SENDER_MAIN, 7006);
       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
       return true;
}

void SendDefaultMenu_doctor(Player *player, Creature *_creature, uint32 action )
{
       switch(action)
       {

       case 7000: //Menu - Main
               player->SEND_GOSSIP_MENU(MSG1, _creature->GetGUID());

               player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 7001);
               player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 7002);
               player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 7003);
               if ( player->GetTeam() == ALLIANCE )
               {
               player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 7004);
               }
               if ( player->GetTeam() == HORDE )
               {
               player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 7005);
               }
               player->ADD_GOSSIP_ITEM(11, "Buffs", GOSSIP_SENDER_MAIN, 7006);
               player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
               break;
       case 7001: //Restore Health
               player->CLOSE_GOSSIP_MENU();
               player->SetHealth(player->GetMaxHealth());
               player->CastSpell(player,61456,false);
               _creature->MonsterWhisper("Your Health has been restored.", player->GetGUID());
               break;
       case 7002: //Restore Mana
               player->CLOSE_GOSSIP_MENU();
               player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
               player->CastSpell(player,61456,false);
               _creature->MonsterWhisper("Your Mana has been restored.", player->GetGUID());
               break;
       case 7003: //Remove Cooldown
               player->CLOSE_GOSSIP_MENU();
               player->RemoveAllSpellCooldown();
               player->CastSpell(player,75459,false);
               _creature->MonsterWhisper("Your cooldowns have been removed.", player->GetGUID());
               break;
       case 7004: //Remove Exhaustion
               player->CLOSE_GOSSIP_MENU();
               player->RemoveAurasDueToSpell(57723);
               player->CastSpell(player,61456,false);
               _creature->MonsterWhisper("Exhaustion has been removed.", player->GetGUID());
               break;
       case 7005: //Remove Sated
               player->CLOSE_GOSSIP_MENU();
               player->RemoveAurasDueToSpell(57724);
               player->CastSpell(player,61456,false);          
               _creature->MonsterWhisper("Sated has been removed.", player->GetGUID());
               break;
       case 7006:
               player->SEND_GOSSIP_MENU(MSG2, _creature->GetGUID());
               player->ADD_GOSSIP_ITEM(5, "Arcane Intellect", GOSSIP_SENDER_MAIN, 9001);
               player->ADD_GOSSIP_ITEM(5, "Mark of the Wild", GOSSIP_SENDER_MAIN, 9002);
               player->ADD_GOSSIP_ITEM(5, "Thorns", GOSSIP_SENDER_MAIN, 9003);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Sanctuary", GOSSIP_SENDER_MAIN, 9004);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Might", GOSSIP_SENDER_MAIN, 9005);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Kings", GOSSIP_SENDER_MAIN, 9006);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Wisdom", GOSSIP_SENDER_MAIN, 9007);
               player->ADD_GOSSIP_ITEM(5, "Divine Spirit", GOSSIP_SENDER_MAIN, 9008);
               player->ADD_GOSSIP_ITEM(5, "Shadow Protection", GOSSIP_SENDER_MAIN, 9009);
               player->ADD_GOSSIP_ITEM(5, "Power Word: Fortitude", GOSSIP_SENDER_MAIN, 9010);
               player->ADD_GOSSIP_ITEM(11, "<- Back to Main Page", GOSSIP_SENDER_MAIN, 7000);
               player->ADD_GOSSIP_ITEM(11, "Close menu", GOSSIP_SENDER_MAIN, 9011);
               player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
               break;
       case 9001: // Buff me Arcane Intellect
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,42995,false);
               break;
       case 9002: // Buff me Mark of the Wild
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48469,false);
               break;
       case 9003: // Buff me Thorns
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,53307,false);
               break;
       case 9004: // Buff me Greater Blessing of Sanctuary
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,25899,false);
               break;
       case 9005: // Buff me Greater Blessing of Might
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48934,false);
               break;
       case 9006: // Buff me Greater Blessing of Kings
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,25898,false);
               break;
       case 9007: // Buff me Greater Blessing of Wisdom
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48938,false);
               break;
       case 9008: // Buff me Divine Spirit
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48073,false);
               break;
       case 9009: // Buff me Power Word: Fortitude
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48169,false);
               break;
       case 9010: // Buff me Shadow Protection
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48161,false);
               break;
       case 9011: //Close menu
               player->CLOSE_GOSSIP_MENU();
               break;
       default:
               break;
       }

}

bool GossipSelect_doctor(Player *player, Creature *_creature, uint32 sender, uint32 action)
{

       if (player->isInCombat())
       {
           player->CLOSE_GOSSIP_MENU();
           _creature->MonsterWhisper("You are in combat. Come back later!", player->GetGUID());
           return true;
       }

         // Main menu
         if (sender == GOSSIP_SENDER_MAIN)
         SendDefaultMenu_doctor( player, _creature, action );

return true;
}

void AddSC_doctor(){
       Script *newscript;
       newscript = new Script; 
       newscript->Name = "doctor";
       newscript->pGossipHello = &GossipHello_doctor;
       newscript->pGossipSelect = &GossipSelect_doctor;
       newscript->RegisterSelf();
        newscript->pItemHello = NULL;
        newscript->pGOHello = NULL;
        newscript->pAreaTrigger = NULL;
        newscript->pItemQuestAccept = NULL;
        newscript->pGOQuestAccept = NULL;
        newscript->pGOChooseReward = NULL;
}

 

 

Keď to nepôjde hoď sem nové errory čo to vypíše :).

Edited by SiLvEr

Share this post


Link to post
Share on other sites

Skús ešte toto a keď to nepôjde tak ... neviem mnoo :), mne sa to skompilovalo na najnovšej revke úplne v pohode ...

 

#include "ScriptPCH.h"

#define MSG1                    100001
#define MSG2                    100002

bool GossipHello_doctor(Player *player, Creature *_creature)
{
       if (player->isInCombat())
       {
           player->CLOSE_GOSSIP_MENU();
           _creature->MonsterWhisper("You are in combat. Come back later!", player->GetGUID());
           return true;
        }

        player->SEND_GOSSIP_MENU(MSG1, _creature->GetGUID());

       player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 7001);
       player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 7002);
       player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 7003);
       if ( player->GetTeam() == ALLIANCE )
       {
       player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 7004);
       }
       if ( player->GetTeam() == HORDE )
       {
       player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 7005);
       }
       player->ADD_GOSSIP_ITEM(7, "Buffs", GOSSIP_SENDER_MAIN, 7006);
       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
       return true;
}

void SendDefaultMenu_doctor(Player *player, Creature *_creature, uint32 action )
{
       switch(action)
       {

       case 7000: //Menu - Main
               player->SEND_GOSSIP_MENU(MSG1, _creature->GetGUID());

               player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 7001);
               player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 7002);
               player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 7003);
               if ( player->GetTeam() == ALLIANCE )
               {
               player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 7004);
               }
               if ( player->GetTeam() == HORDE )
               {
               player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 7005);
               }
               player->ADD_GOSSIP_ITEM(11, "Buffs", GOSSIP_SENDER_MAIN, 7006);
               player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
               break;
       case 7001: //Restore Health
               player->CLOSE_GOSSIP_MENU();
               player->SetHealth(player->GetMaxHealth());
               player->CastSpell(player,61456,false);
               _creature->MonsterWhisper("Your Health has been restored.", player->GetGUID());
               break;
       case 7002: //Restore Mana
               player->CLOSE_GOSSIP_MENU();
               player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
               player->CastSpell(player,61456,false);
               _creature->MonsterWhisper("Your Mana has been restored.", player->GetGUID());
               break;
       case 7003: //Remove Cooldown
               player->CLOSE_GOSSIP_MENU();
               player->RemoveAllSpellCooldown();
               player->CastSpell(player,75459,false);
               _creature->MonsterWhisper("Your cooldowns have been removed.", player->GetGUID());
               break;
       case 7004: //Remove Exhaustion
               player->CLOSE_GOSSIP_MENU();
               player->RemoveAurasDueToSpell(57723);
               player->CastSpell(player,61456,false);
               _creature->MonsterWhisper("Exhaustion has been removed.", player->GetGUID());
               break;
       case 7005: //Remove Sated
               player->CLOSE_GOSSIP_MENU();
               player->RemoveAurasDueToSpell(57724);
               player->CastSpell(player,61456,false);          
               _creature->MonsterWhisper("Sated has been removed.", player->GetGUID());
               break;
       case 7006:
               player->SEND_GOSSIP_MENU(MSG2, _creature->GetGUID());
               player->ADD_GOSSIP_ITEM(5, "Arcane Intellect", GOSSIP_SENDER_MAIN, 9001);
               player->ADD_GOSSIP_ITEM(5, "Mark of the Wild", GOSSIP_SENDER_MAIN, 9002);
               player->ADD_GOSSIP_ITEM(5, "Thorns", GOSSIP_SENDER_MAIN, 9003);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Sanctuary", GOSSIP_SENDER_MAIN, 9004);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Might", GOSSIP_SENDER_MAIN, 9005);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Kings", GOSSIP_SENDER_MAIN, 9006);
               player->ADD_GOSSIP_ITEM(5, "Greater Blessing of Wisdom", GOSSIP_SENDER_MAIN, 9007);
               player->ADD_GOSSIP_ITEM(5, "Divine Spirit", GOSSIP_SENDER_MAIN, 9008);
               player->ADD_GOSSIP_ITEM(5, "Shadow Protection", GOSSIP_SENDER_MAIN, 9009);
               player->ADD_GOSSIP_ITEM(5, "Power Word: Fortitude", GOSSIP_SENDER_MAIN, 9010);
               player->ADD_GOSSIP_ITEM(11, "<- Back to Main Page", GOSSIP_SENDER_MAIN, 7000);
               player->ADD_GOSSIP_ITEM(11, "Close menu", GOSSIP_SENDER_MAIN, 9011);
               player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
               break;
       case 9001: // Buff me Arcane Intellect
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,42995,false);
               break;
       case 9002: // Buff me Mark of the Wild
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48469,false);
               break;
       case 9003: // Buff me Thorns
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,53307,false);
               break;
       case 9004: // Buff me Greater Blessing of Sanctuary
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,25899,false);
               break;
       case 9005: // Buff me Greater Blessing of Might
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48934,false);
               break;
       case 9006: // Buff me Greater Blessing of Kings
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,25898,false);
               break;
       case 9007: // Buff me Greater Blessing of Wisdom
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48938,false);
               break;
       case 9008: // Buff me Divine Spirit
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48073,false);
               break;
       case 9009: // Buff me Power Word: Fortitude
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48169,false);
               break;
       case 9010: // Buff me Shadow Protection
               player->CLOSE_GOSSIP_MENU();
               _creature->CastSpell(player,48161,false);
               break;
       case 9011: //Close menu
               player->CLOSE_GOSSIP_MENU();
               break;
       default:
               break;
       }

}

bool GossipSelect_doctor(Player *player, Creature *_creature, uint32 sender, uint32 action)
{

       if (player->isInCombat())
       {
           player->CLOSE_GOSSIP_MENU();
           _creature->MonsterWhisper("You are in combat. Come back later!", player->GetGUID());
           return true;
       }

         // Main menu
         if (sender == GOSSIP_SENDER_MAIN)
         SendDefaultMenu_doctor( player, _creature, action );

return true;
}

void AddSC_doctor()
{
       Script *newscript;

       newscript = new Script; 
       newscript->Name = "doctor";
       newscript->pGossipHello = &GossipHello_doctor;
       newscript->pGossipSelect = &GossipSelect_doctor;
       newscript->RegisterSelf();

       newscript->pItemHello = NULL;
       newscript->pGOHello = NULL;
       newscript->pAreaTrigger = NULL;
       newscript->pItemQuestAccept = NULL;
       newscript->pGOQuestAccept = NULL;
       newscript->pGOChooseReward = NULL;
}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×