PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Boats and LOS

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help 096
Display posts from previous:   

Author Message
Lad



Joined: 05 Feb 2006
Posts: 23

PostPosted: Mon May 08, 2006 8:44 pm    Post subject: Boats and LOS Reply with quote

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?

Author Message
CWO



Joined: 04 Feb 2006
Posts: 685
Location: Chicago, IL USA

PostPosted: Tue May 09, 2006 1:17 am    Post subject: Reply with quote

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:

  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:


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)


Author Message
Lad



Joined: 05 Feb 2006
Posts: 23

PostPosted: Tue May 09, 2006 8:14 pm    Post subject: Reply with quote

Code:
if ((who.multi).serial != (item.multi).serial)


it's working, thanx Smile

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help 096 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty