Whats wrong with this code?

07/02/2009 09:31 Arcotemple:)#1
someone help me please
i put this code in
everything works except /drop bigscroll
any1 see anything wrong?

EDIT: bigscroll is for dbscrolls
Quote:
if (Splitter[0] == "/drop")
{
uint MoneyDrops = 0;
byte Repeat = byte.Parse(Splitter[3]);
for (int i = 0; i < Repeat; i++)
{
if (Splitter[1] == "db")
{
string Item = "1088000-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(MyChar.LocY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
if (Splitter[1] == "bigdb")
{
string Item = "1088000-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(14) + General.Rand.Next(14)), (uint)(MyChar.LocY - General.Rand.Next(14) + General.Rand.Next(14)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
if (Splitter[1] == "bigscroll")
{
string Item = "700103-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(14) + General.Rand.Next(14)), (uint)(MyChar.LocY - General.Rand.Next(14) + General.Rand.Next(14)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
if (Splitter[1] == "met")
{
string Item = "1088001-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(MyChar.LocY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
}
}
07/02/2009 11:00 JustChillin#2
im guessing that its a custom item? Maybe you didnt add it properly.
07/02/2009 11:01 Arcotemple:)#3
Quote:
Originally Posted by JustChillin View Post
im guessing that its a custom item? Maybe you didnt add it properly.
its to drop db scrolls
07/02/2009 11:26 Incariuz#4
You had the wrong ID for the DBScroll... Change it to this.

Code:
if (Splitter[1] == "bigscroll")
{
string Item = "[COLOR="Red"]720028[/COLOR]-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(14) + General.Rand.Next(14)), (uint)(MyChar.LocY - General.Rand.Next(14) + General.Rand.Next(14)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
Edit: Wait, I'm guessing that is for a 5017 server, nevermind, you had the correct id then. In such a case, I don't know what your issue would be.
07/02/2009 11:28 Arcotemple:)#5
Quote:
Originally Posted by Incariuz View Post
You had the wrong ID for the DBScroll... Change it to this.

Code:
if (Splitter[1] == "bigscroll")
{
string Item = "[COLOR="Red"]720028[/COLOR]-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(14) + General.Rand.Next(14)), (uint)(MyChar.LocY - General.Rand.Next(14) + General.Rand.Next(14)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
i tired that
it didnt work
07/02/2009 11:45 JustChillin#6
Quote:
if (Splitter[0] == "/drop")
{
uint MoneyDrops = 0;
byte Repeat = byte.Parse(Splitter[3]);
for (int i = 0; i < Repeat; i++)
{
if (Splitter[1] == "db")
{
string Item = "1088000-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(MyChar.LocY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
if (Splitter[1] == "bigdb")
{
string Item = "1088000-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(14) + General.Rand.Next(14)), (uint)(MyChar.LocY - General.Rand.Next(14) + General.Rand.Next(14)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
if (Splitter[1] == "bigscroll")
{
string Item = "700103-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(14) + General.Rand.Next(14)), (uint)(MyChar.LocY - General.Rand.Next(14) + General.Rand.Next(14)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
if (Splitter[1] == "met")
{
string Item = "1088001-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(MyChar.LocX - General.Rand.Next(4) + General.Rand.Next(4(uint)(MyChar.LocY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)MyChar.LocMap, MoneyDrops);
World.ItemDrops(item);
}
}
}
Whats the point in having 2 different commands that do the same thing?
Hmm. I have not a clue, i dont do lotf, Maybe the 14's have something to do with it, change them to 4 see what it does. Im probably wrong because, again, i dont code lotf
07/02/2009 11:53 Arcotemple:)#7
Quote:
Originally Posted by JustChillin View Post
Whats the point in having 2 different commands that do the same thing?
Hmm. I have not a clue, i dont do lotf, Maybe the 14's have something to do with it, change them to 4 see what it does. Im probably wrong because, again, i dont code lotf
lol i got it to work already its cool

but the 2 commands are different

/drop db just drops dbs in a small space so all the dbs are next to eachother
/drop bigdb drops the dbs but spreads them out alot more
07/02/2009 12:34 Incariuz#8
What was the issue? If you don't mind me asking...
07/02/2009 22:32 Arcotemple:)#9
Quote:
Originally Posted by Incariuz View Post
What was the issue? If you don't mind me asking...
the issue was the dbscrolls wouldnt drop
07/02/2009 23:00 _Emme_#10
He was wondering how you solved it. Anyhow, problem solved, PM Incariuz if you want to give answer.

#closed