if player1 killed player2 do this action , else do another action .
Discussion on if player1 killed player2 do this action , else do another action . within the CO2 Private Server forum part of the Conquer Online 2 category.
if (attacker.MapID == 1038 && attacked.MapID == 1038) <<== Check about that They r in same map (its useless anyways )
{
if (attacker.Owner.Entity.Dead)
{
attacker.Teleport(1002, 421, 380);<<= This case means that attacker is Dead and teleported to Tc Then
}
else
{
attacker.Teleport(1003, 421, 380); <<= This case means that attacker is alive and be teleported to get prize
}
}
Simplest way I can think of doing it is when you add them to your event (I assume this is still for your elite pk tournament so you should be posting this question inside that thread like I told you to...) would be to create a class for ElitePkTournamentMatch.
This will hold both players, their damage and everything else as well as having some simple methods such as..
EventStart()
EventEnd()
Win(bool playerOne)
etc
Then in your player death code do something like..
Then in your win method make sure to award prizes and run your RoundEnd() code which would clear the ElitePkMatch value for all clients competing and send them to wherever you want.
Tada!
<edit>
The reason I would do something like that is it avoids any extra threads or timers checking conditions... I'd consider it more of an "asynchronous event" because the only time the event needs to end (in this situation) is when a player dies... so you run your checks only when someone dies! If you wanted the round to also have a timeout value then you'd need a different solution (such as a timer which will end the round if it hasn't already been destroyed when the timer expires... but w/e!)
Simplest way I can think of doing it is when you add them to your event (I assume this is still for your elite pk tournament so you should be posting this question inside that thread like I told you to...) would be to create a class for ElitePkTournamentMatch.
This will hold both players, their damage and everything else as well as having some simple methods such as..
EventStart()
EventEnd()
Win(bool playerOne)
etc
Then in your player death code do something like..
Then in your win method make sure to award prizes and run your RoundEnd() code which would clear the ElitePkMatch value for all clients competing and send them to wherever you want.
Tada!
<edit>
The reason I would do something like that is it avoids any extra threads or timers checking conditions... I'd consider it more of an "asynchronous event" because the only time the event needs to end (in this situation) is when a player dies... so you run your checks only when someone dies! If you wanted the round to also have a timeout value then you'd need a different solution (such as a timer which will end the round if it hasn't already been destroyed when the timer expires... but w/e!)
so this code will not work for me ?
PHP Code:
public void EventEnd()
{
if (pOne.Entity.Dead)
{
pOne.Entity.Teleport(1002, 421, 380); //<<= This case means that attacker is Dead and teleported to Tc Then
pTwo.Entity.Teleport(pTwo.Entity.PreviousMapID, pTwo.Entity.PrevX, pTwo.Entity.PrevY);
pTwo.Entity.PKMode = pOne.Entity.PKMode;
pOne.Entity.PKMode = Conquer_Online_Server.Game.Enums.PKMode.Capture;
pOne.Send(new Data(true) { UID = pOne.Entity.UID, ID = Data.ChangePKMode, dwParam = (uint)pOne.Entity.PKMode });
pOne.Entity.PKMode = pTwo.Entity.PKMode;
pTwo.Entity.PKMode = Conquer_Online_Server.Game.Enums.PKMode.Capture;
pTwo.Send(new Data(true) { UID = pTwo.Entity.UID, ID = Data.ChangePKMode, dwParam = (uint)pTwo.Entity.PKMode });
this.EventEnd();
}
else
{
pTwo.Entity.Teleport(1002, 421, 380); //<<= This case means that attacker is Dead and teleported to Tc Then
pOne.Entity.Teleport(pOne.Entity.PreviousMapID, pOne.Entity.PrevX, pOne.Entity.PrevY);
pTwo.Entity.PKMode = pOne.Entity.PKMode;
pOne.Entity.PKMode = Conquer_Online_Server.Game.Enums.PKMode.Capture;
pOne.Send(new Data(true) { UID = pOne.Entity.UID, ID = Data.ChangePKMode, dwParam = (uint)pOne.Entity.PKMode });
pOne.Entity.PKMode = pTwo.Entity.PKMode;
pTwo.Entity.PKMode = Conquer_Online_Server.Game.Enums.PKMode.Capture;
pTwo.Send(new Data(true) { UID = pTwo.Entity.UID, ID = Data.ChangePKMode, dwParam = (uint)pTwo.Entity.PKMode });
this.EventEnd();
}
}
Action 9! 03/29/2011 - Dekaron Private Server - 27 Replies I don't know if you guys read the kr website sometimes but well I do and just noticed this.
http://i52.tinypic.com/2555fyd.jpg
Update will be called,
16ppl can enter the Colosseum and its like survival match
You can also do it in a pt mode (2:2,5:5)
Action-CO where real action comes in co privateserver 01/12/2011 - CO2 PServer Archive - 4 Replies At the begging I would like to say hi
I would like to produce you new server called Action-CO
Server is 5095 as patch and is on VPS
At first I want to say server is still Beta like on levels and that and shopping mall items worth alot atm we r decreasing in time so please we ask you for patience also atm there r no donations for ppl who lives out of egypt atm since there r no Paypay account to provide us with the money untill then there r no donations.
Server Features
1:-Server mobs...
Action 6 First Ban. 04/02/2010 - Dekaron - 15 Replies Any got bann, after action 6?