PenUltima Online

It is currently Sat Sep 06, 2008 11:19 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Boats and LOS
PostPosted: Mon May 08, 2006 4:44 pm 
Offline

Joined: Sun Feb 05, 2006 3:48 am
Posts: 23
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 08, 2006 9:17 pm 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 750
Location: Chicago, IL USA
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)



Top
 Profile  
 
 Post subject:
PostPosted: Tue May 09, 2006 4:14 pm 
Offline

Joined: Sun Feb 05, 2006 3:48 am
Posts: 23
Code:
if ((who.multi).serial != (item.multi).serial)


it's working, thanx :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl