PDA

View Full Version : [C++] Shield on Login



Sdyess94
12-07-09, 12:15 PM
#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.

Onlykl
12-07-09, 12:33 PM
you made it?

Sdyess94
12-07-09, 12:44 PM
Yeah, why?

Onlykl
12-07-09, 12:48 PM
just asking... then + rep for you .. good job ;)
And you could join me to we make repack for mmopro ;)

Sdyess94
12-07-09, 12:53 PM
I might join you :)

Depending on what I need to do atm

Onlykl
12-07-09, 12:56 PM
take a look on my profile for msn add me and we will talk ;)

tekkeryole
01-08-09, 05:19 PM
This is epic lol.

LiLLeCarl
26-08-09, 08:45 AM
Great idea really nice for people with laggy pc's ^^,

Alvanaar
28-08-09, 02:19 AM
Great idea. Uber simple. Nice work. :)

mec
14-09-09, 04:13 PM
very cool

Avidgamer
21-09-09, 11:43 AM
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.

mec
22-09-09, 09:30 PM
i put this in my latest repack on here......no sheild pops up......so. my question is......whats the fix for it?

Avidgamer
23-09-09, 10:51 AM
No idea, didnt work for me either - when I tried to compile it had loads of errors.

mec
24-09-09, 12:13 PM
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.....



#include "StdAfx.h"
#include "Setup.h"
#ifdef WIN32
#pragma warning(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,



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 *'

nato76
02-10-09, 04:29 PM
nice !

Lbniese
04-10-09, 02:25 AM
Very nice, keep up with the good work.

Booty
12-01-10, 06:09 AM
Nice and simple.. goodjob

Dimman
12-01-10, 09:55 AM
good work but paladins will get cooldown on their shield Z_z

Avidgamer
20-01-10, 02:42 PM
Screw Paladins! Their too good anyway, well, I'm not on mine.. 80 Prot on Kilrogg :(

joshiep
21-01-10, 06:16 PM
good work