[C++] XP For Killing Players menu

User Tag List

Results 1 to 15 of 15
  1. #1
    colincancer's Avatar Active Member
    Reputation
    63
    Join Date
    Dec 2007
    Posts
    509
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] XP For Killing Players

    -----CREDITS-----
    Toast From ArcEmu
    Me For Showing You (lol)
    ---------------------

    What Does It Do?
    It rewards you XP for killing another player.

    The Code

    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    void KillPlayer(Player *pPlayer, Player *pVictim)
    {
        uint32 plr_level = pPlayer->getLevel();
        uint32 vic_level = pVictim->getLevel();
    
        if( vic_level <= ( plr_level - 10 ) || vic_level >= ( 10 + plr_level) )
            return;
    
        CalculateXP(pPlayer);
    }
    
    void CalculateXP( Player * pPlayer )
    {
        uint32 plr_level = pPlayer->getLevel();
        uint32 xp1;
    
        if( plr_level <= 10 )
        {
            xp1 = 200;
        }else if( plr_level <= 20 )
        {
            xp1 = 500;
        }else if( plr_level <= 30 )
        {
            xp1 = 1000;
        }else if( plr_level <= 40 )
        {
            xp1 = 1500;
        }else if( plr_level <= 50 )
        {
            xp1 = 2000;
        }else if( plr_level <= 60 )
        {
            xp1 = 2500;
        }else if( plr_level <= 69 )
        {
            xp1 = 3000;
        }
    
        pPlayer->GiveXP(xp1,0,false);
    }
    
    void SetupPlayerXP(ScriptMgr * mgr)
    {
        mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, &KillPlayer);
    #JODYS'WATCHiN

    [C++] XP For Killing Players
  2. #2
    Fan Boi's Avatar Member
    Reputation
    5
    Join Date
    Jul 2008
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Super easy to make. Try a PvP system, but this is good for leveling servers I guess.

  3. #3
    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)
    hey dudes i have a rebornemu.. but i cant compiling.. i get error :/

    any one can compile for me? i give +Rep

    My server need this for full pvp twocents

  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)
    Need help

    Code:
    1>------ Build started: Project: CustomScript, Configuration: Release Win32 ------
    1>Compiling...
    1>KillPlayer.cpp
    1>..srcCustomScriptKillPlayer.cpp(12) : error C3861: 'CalculateXP': identifier not found
    1>..srcCustomScriptKillPlayer.cpp(49) : fatal error C1075: end of file found before the left brace '{' at '..srcCustomScriptKillPlayer.cpp(47)' was matched
    1>Setup.cpp
    1>Build log was saved at "file://c:RebonemuSTABLE TRUNKsrcscriptsprojects2008_int_release_CustomScriptBuildLog.htm"
    1>CustomScript - 2 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  5. #5
    Anthraxx's Avatar Contributor
    Reputation
    111
    Join Date
    Nov 2006
    Posts
    374
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice will try it .. +rep x1 for you

    Edit: Sorry i couldnt give you rep atm, will do it later.


  6. #6
    AzolexX's Avatar Contributor
    Reputation
    179
    Join Date
    May 2007
    Posts
    587
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great Share +rep

    Find about scripting, programming and music! My blog: https://worldofsmth.wordpress.com!

  7. #7
    [Shon3m]'s Avatar Banned
    Reputation
    128
    Join Date
    Apr 2007
    Posts
    669
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow man this is cool!!!

  8. #8
    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)
    aloooo? any one can help me?

  9. #9
    Fan Boi's Avatar Member
    Reputation
    5
    Join Date
    Jul 2008
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Google: Learn C++.

  10. #10
    Herleybob's Avatar Contributor
    Reputation
    178
    Join Date
    Jul 2007
    Posts
    663
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You forgot the } at the end of the code...

    Nom Nom Nom :P

  11. #11
    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)
    Originally Posted by Fan Boi View Post
    Google: Learn C++.

    -.- i´m not a n00b in scripting...

    the rebornemu is incompatible

    take one guide for u
    Code:
    http://arcemu.org/forums/index.php?showtopic=3233

  12. #12
    undeadspwan's Avatar Member
    Reputation
    1
    Join Date
    Sep 2007
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    for those of you with fun server

    i have tested it and it compiles fine should work for everyone


    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    //#include "../../../ascent-shared/svn_revision.h"
    
    void KillPlayer(Player *pPlayer, Player *pVictim)
    {
        uint32 plr_level = pPlayer->getLevel();
        uint32 vic_level = pVictim->getLevel();
    
        if( vic_level <= ( plr_level - 10 ) || vic_level >= ( 10 + plr_level) )
            return;
    
        
    }
    
    void CalculateXP( Player * pPlayer )
    {
        uint32 plr_level = pPlayer->getLevel();
        uint32 xp1;
    
        if( plr_level <= 70 )
        {
            xp1 = 200;
        }else if( plr_level <= 80 )
        {
            xp1 = 500;
        }else if( plr_level <= 90 )
        {
            xp1 = 1000;
        }else if( plr_level <= 100 )
        {
            xp1 = 1500;
        }else if( plr_level <= 150 )
        {
            xp1 = 2000;
        }else if( plr_level <= 200 )
        {
            xp1 = 2500;
        }else if( plr_level <= 255 )
        {
            xp1 = 3000;
        }
    
        pPlayer->GiveXP(xp1,0,false);
    }
    
    void SetupPlayerXP(ScriptMgr * mgr)
    {
        mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, &KillPlayer);
    }

  13. #13
    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)
    Nice copy and paste you got here... By the way, i replied to the thread with a much easier method, and won't hog CPU like this script will.

    Board Message
    Life Puzzler WoW - Website | Forums

  14. #14
    SuperChickenofDoom's Avatar Member
    Reputation
    18
    Join Date
    Sep 2007
    Posts
    128
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a way to do this with items? If so ... post!

  15. #15
    colincancer's Avatar Active Member
    Reputation
    63
    Join Date
    Dec 2007
    Posts
    509
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Gastricpenguin View Post
    Nice copy and paste you got here... By the way, i replied to the thread with a much easier method, and won't hog CPU like this script will.

    Board Message
    Yeah the code is, what does it matter? I gave credit to toast. ,it may not be very nice/good but I used it on my server. Not like it matters anymore though cause i don't have my server and nobody is probably going to use this anymore.
    #JODYS'WATCHiN

Similar Threads

  1. [H] Kill players in IF w/o aggroing guards
    By dannix in forum World of Warcraft Exploits
    Replies: 10
    Last Post: 05-03-2007, 12:48 AM
  2. Killing players in Neutrals without agroing guards.
    By BloodhoofMage in forum World of Warcraft Exploits
    Replies: 15
    Last Post: 02-09-2007, 10:44 PM
  3. Kill players in air
    By tekstorm in forum World of Warcraft Exploits
    Replies: 12
    Last Post: 02-06-2007, 10:55 PM
  4. How to World PvP on a PvE server for New players
    By Ðeception in forum World of Warcraft Guides
    Replies: 7
    Last Post: 12-20-2006, 10:00 PM
  5. Replies: 25
    Last Post: 11-28-2006, 11:23 PM
All times are GMT -5. The time now is 11:52 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