[Release] Gem Drops

01/16/2009 14:30 Exia13#1
It's not much of a "release":p but i noticed that some sources don't have it, so, here goes.

Search for:
Code:
if ((Other.ChanceSuccess(1.5)) || (BossMob && Other.ChanceSuccess(20)))// Dragonball Drop rate
                        {
                            string Item = "1088000-0-0-0-0-0";
Under that, add:
Code:
 //created by Exia13
if ((Other.ChanceSuccess(2)) || (BossMob && Other.ChanceSuccess(20)))// NPG
                            {
                            string Item = "700001-0-0-0-0-0";
                            DroppedItem item = DroppedItems.DropItem(Item, (uint)(PosX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(PosY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)Map, MoneyDrops);
                            World.ItemDrops(item);
                            }
                        if ((Other.ChanceSuccess(2)) || (BossMob && Other.ChanceSuccess(20)))// NDG
                            {
                            string Item = "700011-0-0-0-0-0";
                            DroppedItem item = DroppedItems.DropItem(Item, (uint)(PosX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(PosY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)Map, MoneyDrops);
                            World.ItemDrops(item);
                            }
                        if ((Other.ChanceSuccess(2)) || (BossMob && Other.ChanceSuccess(20)))// NRG
                            {
                            string Item = "700031-0-0-0-0-0";
                            DroppedItem item = DroppedItems.DropItem(Item, (uint)(PosX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(PosY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)Map, MoneyDrops);
                            World.ItemDrops(item);
                            }
                        if ((Other.ChanceSuccess(1)) || (BossMob && Other.ChanceSuccess(20)))// NTG
                            {
                            string Item = "700071-0-0-0-0-0";
                            DroppedItem item = DroppedItems.DropItem(Item, (uint)(PosX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(PosY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)Map, MoneyDrops);
                            World.ItemDrops(item);
                            }
//created by Exia13
Thats it, you guys should know how to change the drop rates. If not, too bad :p. Build the solution and you're done.
P.S. i added NTGs just for fun ^^

This is my VERY FIRST release :D even if it is pretty basic coding.

You know the drill :p PRESS THANKS IF I HELPED YOU OUT
01/16/2009 15:09 _Emme_#2
Quote:
if ((Other.ChanceSuccess(2)) || (BossMob && Other.ChanceSuccess(20)))//
{

uint ItemID = 70001;
int Plus = General.Rand.Next(1,4);
int Plus1 = Plus * 10;
ItemID = ItemID * Plus1;
DroppedItem item = DroppedItems.DropItem(Item, (uint)(PosX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(PosY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)Map, MoneyDrops);
World.ItemDrops(item);
}

Not sure if it works,but its better than that massive code for each gem.
01/16/2009 17:17 Exia13#3
Ah i c. by putting 70001 it drops all items using those first few numbers, right? In this case gems.
01/16/2009 17:58 ~*NewDuuDe*~#4
Lol this is in one of the released sources, cant remember the name thou
01/16/2009 18:03 Exia13#5
Like i said, this is in SOME, not all. I am using Kinshi's source. He didnt have it in his source so i simply copied the code for when Dbs drop and change the item IDs to gemIDs. Wasn't that hard considering i cant code :p lol

I've been thinking about starting up another Pserver, but im too lazy :p. I play pservers for fun, but being a Gm and runiing a pserver simply turns into work. I could do it anytime, but i just need to think of a name? Any suggestions? lol