Results 1 to 8 of 8
  1. #1
    ManKind Gaming's Avatar
    Join Date
    Oct 2017
    Gender
    male
    Posts
    32
    Reputation
    10
    Thanks
    5
    My Mood
    Amused

    A Permanent Loot Drop Effect.

    I want to make it so that my Donator rank has a permanent 1.5x drop rate! Could someone please write me the code to put in player.cs? The rank # is Ranks.Donator

  2. #2
    Orbit's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    In-Orbit
    Posts
    672
    Reputation
    55
    Thanks
    484
    My Mood
    Aggressive
    No. I will not write it for you. You have to learn and do it for yourself. Although I can guide you to where and how you should do it.

    First of all, follow the code that handles loot drop boosts. You can do ctrl + shift + f and search for "loot drop." Find where it handles individual loot drop and try to find lootdropboost. There you can copy how lootdropboost works but make it work for your rank.

    I hope this helps in any way and that you understand that the help thread isn't made for people like you to beg for others work. Try to understand it and learn from it instead.
    Good luck

    “If things go wrong, don’t go with them.”

  3. #3
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    Take a look at:

    Code:
                if (LootDropBoost && lootDropBoostFreeTimer)
                {
                    if (LootDropBoostTimeLeft > 0)
                    {
                        lootDropBoostFreeTimer = false;
                        Owner.Timers.Add(new WorldTimer(1000, (w, t) =>
                        {
                            LootDropBoostTimeLeft -= 1;
                            lootDropBoostFreeTimer = true;
                            UpdateCount++;
                        }));
                    }
                }
    
                if (LootTierBoost && lootTierBoostFreeTimer)
                {
                    if (LootTierBoostTimeLeft > 0)
                    {
                        lootTierBoostFreeTimer = false;
                        Owner.Timers.Add(new WorldTimer(1000, (w, t) =>
                        {
                            LootTierBoostTimeLeft -= 1;
                            lootTierBoostFreeTimer = true;
                            UpdateCount++;
                        }));
                    }
                }
    and

    Code:
                if (item.LootDropBooster)
                {
                    if (!LootDropBoost)
                    {
                        LootDropBoostTimeLeft = (float)item.Timer;
                        lootDropBoostFreeTimer = (float)item.Timer == -1.0 ? false : true;
                        return false;
                    }
                    else
                    {
                        SendInfo("You have already an active Loot Drop Booster.");
                        return true;
                    }
                }
    
                if (item.LootTierBooster)
                {
                    if (!LootTierBoost)
                    {
                        LootTierBoostTimeLeft = (float)item.Timer;
                        lootTierBoostFreeTimer = (float)item.Timer == -1.0 ? false : true;
                        return false;
                    }
                    else
                    {
                        SendInfo("You have already an active Loot Tier Booster.");
                        return true;
                    }
                }
    Although, I doubt you will be able to do it. My best advice would be to read what @Orbit said, and maybe learn some C# as well. Then only will you be able to create such basic events like this.

  4. #4
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    I know how to do it 2 ways, one every time the ability is pressed and the other only based in 'Player.cs' (which is what you wanted).

    I'd post the code, but after seeing above I won't lol
    Anyway, you'd I'll give you some hints.

    You must place the code in a place where it is called frequently so that it will constantly set 'LoopDropBoostTimeLeft' to 10 seconds (I think this is enough time). You'll see that the boost timer is raised to 10 each time you move your character which is bad imo as we don't want to keep assigning 10. So I made it such that if lower that 5 seconds it is reset to 10 (which is useful for 30min loot drops, etc.). To form the condition of the if statement you need to create another bool that is set based on the account's rank when the account information is loaded.

    To confirm you are correct, ensure you check the database for the table with the column 'ldtimer' and see if it is set correctly.

    Good luck!

  5. #5
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    Ugh, I will just spoon feed you some code.

    Player.Boosts.cs:
    Code:
            private int xdlmao;
    Code:
                if (LootDropBoost && lootDropBoostFreeTimer)
                {
                    if (LootDropBoostTimeLeft > 0)
                    {
                        lootDropBoostFreeTimer = false;
                        Owner.Timers.Add(new WorldTimer(1000, (w, t) =>
                        {
                            LootDropBoostTimeLeft -= xdlmao;
                            lootDropBoostFreeTimer = true;
                            UpdateCount++;
                        }));
                    }
                }
    Code:
                if (Client.Account.Rank == 3) {
                    xdlmao = 0;
                }
                else {
                    xdlmao = 1;
                }
    Not telling you where to put it, just use your brain. Not sure about optimised, tested it once, and it was stuck on 29:59, if you want to change it, you are on your own.

    Read what we said above, and learn some C#, this wasn't even 2 minutes of work...

    Make sure you put in the if else statement: return true (LootDropBoost && lootDropBoostFreeTimer);
    Last edited by DevilRotMG; 07-19-2018 at 04:50 AM.

  6. #6
    ManKind Gaming's Avatar
    Join Date
    Oct 2017
    Gender
    male
    Posts
    32
    Reputation
    10
    Thanks
    5
    My Mood
    Amused
    Quote Originally Posted by Orbit View Post
    No. I will not write it for you. You have to learn and do it for yourself. Although I can guide you to where and how you should do it.

    First of all, follow the code that handles loot drop boosts. You can do ctrl + shift + f and search for "loot drop." Find where it handles individual loot drop and try to find lootdropboost. There you can copy how lootdropboost works but make it work for your rank.

    I hope this helps in any way and that you understand that the help thread isn't made for people like you to beg for others work. Try to understand it and learn from it instead.
    Good luck
    I don't need it I knew how to do it in Loots.cs and change the drop rates and assign it to a rank. I just wanted to know if there was a way to do it in Player.cs, I could had worded that better.

    - - - Updated - - -
    @Luverdark, and @Nyaro I don't need this open.

  7. #7
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    Quote Originally Posted by ManKind Gaming View Post
    I don't need it I knew how to do it in Loots.cs and change the drop rates and assign it to a rank. I just wanted to know if there was a way to do it in Player.cs, I could had worded that better.

    - - - Updated - - -
    @Luverdark, and @Nyaro I don't need this open.
    I doubt you knew how to do it... Did you get your code written out? You literally asked here for people to write the code out for you, so I don't know what you are doing elsewhere.

    Anyways, just a tip:

    Learn your stuff before making a server, or it will just die very quickly...

  8. #8
    Luverdark's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    7,821
    Posts
    4,986
    Reputation
    1386
    Thanks
    2,030
    My Mood
    Yeehaw
    Closed upon request.




     
    Member Since 07-18-2015
    Mpgh Premium 07-17-2016
    Mpgh Premium Seller 08-17-2016
    Mpgh News Force (Gaming News) 02-09-2017
    Mpgh News Resignation 06-08-2017
    Realm Of The Mad God Minion 12-11-2017
    Former Staff 09-25-2018

Similar Threads

  1. [Solved] Understanding Loot Drop Percentages
    By Invader_Zim in forum Realm of the Mad God Private Servers Help
    Replies: 7
    Last Post: 05-06-2016, 07:36 AM
  2. [Help Request] Data Tracking for killed monsters and loot drops
    By Janube in forum Realm of the Mad God Help & Requests
    Replies: 12
    Last Post: 05-16-2014, 08:10 PM
  3. Loot drop and tier potions.
    By nathan463 in forum Realm of the Mad God Discussions
    Replies: 1
    Last Post: 04-21-2014, 03:55 AM
  4. There's a bunch of unnamed accounts buying Loot Drop Potions on USSouth.
    By Turtlezz in forum Realm of the Mad God Discussions
    Replies: 4
    Last Post: 11-26-2012, 04:31 AM
  5. increase loot drop
    By upload420 in forum Borderlands 2 Hacks
    Replies: 5
    Last Post: 10-08-2012, 07:10 PM