off the top of your head...

02/19/2013 10:54 Real~Death#1
anyone got the complete array of packets that are sent/recived when leaving the guild war "it is time for your pardon" release?

I know it was psted or discused before.I had A nice documented file on it,but deleted all my CO stuff years ago :/
the packet reader i been using has a hard time filtering out the junk i don't need.It's just taking me longer then it should.
02/19/2013 12:00 go for it#2
" complete array of packets" ? i don't really understand what you mean by this
but all i know is that at any threat of your's which is executing by timer
ex. at trinity there is 7-9 threads executing with a timer , you can simply do a check at any of them like that
create datetime variable
if datetime now day is gw day
if datetime now min ( >= 0 and <= 5 ) or ( >= 30 and <= 35)
if last chat packet sent to tell players to get out is .min + 1 is less than now
foreach player online
if map = gw jail
send chat packet tellin them to get out
set a datetime variable = date time now

and do almost the same with npc to release them on time

never knew it got some special packets but that's how i handle it and i don't think it takes much cpu to check for 1 or 2 conditions per second
and i don't think there is a better way to handle it , you will always need to raise an event from a timer which will do that check on the timer

wish that was what you want
02/20/2013 15:00 Super Aids#3
Quote:
Originally Posted by go for it View Post
" complete array of packets" ? i don't really understand what you mean by this
but all i know is that at any threat of your's which is executing by timer
ex. at trinity there is 7-9 threads executing with a timer , you can simply do a check at any of them like that
create datetime variable
if datetime now day is gw day
if datetime now min ( >= 0 and <= 5 ) or ( >= 30 and <= 35)
if last chat packet sent to tell players to get out is .min + 1 is less than now
foreach player online
if map = gw jail
send chat packet tellin them to get out
set a datetime variable = date time now

and do almost the same with npc to release them on time

never knew it got some special packets but that's how i handle it and i don't think it takes much cpu to check for 1 or 2 conditions per second
and i don't think there is a better way to handle it , you will always need to raise an event from a timer which will do that check on the timer

wish that was what you want
A thread running with a loop checking time should never take any memory literally. You could probably run 500 threads doing it and it wouldn't really do a lot.

What you should remember is if your loops are running for quite some time then you should always sleep the thread for minimum 1 millisecond.

A loop like this:
Code:
while (true) { }
Will leak memory like there was no tomorrow.
02/22/2013 05:32 pro4never#4
I've generally preferred a single server thread that handles basic actions (run it once a second for reasonable accuracy with very little overhead) which can handle timed events such as triggering server events and such.


Here's some information..

#1: No packets are sent to the client when you can leave jail except for the message that you can leave (broadcast to the jail map every X minutes)
#2: The npc then checks if it's a valid time to leave when you use it. That changes what options it allows.


That being said... I prefer a system where you are just not allowed back in guild war for X minutes after you revive there (so you can still go play in jail or go farm for the 15 minutes). I feel that forcing ppl into gw jail just forces people to go afk and waste their time when there's better options. If that's the route you wanna take then just do a datetime listing when they can go back into GW (init to DateTime.Now when you login to the server) and when they revive in gw map just set it to DateTime.Now.AddMinutes(X)

pretty simple stuff.