Refinery Info packet not working.

04/03/2011 03:11 kill_acvc#1
I borrowed this packet from pro4never's source but I can't make it work.
Any ideas?

Quote:
public static GamePacket RefineryInfo(Item I, bool self, uint Pos,uint Type,uint Level,uint Effect,uint Expires)
{
byte[] Pack = new byte[44];
WriteUInt16(36, 0, Pack);
WriteUInt16(2077, 2, Pack);
WriteUInt32(Pos, 4, Pack);//position
WriteUInt32(I.UID, 8, Pack);
if (!self)
WriteUInt32(2, 12, Pack);
// if (I.Refinery != null)
// {
WriteUInt32((uint)Type, 16, Pack);//refinery type
WriteUInt32(Level, 20, Pack);//lvl
WriteUInt32(Effect, 24, Pack);//effect
WriteUInt32(Expires, 28, Pack);//time remaining

// }
// else return new byte[] { };
return new GamePacket(Pack);
}
04/03/2011 09:45 pro4never#2
You're using it wrong. There's nothing wrong with the packet.

Make sure that the refinery type you send is a valid subtype and the other variables are all proper also :P
04/03/2011 17:05 kill_acvc#3
Quote:
Originally Posted by pro4never View Post
You're using it wrong. There's nothing wrong with the packet.

Make sure that the refinery type you send is a valid subtype and the other variables are all proper also :P


Ok I have a doubt. What does that that "self" bool mean? And what is "Effect"? Because the rest I know how to use.

Thanks, by the way.

[Edit]
Forgot to say... I'm using it in this fashion

Quote:
foreach (Item I in Client.MyCharacter.Inventory.This.Values)
Client.AddSendGamePacket(GamePackets.RefineryInfo( I, true, 0, (uint)Enums.ItemEnums.RefineryType.Breakthrough, 3, 255, uint.Parse(DateTime.Now.AddDays(7).ToString("yyddm m"))).ToArray);
04/03/2011 17:10 Kiyono#4
self bool is not needed and effect is percentage appearing on items.
For example, using 200 for effect would give this:
[Only registered and activated users can see links. Click Here To Register...]
04/03/2011 17:31 kill_acvc#5
Quote:
Originally Posted by Kiyono View Post
self bool is not needed and effect is percentage appearing on items.
For example, using 200 for effect would give this:
[Only registered and activated users can see links. Click Here To Register...]
Oh I see, thanks. =P But I guess I know what's going on. I was using a 5372 client while the packet was sniffed for 5355 clients =P. I'll test this theory now and thanks for the informations.
04/03/2011 19:11 pro4never#6
It should still work on the latest client. Last I tested it with was 5370 I think.

The self bool is completely wrong. It should be coded as 2 always for refinery (it's like a 'send type'. 2 for refinery, 14 or something for dragon souls)


But yes, make sure you have valid values in all of the offsets and it works just great.


For example...

ItemInfo item = user.Equipment[1];//headgear or w/e. MUST be equipped or this will not work
user.Send(Packets.RefineryInfo(item, true, item.Location, 301, 1, 10, 1000));
04/05/2011 00:35 kill_acvc#7
Quote:
Originally Posted by pro4never View Post
It should still work on the latest client. Last I tested it with was 5370 I think.

The self bool is completely wrong. It should be coded as 2 always for refinery (it's like a 'send type'. 2 for refinery, 14 or something for dragon souls)


But yes, make sure you have valid values in all of the offsets and it works just great.


For example...

ItemInfo item = user.Equipment[1];//headgear or w/e. MUST be equipped or this will not work
user.Send(Packets.RefineryInfo(item, true, item.Location, 301, 1, 10, 1000));

Just noticed the packet works only for equipped items. Thanks.

#request close