Droprates

05/31/2012 08:01 -Sensei-#1
Can someone enlighten me, im a little bit confused onthis code.


Code:
            if (ServerBase.Kernel.Rate(ServerBase.Constants.MoneyDropRate - lessrate + morepercent))
            {
                uint amount = (uint)ServerBase.Kernel.Random.Next((int)MinMoneyDropAmount, (int)MaxMoneyDropAmount);
                //amount *= ServerBase.Constants.MoneyDropMultiple;

                if (amount > 500)  
                    amount = 10;

                if (amount == 0)
                    return;

                if (killer.VIPLevel == 1)
                {
                    killer.Money += amount;
                    return;
                }
if (amount > 500) is it 500+ gold will autopick up? And how about
amount = 10; whats the use of this.

Help would be appreciated.
Thanks in advance.
05/31/2012 08:24 Zeroxelli#2
If the amount is over 500, it becomes 10. If the amount is 0, we return nothing. If the person who killed the monster is VIP, it goes straight to their inventory.
05/31/2012 08:39 -Sensei-#3
Alright alright, this is a big mess :D
05/31/2012 10:51 I don't have a username#4
Bad code is bad.

Why'd you want to make it 10, when it reaches 500? Makes no sense to me o.o

Also it will never reach 0, because it's between the two numbers, not from and to.
05/31/2012 10:57 -Sensei-#5
Quote:
Originally Posted by I don't have a username View Post
Bad code is bad.

Why'd you want to make it 10, when it reaches 500? Makes no sense to me o.o

Also it will never reach 0, because it's between the two numbers, not from and to.
Im just using resources. Thats why i ask here to get enlighten :rolleyes:
05/31/2012 21:01 I don't have a username#6
Maybe look up on the actual C# language?
05/31/2012 23:08 shadowman123#7
Didnt i tell u Sensi that ill Code it for ya Completely & Efficiently .. Contact me on yahoo
06/01/2012 01:43 -Sensei-#8
Quote:
Originally Posted by shadowman123 View Post
Didnt i tell u Sensi that ill Code it for ya Completely & Efficiently .. Contact me on yahoo
Lets get it on :).

Quote:
Originally Posted by I don't have a username View Post
Maybe look up on the actual C# language?
I dont have time for it, i have lots of things to do besides being here. Im just having fun with this.

:cool:
06/01/2012 03:22 Zeroxelli#9
Oh, you coded that..? I assumed that was from another source lol shades of the LOTF era.
06/01/2012 10:33 I don't have a username#10
Quote:
Originally Posted by -Sensei- View Post
I dont have time for it, i have lots of things to do besides being here. Im just having fun with this.

:cool:
You got time to code a server, but not to learn coding? Lolwut.
06/01/2012 12:26 mineroxas#11
11
06/01/2012 12:39 -Sensei-#12
Quote:
Originally Posted by I don't have a username View Post
You got time to code a server, but not to learn coding? Lolwut.
I already told you that im doing this for fun in my free time. I hope thats more clear to you.