Register for your free account! | Forgot your password?

You last visited: Today at 09:27

  • Please register to post and access all features, it's quick, easy and FREE!

 

TrinityCore C++ Script Fehler

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2014
Posts: 16
Received Thanks: 0
Arrow TrinityCore C++ Script Fehler

Hallo liebe leute,
ich habe mal einen neuen script entdeckt der sich Killstream nennt...
Ich wollte es so in meinem Server haben das man bei dem 10ten Kill anfängt mit den ganzen streaks und es bis zu den 50ten kill geht...
Doch leider habe ich beim kompliren wieder einen fehler...
Quote:
/TrinityCore/src/server/scripts/Custom/System_OnPVPKill.cpp: In member function 'virtual void System_OnPvPKill::OnPVPKill(Player*, Player*)':
/TrinityCore/src/server/scripts/Custom/System_OnPVPKill.cpp:35:120: error: cannot pass objects of non-trivially-copyable type 'const string {aka const class std::basic_string<char>}' through '...'
compilation terminated due to -Wfatal-errors.
make[2]: *** [src/server/scripts/CMakeFiles/scripts.dir/Custom/System_OnPVPKill.cpp.o] Error 1
make[1]: *** [src/server/scripts/CMakeFiles/scripts.dir/all] Error 2
make: *** [all] Error 2
Und der komplette script:
Quote:
class System_OnPvPKill : public PlayerScript
{
public:
System_OnPvPKill() : PlayerScript("System_OnPvPKill") { }

struct SystemInfo
{
uint32 KillStreak;
uint32 LastGUIDKill;
};

static std::map<uint32, SystemInfo> KillingStreak;

void OnPVPKill(Player *pKiller, Player *pVictim)
{
uint32 kGUID;
uint32 vGUID;
kGUID = pKiller->GetGUID();
vGUID = pVictim->GetGUID();
if(kGUID == vGUID)
return;
if(KillingStreak[kGUID].LastGUIDKill == vGUID)
return;
KillingStreak[kGUID].KillStreak++;
KillingStreak[vGUID].KillStreak = 0;
KillingStreak[kGUID].LastGUIDKill = vGUID;
KillingStreak[vGUID].LastGUIDKill = 0;

switch(KillingStreak[kGUID].KillStreak)
{
char msg[500];

case 10:
pKiller->AddItem(29434, 15);
sprintf(msg, "[PvP System]: %s killed %s and is on a kill streak! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;


case 20:
pKiller->AddItem(29434, 25);
sprintf(msg, "[PvP System]: %s killed %s and is on a RaMpAgE! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;


case 30:
pKiller->AddItem(29434, 35);
sprintf(msg, "[PvP System]: %s killed %s and is Unstoppable! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;


case 40:
pKiller->AddItem(29434, 45);
sprintf(msg, "[PvP System]: %s killed %s and is DOMINATING! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;


case 50:
pKiller->AddItem(29434, 55);
sprintf(msg, "[PvP System]: %s killed %s and is Godlike! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
KillingStreak[kGUID].KillStreak = 0;
break;
}
}
};

void AddSC_System_OnPvPkill()
{
new System_OnPvPKill;
}
Danke euch



newbieON is offline  
Old   #2
 
elite*gold: 2703
Join Date: Jul 2010
Posts: 6,451
Received Thanks: 1,232
Woher hast du denn das Script? Evtl. verlinkst du auch mal deine Source, denn hier fehlt einiges.


°"Crazy"° is offline  
Old   #3
 
elite*gold: 0
Join Date: Feb 2014
Posts: 16
Received Thanks: 0
Ich habe das script von emudevs.com und das ganze script geschrieben von Tommy

Quote:
class System_OnPvPKill : public PlayerScript
{
public:
System_OnPvPKill() : PlayerScript("System_OnPvPKill") { }

struct SystemInfo
{
uint32 KillStreak;
uint32 LastGUIDKill;
};

static std::map<uint32, SystemInfo> KillingStreak;

void OnPvPKill(Player *pKiller, Player *pVictim)
{
uint32 kGUID;
uint32 vGUID;
kGUID = pKiller->GetGUID();
vGUID = pVictim->GetGUID();
if(kGUID == vGUID)
return;
if(KillingStreak[kGUID].LastGUIDKill == vGUID)
return;
KillingStreak[kGUID].KillStreak++;
KillingStreak[vGUID].KillStreak = 0;
KillingStreak[kGUID].LastGUIDKill = vGUID;
KillingStreak[vGUID].LastGUIDKill = 0;

switch(KillingStreak[kGUID].KillStreak)
{
char msg[500];
case 1:
pKiller->AddItem(49426, 1);
break;

case 2:
pKiller->AddItem(49426, 1);
break;

case 3:
pKiller->AddItem(49426, 1);
break;

case 4:
pKiller->AddItem(49426, 1);
break;

case 5:
pKiller->AddItem(49426, 1);
break;

case 6:
pKiller->AddItem(49426, 1);
break;

case 7:
pKiller->AddItem(49426, 1);
break;

case 8:
pKiller->AddItem(49426, 1);
break;

case 9:
pKiller->AddItem(49426, 1);
break;

case 10:
pKiller->AddItem(49426, 3);
sprintf(msg, "[PvP System]: %s killed %s and is on a kill streak! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;

case 11:
pKiller->AddItem(49426, 2);
break;

case 12:
pKiller->AddItem(49426, 2);
break;

case 13:
pKiller->AddItem(49426, 2);
break;

case 14:
pKiller->AddItem(49426, 2);
break;

case 15:
pKiller->AddItem(49426, 2);
break;

case 16:
pKiller->AddItem(49426, 2);
break;

case 17:
pKiller->AddItem(49426, 2);
break;

case 18:
pKiller->AddItem(49426, 2);
break;

case 19:
pKiller->AddItem(49426, 2);
break;

case 20:
pKiller->AddItem(49426, 4);
sprintf(msg, "[PvP System]: %s killed %s and is on a RaMpAgE! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;

case 21:
pKiller->AddItem(49426, 3);
break;

case 22:
pKiller->AddItem(49426, 3);
break;

case 23:
pKiller->AddItem(49426, 3);
break;

case 24:
pKiller->AddItem(49426, 3);
break;

case 25:
pKiller->AddItem(49426, 3);
break;

case 26:
pKiller->AddItem(49426, 3);
break;

case 27:
pKiller->AddItem(49426, 3);
break;

case 28:
pKiller->AddItem(49426, 3);
break;

case 29:
pKiller->AddItem(49426, 3);
break;

case 30:
pKiller->AddItem(49426, 5);
sprintf(msg, "[PvP System]: %s killed %s and is Unstopable! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;

case 31:
pKiller->AddItem(49426, 4);
break;

case 32:
pKiller->AddItem(49426, 4);
break;

case 33:
pKiller->AddItem(49426, 4);
break;

case 34:
pKiller->AddItem(49426, 4);
break;

case 35:
pKiller->AddItem(49426, 4);
break;

case 36:
pKiller->AddItem(49426, 4);
break;

case 37:
pKiller->AddItem(49426, 4);
break;

case 38:
pKiller->AddItem(49426, 4);
break;

case 39:
pKiller->AddItem(49426, 4);
break;

case 40:
pKiller->AddItem(49426, 6);
sprintf(msg, "[PvP System]: %s killed %s and is DOMINATING! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;

case 41:
pKiller->AddItem(49426, 5);
break;

case 42:
pKiller->AddItem(49426, 5);
break;

case 43:
pKiller->AddItem(49426, 5);
break;

case 44:
pKiller->AddItem(49426, 5);
break;

case 45:
pKiller->AddItem(49426, 5);
break;

case 46:
pKiller->AddItem(49426, 5);
break;

case 47:
pKiller->AddItem(49426, 5);
break;

case 48:
pKiller->AddItem(49426, 5);
break;

case 49:
pKiller->AddItem(49426, 5);
break;

case 50:
pKiller->AddItem(49426, 7);
sprintf(msg, "[PvP System]: %s killed %s and is Godlike! ", pKiller->GetName(), pVictim->GetName());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
KillingStreak[kGUID].KillStreak = 0;
break;
}
}
};

void AddSC_System_OnPvPkill()
{
new System_OnPvPKill;
}
Ich wollte aber nur das es bei 15, 25, 35, 45, 55 kills etwas gibts deswegen habe ich diese ganzen 1, 2, 3, 4, 5, ,6 usw gelöscht...
War das der fehler? :c
newbieON is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
TrinityCore c++ Script
Hallo liebe leute, ich hoffe ihr könnt mir hierbei weiter helfen und zwar habe ich versucht den folgenden script auf meinem server zu bringen...
9 Replies - WoW PServer Hosting
World of Warcraft, TrinityCore fehler
Hallo liebe community, Ich habe mir einen kostenlosten Test Vserver (linux) für 7 Tagen angschaffen... Und habe mal versucht World of Warcraft...
0 Replies - WoW PServer Hosting
3.3.5a TrinityCore Fehler - Falsche OpenSSL Version
Hey, ich versuche einen 3.3.5a Server aufzusetzen. Betriebssystem: Debian 6 64 Bit Fehler: [email protected]:~/TrinityCore/build$ cmake ../...
1 Replies - WoW PServer Hosting
TrinityCore auf Ubuntu Compilen - CMake fehler
Hallo leute, immer wenn ich cmake ausführen will mit diesem Befehl: bekomme ich diesen fehler wäre sehr nett wenn mir einer helfen könnte
5 Replies - WoW PServer Hosting
TrinityCore 2.4.3 fehler meldung!
Moin, habe gerade ein dummes problem ._. beim starten trinitycore.exe kommt ne fehlermledung: ...
0 Replies - WoW PServer Hosting



All times are GMT +1. The time now is 09:27.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.