xD cool well i got so many scripts i wanna have in my script here's the error
Code:
3>Setup.obj : error LNK2019: unresolved external symbol "void __cdecl SetupMorper(class ScriptMgr *)" (?SetupMorper@@YAXPAVScriptMgr@@@Z) referenced in function __exp_script_register
Morpher.cpp
Code:
#include "StdAfx.h"
#include "Setup.h"
#define MORPHER 123455
class SCRIPT_DECL Morpher : public GossipScript
{
public:
void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
void GossipEnd(Object * pObject, Player* Plr);
void Destroy()
{
delete this;
}
};
void Morpher::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
{
GossipMenu *Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
Menu->AddItem(0, "Goblin", 1);
Menu->AddItem(0, "Felguard", 2);
Menu->AddItem(0, "Broken", 3);
Menu->AddItem(0, "Ogre", 4);
Menu->AddItem(0, "Pirate", 5);
Menu->AddItem(0, "Skeleton", 6);
Menu->AddItem(2, "Demorph", 7);
Menu->SendTo(Plr);
}
//Defining Cases
void Morpher::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
{
GossipMenu * Menu;
switch(IntId)
{
case 0:
{
GossipHello(pObject, Plr, true);
}break;
case 1: //Goblin
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 7109);
}break;
case 2: //FelGuard
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 18287);
}break;
case 3: //Broken
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21105);
}break;
case 4: //Ogre
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 1122);
}break;
case 5: //Pirate
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 2347);
}break;
case 6: //Skeleton
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 17970);
}break;
case 7: //Demorphing :p
{
Plr->DeMorph();
}break;
}//switch
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
};
void Morpher::GossipEnd(Object * pObject, Player* Plr)
{
GossipScript::GossipEnd(pObject, Plr);
}
void SetupMorpher(ScriptMgr * mgr)
{
GossipScript * gs = (GossipScript*) new Morpher();
mgr->register_item_gossip_script(MORPHER, gs);
}
Setup.cpp
Code:
#include "StdAfx.h"
#include "Setup.h"
#define SKIP_ALLOCATOR_SHARING 1
#include <ScriptSetup.h>
extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
{
return SCRIPT_TYPE_MISC;
}
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr * mgr) // Comment any script to disable it
{
SetupMorper(mgr);
}
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
return TRUE;
}
#endif
and Setup.h
Code:
#ifndef MISC_SCRIPTS_SETUP_H
#define MISC_SCRIPTS_SETUP_H
void SetupMorper(ScriptMgr * mgr);
#endif
well i think its like the other one :P