So I have been playing around with traps lately using the ground item packet (1101) on patch 5065.
Not really getting the results I was expecting.
So I am able to display a trap, using either subtype 10 or 11. Its there on the ground, I can see it etc.
Now, I was under the impression that the client would then send a packet to the server when a trap is stood on or 'activated'. However, I have not had this happen yet.
Am I correct in this assumption? Am I just doing something wrong so the client doesn't really know its a trap?
Or am I going to have to check for traps manually on each location change.
Lastly, I am unable to remove the trap. It will disappear if you go off screen, but I cannot make it disappear while on screen.
I have tried sending subtype 12, with the trap info to remove it.
I have also tried sending subtype 2 (DeleteItem).
I even tried sending the GeneralData packet with the remove entity subtype.
All of the above had no luck.
I was using the UID between 900,000 and 999999. All with no luck
Does anyone have any idea how traps work?
I know there is a way to remove them, since TQ does it with squamas, I just haven't figured out how...
And I also can't really imagine having to check for a trap every location change. I know you will have to validate that there is a trap, but checking for a trap every jump seems quite inefficient, even for TQ.
The client doesn't send a "pick up" to the server because a method like that could be exploited. Place your trap in your map objects collection, proximity check each character server-side, if a character comes close you can remove the trap and activate the effect associated.
Send packet 1101 with subtype 10 to create the trap.
Worked fine and the trap displayed.
Sent packet 1101 again with subtype 12, and voila, trap disappeared!
I go back to my 5065 version, do everything exactly the same.
Nope, trap stays where it is.
Is there a different way of removing these in lower patches?
Does anyone have some kind of clue.
You validate things server side, not client side. You should validate trap coordinates on the server. Store the traps in some sort of collection and check whether the coords match the players.
Ex. use a point struct.
Code:
struct Point
{
public int X;
public int Y;
public Point(int x, int y)
{
X = x;
Y = y;
}
}
Code:
ConcurrentDictionary<Point, Trap> Traps; // var trap = Traps[new Point(100, 150)];
You validate things server side, not client side. You should validate trap coordinates on the server. Store the traps in some sort of collection and check whether the coords match the players.
Ex. use a point struct.
Code:
struct Point
{
public int X;
public int Y;
public Point(int x, int y)
{
X = x;
Y = y;
}
}
Code:
ConcurrentDictionary<Point, Trap> Traps; // var trap = Traps[new Point(100, 150)];
I fully intend to validate server side.
But right now that is pretty useless if they cannot be removed
According to TQ's source code, you also have to specify the location and type of the trap. This is the method they use for creating the removal packet (using subtype 12):
The identity range for a normal trap (called a magic trap for TQ) should be 900001 - 989999. The identity range for a synchro trap (I haven't tested with this) should be 990001 - 999999. be sure that you're using that identity range. I haven't tested traps this low of a patch, so it's possible that you might have to reverse engineer the client a bit to see what inputs it's expecting.
[ BOT TRAPS ] In Jangan 04/23/2014 - Silkroad Online - 8 Replies Wtf , people gone crazy or what ? why are you doing bot traps in jangan ? there is only few gold bots lvl 80+ . Yesterday i came home high as a cow and gone to bed. i woke up and WTF -20 % ?? I got breakdown lol :D . In future , people , please dont do bot traps in jangan , cause in jangan 98 % = player bots ;) Bye
Request codes traps 07/25/2013 - Facebook - 1 Replies you can have the codes of the traps WOM thanks
[Sammeltherad] Mob Traps 01/21/2011 - Minecraft - 11 Replies Hier könnt ihr
- eure mob traps posten (mit bau einleitung)
- gegen seitig mob traps tauschen
- Oder Fragen zu mob traps stellen
Viel Spaß
Mfg
Be able to put infinite traps? 02/06/2009 - RF Online - 0 Replies is there a way to be able to put more traps like 30 , 40 etc on a same spot?
Nid Help How to murder x-traps from p servers... 09/17/2008 - Cabal Online - 1 Replies as the topic says any existing threads has been posted here just asking lame on click the search button...