Network: WoW Gold | WoW Accounts | MPS Games | FPSowned
MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides
Homepage »      Register »      Hall of Fame »      Ranks And Awards »      Advertise »      Marketplace »
 
Sign up



Do you like this excellent information? Then Donate HERE to remove ads and support the MMOwned community.


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > WoW Emulator Server > Emulator Server Discussion

Emulator Server Discussion World of Warcraft Emulator Server general chat .
[NO Questions here]

Reply
 
LinkBack Thread Tools
  #1  
Old 02-09-2009
Gastricpenguin's Avatar
Gastricpenguin is offline.
Emulation Moderator
Legendary User
  
 
Join Date: Feb 2007
Location: EST
Posts: 2,285
Nominated 3 Times in 1 Post
Reputation: 975
Points: 25,812, Level: 23
Points: 25,812, Level: 23 Points: 25,812, Level: 23 Points: 25,812, Level: 23
Level up: 19%, 1,388 Points needed
Level up: 19% Level up: 19% Level up: 19%
Activity: 0.7%
Activity: 0.7% Activity: 0.7% Activity: 0.7%

[C++] Function Library

C++ Function Library

Player Functions


SendAreaTriggerMessage("text"); - Sends an Area Trigger Message
BroadcastMessage("text"); - Sends a message to the chatbox
EventTeleport(mapid, x, y, z); - Teleports the player
SafeTeleport(mapid, instanceid, location vector); - Teleports the player to specific instance
Kick(miliseconds); - Kicks the player in x miliseconds
SoftDisconnect(); - Ends the player's session
Reset_Spells(); - Resets spells
Reset_Talents(); - Resets Talents
Reset_ToLevel1(); - Resets player to level 1
GiveXP(y, guid, true); - Gives y number of XP to a player guid
AddCalculatedRestXP(# of seconds); - Adds rested xp to player equal to # of seconds
GetPositionX(); - Get player's X coordinate
GetPositionY(); - Get player's Y coordinate
GetPositionZ(); - Get player's Z coordinate
GetPositionO(); - Get player's O coordinate
KillPlayer(); - Kills the player
ResurrectPlayer(); - Resurrects the player
SetBindPoint(x, y, z, mapid, zoneid); - Bind the player's hearthstone
ModStanding(Faction, Value); - Modifies the player's standing with the Faction
_AdvanceSkillLine(SkillLine, x); - Advances a skill line x times
_AddSkillLine(SkillLine, min, max); - Adds skill line x with minimum and maximum level
_RemoveSkillLine(x); - Removes skill line x
_HasSkillLine(x); - Returns true if player has skill line x
_RemoveAllSkills(); - Removes all skills from player
_RemoveLanguages(); - Removes all languages from player
_AddLanguages(true); - Adds all languages to player
_AdvanceAllSkills(x); - Advances all skills x times
_ModifySkillMaximum(SkillLine, Max); - Sets a skill level equal to Max
GetClass(); - Returns the player's class
GetRace(); Returns the player's race
getLevel(); - Returns the player's level
GetGUID(); - Returns the player's guid
GetLowGuid(); - Returns the player's low guid
getTeam(); Returns true (1) if player is horde

GetItemInterface()->GetItemCount(itemid, false); - Returns the number of itemid the player has
PlaySoundToSet(entryid); - Plays a sound entry

Item * pItem = objmgr.CreateItem(itemid, Player);
GetItemInterface()->AddItemToFreeSlot(pItem); - Adds and item to Player

LevelInfo * Info = objmgr.GetLevelInfo(PlayerRace, PlayerClass, level);
ApplyLevelInfo(Info, level); - mods a players level

PVP
IsPvPFlagged() - When returned true, player is in pvp
SetPvPFlag(); - Sets the player in pvp
RemovePvPFlag(); - Removes the player from pvp
IsFFAPvPFlagged() - When returned true, player is in FFA pvp
SetFFAPvPFlag(); - Sets the player in FFA pvp
RemoveFFAPvPFlag(); - Removes the player from FFA pvp
RecalculateHonor(); - Reloads honor

Spells
AddAura(#); - Adds an aura to the player
addSpell(spellid); - Adds a spell to the player
CastSpell(target, spellid, 0); - Cast a spell on target
HasSpell(spellid); - Returns true if the player has the spell

Quests
HasFinishedQuest(quest_id); - Returns true if player has finished the quest
HasQuestForItem(itemid); - Returns true if player has quest item
HasQuestSpell(spellid); - Returns true if player has quest spell
HasQuest(quest_id); - Returns true if player has quest

Last edited by Gastricpenguin; 02-09-2009 at 09:11 PM.
Reply With Quote


Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx.

  #2  
Old 02-09-2009
Gastricpenguin's Avatar
Gastricpenguin is offline.
Emulation Moderator
Legendary User
  
 
Join Date: Feb 2007
Location: EST
Posts: 2,285
Nominated 3 Times in 1 Post
Reputation: 975
Points: 25,812, Level: 23
Points: 25,812, Level: 23 Points: 25,812, Level: 23 Points: 25,812, Level: 23
Level up: 19%, 1,388 Points needed
Level up: 19% Level up: 19% Level up: 19%
Activity: 0.7%
Activity: 0.7% Activity: 0.7% Activity: 0.7%

Server Hooks

Server Hooks

OnNewCharacter(uint32 Race, uint32 Class, WorldSession * Session, const char * Name);
OnKillPlayer(Player * pPlayer, Player * pVictim);
OnFirstEnterWorld(Player * pPlayer);
OnEnterWorld(Player * pPlayer);
OnGuildCreate(Player * pLeader, Guild * pGuild);
OnGuildJoin(Player * pPlayer, Guild * pGuild);
OnDeath(Player * pPlayer);
OnRepop(Player * pPlayer);
OnEmote(Player * pPlayer, uint32 Emote, Unit * pUnit);
OnEnterCombat(Player * pPlayer, Unit * pTarget);
OnCastSpell(Player * pPlayer, SpellEntry * pSpell);
OnLogoutRequest(Player * pPlayer);
OnLogout(Player * pPlayer);
OnQuestAccept(Player * pPlayer, Quest * pQuest, Object * pQuestGiver);
OnZone(Player * pPlayer, uint32 Zone);
OnChat(Player * pPlayer, uint32 Type, uint32 Lang, const char * Message, const char * Misc);
OnLoot(Player * pPlayer, Unit * pTarget, uint32 Money, uint32 ItemId);
OnEnterWorld2(Player * pPlayer);
OnCharacterCreate(Player * pPlayer);
OnQuestCancelled(Player * pPlayer, Quest * pQuest);
OnQuestFinished(Player * pPlayer, Quest * pQuest, Object * pQuestGiver);
OnHonorableKill(Player * pPlayer, Player * pKilled);
OnArenaFinish(Player * pPlayer, ArenaTeam* pTeam, bool victory, bool rated);
OnObjectLoot(Player * pPlayer, Object * pTarget, uint32 Money, uint32 ItemId);
OnAreaTrigger(Player * pPlayer, uint32 areaTrigger);
OnPostLevelUp(Player * pPlayer);
OnPreUnitDie(Unit *Killer, Unit *Victim);
OnAdvanceSkillLine(Player * pPlayer, uint32 SkillLine, uint32 Current);
OnDealDamage(Player * plr);

Hooking your script

Code:
void SetupSCRIPTNAME(ScriptMgr * mgr)
{
    mgr->register_hook(SERVER_HOOK_EVENT_ON_NEW_CHARACTER, OnNewCharacterl);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, OnKillPlayer);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_FIRST_ENTER_WORLD, OnFirstEnterWorld);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_WORLD, OnEnterWorld);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_GUILD_JOIN, OnGuildJoin);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_DEATH, OnDeath);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_REPOP, OnRepop);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_EMOTE, OnEmote);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_COMBAT, OnEnterCombat);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_CAST_SPELL, OnCastSpell);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_TICK, OnTick);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_LOGOUT_REQUEST, OnLogoutRequest);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_LOGOUT, OnLogout);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_QUEST_ACCEPT, OnQuestAccept);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_ZONE, OnZone);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, OnChat);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_LOOT, OnLoot);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_GUILD_CREATE, OnGuildCreate);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_WORLD_2, OnEnterWorld2);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_CHARACTER_CREATE, OnCharacterCreate);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_QUEST_CANCELLED, OnQuestCancelled);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_QUEST_FINISHED, OnQuestFinished);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_HONORABLE_KILL, OnHonorableKill);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_ARENA_FINISH, OnArenaFinish);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_OBJECTLOOT, OnObjectLoot);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_AREATRIGGER, OnAreaTrigger);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_POST_LEVELUP, OnPostLevelUp);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_PRE_DIE, OnPreUnitDie);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_ADVANCE_SKILLLINE , OnAdvanceSkillLine);
    mgr->register_hook(SERVER_HOOK_EVENT_ON_DEAL_DAMAGE, OnDealDamage);
}

Last edited by Gastricpenguin; 02-09-2009 at 08:20 PM.
Reply With Quote
  #3  
Old 02-09-2009
Vindicated's Avatar
Vindicated is offline.
Contributor
  
 
Join Date: Aug 2008
Location: USA
Posts: 1,057
Reputation: 213
Points: 3,189, Level: 5
Points: 3,189, Level: 5 Points: 3,189, Level: 5 Points: 3,189, Level: 5
Level up: 49%, 411 Points needed
Level up: 49% Level up: 49% Level up: 49%
Activity: 21.8%
Activity: 21.8% Activity: 21.8% Activity: 21.8%

Epic, just what I needed xD GP
__________________
To Write Love On Her Arms <3
Reply With Quote
  #4  
Old 02-09-2009
Hellgawd's Avatar
Hellgawd is offline.
Web Developer
Legendary User
  
 
Join Date: Jun 2007
Location: British Columbia
Posts: 2,279
Reputation: 636
Points: 18,780, Level: 18
Points: 18,780, Level: 18 Points: 18,780, Level: 18 Points: 18,780, Level: 18
Level up: 66%, 520 Points needed
Level up: 66% Level up: 66% Level up: 66%
Activity: 33.1%
Activity: 33.1% Activity: 33.1% Activity: 33.1%

Looks great, as always GP!
__________________
[Only registered and activated users can see links. ] [|] [Only registered and activated users can see links. ]
Reply With Quote
  #5  
Old 02-09-2009
Hasbro is offline.
Banned
  
 
Join Date: Dec 2007
Location: www.ArcEmu.org
Posts: 336
Reputation: 65
Be sure to use Visual Studio if you're on Windows that way Intellisense will give you a little popup/drop-down of how these functions are used and what their arguments are.
Also, if you need help using any of these (right click on the function and select Find References)
This little feature of Visual Studio finds all references of the function within the project
Reply With Quote
  #6  
Old 02-09-2009
CoolManBob's Avatar
CoolManBob is offline.
Contributor
  
 
Join Date: Jul 2006
Posts: 199
Reputation: 87
Points: 2,283, Level: 4
Points: 2,283, Level: 4 Points: 2,283, Level: 4 Points: 2,283, Level: 4
Level up: 27%, 517 Points needed
Level up: 27% Level up: 27% Level up: 27%
Activity: 0.4%
Activity: 0.4% Activity: 0.4% Activity: 0.4%

this is great Gastric, really useful for noobs
Reply With Quote
  #7  
Old 02-10-2009
Performer's Avatar
Performer is offline.
Contributor
  
 
Join Date: Nov 2007
Location: United Kingdom
Posts: 876
Reputation: 203
Points: 5,929, Level: 8
Points: 5,929, Level: 8 Points: 5,929, Level: 8 Points: 5,929, Level: 8
Level up: 49%, 571 Points needed
Level up: 49% Level up: 49% Level up: 49%
Activity: 2.2%
Activity: 2.2% Activity: 2.2% Activity: 2.2%

Useful Gastric +rep if poss.
__________________

Reply With Quote
  #8  
Old 02-10-2009
Snailz's Avatar
Snailz is offline.
Contributor
  
 
Join Date: Nov 2007
Location: Snail land
Posts: 944
Reputation: 239
Points: 4,950, Level: 7
Points: 4,950, Level: 7 Points: 4,950, Level: 7 Points: 4,950, Level: 7
Level up: 50%, 450 Points needed
Level up: 50% Level up: 50% Level up: 50%
Activity: 0.4%
Activity: 0.4% Activity: 0.4% Activity: 0.4%

I was just thinking of making a C++ Wiki for emulaters =/, gj on this though
__________________
Cheese Cake?
Reply With Quote
  #9  
Old 02-10-2009
stoneharry's Avatar
stoneharry is online.
Is Bored
  
 
Join Date: Sep 2007
Location: England
Posts: 1,260
Nominated 38 Times in 2 Posts
Nominated TOTM/W Award(s): 1
Reputation: 545
Points: 8,075, Level: 10
Points: 8,075, Level: 10 Points: 8,075, Level: 10 Points: 8,075, Level: 10
Level up: 44%, 625 Points needed
Level up: 44% Level up: 44% Level up: 44%
Activity: 30.9%
Activity: 30.9% Activity: 30.9% Activity: 30.9%

oh damn, i've been wanting this for ages...
__________________
My only form of communication is [Only registered and activated users can see links. ] or private message me on here.
Reply With Quote
  #10  
Old 02-10-2009
illegalalien is offline.
Corporal
  
 
Join Date: Sep 2008
Posts: 18
Reputation: 15
Points: 252, Level: 1
Points: 252, Level: 1 Points: 252, Level: 1 Points: 252, Level: 1
Level up: 63%, 148 Points needed
Level up: 63% Level up: 63% Level up: 63%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
ive been wanting this also <3
Reply With Quote
  #11  
Old 02-11-2009
LJN's Avatar
LJN is offline.
Contributor
  
 
Join Date: Jun 2007
Location: USA
Posts: 671
Reputation: 238
Points: 7,446, Level: 9
Points: 7,446, Level: 9 Points: 7,446, Level: 9 Points: 7,446, Level: 9
Level up: 86%, 154 Points needed
Level up: 86% Level up: 86% Level up: 86%
Activity: 3.3%
Activity: 3.3% Activity: 3.3% Activity: 3.3%

Thanks, great for beginners! X3
Reply With Quote
  #12  
Old 02-13-2009
TheSpidey's Avatar
TheSpidey is offline.
Elite User
  
 
Join Date: Jan 2008
Posts: 2,124
Reputation: 349
Points: 8,100, Level: 10
Points: 8,100, Level: 10 Points: 8,100, Level: 10 Points: 8,100, Level: 10
Level up: 46%, 600 Points needed
Level up: 46% Level up: 46% Level up: 46%
Activity: 10.4%
Activity: 10.4% Activity: 10.4% Activity: 10.4%

Note that functions which begin with an underscore are not supposed to be called outside of the class definition
__________________
Reply With Quote
  #13  
Old 02-22-2009
Jonthe838's Avatar
Jonthe838 is offline.
Knight-Lieutenant
  
 
Join Date: Aug 2008
Location: Sweden
Posts: 358
Reputation: 68
Points: 1,151, Level: 2
Points: 1,151, Level: 2 Points: 1,151, Level: 2 Points: 1,151, Level: 2
Level up: 51%, 249 Points needed
Level up: 51% Level up: 51% Level up: 51%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

cool release! is any1 here good a VB programing? i would realy need a Function libary ^^ for release
__________________
Lines of Coding: |||||||||| Goal 1000
Current: 546 Achived Goals: 500 Lines

Reply With Quote
  #14  
Old 03-29-2009
L0st's Avatar
L0st is offline.
Sergeant Major
  
 
Join Date: Mar 2009
Location: Ohio
Posts: 147
Reputation: 69
Points: 1,312, Level: 2
Points: 1,312, Level: 2 Points: 1,312, Level: 2 Points: 1,312, Level: 2
Level up: 83%, 88 Points needed
Level up: 83% Level up: 83% Level up: 83%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Nice GP!
__________________
Need help with your PS (private server) well PM me and I'll do the best I can to help you out.

~-L0sT-~
Reply With Quote
  #15  
Old 04-18-2009
gotiefan is offline.
New User
  
 
Join Date: Jan 2008
Posts: 53
Reputation: 1
Awesome, thank you! +rep
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



All times are GMT -4. The time now is 07:09 AM.




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.1

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 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493