MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides  
Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > WoW Emulator Server > Emulator Server Releases
Reload this Page [Release] New Character Announcer
Emulator Server Releases This section is for all releases regarding Emu servers.
[NO QUESTIONS HERE]

Reply
 
LinkBack Thread Tools
[Release] New Character Announcer
(#1)
Old
insanesk8123's Avatar
insanesk8123 is Offline
Contributor
Rep Power: 3
Reputation: 257
insanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the rough
 
Posts: 585
Join Date: Feb 2007
Location: main(String[] args)
Legendary [Release] New Character Announcer - 09-29-2008


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






Source
NewCharacter.cpp:
Code:
/*
Author: insanesk8123
Date: 9/25/08
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 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: [Only registered and activated users can see links. ]


By Jerbab

Last edited by insanesk8123; 09-30-2008 at 04:04 PM..
Reply With Quote

Donate to remove ads.
(#2)
Old
XaooaX's Avatar
XaooaX is Offline
Contributor
Rep Power: 2
Reputation: 92
XaooaX will become famous soon enough
 
Posts: 145
Join Date: Sep 2007
Location: California
09-29-2008

Epic lol , really niCe


Reply With Quote
(#3)
Old
findnemo is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 3
findnemo is an unknown quantity at this point
 
Posts: 42
Join Date: Jul 2008
09-29-2008

Thanks for this. Awsome released.Can we have Setup.cpp?
Reply With Quote
(#4)
Old
Devilsadvocate's Avatar
Devilsadvocate is Offline
Knight-Lieutenant
Rep Power: 1
Reputation: 68
Devilsadvocate will become famous soon enough
 
Posts: 224
Join Date: May 2008
Location: In My Own World
09-29-2008

not too bad...


I'm not going to be releasing anything for a while. I'm back on retail for new content.
Reply With Quote
(#5)
Old
Rockerfooi's Avatar
Rockerfooi is Offline
Site Donator
Rep Power: 2
Reputation: 48
Rockerfooi is on a distinguished road
 
Posts: 427
Join Date: Nov 2007
Location: In a house (really!)
09-29-2008

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




<-- IGNORE THIS IT IS NOT TRUE
Reply With Quote
(#6)
Old
insanesk8123's Avatar
insanesk8123 is Offline
Contributor
Rep Power: 3
Reputation: 257
insanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the rough
 
Posts: 585
Join Date: Feb 2007
Location: main(String[] args)
09-29-2008

thanks guys

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


By Jerbab
Reply With Quote
(#7)
Old
findnemo is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 3
findnemo is an unknown quantity at this point
 
Posts: 42
Join Date: Jul 2008
09-29-2008

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 ^^
Reply With Quote
(#8)
Old
insanesk8123's Avatar
insanesk8123 is Offline
Contributor
Rep Power: 3
Reputation: 257
insanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the rough
 
Posts: 585
Join Date: Feb 2007
Location: main(String[] args)
09-29-2008

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>."


By Jerbab
Reply With Quote
(#9)
Old
мιяаgє's Avatar
мιяаgє is Offline
Knight
Rep Power: 1
Reputation: 42
мιяаgє is on a distinguished road
 
Posts: 212
Join Date: Jan 2008
09-29-2008

That's pretty cool man



Reply With Quote
(#10)
Old
Gastricpenguin's Avatar
Gastricpenguin is Offline
Why so serious...?
Legendary User

Rep Power: 7
Reputation: 794
Gastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to behold
 
Posts: 1,659
Join Date: Feb 2007
Location: 4Chan
09-29-2008

+7 rep

Where have you been all this time? xD


[-------MAX] C++ knowledge
[-------MAX] LUA knowledge
[-------MAX] Awesomeness
[-------MAX] Pulcharitude
[EMPTY____]
Kindness
Reply With Quote
(#11)
Old
insanesk8123's Avatar
insanesk8123 is Offline
Contributor
Rep Power: 3
Reputation: 257
insanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the rough
 
Posts: 585
Join Date: Feb 2007
Location: main(String[] args)
09-29-2008

Ya man i was afk for about like 4-5 months lol


By Jerbab
Reply With Quote
(#12)
Old
TheSpidey's Avatar
TheSpidey is Offline
Emulator Server Specialist

Rep Power: 2
Reputation: 293
TheSpidey is a jewel in the roughTheSpidey is a jewel in the roughTheSpidey is a jewel in the rough
 
Posts: 1,953
Join Date: Jan 2008
09-30-2008

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.


Reply With Quote
(#13)
Old
insanesk8123's Avatar
insanesk8123 is Offline
Contributor
Rep Power: 3
Reputation: 257
insanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the rough
 
Posts: 585
Join Date: Feb 2007
Location: main(String[] args)
09-30-2008

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


By Jerbab
Reply With Quote
(#14)
Old
Extension is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 0
Reputation: 1
Extension is an unknown quantity at this point
 
Posts: 3
Join Date: Sep 2008
10-11-2008

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
Reply With Quote
(#15)
Old
insanesk8123's Avatar
insanesk8123 is Offline
Contributor
Rep Power: 3
Reputation: 257
insanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the roughinsanesk8123 is a jewel in the rough
 
Posts: 585
Join Date: Feb 2007
Location: main(String[] args)
10-12-2008

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


By Jerbab
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366