Advertisement
Rochet2

CharCreateArc

Jul 15th, 2012
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Small C++ script, credits to AuxProductions. */
  2.  
  3. #include "StdAfx.h"
  4. #include "Setup.h"
  5.  
  6.  
  7. #ifdef WIN32
  8. #pragma warning(disable:4305)    // warning C4305: 'argument' : truncation from 'double' to 'float'
  9. #endif
  10.  
  11.  
  12.  
  13.  
  14. void OnFirstEnterWorld(Player * pPlayer)
  15. {
  16.     static const char* classes[12] = {"None", "Warrior", "Paladin", "Hunter", "Rogue", "Priest", "Death Knight", "Shaman", "Mage", "Warlock", "None", "Druid"};
  17.     char message[500];
  18.     sprintf(message, "[SERVERNAME] Welcome our new %s, %s to the server!", classes[pPlayer->getClass()], pPlayer->GetName());
  19.     sWorld.SendWorldWideScreenText(message);
  20.  }
  21.  
  22.        
  23.    
  24. void SetupOnFirstEnterWorld(ScriptMgr * mgr)
  25. {
  26.     mgr->register_hook(SERVER_HOOK_EVENT_ON_FIRST_ENTER_WORLD, OnFirstEnterWorld);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement