|
You last visited: Today at 07:43
Advertisement
SImple Question
Discussion on SImple Question within the CO2 Private Server forum part of the Conquer Online 2 category.
09/25/2011, 15:09
|
#1
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
SImple Question
well i wanted to make horse race like that if the player isnt riding his horse the acc disconnect..how to write that ?? ,,i made smthing like Team Extreme Pk Tournament..i made every thing cool but couldnt add a case which is...when there is more than team leader no1 get award beside and when teamleader claim the award the teammates claim it too or vice versa ...how to write that in C# ?
|
|
|
09/25/2011, 15:14
|
#2
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Just make so they can't go off the horse or just disable all skills.
|
|
|
09/25/2011, 16:02
|
#3
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
Quote:
Originally Posted by BaussHacker
Just make so they can't go off the horse or just disable all skills.
|
aha ..Nice Idea but what about the 2nd part of Team pk ..Any hints or infos?? would be appriciate
|
|
|
09/25/2011, 16:09
|
#4
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
What you mean with 2nd part?
|
|
|
09/25/2011, 16:15
|
#5
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
Quote:
Originally Posted by BaussHacker
What you mean with 2nd part?
|
Adding smthing like that..if there r two or more teamleader no1 get awarded till it become only teamleader in map ..and when teamleader claim the reward everyteammate claim it too ..how it would be
|
|
|
09/25/2011, 16:55
|
#6
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Try turn what you just said into a programmatical way
|
|
|
09/25/2011, 17:18
|
#7
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
i tried but i failed heres my code ...Heres my Decent Code
Code
Code:
if (client.Alive && client.Team.TeamLeader)
{
foreach (GameState cli in client.Team.Teammates)
{
client.Entity.ConquerPoints += 20000;
Conquer_Online_Server.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + "'s Team claimed 20k cps for winning the Team Extreme Pk War and Received PurpleSparkle Halo .", System.Drawing.Color.White, Message.Center), Conquer_Online_Server.ServerBase.Kernel.GamePool.Values);
client.Entity.AddFlag(Update.Flags.PurpleSparkles);
DateTime.Now.AddDays(7);
client.Entity.Teleport(1002, 429, 378);
EntityTable.SaveEntity(client);
}
}
What do u think About that ...?
|
|
|
09/25/2011, 18:43
|
#8
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by shadowman123
i tried but i failed heres my code ...Heres my Decent Code
Code
Code:
if (client.Alive && client.Team.TeamLeader)
{
foreach (GameState cli in client.Team.Teammates)
{
client.Entity.ConquerPoints += 20000;
Conquer_Online_Server.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + "'s Team claimed 20k cps for winning the Team Extreme Pk War and Received PurpleSparkle Halo .", System.Drawing.Color.White, Message.Center), Conquer_Online_Server.ServerBase.Kernel.GamePool.Values);
client.Entity.AddFlag(Update.Flags.PurpleSparkles);
DateTime.Now.AddDays(7);
client.Entity.Teleport(1002, 429, 378);
EntityTable.SaveEntity(client);
}
}
What do u think About that ...?
|
DateTime.Now.AddDays(7); will not do anything, because you do not assign it to a variable or save it any places.
|
|
|
09/25/2011, 20:19
|
#9
|
elite*gold: 0
Join Date: Jul 2010
Posts: 55
Received Thanks: 11
|
meh
Code:
byte c = 0;
player winner;
Foreach( player in map)
{
if ( player.teamleader && player.alive)
{
winner = player
c++;
}
}
if(c != 1)
return;
else
foreach(tempplayer in winners.teammates)
{
// reward code
}
this is easiest way that I can think of!
|
|
|
09/25/2011, 20:34
|
#10
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by pwerty
meh
Code:
byte c = 0;
player winner;
Foreach( player in map)
{
if ( player.teamleader && player.alive)
{
winner = player
c++;
}
}
if(c != 1)
return;
else
foreach(tempplayer in winners.teammates)
{
// reward code
}
this is easiest way that I can think of!
|
Change if(c != 1) to if(c > 1)
Otherwise there would only be a winner, when there is one in the team.
|
|
|
09/25/2011, 20:47
|
#11
|
elite*gold: 0
Join Date: Jul 2010
Posts: 55
Received Thanks: 11
|
Quote:
Originally Posted by BaussHacker
Change if(c != 1) to if(c > 1)
Otherwise there would only be a winner, when there is one in the team.
|
Im pretty sure that it just make sure that there is only on winning team
and if c stays 0 for some reason then it couse crash or somthing coz "winner" will be empty/null. So there is no winner.teammates to look at.
EDIT: anyway its just Idea not code. He should work around it if he choose this Idea
|
|
|
09/25/2011, 21:14
|
#12
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by pwerty
Im pretty sure that it just make sure that there is only on winning team
and if c stays 0 for some reason then it couse crash or somthing coz "winner" will be empty/null. So there is no winner.teammates to look at.
EDIT: anyway its just Idea not code. He should work around it if he choose this Idea
|
Well your adding a value to the variable c for every member there is in the team.
The check you made is only checking if there is one member. If there is more or less, then it will just return. And I made a mistake as well, it should have been > 0. But true, the code should just be used as a reference.
|
|
|
09/25/2011, 21:27
|
#13
|
elite*gold: 0
Join Date: Jul 2010
Posts: 55
Received Thanks: 11
|
Quote:
Originally Posted by BaussHacker
Well your adding a value to the variable c for every member there is in the team.
The check you made is only checking if there is one member. If there is more or less, then it will just return. And I made a mistake as well, it should have been > 0. But true, the code should just be used as a reference.
|
well ..
Code:
if ( player.teamleader && player.alive)
c++;
player.teamleader is bool (and in team there can be only one leader) and player.alive is bool!
so this code counts alive team leaders.
next:: "winner" is teamleader. and its used as referance to reward team members.
Code:
foreach(tempplayer in winners.teammates)
{
// reward code
}
I hope this makes it clear. (sry for "spamming" but I just don't like to leave things unexplained)
|
|
|
09/26/2011, 01:42
|
#14
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
Well thank u both ..its amazing Solution u both Rocks
|
|
|
|
Similar Threads
|
Simple question!
11/25/2008 - Dekaron - 3 Replies
Hi, can any1 say how my game guard dont make update alone after i put gg killer archives there?
thx a lot ;)
|
Simple Question
09/03/2008 - Silkroad Online - 5 Replies
I have a simple question.
When i want to bot 24/7, my inventory gets quick full. When its full and goes to town. It wont buy pots because it has not enough space. Is there an option to turn this off and just let it go on?
|
Simple Question Needs Simple Answer[If CR gone what bot we can use]
08/08/2008 - Cabal Online - 2 Replies
If CR is not free what BOT can we use in PH... Many players in Ph asking that question....
TY...
|
Simple Question
07/11/2005 - World of Warcraft - 8 Replies
Just wanted to know how I can change my language settings. I already downloaded the English Language Package from WoW-Europe. However I didn't figure out how to apply the package. Can anyone help me?
Ich würde gerne wissen wie ich die Sprache von meinem WoW ändern kann. Hab das Sprachpaket von WoW_Europe gedownloadet. Würde gerne wissen wie ich es jetzt anwenden kann. Ok das wärs auch schon.
MfG Shithead
|
All times are GMT +2. The time now is 07:43.
|
|