Register for your free account! | Forgot your password?

You last visited: Today at 21:26

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

Advertisement



Help,

Discussion on Help, within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Help,

Can anyone tell me how i can make Something like GC.MyChar.LastAlive
i wanna make it so that. LastAlive checks if theres No one else in that Map Alive iam trying to do Pk Events.. Version 5165
-Shunsui- is offline  
Old 12/02/2009, 21:58   #2
 
elite*gold: 0
Join Date: Dec 2009
Posts: 12
Received Thanks: 1
Quote:
Originally Posted by flako27 View Post
Can anyone tell me how i can make Something like GC.MyChar.LastAlive
i wanna make it so that. LastAlive checks if theres No one else in that Map Alive iam trying to do Pk Events.. Version 5165
Noone is gonna help you. These forums have died.
Zeya is offline  
Old 12/03/2009, 14:42   #3


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
What you need to do is create a hashtable or a dictionary of characters when they first join the map, then when people die in that map they need to be removed from the hashtable, everytime someone dies perform a check to see if the length of the hashtable is 1, if that checkreturns true then theres only 1 person left and they are the winner.

Im not gunna give ya any code for it, you should be able to work something out from that.
Korvacs is offline  
Thanks
2 Users
Old 12/03/2009, 18:31   #4
 
~*NewDuuDe*~'s Avatar
 
elite*gold: 111
Join Date: Feb 2008
Posts: 2,161
Received Thanks: 646
Was just about to do a new PK tournament myself, so thanks.
~*NewDuuDe*~ is offline  
Old 12/03/2009, 21:19   #5
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Thanks Korvac
-Shunsui- is offline  
Old 12/04/2009, 12:20   #6
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
well korvacs is right but that source probably already has it..

if it does for ALl chars like world.all since its lotf

Code:
byte Count = 0;

foreach (DictionaryEntry DE in AllAccounts)
{
Entity E = DE.Value;

if (E.InMap(1025))
{
if (Alive)
{
Count++;

}
}

if (Count = 1)
{
WE HAVE A WINNER..
}
PeTe Ninja is offline  
Thanks
2 Users
Old 12/04/2009, 13:18   #7
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Quote:
Originally Posted by PeTe Ninja View Post
well korvacs is right but that source probably already has it..

if it does for ALl chars like world.all since its lotf

Code:
byte Count = 0;

foreach (DictionaryEntry DE in AllAccounts)
{
Entity E = DE.Value;

if (E.InMap(1025))
{
if (Alive)
{
Count++;

}
}

if (Count = 1)
{
WE HAVE A WINNER..
}
THanx And Lol at your Siggy off to School now
-Shunsui- is offline  
Old 12/04/2009, 16:52   #8
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 505
Quote:
Originally Posted by Zeya View Post
Noone is gonna help you. These forums have died.
Deja vu.
Basser is offline  
Old 12/11/2009, 18:04   #9
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
#request close hes been helped.
PeTe Ninja is offline  
Thanks
1 User
Old 12/11/2009, 19:20   #10
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,000
#Closed
tanelipe is offline  
Closed Thread




All times are GMT +2. The time now is 21:26.


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.