-
[C++] Shield on Login
Code:
#include "StdAfx.h"
#include "Setup.h"
#ifdef WIN32
#pragma warning(disable:4305) // warning C4305: 'argument' : truncation from 'double' to 'float'
#endif
void OnEnterWorld(Player * pPlayer)
{
pPlayer->CastSpell(pPlayer, 33581, true);
}
void SetupEnterWorld(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_WORLD, OnEnterWorld);
}
This is pretty much so when you login you wont be wtfpwned by mobs or other players.
-
-
-
just asking... then + rep for you .. good job ;)
And you could join me to we make repack for mmopro ;)
-
I might join you :)
Depending on what I need to do atm
-
take a look on my profile for msn add me and we will talk ;)
-
-
Great idea really nice for people with laggy pc's ^^,
-
Great idea. Uber simple. Nice work. :)
-
-
Indeed. Shame someone tried to say they made it on a server I know. Unfortunatly it back-fired on him.. didn't even work and he cant fix it lol.
-
i put this in my latest repack on here......no sheild pops up......so. my question is......whats the fix for it?
-
No idea, didnt work for me either - when I tried to compile it had loads of errors.
-
error
somebody else made a variation of this but it roots the player and banishes them....but it still has errors.....and i know one of these works because if you go to exilewow.com their server has a working copy of it.....
Code:
#include"StdAfx.h"
#include"Setup.h"
#ifdef WIN32
#pragmawarning(disable:4305)
#endif
//_____Defines____\\
#define Banish 37527
#define Paralyze 25725
void OnEnterWorld(Player * pPlayer)
{
pPlayer->BroadcastMessage("|cFF006400[Login Protection]:|r |cFF00FF00 Welcome to the Server! You've been banished! you will remain invincible for 10 seconds but unable to act.|r");
pPlayer->CastSpell(pPlayer, Banish, true);
pPlayer->AddAura(Paralyze);
// Need to add something here to remove the aura, or just not use it and Root the player?
//pPlayer->Root();
//pPlayer->UnRoot();
}
void SetupProtectLogin(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_WORLD, OnEnterWorld);
}
heres the errors that came with it....maybe somebody can fix them,
Code:
1>..\src\ExtraScripts\Enterworld.cpp(9) : warning C4010: single-line comment contains line-continuation character
1>..\src\ExtraScripts\Enterworld.cpp(16) : error C2065: 'Banish' : undeclared identifier
1>..\src\ExtraScripts\Enterworld.cpp(17) : error C2664: 'Unit::AddAura' : cannot convert parameter 1 from 'int' to 'Aura *'
-
-
Very nice, keep up with the good work.
-
Nice and simple.. goodjob
-
good work but paladins will get cooldown on their shield Z_z
-
Screw Paladins! Their too good anyway, well, I'm not on mine.. 80 Prot on Kilrogg :(
-