[Help] With DisCity Mob Drops

09/29/2008 04:02 jaker63#1
Code:
                    if (Name == "UndeadSpearman")
                    {
                        string Item = "723085-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(10) || BossMob && Other.ChanceSuccess(30)) ;
                    }
                }
it says
Code:
;
is an error anyone know how to fix it?
09/29/2008 04:12 tao4229#2
Code:
if (Name == "UndeadSpearman")
                    {
if (Other.ChanceSuccess(10) || BossMob && Other.ChanceSuccess(30))
{
                        string Item = "723085-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);
}

                    }
I think that's what you're looking for, not sure..
09/30/2008 05:29 pauldexter#3
for you newbie here is some tutorials of drop

red color= needs to be changed

Selected monster will only drop the item you choose.
Code:
                        if (Name == "[COLOR="Red"]Monster Name here[/COLOR]")
                        {
                            if (Other.ChanceSuccess([COLOR="Red"]rate of the drop[/COLOR]))
                            {
                                string Item = "[COLOR="Red"]item no.[/COLOR]-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 you want all monster will drop here is it.
Code:
                            if (Other.ChanceSuccess([COLOR="Red"]drop rate[/COLOR]))
                            {
                                string Item = "[COLOR="Red"]item no.[/COLOR]-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 you want your monster to drop your selected item for 100% here is it
Code:
                        if (Name == "[COLOR="Red"]Monster name[/COLOR]")
                        {
                            string Item = "[COLOR="Red"]item no.[/COLOR]-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);
                        }
hope it help for you
10/26/2008 15:32 ~jochemke~#4
it helped me to create a new item that gives u cps :D
10/26/2008 20:00 _Emme_#5
Actually,you didnt get an error,only a warning. As I say ; warning are nothing , just ignore them:)
10/26/2008 20:20 Kiyono#6
But a warning warns you for something so you're about to do something wrong, non?
10/26/2008 22:39 null#7
Quote:
if (Other.ChanceSuccess(10) || BossMob && Other.ChanceSuccess(30)) ;
that is an invalid "if" code block, as you are terminating it with a ;, not with a { CODE }