Ok Guys I Need Some Help Here
Im Working On a Repack Right Will....Im Having Some Problams With Ascent I Want Ascent To Have In The Scripts Kill Player Get Gold Die From other Player Lose 2 Gold Right Will.....I Had Alrdy C++ IT But It Wont Complie......
KillGold.Cpp
Code:
#include "StdAfx.h"
#include "Setup.h"
void OnKillPlayer( Player * killer, Player * victim)
{
uint32 killamount = 100000;
uint32 killcurrentgold = killer->GetUInt32Value(PLAYER_FIELD_COINAGE);
int32 killnewgold = killcurrentgold + killamount;
killer->SetUInt32Value(PLAYER_FIELD_COINAGE,killnewgold);
uint32 dieamount = 100000;
uint32 diecurrentgold = victim->GetUInt32Value(PLAYER_FIELD_COINAGE);
int32 dienewgold = diecurrentgold - dieamount;
victim->SetUInt32Value(PLAYER_FIELD_COINAGE,dienewgold);
}
void SetupGoldKill(ScriptMgr * mgr)
{
sScriptMgr.register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, OnKillPlayer);
}
Can Anyone Tell Me What Im Doing Wrong
Also I Have Setup.h
Code:
#ifndef INSTANCE_SCRIPTS_SETUP_H
#define INSTANCE_SCRIPTS_SETUP_H
void SetupGoldKill(ScriptMgr * mgr);
void SetupInnkeepers(ScriptMgr * mgr);
void SetupGuardGossip(ScriptMgr * mgr);
void SetupBattlemaster(ScriptMgr * mgr);
#endif
Done As Well Here's Other One
Setup.cpp
Code:
#include "StdAfx.h"
#include "Setup.h"
extern "C" SCRIPT_DECL uint32 _exp_get_version()
{
return MAKE_SCRIPT_VERSION(SCRIPTLIB_VERSION_MAJOR, SCRIPTLIB_VERSION_MINOR);
}
extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
{
return SCRIPT_TYPE_MISC;
}
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
SetupGoldKill(mgr);
SetupInnkeepers(mgr);
SetupBattlemaster(mgr);
SetupGuardGossip(mgr);
}
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
return TRUE;
}
#endif
An It Wont Complie.....Here a Error
Creating library ..\..\..\bin\debug\script_bin/GossipScripts.lib and object ..\..\..\bin\debug\script_bin/GossipScripts.exp
Setup.obj : error LNK2019: unresolved external symbol "void __cdecl SetupGoldKill(class ScriptMgr *)" (?SetupGoldKill@@YAXPAVScriptMgr@@@Z) referenced in function __exp_script_register
../../../bin/release/script_bin/GossipScripts.dll : fatal error LNK1120: 1 unresolved externals
It's The Only Error Im Getting