hi all
i ahve tryd to make a script here but when i follow a vid from Tommy i get an error that his does not.
error: http://puu.sh/6bG4l.png
main cpp
and the .h
i ahve other questins too. i wonder cuz i sounds that you can do so mutch but he did never expain in a way so you as nood and never done c++ to undersand what he means^^ i don't mean anything rude i like his work and its a good wau to start as a noob, i think i will learn alot.
but that i want to know are as reword for winning how can i change the NPC faction so that i will be like WG? and can i make this so you can kill en npc and then you win or so that u start it but talking to an NPC and then select something from a Gossip?
i don't want you really to do it for me. i just want a really good explaintion on how to do it so i can learn instead of asking the next time and so on.
i have abit hard to undersand when someone just worte a pace of code and nothing more, its ok to change stuff what a diff coulor i will get that.^^
sorry for bad eng and bad explain.
if you want to u can hit me up on skype too the i will learn mutch faster^^
skype: qvika_gilla
u don't need to but u deside^^
i ahve tryd to make a script here but when i follow a vid from Tommy i get an error that his does not.
error: http://puu.sh/6bG4l.png
main cpp
Code:
#include "OutDorrPvP_QD.h"
OutdoorPvPSunwell::OutdoorPvPSunwell()
{
m_TypeId = OUTDOOR_PVP_QD;
hordeResources = 300;
allyResources = 300;
}
bool OutdoorPvPSunwell::SetupOutdoorPvP()
{
for (uint8 i = 0; i < sizeof(OutdoorPvPZone) / sizeof(uint32); ++i)
RegisterZone(OutdoorPvPZone[i[);
return true;
}
void OutdoorPvPSunwell::HandlePlayerEnterZone(Player* player, uint32 zone)
{
ChatHandler(player->GetSession()).SendSysMessage("You have Enter a PvP Zone!");
OutdoorPvP::HandlePlayerEnterZone(player, zone);
}
void OutdoorPvPSunwell::HandlePlayerLeaveZone(Player* player, uint32 zone)
{
OutdoorPvP::HandlePlayerLeaveZone(player, zone);
}
void OutdoorPvPSunwell::HandleKill(Player* player, Unit* killed)
{
OutdoorPvP::HandleKill(player, killed);
}
bool OutdoorPvPSunwell::Update(uint32 diff)
{
allyResources -= 3;
hordeResources -= 3;
if (allyResources <= 0)
{
// Horde Loses
}
if (hordeResources <= 0)
{
// Ally Loses
}
OutdoorPvP::Update(diff);
}
class pvp_resource_sunwell : public OutdoorPvPScript
{
public:
pvp_resource_sunwell() : OutdoorPvPScript ("pvp_resource_sunwell") { }
};
and the .h
Code:
#include "OutdoorPvP.h"
#include "OutdoorPvPMgr.h"
const uint32 OutdoorPvPZone [1] = { 4080 };
class OutdoorPvPSunwell : public OutdoorPvP
{
public:
OutdoorPvPSunwell();
bool SetupOutdoorPvP();
// Handle Join and Öeave Zone
void HandlePlayerEnterZone(Player* player, uint32 zone);
void HandöerPlayerLeaveZone(Player* player, uint32 zone);
void HandleKill(Player* player, Unit* killed);
bool Update(uint32 diff);
private:
uint32 hordeResources;
uint32 allyResources;
};
i ahve other questins too. i wonder cuz i sounds that you can do so mutch but he did never expain in a way so you as nood and never done c++ to undersand what he means^^ i don't mean anything rude i like his work and its a good wau to start as a noob, i think i will learn alot.
but that i want to know are as reword for winning how can i change the NPC faction so that i will be like WG? and can i make this so you can kill en npc and then you win or so that u start it but talking to an NPC and then select something from a Gossip?
i don't want you really to do it for me. i just want a really good explaintion on how to do it so i can learn instead of asking the next time and so on.
i have abit hard to undersand when someone just worte a pace of code and nothing more, its ok to change stuff what a diff coulor i will get that.^^
sorry for bad eng and bad explain.
if you want to u can hit me up on skype too the i will learn mutch faster^^
skype: qvika_gilla
u don't need to but u deside^^