[Release] New Character Announcer menu

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] New Character Announcer


    This script announces the name, race, and class of the newly created character to the rest of the server.


    V1.1: Thank Karyuudo for the DK fix






    Source
    NewCharacter.cpp:
    Code:
    /*
    Author: insanesk8123 (Pragma)
    Date: 9/25/08
    DK Fix: Karyuudo
    Purpose: make a greeting for new characters
    todo: nothing right now
    */
    
    #include "StdAfx.h"
    #include "Setup.h"
    #include <ScriptSetup.h>
    
    
    #ifdef WIN32
    #pragma warning(disable:4305)// warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    void NewCharacter(Player* Plr)
    {
        char welcomeStr[255];  //final string to be displayed
    
        plrInfo classInfo;
        plrInfo raceInfo;
    
    /* Getting integer info for class and race */
        classInfo.intForm = Plr->getClass();      
        raceInfo.intForm = Plr->getRace();
    
    
    //turning the int class id into a string
        switch(classInfo.intForm)
        {
        case 1:
            classInfo.strForm = "Warrior";
            break;
        case 2:
            classInfo.strForm = "Paladin";
            break;
        case 3:
            classInfo.strForm = "Hunter";
            break;
        case 4:
            classInfo.strForm = "Rogue";
            break;
        case 5:
            classInfo.strForm = "Priest";
            break;
        case 6:
            classInfo.strForm = "Death Knight";
            break;
        case 7:
            classInfo.strForm = "Shaman";
            break;
        case 8:
            classInfo.strForm = "Mage";
            break;
        case 9:
            classInfo.strForm = "Warlock";
            break;
        case 11:
            classInfo.strForm = "Druid";
            break;
        default:
            classInfo.strForm = "";
            break;
        }
    
    
    //turning the int race id into a string
        switch(raceInfo.intForm)
        {
        case 1:
            raceInfo.strForm = "Human";
            break;
        case 2:
            raceInfo.strForm = "Orc";
            break;
        case 3:
            raceInfo.strForm = "Dwarf";
            break;
        case 4:
            raceInfo.strForm = "Night Elf";
            break;
        case 5:
            raceInfo.strForm = "Undead";
            break;
        case 6:
            raceInfo.strForm = "Tauren";
            break;
        case 7:
            raceInfo.strForm = "Gnome";
            break;
        case 8:
            raceInfo.strForm = "Troll";
            break;
        case 10:
            raceInfo.strForm = "Blood Elf";
            break;
        case 11:
            raceInfo.strForm = "Draenei";
            break;
        default:
            raceInfo.strForm = "";
            break;
        }
    
    
    //combines all the strings into one message
        sprintf(welcomeStr,"[|cff00ff00News!|r]Give a warm welcome to |cff00ccff%s|r the |cffff0000%s|r |cffff00ff%s|r.",Plr->GetName(), raceInfo.strForm, classInfo.strForm);
    
    
        //displays the message to the world
        sWorld.SendWorldText(welcomeStr);
    }
    
    
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type() 
    {
        return SCRIPT_TYPE_MISC;
    }
    
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr) 
    {
    
        mgr->register_hook(SERVER_HOOK_EVENT_ON_FIRST_ENTER_WORLD, &NewCharacter);
    }
    Setup.h
    Code:
    struct plrInfo
        {
            uint8 intForm;
            char * strForm;         /*stores info of player in both variable types*/
        };
    
    void NewCharacter(Player* Plr);
    Download DLL for ascent 5.0: Filebeam - Free Fast File Hosting
    Last edited by Pragma; 12-04-2008 at 04:00 PM.


    [Release] New Character Announcer
  2. #2
    -xepher-'s Avatar Banned
    Reputation
    92
    Join Date
    Sep 2007
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Epic lol , really niCe +Rep

  3. #3
    findnemo's Avatar Member
    Reputation
    5
    Join Date
    Jul 2008
    Posts
    58
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for this. Awsome released.Can we have Setup.cpp?

  4. #4
    Devilsadvocate's Avatar Member
    Reputation
    70
    Join Date
    May 2008
    Posts
    254
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not too bad... +Rep
    I'm not going to be releasing anything for a while. I'm back on retail for new content.

  5. #5
    Rockerfooi's Avatar Contributor
    Reputation
    97
    Join Date
    Nov 2007
    Posts
    597
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is really nice done... but on the more popular servers quite annoying every 3 sec. a message... and people could easily use this to spam with it... But really nice anyways

  6. #6
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks guys

    Originally Posted by findnemo
    Thanks for this. Awsome released.Can we have Setup.cpp?
    no Setup.cpp needed


  7. #7
    findnemo's Avatar Member
    Reputation
    5
    Join Date
    Jul 2008
    Posts
    58
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh thanks .It is working for now . I want to replace Mmmowned to another word with new color ex : welcome to House (with blue color) , can you teach me please .Thanks ^^

  8. #8
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well mmowned is in there cause its the name of the character that joined. see the string that is displayed says "[News!]Give a warm welcome to <name> the <race> <class>."


  9. #9
    мιяаgє's Avatar Member
    Reputation
    42
    Join Date
    Jan 2008
    Posts
    210
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's pretty cool man +Rep


  10. #10
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    +7 rep

    Where have you been all this time? xD
    Life Puzzler WoW - Website | Forums

  11. #11
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya man i was afk for about like 4-5 months lol


  12. #12
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks solid. Just a few pointers:
    Move the struct declaration to out of the function, then just declare raceInfo and classInfo as instances of that struct.
    No need to delete welcomeMsg as it's local and gets deleted by C++'s garbage collection.

  13. #13
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    k, ill change that and ya i took out the wrlcomestr deletion on mine when i realized it was converting it to a pointer before deletion because it was unneeded to be deleted


  14. #14
    Extension's Avatar Member
    Reputation
    1
    Join Date
    Sep 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, i am quite new in making dll's and i have a little question!
    Can one of you guys short help me and write down how i make this for ArcEmu?
    What i have to do..?

    thx.. and insane +rep for this nice source

  15. #15
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you would like to build this as a DLL for ArcEmu you would do it the exact same as you would for Ascent, search mmowned for Gastric's vid on compiling a DLL


Page 1 of 3 123 LastLast

Similar Threads

  1. [Guide] How to: Change the starting stats of a new character
    By Cursed in forum WoW EMU Guides & Tutorials
    Replies: 7
    Last Post: 12-30-2007, 10:11 PM
  2. [Release] New Ascent + Christmas Book 1
    By ~SaiLyn~ in forum World of Warcraft Emulator Servers
    Replies: 38
    Last Post: 12-30-2007, 05:24 AM
  3. New Character
    By illogic in forum World of Warcraft General
    Replies: 4
    Last Post: 12-12-2007, 10:15 PM
  4. [Release]New Vanish Effect
    By luddo9 in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 07-05-2007, 04:34 PM
  5. Level new characters quickly with Midsummer Event.
    By xXavierx in forum World of Warcraft Exploits
    Replies: 22
    Last Post: 06-28-2007, 01:45 PM
All times are GMT -5. The time now is 08:11 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search