[Release]so that the items do not fall on other items

08/21/2008 19:35 konkizta#1
in client.cs looking for this:


Code:
case 3:
                                    {
                                        MyChar.Ready = false;
                                        uint ItemUID = (uint)((Data[7] << 24) + (Data[6] << 16) + (Data[5] << 8) + Data[4]);

                                        int Count = 0;

                                        foreach (uint uid in MyChar.Inventory_UIDs)
                                        {
                                            if (uid == ItemUID)
                                            {
                                                string Item = MyChar.Inventory[Count];

                                                DroppedItem e = DroppedItems.DropItem(Item, MyChar.LocX, MyChar.LocY, MyChar.LocMap, 0);
                                                World.ItemDrops(e);

                                                MyChar.RemoveItem(ItemUID);
                                            }
                                            Count++;
                                        }
                                        MyChar.Ready = true;
                                        break;
                                    }


and replace it by this:

Code:
case 3:
                                    {
                                        MyChar.Ready = false;
                                        uint ItemUID = (uint)((Data[7] << 24) + (Data[6] << 16) + (Data[5] << 8) + Data[4]);

                                        int Count = 0;

                                        foreach (uint uid in MyChar.Inventory_UIDs)
                                        {
                                            if (uid == ItemUID)
                                            {
                                                string Item = MyChar.Inventory[Count];

                                                DroppedItem e = 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,0);
                                                World.ItemDrops(e);

                                                MyChar.RemoveItem(ItemUID);
                                            }
                                            Count++;
                                        }
                                        MyChar.Ready = true;
                                        break;
                                    }
that's all. xD

sorry if my English is bad is that use translator.

:mofo:
08/21/2008 19:49 The_Real_Slim_Shady#2
nice man ths
08/21/2008 22:51 keving#3
ty dude good work keep it up :handsdown:
08/21/2008 22:54 alexbigfoot#4
GOOD work man!!
+k!
08/21/2008 23:09 kinshi88#5
Very simple fix, but good job.
08/21/2008 23:17 konkizta#6
thanks.

kinshi88 and thanks for your guides, are very good.
08/22/2008 11:49 glupkotrup#7
Nice nice... Good work ;)
08/22/2008 16:15 _Emme_#8
Or I think you could just do something like this:


Random r = new Random();
MyChar.LocX.R(-5, 5);
MyChar.LocY.R(-5, 5);

Well,not sure,im not at my computer and it was pretty long time ago I coded,a week or so,but ye i think thats the correct code. What it does basiclly is that it does Random at ur chars coords,well u not move but the item drops at different spots.

emme
08/27/2008 02:38 taguro#9
thanks for this fix man, keep up the good work
08/27/2008 15:08 jochemke#10
yea tnx i had some problems with it but its fixed now

+k
08/27/2008 18:34 tao4229#11
Quote:
Originally Posted by emildayan1 View Post
Or I think you could just do something like this:


Random r = new Random();
MyChar.LocX.R(-5, 5);
MyChar.LocY.R(-5, 5);

Well,not sure,im not at my computer and it was pretty long time ago I coded,a week or so,but ye i think thats the correct code. What it does basiclly is that it does Random at ur chars coords,well u not move but the item drops at different spots.

emme
Not insulting/proving you wrong/anything like that. But it'd be MyChar.LocX.R.Next(-5,5), you probably know that though <3(You were just going off random stuff off the top of your head =])
08/27/2008 19:41 _Emme_#12
Yeah,couldnt look and I was very tired=P
11/15/2008 03:33 almoshax.#13
thanks u realy helped me
11/19/2008 13:00 Danutzhaha#14
ty
11/20/2008 03:19 brodie67#15
Thank you very much works! +k :p