Code
Salanar The Horseman
--------------------------------------------------------------------------------
There were several things missing:
1. #include "precompiled.h"<-- it does contains classes like Player, Creature and Unit you need it in each script.
2. According to coding standarts of SD2 I dont know why each devisee have to have an p on begining so -> pCreature, pPlayer and pUnit.
3. DoCast was not fitting its also should be shown while compiling the script, so pPlayer->CastSpell(pPlayer, SPELL_RETURN_REALM, false);
4. Dont forget to close GOSSIP so: pPlayer->CLOSE_GOSSIP_MENU();
Hope that it does help you good luck
Full working script based on yours:
/* Copyright © 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: Salaran Horseman
SD%Complete: 0
SDComment:
SDCategory: Salaran Horseman
EndScriptData */
#include "precompiled.h"
#define GOSSIP_RETURN_REALM "I must return to the Realm of Shadows."
#define SPELL_RETURN_REALM 52693
bool GossipHello_npc_salanar_horseman(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (pPlayer->GetQuestStatus(12687) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RETURN_REALM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(9978,pCreature->GetGUID());
return true;
}
bool GossipSelect_npc_salanar_horseman(Player *pPlayer, Creature *pCreature, uint32 sender, uint32 action )
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
{
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer, SPELL_RETURN_REALM, false);
}
return true;
}
void AddSC_npc_salanar_horseman()
{
Script *newscript;
newscript = new Script;
newscript->Name = "npc_salanar_horseman";
newscript->pGossipHello = &GossipHello_npc_salanar_horseman;
newscript->pGossipSelect = &GossipSelect_npc_salanar_horseman;
newscript->RegisterSelf();
}
Это исправление для ScriptDev2, только вот как и куда его вставлять, знает ктонибудь? И если можно выложите его в форме патча.