Boats and LOS

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 096.
Note: Core 096 is no longer officially supported.
Post Reply
Lad
New User
Posts: 23
Joined: Sun Feb 05, 2006 3:48 am

Boats and LOS

Post 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?
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post 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) 

Lad
New User
Posts: 23
Joined: Sun Feb 05, 2006 3:48 am

Post by Lad »

Code: Select all

if ((who.multi).serial != (item.multi).serial) 
it's working, thanx :)
Post Reply