Regarding Packet Hooks

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
ThisIsMe
Distro Developer
Posts: 52
Joined: Sun Jul 17, 2016 1:29 am
Contact:

Regarding Packet Hooks

Post by ThisIsMe » Sun Apr 15, 2018 2:04 pm

Question, if I write a packet hook for instance deny pick up, does this override or interfere with the server's normal handling of this?

I'm trying to write an improved open paper doll function so that I can send a flag to allow staff or players to remove or change clothing on another player and npc for staff and npcs in certain situations like player vendors. The issue is I think the deny lifting packet is interfering with me dragging an item from the mobile. The item is picked up for a split second then snaps back and I get the "you can't move this" error. (May not be that exact message but it's one of the 5 messages).

RusseL
Forum Regular
Posts: 341
Joined: Fri Feb 20, 2009 8:30 pm

Re: Regarding Packet Hooks

Post by RusseL » Sun Apr 15, 2018 11:50 pm

ThisIsMe wrote:
Sun Apr 15, 2018 2:04 pm
Question, if I write a packet hook for instance deny pick up, does this override or interfere with the server's normal handling of this?
if i remember correctly It depends on return value of your packet hook.
return 1 - core will not handle this packet
return 0 - core will handle packet after your hook is done.

ThisIsMe
Distro Developer
Posts: 52
Joined: Sun Jul 17, 2016 1:29 am
Contact:

Re: Regarding Packet Hooks

Post by ThisIsMe » Mon Apr 16, 2018 9:25 am

Cool thanks, I will try this out and see. Appreciate you taking the time to answer.

User avatar
CWO
POL Expert
Posts: 1137
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA
Contact:

Re: Regarding Packet Hooks

Post by CWO » Mon Apr 16, 2018 5:02 pm

The problem with this is that if you block the deny packet, the client will have a ghost item on it but the server still denied it so it's not moved. The server has to accept that the item can be moved otherwise it will not be.

Post Reply