Level up money menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Level up money

    Level up money

    I wanted you to gain money each time you levelup, so i wrote this:


    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    /*    MADE BY     */
    /*    LINK_S      */
    void LevelUp(Player * plr)
    {
        uint32 player_coinage = plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
        if(plr->getLevel() < 40)
        {
        uint32 player_coinage_gain = plr->getLevel() * 50000;
        plr->SetUInt32Value(PLAYER_FIELD_COINAGE, player_coinage + player_coinage_gain);
        }
    
        if(plr->getLevel() > 40 && plr->getLevel() < 60)
        {
        uint32 player_coinage_gain = plr->getLevel() * 100000;
        plr->SetUInt32Value(PLAYER_FIELD_COINAGE, player_coinage + player_coinage_gain);
        }
    
        if(plr->getLevel() > 60 && plr->getLevel() < 80)
        {
        uint32 player_coinage_gain = plr->getLevel() * 150000;
        plr->SetUInt32Value(PLAYER_FIELD_COINAGE, player_coinage + player_coinage_gain);
        }
    }
    
    void SetupLevelUpMoney(ScriptMgr * mgr)
    {
        mgr->register_hook(SERVER_HOOK_EVENT_ON_POST_LEVELUP, &LevelUp);
    }

    hope you enjoy my little project.

    info:
    Each time you level up you gain:

    1-40: your level * 5, in gold.
    40-60: your level * 10, in gold.
    60-80: your level * 15, in gold.

    Level up money
  2. #2
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pretty Neat!!

    +Rep x2

  3. #3
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    150/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    This is Very nice, it's short, simple, but a brilliant fantastic idea. Really good +Rep x3

  4. #4
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much

  5. #5
    Hellgawd's Avatar Account not activated by Email
    Reputation
    710
    Join Date
    Jun 2007
    Posts
    2,480
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An interesting script to say the least.

  6. #6
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Were just playing around and found the levelingup hook

    Thanks

  7. #7
    Phygar's Avatar ( ͡° ͜ʖ ͡°)
    Reputation
    443
    Join Date
    Nov 2007
    Posts
    1,591
    Thanks G/R
    7/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very original idea + rep

  8. #8
    Nymphx's Avatar Active Member
    Reputation
    83
    Join Date
    Sep 2008
    Posts
    212
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is so simple, yet the idea is just extrodinary.

    +Rep

  9. #9
    proskater's Avatar Member
    Reputation
    1
    Join Date
    Apr 2008
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how would you install this script?

    I would like to use your script one of my servers. (if that is alright)

  10. #10
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure if you actually code in C++ or if this was just you playing around, but indentation in your code helps people to understand it. So thats the only thing I would suggest.

    Other than that.. Great idea, and great job.

    I live in a shoe

  11. #11
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Omg, Very nice man! 2x+Rep

  12. #12
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Sounddead View Post
    Not sure if you actually code in C++ or if this was just you playing around, but indentation in your code helps people to understand it. So thats the only thing I would suggest.
    So you suggest that i should put comments that explains the code

  13. #13
    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)
    For people who want comments: (also cleaned up code and added defines)
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    // Gold values -- multiplied with current level
    #define GOLD1 5  // lvl 1-40
    #define GOLD2 10 // lvl 40-60
    #define GOLD3 15 // lvl 60+
    
    // Example: A level 45 would get 450G (45*GOLD2) by default
    
    /*    MADE BY     */
    /*    LINK_S      */
    void LevelUp(Player * plr)
    {
        uint32 player_coinage = plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
        uint32 player_coinage_gain;
    
        if(plr->getLevel() > 60)                            // lvl 60+
            player_coinage_gain = plr->getLevel() * (GOLD1*10000);
        else if(plr->getLevel() > 40)                       // lvl 40-60
            player_coinage_gain = plr->getLevel() * (GOLD2*10000);
        else                                                // lvl 1-40
            player_coinage_gain = plr->getLevel() * (GOLD3*10000);
    
        // Add the gold
        plr->SetUInt32Value(PLAYER_FIELD_COINAGE, player_coinage + player_coinage_gain);
    }
    
    void SetupLevelUpMoney(ScriptMgr * mgr)
    {
        mgr->register_hook(SERVER_HOOK_EVENT_ON_POST_LEVELUP, &LevelUp);
    }
    I haven't tested as I don't use ascent, but it should work.

  14. #14
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your sample looks more messy, and harder to understand.

  15. #15
    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)
    Originally Posted by Link_S View Post
    Your sample looks more messy, and harder to understand.
    Don't use such messy variable names then

    Does this look better for you maybe? It's as clean as it can get...

    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    // Gold values -- multiplied with current level
    #define GOLD1 50000  // lvl 1-40
    #define GOLD2 100000 // lvl 40-60
    #define GOLD3 150000 // lvl 60+
    
    // Example: A level 45 would get 450G (45*GOLD2) by default
    
    void LevelUp(Player * plr)
    {
        uint32 CurrentMoney = plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
        uint32 lvl = plr->getLevel();
        uint32 MoneyGain;
    
    
        // lvl 60+
        if(lvl > 60)
            MoneyGain = lvl * GOLD1;
    
        // lvl 40-60
        else if(lvl > 40)
            MoneyGain = lvl * GOLD2;
    
        // lvl 1-40
        else
            MoneyGain = lvl * GOLD3;
    
    
        // Add calculated gold to player
        plr->SetUInt32Value(PLAYER_FIELD_COINAGE, CurrentMoney + MoneyGain);
    }
    
    void SetupLevelUpMoney(ScriptMgr * mgr)
    {
        mgr->register_hook(SERVER_HOOK_EVENT_ON_POST_LEVELUP, &LevelUp);
    }

Page 1 of 2 12 LastLast

Similar Threads

  1. [Buying] Buying Modded ps3 transfer, everything unlocked $25 with custom level and money
    By Sleezypro in forum Grand Theft Auto 5 Buy Sell Trade
    Replies: 0
    Last Post: 08-02-2016, 01:49 AM
  2. [Selling] [WTS] LEvel 85 warlock, new leveled good money amount.
    By mrlaffo in forum WoW-EU Account Buy Sell Trade
    Replies: 1
    Last Post: 04-01-2013, 10:46 AM
  3. Under Level 60 Money Making
    By BaboonX in forum World of Warcraft General
    Replies: 6
    Last Post: 10-14-2008, 06:02 PM
  4. Money making (Especially for lower levels)
    By Cush in forum World of Warcraft Guides
    Replies: 24
    Last Post: 12-22-2006, 11:19 AM
  5. Money & XP For low levels
    By Matt in forum World of Warcraft Guides
    Replies: 2
    Last Post: 03-21-2006, 04:25 PM
All times are GMT -5. The time now is 10:06 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