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
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
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.
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..
}
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..
}