[Question]Limiting packets in a certain place

09/28/2015 03:22 Kardil#1
As i said i want to prevent some packets from a certain region
for example:
i wanna prevent players using return scroll from a region .. i knew that is using a packet filter ( as i understood ) but i don't have a source for a packet filter or even know how it works.

thanks in advance
09/28/2015 04:08 magicanoo#2
There are multiple sources for packet filters lying around in the forum. You need to take a good look at them.
The concept is pretty straight forward: you'll monitor the player's movements through packets and save the regionID in a variable, then you need to find and parse the packet that is concerned with using inventory items and get to know the return scroll type. Intercept that packet and put a conditional IF statement as the following pseudo code:

if packet opcode == inventory using item
{
if parsed type == return scroll usage
{
if this client's regionID == prohibited regionID
//do whatever you want, either ignore the packet or send an error msg
}
}
09/28/2015 06:28 Kardil#3
Quote:
Originally Posted by magicanoo View Post
There are multiple sources for packet filters lying around in the forum. You need to take a good look at them.
The concept is pretty straight forward: you'll monitor the player's movements through packets and save the regionID in a variable, then you need to find and parse the packet that is concerned with using inventory items and get to know the return scroll type. Intercept that packet and put a conditional IF statement as the following pseudo code:

if packet opcode == inventory using item
{
if parsed type == return scroll usage
{
if this client's regionID == prohibited regionID
//do whatever you want, either ignore the packet or send an error msg
}
}
thanks that's so useful .. but if you don't mind lead me with a link or something to a good & trusted filter as i searched for it but no thing.
09/28/2015 06:57 magicanoo#4
Check the releases section. I never used any of the released ones, so I can't really tell.
09/28/2015 12:15 ​Exo#5
Quote:
Originally Posted by Kardil View Post
thanks that's so useful .. but if you don't mind lead me with a link or something to a good & trusted filter as i searched for it but no thing.
None of them are good!
09/28/2015 12:53 Devsome#6
Quote:
Originally Posted by ​Exo View Post
None of them are good!
The newest Superman is good
09/28/2015 13:11 AceSpace#7
You'll have to go through a lot of shiz to get a one working well, If u want to ignore the packets if X packet was sent, just use "continue;"
09/28/2015 14:14 ​Exo#8
Quote:
Originally Posted by Devsome View Post
The newest Superman is good

It's not open src so he won't be able to do whatever he likes tho.
09/29/2015 03:26 Kardil#9
Quote:
Originally Posted by Skipper* View Post
You'll have to go through a lot of shiz to get a one working well, If u want to ignore the packets if X packet was sent, just use "continue;"
I don't wanna use one of them , i just wanna know the way it works and i gonna make my own .. i've a knowledge in c# but not for sro .. anyway, so you mean that continue; will prevent the packet i select that's right?
Quote:
Originally Posted by ​Exo View Post
It's not open src so he won't be able to do whatever he likes tho.
Yes it's not .. but i've just decompiled it so easily o.O i don't know if nobody could but i just did
09/29/2015 09:50 Devsome#10
Quote:
Originally Posted by Kardil View Post
I don't wanna use one of them , i just wanna know the way it works and i gonna make my own .. i've a knowledge in c# but not for sro .. anyway, so you mean that continue; will prevent the packet i select that's right?


Yes it's not .. but i've just decompiled it so easily o.O i don't know if nobody could but i just did
I released a old source, but okay.
Then do it on your own