|
You last visited: Today at 19:07
Advertisement
Need help With Item Pick Up.
Discussion on Need help With Item Pick Up. within the CO2 Private Server forum part of the Conquer Online 2 category.
05/22/2014, 15:59
|
#1
|
elite*gold: 0
Join Date: Mar 2014
Posts: 46
Received Thanks: 0
|
Need help With Item Pick Up.
I got a problem in source 5670 with the item pick up. coz when i get the items drop in ground its still there it wont be gone it take a min. before the item will be remove in ground. any one know why is that happening. can till me where to start looking and what code i should search for it.
|
|
|
05/22/2014, 16:42
|
#2
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
|
start looking at dropitem and pickitem voids
|
|
|
05/22/2014, 17:13
|
#3
|
elite*gold: 0
Join Date: Mar 2014
Posts: 46
Received Thanks: 0
|
should it look at it in PacketHandler.cs?
Can You Help Me Whats Wrong With This Code
private static void PickupItem(FloorItem floorItem, Client.GameState client)
{
if (client.Screen.TryGetFloorItem(floorItem.UID, out floorItem) && !client.Trade.InTrade)
{
if (client.Entity.X == floorItem.X && client.Entity.Y == floorItem.Y)
{
uint owner = floorItem.Owner.Entity.UID;
if ((owner != 0 && owner == client.Entity.UID) || owner == 0 || Time32.Now >= floorItem.OnFloor.AddSeconds(ServerBase.Constants. FloorItemAvailableAfter))
{
goto Jump;
}
else if (client.Team != null)
{
if (client.Team.IsTeammate(owner))
{
if (client.Team.PickupItems && floorItem.ValueType == FloorItem.FloorValueType.Item)
{
if (floorItem.ItemID != 1088000 && floorItem.ItemID != 1088001)
{
goto Jump;
}
}
else if (client.Team.PickupMoney && floorItem.ValueType != FloorItem.FloorValueType.Item)
{
goto Jump;
}
}
}
client.Send(ServerBase.Constants.FloorItemNotAvail able);
return;
Jump:
FloorItem pickupAnimation = new FloorItem(true);
if (floorItem.ValueType != FloorItem.FloorValueType.Item)
client.Map.RemoveFloorItem(floorItem);
pickupAnimation.Type = FloorItem.Animation;
pickupAnimation.UID = client.Entity.UID;
pickupAnimation.X = client.Entity.X;
pickupAnimation.Y = client.Entity.Y;
if (floorItem.PickedUpAlready)
return;
floorItem.PickedUpAlready = true;
switch (floorItem.ValueType)
{
case FloorItem.FloorValueType.Item:
{
if (client.Inventory.Count <= 39)
{
client.SendScreen(pickupAnimation, false);
if (floorItem.Item.MobDropped)
client.Inventory.Add(floorItem.Item, Game.Enums.ItemUse.CreateAndAdd);
else
client.Inventory.Add(floorItem.Item, Game.Enums.ItemUse.Add);
floorItem.Type = FloorItem.Remove;
client.RemoveScreenSpawn(floorItem, true);
client.Send(ServerBase.Constants.PickupItem(Databa se.ConquerItemInformation.BaseInformations[floorItem.Item.ID].Name));
}
else
client.Send(ServerBase.Constants.FullInventory);
break;
}
case FloorItem.FloorValueType.Money:
{
client.Send(ServerBase.Constants.PickupGold(floorI tem.Value));
client.SendScreen(pickupAnimation, false);
client.Entity.Money += floorItem.Value;
floorItem.Type = FloorItem.Remove;
client.RemoveScreenSpawn(floorItem, true);
break;
}
case FloorItem.FloorValueType.ConquerPoints:
{
client.Send(ServerBase.Constants.PickupConquerPoin ts(floorItem.Value));
client.SendScreen(pickupAnimation, false);
client.Entity.ConquerPoints += (uint)Math.Min(floorItem.Value, 30);
floorItem.Type = FloorItem.Remove;
client.RemoveScreenSpawn(floorItem, true);
break;
}
}
return;
}
}
}
private static void DropItem(ItemUsage itemUsage, Client.GameState client)
{
Interfaces.IConquerItem item = null;
if (client.Inventory.TryGetItem(itemUsage.UID, out item))
{
if (item.ID == 0)
return;
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(item.ID, 0);
if (item.Lock != 0 || item.Suspicious)
return;
if (infos.BaseInformation.Type == Database.ConquerItemBaseInformation.ItemType.Dropa ble && !item.Bound)
{
ushort X = client.Entity.X, Y = client.Entity.Y;
if (client.Map.SelectCoordonates(ref X, ref Y))
{
FloorItem floorItem = new FloorItem(true);
floorItem.Item = item;
floorItem.ItemID = item.ID;
floorItem.ItemColor = item.Color;
floorItem.MapID = client.Map.ID;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = X;
floorItem.Y = Y;
floorItem.Type = FloorItem.Drop;
floorItem.OnFloor = Time32.Now;
floorItem.UID = FloorItem.FloorUID.Next;
floorItem.Owner = client;
while (client.Map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = FloorItem.FloorUID.Next;
client.SendScreenSpawn(floorItem, true);
client.Map.AddFloorItem(floorItem);
ushort stack = item.StackSize;
item.StackSize = 0;
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
item.StackSize = stack;
}
}
else
client.Inventory.Remove(item, Game.Enums.ItemUse.Delete);
}
}
|
|
|
05/22/2014, 17:28
|
#4
|
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
|
Quote:
Originally Posted by fairytaleco
should it look at it in PacketHandler.cs?
Can You Help Me Whats Wrong With This Code
|
Yeah, its not in code brackets which makes it ugly to read.
|
|
|
05/22/2014, 17:44
|
#5
|
elite*gold: 0
Join Date: Mar 2014
Posts: 46
Received Thanks: 0
|
how Should i code it right.?
|
|
|
05/22/2014, 18:02
|
#6
|
elite*gold: 153
Join Date: Mar 2011
Posts: 635
Received Thanks: 489
|
OMG! He means to put them in BB code "[code1]code here![/code1]" remove 1 from the brackets and put your code in code here!
Beginners xD!
|
|
|
05/23/2014, 00:18
|
#7
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,446
Received Thanks: 1,179
|
I don't care if you're just joking with your friend, foreign language isn't allowed. Plus, stay on topic.
|
|
|
05/23/2014, 13:42
|
#8
|
elite*gold: 0
Join Date: Mar 2014
Posts: 46
Received Thanks: 0
|
Thank abdoumatrix <--- i fixe it with my own work
|
|
|
 |
Similar Threads
|
Item stealer und Pick up Bot
05/06/2013 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 3 Replies
Hallo alle zusammen ich suche ein Pick Up Bot und ein Itemstealer
in google hab ich nichts gefunden und hier auch nicht ( by unpublished nicht!)
suche ein Pick Up Bot der schnell aufhebt
ich habe 2 bots aber die funktionieren nicht bzw. ich weiß nicht wie man die richtig beutz
PickUp Bot V4.0 Hidden by MarcoPolo
PickUp Bot International by MarcoPolo
|
S.V ...item pick up
08/09/2007 - Conquer Online 2 - 3 Replies
i set my bot to default so it could pick up dbs/mets/super/elites/uni's/gold like statted in the readme but it hardly picks up gold ....wats up with that?...by the way im talking about the latest bots.
text2schild.php?smilienummer=1&text=We Noobs Must Stick Together!' border='0' alt='We Noobs Must Stick Together!' />
|
How to pick up an item
06/28/2007 - Conquer Online 2 - 7 Replies
How to pick up an item when somebody is sitting on it? I saw people do that. Like i saw something and jumped on it, but it doesn't picks up yet, other char sit the same as me on the item and pick it up, but how??!! text2schild.php?smilienummer=1&text=Plz help, i'm noob' border='0' alt='Plz help, i'm noob' />
|
item pick up on co partner?
06/06/2006 - Conquer Online 2 - 0 Replies
i set my pick settings to meteor, dragonball,SunDiamond and in box b i put 9.
but it still picks up normal items and gold:( what number do i need to put in box b to just pick up ref,uni,super only? thank you for your time.
|
All times are GMT +2. The time now is 19:08.
|
|