[Release] OnPvPKill Level up menu

User Tag List

Results 1 to 6 of 6
  1. #1
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] OnPvPKill Level up

    this is a script for PvP servers mostly it levels up on PvP kill if you level is = to or higher than your targets

    Code:
    #include "Setup.h"
    #include "StdAfx.h"
    
    void PvPLevelUp(Player * Plr, Player * Victim)
    {
    	if(Plr->getLevel() >= Victim->getLevel() && Plr->IsPlayer()== true && Victim->IsPlayer()== true)
    	{
    		int level;
    		level = Plr->GetUInt32Value(UNIT_FIELD_LEVEL);
    		level = level++;
    		Plr->SetUInt32Value(UNIT_FIELD_LEVEL,level);
    	}
    	else
    	{
    	}
    };
    
    void SetupPvPKill(ScriptMgr * mgr)
    {
    	mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, (void*)PvPLevelUp);
    }
    its untested so tell me how it works please
    Lunar Gaming - Reaching For The Stars

    [Release] OnPvPKill Level up
  2. #2
    BrantX's Avatar Contributor
    Reputation
    205
    Join Date
    Jul 2007
    Posts
    899
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    FIRST!
    Ha haha, Posting on a epix thread.
    Another good release from Mager. Zomg can't rep /cry, +Love to you for the C++ Script .



  3. #3
    **Sweeny**'s Avatar Member
    Reputation
    33
    Join Date
    Dec 2007
    Posts
    282
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    2ND WOOT!
    Mager how did you get so epic this sounds so awesome...
    EDIT* Oh an rep added

  4. #4
    marcojoao's Avatar Master Sergeant
    Reputation
    8
    Join Date
    Aug 2007
    Posts
    114
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    3º. *_* nice one dude!!
    Love you!!
    + rep!!

  5. #5
    Cursed's Avatar Contributor
    Reputation
    270
    Join Date
    Jun 2007
    Posts
    1,380
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not bad for PvP Servers... +Rep added... (Sorry, can't tell you I luf you )

  6. #6
    Dythzer's Avatar Contributor
    Reputation
    271
    Join Date
    May 2008
    Posts
    461
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just some tips for better/more clean code... In bool functions you don't need to do "IsPlayer() == true", "IsPlayer()" is enough (and !IsPlayer() for false). And the else statement doesn't need to be added after the if statement if you're not gonna put anything there.
    Also, instead of having:
    Code:
    int level;
    level = Plr->GetUInt32Value(UNIT_FIELD_LEVEL);
    level = level++;
    you could simply do:
    Code:
    int level = Plr->getLevel() + 1;
    Also there should be a function for giving level that you can use instead of typing "Plr->SetUInt32Value(UNIT_FIELD_LEVEL,level)" Don't know about that function since i've never used ascent but it's probably something like LevelUp() or GiveLevel(). Otherwise code looks fine.

Similar Threads

  1. [Release] ArcEmu Leveling Mobs & Trainers
    By Trle94 in forum WoW EMU General Releases
    Replies: 6
    Last Post: 07-28-2009, 10:25 AM
  2. [RELEASE][C++]Level Helper!
    By Performer in forum WoW EMU General Releases
    Replies: 16
    Last Post: 10-22-2008, 02:28 PM
  3. [Release] #1 FunCore for FunServer / Flying mount anywhere + Level cap 70+ , new gm
    By ~SaiLyn~ in forum World of Warcraft Emulator Servers
    Replies: 95
    Last Post: 12-26-2007, 10:54 AM
  4. [RELEASE] TIER 8 with Vendor (for level 80)
    By Greatdrak in forum World of Warcraft Emulator Servers
    Replies: 19
    Last Post: 12-24-2007, 11:47 PM
  5. [Release]: Custom level 80 Weapons
    By Greatdrak in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 12-15-2007, 04:19 PM
All times are GMT -5. The time now is 11:22 PM. 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