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:  
Cäsh

[c++] Doctor

Recommended Posts

Prepsano, snad bude funkcni :)

ScriptName je npc_doctor.

 

#include "ScriptPCH.h"

class npc_doctor : public CreatureScript
{
public:
   npc_doctor() : CreatureScript("npc_doctor") { }

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

       SendMainMenu(player, creature);
       return true;
}

bool OnGossipSelect(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;
       }

	player->PlayerTalkClass->ClearMenus();

       if (sender != GOSSIP_SENDER_MAIN)
		return true;

	switch(action)
       {
		case 7000: //Menu - Main
               SendMainMenu(player, creature);
               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->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;
       }

	return true;
}

private:
bool SendMainMenu(Player *player, Creature *creature)
{
       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);
       else 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 AddSC_custom_npc_doctor()
{
   new npc_doctor();
}

 

 

To si ho celého přepisoval, nebo to máš někde uložený? (PS: Hodili by se mi o ostatní scripty, co byly na Justice Instant, tak jestli nějaké máš a mohl by si mi je dát, byl bych ti zavázán. )

Share this post


Link to post
Share on other sites

Omlouvam se, nevsiml jsem si, ze to prepsal i wolf...

Jo, ale to už bylo trochu dýl, než bych si přál. A nauč se alespoň formátovat text C++ kódu.

Edited by Wolf Officious

Share this post


Link to post
Share on other sites

Prepsano, snad bude funkcni :)

ScriptName je npc_doctor.

 

#include "ScriptPCH.h"

class npc_doctor : public CreatureScript
{
public:
   npc_doctor() : CreatureScript("npc_doctor") { }

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

       SendMainMenu(player, creature);
       return true;
   }

   bool OnGossipSelect(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;
       }

       player->PlayerTalkClass->ClearMenus();

       if (sender != GOSSIP_SENDER_MAIN)
           return true;

       switch(action)
       {
           case 7000: //Menu - Main
               SendMainMenu(player, creature);
               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->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;
       }

       return true;
   }

private:
   bool SendMainMenu(Player *player, Creature *creature)
   {
       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);
       else 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 AddSC_custom_npc_doctor()
{
   new npc_doctor();
}

 

 

 

Creating library C:/Users/Admin/Desktop/TrinityCore-Build/src/server/worldserver/Release/worldserver.lib and object C:/Users/Admin/Desktop/TrinityCore-Build/src/server/worldserver/Release/worldserver.exp

3>game.lib(ScriptLoader.obj) : error LNK2019: unresolved external symbol "void __cdecl AddSC_npc_doctor(void)" (?AddSC_npc_doctor@@YAXXZ) referenced in function "void __cdecl AddCustomScripts(void)" (?AddCustomScripts@@YAXXZ)

3>C:\Users\Admin\Desktop\TrinityCore-Build\bin\Release\worldserver.exe : fatal error LNK1120: 1 unresolved externals

 

chyba.. a ScriptLoader.cpp bych měl mít dobře..

 

 

#ifdef SCRIPTS

//world

void AddSC_npc_teleport();

void AddSC_npc_customize();

void AddSC_npc_doctor();

 

 

#ifdef SCRIPTS

AddSC_npc_teleport();

AddSC_npc_customize();

AddSC_npc_doctor();

/* This is where custom scripts should be added. */

Edited by Ignitione

Share this post


Link to post
Share on other sites

Zapoměl jsi na slovíčko custom :D

void AddSC_custom_npc_doctor();

AddSC_custom_npc_doctor();

 

tak proč se mi všechny ostatní zkompilovali bez chyby a je tam jen void AddSC_npc_teleport(); atd.? :-O

Share this post


Link to post
Share on other sites

Blbě jsem to formuloval :D Ne že by tam slovo custom obecne hralo nejakou dulezitou roli, ale kdyz se kouknes na konec toho kodu tak tam mas

void AddSC_custom_npc_doctor()
{
   new npc_doctor();
}

Uz to vidis?

void AddSC_custom_npc_doctor()

Zalezi na tom jak se ta funkce jmenuje a ne, co je v ni :)

Share this post


Link to post
Share on other sites

Pro ty, co by chtěli v nových rev. na serveru tohohle Doktora!

 

Kompilace proběhne bez problémů ale když se zapíná Server tak to hodí, že program přestal pracovat..

 

Bohužel crashlog sem nechtěně smazal.

Share this post


Link to post
Share on other sites

Aktualizace / Upravil jsem to pro TC rev. 116xx+ (přibližně ze dne 17.4.2011)

(Našlo se tam pár chyb, nějaký věci jsem řešil trochu jinak, ale teď je to aktuální funkční.)

 

:diablo:ZDROJÁK:diablo:

 

#include "ScriptPCH.h"

class custom_npc_doctor : public CreatureScript
{
private:
   void InitMainMenu(Player *player, Creature *_creature)
   {
       player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 101);
       player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 102);
       player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 103);

       switch(player->GetTeam())
       {
       case ALLIANCE:
           player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 104);
           break;
       case HORDE:
           player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 105);
           break;
       default:
           break;
       }

       player->ADD_GOSSIP_ITEM(7, "Buffs", GOSSIP_SENDER_MAIN, 200);
       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
   }

public:
   custom_npc_doctor() : CreatureScript("custom_npc_doctor") { }

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

       InitMainMenu(player, _creature);
       return true;
   }

   bool OnGossipSelect(Player *player, Creature *_creature, uint32 sender, uint32 action)
   {
       player->PlayerTalkClass->ClearMenus();

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

       if(sender != GOSSIP_SENDER_MAIN)
           return true;

       if(action != 666 || action != 200)
           player->CLOSE_GOSSIP_MENU();

       switch(action)
       {
       /****************************************************************************************
        *  MAINS                                                                               *
        ****************************************************************************************/
       case 101: //Restore Health
           player->SetHealth(player->GetMaxHealth());
           player->CastSpell(player, 61456, false);
           _creature->MonsterWhisper("Your Health has been restored.", player->GetGUID());
           break;
       case 102: //Restore Mana
           player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
           player->CastSpell(player, 61456, false);
           _creature->MonsterWhisper("Your Mana has been restored.", player->GetGUID());
           break;
       case 103: //Remove Cooldown
           player->RemoveAllSpellCooldown();
           player->CastSpell(player, 75459, false);
           _creature->MonsterWhisper("Your cooldowns have been removed.", player->GetGUID());
           break;
       case 104: //Remove Exhaustion
           player->RemoveAurasDueToSpell(57723);
           player->CastSpell(player, 61456, false);
           _creature->MonsterWhisper("Exhaustion has been removed.", player->GetGUID());
           break;
       case 105: //Remove Sated
           player->RemoveAurasDueToSpell(57724);
           player->CastSpell(player, 61456, false);          
           _creature->MonsterWhisper("Sated has been removed.", player->GetGUID());
           break;

       /****************************************************************************************
        *  BUFFS                                                                               *
        ****************************************************************************************/
       case 200:
           player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect",              GOSSIP_SENDER_MAIN, 201);
           player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild",              GOSSIP_SENDER_MAIN, 202);
           player->ADD_GOSSIP_ITEM( 5, "Thorns",                        GOSSIP_SENDER_MAIN, 203);
           player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Sanctuary", GOSSIP_SENDER_MAIN, 204);
           player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Might",     GOSSIP_SENDER_MAIN, 205);
           player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Kings",     GOSSIP_SENDER_MAIN, 206);
           player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Wisdom",    GOSSIP_SENDER_MAIN, 207);
           player->ADD_GOSSIP_ITEM( 5, "Divine Spirit",                 GOSSIP_SENDER_MAIN, 208);
           player->ADD_GOSSIP_ITEM( 5, "Shadow Protection",             GOSSIP_SENDER_MAIN, 209);
           player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude",         GOSSIP_SENDER_MAIN, 210);
           player->ADD_GOSSIP_ITEM(11, "<- Back to Main Page",          GOSSIP_SENDER_MAIN, 666);
           player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
           break;
       case 201: // Arcane Intellect
           _creature->CastSpell(player, 42995, false);
           break;
       case 202: // Mark of the Wild
           _creature->CastSpell(player, 48469, false);
           break;
       case 203: // Thorns
           _creature->CastSpell(player, 53307, false);
           break;
       case 204: // Greater Blessing of Sanctuary
           _creature->CastSpell(player, 25899, false);
           break;
       case 205: // Greater Blessing of Might
           _creature->CastSpell(player, 48934, false);
           break;
       case 206: // Greater Blessing of Kings
           _creature->CastSpell(player, 25898, false);
           break;
       case 207: // Greater Blessing of Wisdom
           _creature->CastSpell(player, 48938, false);
           break;
       case 208: // Divine Spirit
           _creature->CastSpell(player, 48073, false);
           break;
       case 209: // Power Word: Fortitude
           _creature->CastSpell(player, 48169, false);
           break;
       case 210: // Shadow Protection
           _creature->CastSpell(player, 48161, false);
           break;

       /****************************************************************************************
        *  MAIN MENU                                                                           *
        ****************************************************************************************/
       case 666:
           InitMainMenu(player, _creature);
           break;
       default:
           player->CLOSE_GOSSIP_MENU();
           break;
       }

       return true;

   }
};

void AddSC_custom_npc_doctor()
{
   new custom_npc_doctor();
}

 

 

:beach:SQL :beach:

 

INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`)
VALUES('700015','0','0','0','0','0','23876','0','0','0','Doctor','ServerNAME','','0','80','80','1','35','35','1','1','1.14286','2','0','5000','5000','0','35000','10','1','0','1','512','0','0','0','0','0','0','10000','10000','68','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','3','20','20','20','0','0','0','0','0','0','0','0','255','0','0','0','custom_npc_doctor','0');

 

 

:blink:SCREEN :blink:

 

wowscrmzm.jpg

 

Edited by Wolf Officious
  • Upvote 2

Share this post


Link to post
Share on other sites

Supr, díky moc! A hele když kliknu na buff tak menu se closne.. Jak udělat, aby zůstalo i po kliknutí na buff.

Edited by Jamira

Share this post


Link to post
Share on other sites

Supr, díky moc! A hele když kliknu na buff tak menu se closne.. Jak udělat, aby zůstalo i po kliknutí na buff.

 

 

#include "ScriptPCH.h"

class custom_npc_doctor : public CreatureScript
{
private:
   void InitMainMenu(Player *player, Creature *_creature)
   {
       player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 101);
       player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 102);
       player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 103);

       switch(player->GetTeam())
       {
       case ALLIANCE:
           player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 104);
           break;
       case HORDE:
           player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 105);
           break;
       default:
           break;
       }

       player->ADD_GOSSIP_ITEM(7, "Buffs", GOSSIP_SENDER_MAIN, 200);
       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
   }

public:
   custom_npc_doctor() : CreatureScript("custom_npc_doctor") { }

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

       InitMainMenu(player, _creature);
       return true;
   }

   bool OnGossipSelect(Player *player, Creature *_creature, uint32 sender, uint32 action)
   {
       player->PlayerTalkClass->ClearMenus();

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

       if(sender != GOSSIP_SENDER_MAIN)
           return true;

     //if(action != 666 || action != 200)
     //    player->CLOSE_GOSSIP_MENU();

       switch(action)
       {
       /****************************************************************************************
        *  MAINS                                                                               *
        ****************************************************************************************/
       case 101: //Restore Health
           player->SetHealth(player->GetMaxHealth());
           player->CastSpell(player, 61456, false);
           _creature->MonsterWhisper("Your Health has been restored.", player->GetGUID());
           break;
       case 102: //Restore Mana
           player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
           player->CastSpell(player, 61456, false);
           _creature->MonsterWhisper("Your Mana has been restored.", player->GetGUID());
           break;
       case 103: //Remove Cooldown
           player->RemoveAllSpellCooldown();
           player->CastSpell(player, 75459, false);
           _creature->MonsterWhisper("Your cooldowns have been removed.", player->GetGUID());
           break;
       case 104: //Remove Exhaustion
           player->RemoveAurasDueToSpell(57723);
           player->CastSpell(player, 61456, false);
           _creature->MonsterWhisper("Exhaustion has been removed.", player->GetGUID());
           break;
       case 105: //Remove Sated
           player->RemoveAurasDueToSpell(57724);
           player->CastSpell(player, 61456, false);          
           _creature->MonsterWhisper("Sated has been removed.", player->GetGUID());
           break;

       /****************************************************************************************
        *  BUFFS                                                                               *
        ****************************************************************************************/
       case 200:
           player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect",              GOSSIP_SENDER_MAIN, 201);
           player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild",              GOSSIP_SENDER_MAIN, 202);
           player->ADD_GOSSIP_ITEM( 5, "Thorns",                        GOSSIP_SENDER_MAIN, 203);
           player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Sanctuary", GOSSIP_SENDER_MAIN, 204);
           player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Might",     GOSSIP_SENDER_MAIN, 205);
           player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Kings",     GOSSIP_SENDER_MAIN, 206);
           player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Wisdom",    GOSSIP_SENDER_MAIN, 207);
           player->ADD_GOSSIP_ITEM( 5, "Divine Spirit",                 GOSSIP_SENDER_MAIN, 208);
           player->ADD_GOSSIP_ITEM( 5, "Shadow Protection",             GOSSIP_SENDER_MAIN, 209);
           player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude",         GOSSIP_SENDER_MAIN, 210);
           player->ADD_GOSSIP_ITEM(11, "<- Back to Main Page",          GOSSIP_SENDER_MAIN, 666);
           player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
           break;
       case 201: // Arcane Intellect
           _creature->CastSpell(player, 42995, false);
           break;
       case 202: // Mark of the Wild
           _creature->CastSpell(player, 48469, false);
           break;
       case 203: // Thorns
           _creature->CastSpell(player, 53307, false);
           break;
       case 204: // Greater Blessing of Sanctuary
           _creature->CastSpell(player, 25899, false);
           break;
       case 205: // Greater Blessing of Might
           _creature->CastSpell(player, 48934, false);
           break;
       case 206: // Greater Blessing of Kings
           _creature->CastSpell(player, 25898, false);
           break;
       case 207: // Greater Blessing of Wisdom
           _creature->CastSpell(player, 48938, false);
           break;
       case 208: // Divine Spirit
           _creature->CastSpell(player, 48073, false);
           break;
       case 209: // Power Word: Fortitude
           _creature->CastSpell(player, 48169, false);
           break;
       case 210: // Shadow Protection
           _creature->CastSpell(player, 48161, false);
           break;

       /****************************************************************************************
        *  MAIN MENU                                                                           *
        ****************************************************************************************/
       case 666:
           InitMainMenu(player, _creature);
           break;
       default:
           player->CLOSE_GOSSIP_MENU();
           break;
       }

       return true;

   }
};

void AddSC_custom_npc_doctor()
{
   new custom_npc_doctor();
}

 

Takhle se nebude zavírat po kliknutí na volbu.. Ale nedoporučuju to používat..

Edited by Wolf Officious
  • Upvote 2

Share this post


Link to post
Share on other sites

Megamrtěmocvyhuštěněkrutý dostáváš +1 todle sem dlouuuho hledal, díky moc, seš moje láska, miluju tě, chci ti stát poboku a držet tě za tvou ladnou ručku a letmo se jí dotejkat, když zrovna programuješ scripty

:DD to bylo tak těžký ? :D

 

Ale jinak + rep diky urcite nabídnu serveru.

Share this post


Link to post
Share on other sites

Zdravým Wolfe,

prvý script funguje super len pri tom druhom ako sa nemá zatvoriť okno - keď klikneš na spell, buffne ťa a na iné sa síce dá kliknúť ale nič to nespraví...

Mohol by niekto pomôcť ... ?

Díki ...

 

 

 

 

#include "ScriptPCH.h"

 

class custom_npc_doctor : public CreatureScript

{

private:

void InitMainMenu(Player *player, Creature *_creature)

{

player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 101);

player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 102);

player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 103);

 

switch(player->GetTeam())

{

case ALLIANCE:

player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 104);

break;

case HORDE:

player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 105);

break;

default:

break;

}

 

player->ADD_GOSSIP_ITEM(7, "Buffs", GOSSIP_SENDER_MAIN, 200);

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

}

 

public:

custom_npc_doctor() : CreatureScript("custom_npc_doctor") { }

 

bool OnGossipHello(Player *player, Creature *_creature)

{

if(player->isInCombat())

{

player->CLOSE_GOSSIP_MENU();

_creature->MonsterWhisper("You are in combat. Come back later!", player->GetGUID());

return true;

}

 

InitMainMenu(player, _creature);

return true;

}

 

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

{

player->PlayerTalkClass->ClearMenus();

 

if(player->isInCombat())

{

player->CLOSE_GOSSIP_MENU();

_creature->MonsterWhisper("You are in combat. Come back later!", player->GetGUID());

return true;

}

 

if(sender != GOSSIP_SENDER_MAIN)

return true;

 

//if(action != 666 || action != 200)

// player->CLOSE_GOSSIP_MENU();

 

switch(action)

{

/****************************************************************************************

* MAINS *

****************************************************************************************/

case 101: //Restore Health

player->SetHealth(player->GetMaxHealth());

player->CastSpell(player, 61456, false);

_creature->MonsterWhisper("Your Health has been restored.", player->GetGUID());

break;

case 102: //Restore Mana

player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));

player->CastSpell(player, 61456, false);

_creature->MonsterWhisper("Your Mana has been restored.", player->GetGUID());

break;

case 103: //Remove Cooldown

player->RemoveAllSpellCooldown();

player->CastSpell(player, 75459, false);

_creature->MonsterWhisper("Your cooldowns have been removed.", player->GetGUID());

break;

case 104: //Remove Exhaustion

player->RemoveAurasDueToSpell(57723);

player->CastSpell(player, 61456, false);

_creature->MonsterWhisper("Exhaustion has been removed.", player->GetGUID());

break;

case 105: //Remove Sated

player->RemoveAurasDueToSpell(57724);

player->CastSpell(player, 61456, false);

_creature->MonsterWhisper("Sated has been removed.", player->GetGUID());

break;

 

/****************************************************************************************

* BUFFS *

****************************************************************************************/

case 200:

player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect", GOSSIP_SENDER_MAIN, 201);

player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild", GOSSIP_SENDER_MAIN, 202);

player->ADD_GOSSIP_ITEM( 5, "Thorns", GOSSIP_SENDER_MAIN, 203);

player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Sanctuary", GOSSIP_SENDER_MAIN, 204);

player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Might", GOSSIP_SENDER_MAIN, 205);

player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Kings", GOSSIP_SENDER_MAIN, 206);

player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Wisdom", GOSSIP_SENDER_MAIN, 207);

player->ADD_GOSSIP_ITEM( 5, "Divine Spirit", GOSSIP_SENDER_MAIN, 208);

player->ADD_GOSSIP_ITEM( 5, "Shadow Protection", GOSSIP_SENDER_MAIN, 209);

player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude", GOSSIP_SENDER_MAIN, 210);

player->ADD_GOSSIP_ITEM(11, "<- Back to Main Page", GOSSIP_SENDER_MAIN, 666);

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

break;

case 201: // Arcane Intellect

_creature->CastSpell(player, 42995, false);

break;

case 202: // Mark of the Wild

_creature->CastSpell(player, 48469, false);

break;

case 203: // Thorns

_creature->CastSpell(player, 53307, false);

break;

case 204: // Greater Blessing of Sanctuary

_creature->CastSpell(player, 25899, false);

break;

case 205: // Greater Blessing of Might

_creature->CastSpell(player, 48934, false);

break;

case 206: // Greater Blessing of Kings

_creature->CastSpell(player, 25898, false);

break;

case 207: // Greater Blessing of Wisdom

_creature->CastSpell(player, 48938, false);

break;

case 208: // Divine Spirit

_creature->CastSpell(player, 48073, false);

break;

case 209: // Power Word: Fortitude

_creature->CastSpell(player, 48169, false);

break;

case 210: // Shadow Protection

_creature->CastSpell(player, 48161, false);

break;

 

/****************************************************************************************

* MAIN MENU *

****************************************************************************************/

case 666:

InitMainMenu(player, _creature);

break;

default:

player->CLOSE_GOSSIP_MENU();

break;

}

 

return true;

 

}

};

 

void AddSC_custom_npc_doctor()

{

new custom_npc_doctor();

}

 

 

 

Edited by SkullCrack

Share this post


Link to post
Share on other sites

Jo, skulle, to jsem udělal blbě, to přiznávám. Má se znovu odesílat menu po každým kliknutí na option. :pinch:

 

EDIT: Zkus tohle, psal jsem to sice na slepo, ale mělo by to jít. Dal bych za to ruku do ohně :diablo::D

 

#include "ScriptPCH.h"

class custom_npc_doctor : public CreatureScript
{
private:
   void SendMainMenu(Player *player, Creature *_creature)
   {
       player->ADD_GOSSIP_ITEM(5, "Restore Health", GOSSIP_SENDER_MAIN, 101);
       player->ADD_GOSSIP_ITEM(5, "Restore Mana", GOSSIP_SENDER_MAIN, 102);
       player->ADD_GOSSIP_ITEM(5, "Remove Cooldown", GOSSIP_SENDER_MAIN, 103);

       switch(player->GetTeam())
       {
       case ALLIANCE:
           player->ADD_GOSSIP_ITEM(5, "Remove Exhaustion", GOSSIP_SENDER_MAIN, 104);
           break;
       case HORDE:
           player->ADD_GOSSIP_ITEM(5, "Remove Sated", GOSSIP_SENDER_MAIN, 105);
           break;
       default:
           break;
       }

       player->ADD_GOSSIP_ITEM(7, "Buffs", GOSSIP_SENDER_MAIN, 200);
       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
   }

   void SendSubMenu(Player *player, Creature *_creature)
   {
       player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect",              GOSSIP_SENDER_MAIN, 201);
       player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild",              GOSSIP_SENDER_MAIN, 202);
       player->ADD_GOSSIP_ITEM( 5, "Thorns",                        GOSSIP_SENDER_MAIN, 203);
       player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Sanctuary", GOSSIP_SENDER_MAIN, 204);
       player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Might",     GOSSIP_SENDER_MAIN, 205);
       player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Kings",     GOSSIP_SENDER_MAIN, 206);
       player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Wisdom",    GOSSIP_SENDER_MAIN, 207);
       player->ADD_GOSSIP_ITEM( 5, "Divine Spirit",                 GOSSIP_SENDER_MAIN, 208);
       player->ADD_GOSSIP_ITEM( 5, "Shadow Protection",             GOSSIP_SENDER_MAIN, 209);
       player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude",         GOSSIP_SENDER_MAIN, 210);
       player->ADD_GOSSIP_ITEM(11, "<- Back to Main Page",          GOSSIP_SENDER_MAIN, 666);
       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
   }

public:
   custom_npc_doctor() : CreatureScript("custom_npc_doctor") { }

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

       SendMainMenu(player, _creature);
       return true;
   }

   bool OnGossipSelect(Player *player, Creature *_creature, uint32 sender, uint32 action)
   {
       player->PlayerTalkClass->ClearMenus();

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

       if(sender != GOSSIP_SENDER_MAIN)
           return true;

       switch(action)
       {
       /****************************************************************************************
        *  MAINS                                                                               *
        ****************************************************************************************/
       case 101: //Restore Health
           player->SetHealth(player->GetMaxHealth());
           player->CastSpell(player, 61456, false);
           _creature->MonsterWhisper("Your Health has been restored.", player->GetGUID());
           break;
       case 102: //Restore Mana
           player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
           player->CastSpell(player, 61456, false);
           _creature->MonsterWhisper("Your Mana has been restored.", player->GetGUID());
           break;
       case 103: //Remove Cooldown
           player->RemoveAllSpellCooldown();
           player->CastSpell(player, 75459, false);
           _creature->MonsterWhisper("Your cooldowns have been removed.", player->GetGUID());
           break;
       case 104: //Remove Exhaustion
           player->RemoveAurasDueToSpell(57723);
           player->CastSpell(player, 61456, false);
           _creature->MonsterWhisper("Exhaustion has been removed.", player->GetGUID());
           break;
       case 105: //Remove Sated
           player->RemoveAurasDueToSpell(57724);
           player->CastSpell(player, 61456, false);          
           _creature->MonsterWhisper("Sated has been removed.", player->GetGUID());
           break;

       /****************************************************************************************
        *  BUFFS                                                                               *
        ****************************************************************************************/
       case 200:
           //SendSubMenu(player, _creature);
           break;
       case 201: // Arcane Intellect
           _creature->CastSpell(player, 42995, false);
           break;
       case 202: // Mark of the Wild
           _creature->CastSpell(player, 48469, false);
           break;
       case 203: // Thorns
           _creature->CastSpell(player, 53307, false);
           break;
       case 204: // Greater Blessing of Sanctuary
           _creature->CastSpell(player, 25899, false);
           break;
       case 205: // Greater Blessing of Might
           _creature->CastSpell(player, 48934, false);
           break;
       case 206: // Greater Blessing of Kings
           _creature->CastSpell(player, 25898, false);
           break;
       case 207: // Greater Blessing of Wisdom
           _creature->CastSpell(player, 48938, false);
           break;
       case 208: // Divine Spirit
           _creature->CastSpell(player, 48073, false);
           break;
       case 209: // Power Word: Fortitude
           _creature->CastSpell(player, 48169, false);
           break;
       case 210: // Shadow Protection
           _creature->CastSpell(player, 48161, false);
           break;

       /****************************************************************************************
        *  MAIN MENU                                                                           *
        ****************************************************************************************/
       case 666:
           SendMainMenu(player, _creature);
           break;
       default:
           player->CLOSE_GOSSIP_MENU();
           return true;
       }

       if(action >= 100 && action < 200)
           SendMainMenu(player, _creature);

       if(action >= 200 && action < 300)
           SendSubMenu(player, _creature);

       return true;
   }
};

void AddSC_custom_npc_doctor()
{
   new custom_npc_doctor();
}

 

 

EDIT2: Když na to teď tak koukám, mohl bych udělat to, že když buff už hráč bude mít, tak se mu v gossip menu nezobrazí. (zmizí po nabufování a oběví se zas až bude mít hráč buff pryč)

Edited by Wolf Officious
  • Upvote 1

Share this post


Link to post
Share on other sites

Chtěl bych se dopředu moc omluvit za obnovení starého topicu. Chtěl bych se zeptat na předchozích revizích mi tento doctor od wolfa šel ale na nových revizich už to nechce castit buffy typu "Greater Blessing of Wisdom" tam je problém že je k tomu buffu zapotřebí ITEM neví někdo jak to prosím vás opravit?

 

Ještě jednou se omlouvám za obnovení.

Share this post


Link to post
Share on other sites

nekolik moznosti bud editovat dbccko nebo ve spellmgr pripsat ze ten spell nepotrebuje reagent

nebo udelat vyjimku ze kdyz to casti tohle npccko tak se to na to nebude ptat

nebo to prepsat jako addaura kde se to nepta na tyhle veci :-)

Share this post


Link to post
Share on other sites

jinak to osetreni blessingu je celkem k nicemu mel by to resit spell_linked_spell pripadne spell_stack

Share this post


Link to post
Share on other sites

Jen tak dopředu jsem C++ n00b a abych přišel na metodu addaura .... to je daleko :D

 

misto _creature->CastSpell(player,xxxx,false); das _creature->AddAura(idspellu, player); ale slo by to i player->AddAura(idspellu); zbytecny, aby caster byl NPC :-) ale tohle je mega jednoduchy, to zvladnes :P

Edited by HyN3Q

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


×