Page 1 of 1
Boats and LOS
Posted: Mon May 08, 2006 4:44 pm
by Lad
khm i will tray describe situation:
we have 2 boats, on first we have player and on 2'nd items:)
player can pick up items from secend boat.. its any way to block this in scripts/packets ? is possible to check los in this action?
Posted: Mon May 08, 2006 9:17 pm
by CWO
Well, you can probably use a packethook on 0x07. I havent done anything like this nor tested this so you should test it before putting it on your shard... something like
Code: Select all
var item := SystemFindObjectBySerial(packet.GetInt32(1));
if (who.multi != item.multi)
var reject := CreatePacket(0x27, 2);
reject.SetInt8(1, 0x00);
reject.SendPacket(who);
return 1;
endif
return 0;
If this works as I'm thinking, this will stop anyone from moving anything on any multi whether it'd be a house or a boat unless they were standing on it.
Packet breakdown:
Code: Select all
0x07
Pick Up Item(s) (7 bytes)
· BYTE cmd
· BYTE[4] item id
· BYTE[2] # of items in stack
0x27
Reject Request to Move Items (2 bytes)
· BYTE cmd
· BYTE unknown1 (0x00)
Posted: Tue May 09, 2006 4:14 pm
by Lad
Code: Select all
if ((who.multi).serial != (item.multi).serial)
it's working, thanx
