Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 07:39

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[REQ] Sorta timer thingy for CoEmu v2[Read]

Discussion on [REQ] Sorta timer thingy for CoEmu v2[Read] within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
xellios's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 310
Received Thanks: 13
[REQ] Sorta timer thingy for CoEmu v2[Read]

I made a npc but its supposed to teleport you to a map only if its between 16:00 and 17:00 how can i do this?

Second question :
I want him to only let in 50 people how can i do that too?


Thanks for your help and time,
Xellios
xellios is offline  
Old 07/14/2009, 20:51   #2
 
xellios's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 310
Received Thanks: 13
Sorry for the bump cuz otherwise nobody could see this thread and its kinda needed and i ddont want to post 2 threads
xellios is offline  
Old 07/14/2009, 21:04   #3
 
elite*gold: 0
Join Date: Feb 2007
Posts: 28
Received Thanks: 0
Busca la funcion datetime para c#...

por ejemplo...

if (DateTime.Now.ToString("hh:mm:ss") == "17:00:00")
{
codigo.
}
Roykssop is offline  
Old 07/14/2009, 21:44   #4
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,884
Quote:
Originally Posted by xellios View Post
I made a npc but its supposed to teleport you to a map only if its between 16:00 and 17:00 how can i do this?

Second question :
I want him to only let in 50 people how can i do that too?


Thanks for your help and time,
Xellios
The "easiest" and most efficient way to do it would be to use the DateTime structure provided by microsoft. You can check if it's in between that time, by doing the following,

Code:
int Hours = DateTime.Now.Hour;
if (Hours >= 16 && Hours <= 17)
{
// ... What to do if it's inbetween this time period
}
else
{
// ... What to do if it is not within the 16h - 17h time period.
}
As for limiting 50 people coming in, you'll need a static-variable, i.e.
Code:
public const int LimitEnter = 50;
public static int PeopleEntered = 0;
And then simply increment (add one) that number everytime someone enters the map through your npc.

If you wish to limit it so only 50 people are on the map, you'll need to increment the variable if someone logs into that map, decrement it (subtract one) if someone leaves that map as well.
InfamousNoone is offline  
Old 07/14/2009, 22:10   #5
 
xellios's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 310
Received Thanks: 13
none of these work lol
xellios is offline  
Old 07/14/2009, 22:24   #6
 
elite*gold: 0
Join Date: Feb 2007
Posts: 28
Received Thanks: 0
Well we gave you a little help, so you should make your own solution.
Roykssop is offline  
Reply


Similar Threads Similar Threads
[Off topic sorta] The WoW servers
01/22/2010 - WoW Private Server - 3 Replies
I would like to have join one of these servers, however, the language used in the threads for the servers is one i do not understand. So, if there is an english server... Could anyone point me to it.... agian, i dont understand the language used in these threads to advertise the servers. So yeah, any help if apprecieated.
[NEW SERVER] (sorta) EdenOnline
01/19/2010 - EO PServer Hosting - 6 Replies
We are once again opening our doors. Welcome to Eden-Online New client download, VIP based drops. The account logins has all been saved and returning players are all privilaged with VIP status. however the characters and pets has not been saved. Welcome to our sites =)
[RELEASE] COEMU 5095 SOURCE, WITH FLOWERS, NOBILITY, MANY MORE READ!
11/11/2009 - CO2 PServer Guides & Releases - 58 Replies
#closed.... -.-
hi! look! i read the guide and made a long topic thingy!
12/22/2008 - Say Hello - 0 Replies
Well, as you can/should be able to guess, I'm new to elitepvpers. I play Shaiya fanatically and hope to make a name for myself in the pvp area even though I haven't been in much. I hope that I can help in any way for everyone to prosper. And live long. xD I go by soady in the forums but in game... if you don't know my name, it's ilas. If you want to know my name... You'll have to befriend me or show me I can trust you. :] wow this long for an intro thing... So I'll stop now. ^-^ peace!



All times are GMT +2. The time now is 07:39.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.