Register for your free account! | Forgot your password?

You last visited: Today at 07:43

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

Advertisement



SImple Question

Discussion on SImple Question within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
shadowman123's Avatar
 
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# ?
shadowman123 is offline  
Old 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.
BaussHacker is offline  
Old 09/25/2011, 16:02   #3
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by BaussHacker View Post
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
shadowman123 is offline  
Old 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?
BaussHacker is offline  
Old 09/25/2011, 16:15   #5
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by BaussHacker View Post
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
shadowman123 is offline  
Old 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
BaussHacker is offline  
Old 09/25/2011, 17:18   #7
 
shadowman123's Avatar
 
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 ...?
shadowman123 is offline  
Old 09/25/2011, 18:43   #8
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by shadowman123 View Post
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.
BaussHacker is offline  
Old 09/25/2011, 20:19   #9
 
pwerty's Avatar
 
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!
pwerty is offline  
Old 09/25/2011, 20:34   #10
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by pwerty View Post
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.
BaussHacker is offline  
Old 09/25/2011, 20:47   #11
 
pwerty's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 55
Received Thanks: 11
Quote:
Originally Posted by BaussHacker View Post
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
pwerty is offline  
Old 09/25/2011, 21:14   #12
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by pwerty View Post
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.
BaussHacker is offline  
Old 09/25/2011, 21:27   #13
 
pwerty's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 55
Received Thanks: 11
Quote:
Originally Posted by BaussHacker View Post
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)
pwerty is offline  
Old 09/26/2011, 01:42   #14
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Well thank u both ..its amazing Solution u both Rocks
shadowman123 is offline  
Reply


Similar Threads 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.


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.