|
You last visited: Today at 16:19
Advertisement
Code ExpBall in private Server
Discussion on Code ExpBall in private Server within the Conquer Online 2 forum part of the MMORPGs category.
06/12/2008, 06:02
|
#1
|
elite*gold: 0
Join Date: Jun 2008
Posts: 113
Received Thanks: 58
|
Code ExpBall in private Server
Nevermind buddies, I got it the way to work i needed it to =D
|
|
|
06/12/2008, 06:12
|
#2
|
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
|
Um.. I don't know the variables/classes/methods. How am I expected to code it? >_>
|
|
|
06/12/2008, 07:06
|
#3
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
|
Simple make it connect to another file,where it is listed like
else if (Character.Level == 1)
Character.Level = 25;
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Level, Character.Level));
HeadController.SendVisibilityfield(StandardPackets .Effect.Packet("LevelUp", Character.PlayerID), Character);
StatPoints SP = StatSystem.KrijgPoints(Character.Level, Character.Class);
Character.Vitality = SP.Vitality;
Character.Strength = SP.Strength;
Character.Spirit = SP.Spritit;
Character.Agility = SP.Agility;
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Agility, Character.Agility));
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Vitality, Character.Vitality));
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Strenght, Character.Strength));
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Spirit, Character.Spirit));
Character.HP = Character.MaxHP;
}
else
{
Dia.AddMessage("You used 5 expball's today. Are you sure you want to use more?");
Dia.AddOption("Yeah", 1);
Dia.AddOption("No thanks", 255);
Dia.Open();
}
if (Character.LevelUp)
HeadController.SendVisibilityfield(StandardPackets .Effect.Packet("LevelUp", Character.PlayerID), Character);
}
break;
that should be it. well,its alot of easier ways,um if you want more help or need an good coder,just tell me.
|
|
|
06/12/2008, 07:07
|
#4
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
|
Well,that code is just one i wrote,im pretty sure it wont fit into urs,but yeah just add me on msn.
|
|
|
06/12/2008, 07:12
|
#5
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
|
I think another way also is to do this:
case "120": = new string[] { "0", "8" }; break;
case "129": = new string[] { "0", "2.4" }; break;
The numbers after case are the levels,then the numbers after "new string" , is first the level,and ofcourse you dont get a whole level when you use an expball at 120,you get pcts. thats why its 8 after,gives 8 pcts.
well ofcourse you need to write a bunch of stuffs before to make the code working,but it shouldnt be too hard.
|
|
|
06/12/2008, 14:36
|
#6
|
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
|
Quote:
Originally Posted by emildayan1
Simple make it connect to another file,where it is listed like
else if (Character.Level == 1)
Character.Level = 25;
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Level, Character.Level));
HeadController.SendVisibilityfield(StandardPackets .Effect.Packet("LevelUp", Character.PlayerID), Character);
StatPoints SP = StatSystem.KrijgPoints(Character.Level, Character.Class);
Character.Vitality = SP.Vitality;
Character.Strength = SP.Strength;
Character.Spirit = SP.Spritit;
Character.Agility = SP.Agility;
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Agility, Character.Agility));
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Vitality, Character.Vitality));
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Strenght, Character.Strength));
con.Send(UpdatePackets.Update.Ding(Character.Playe rID, UpdateThings.Spirit, Character.Spirit));
Character.HP = Character.MaxHP;
}
else
{
Dia.AddMessage("You used 5 expball's today. Are you sure you want to use more?");
Dia.AddOption("Yeah", 1);
Dia.AddOption("No thanks", 255);
Dia.Open();
}
if (Character.LevelUp)
HeadController.SendVisibilityfield(StandardPackets .Effect.Packet("LevelUp", Character.PlayerID), Character);
}
break;
|
No, this is absolutely horrid code. It's incomplete and you don't even have a case to break.
Quote:
Originally Posted by emildayan1
I think another way also is to do this:
case "120": = new string[] { "0", "8" }; break;
case "129": = new string[] { "0", "2.4" }; break;
The numbers after case are the levels,then the numbers after "new string" , is first the level,and ofcourse you dont get a whole level when you use an expball at 120,you get pcts. thats why its 8 after,gives 8 pcts.
well ofcourse you need to write a bunch of stuffs before to make the code working,but it shouldnt be too hard.
|
This is also incorrect, exp balls give raw experience, and it would be so much easier (and less sloppy) if you would measure it in raw experience rather than level/percentage.
|
|
|
06/13/2008, 01:42
|
#7
|
elite*gold: 0
Join Date: Jun 2006
Posts: 457
Received Thanks: 67
|
i don't know how to code the thing you wanted. But my thoughts are the same as Lateralus.
say. 1 expball gives 50 000 000 exp on your server.
if (item_used == expball_id)
{ char.exp += 50000000;
evaluate_level();
}
this is what i have in mind.
|
|
|
06/13/2008, 05:33
|
#8
|
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 81
|
else if (use_item[0] == 723700)
{
That's horrible coding, use a switch.
and Yeh emildayan1 there is no loop or switch to break.
Like lat said, we dont know the methods/variables to do anything. But ur closest will be how shitboi has it.
Make a formula in some class, do some maths then do something like
Formula formula = new Formula();
int itemId = use_item[0];
switch (itemId)
{
case 723700:
char.exp += formula.getExpBallFormula(); // <-- would tally up the percentage according to your level.
char.checkLevel(); // not sure how this is done in ur source, but it would check if you need to be leveled up.
inventory.removeItem(723700, 1); // however it is done in ur source
break;
}
|
|
|
06/13/2008, 10:27
|
#9
|
elite*gold: 0
Join Date: Aug 2007
Posts: 16
Received Thanks: 11
|
I HAV NO IDEA WHAT ANY OF YOU ARE SAYING
|
|
|
06/13/2008, 19:32
|
#10
|
elite*gold: 20
Join Date: Jan 2006
Posts: 890
Received Thanks: 241
|
Quote:
Originally Posted by rioriorio
I HAV NO IDEA WHAT ANY OF YOU ARE SAYING
|
then y u even replying 2 this topic? lol seems abit pointless 2 me
|
|
|
06/13/2008, 23:22
|
#11
|
elite*gold: 0
Join Date: Jul 2005
Posts: 86
Received Thanks: 7
|
Lol, Exp *****?
Anyway, just define a const for the amount exp an exp ball would give.
Code:
public const int ExpBallValue = 5e7; //50 million exp points
...
//in RequestEquipItem
case 723700:
{
int exp = ExpBallValue;
while(true)
{
//Start Pseudo-code
int req = ExpForNextLevel - Player.CurrentEXP; //Get the amount of exp for the next level minus what the player already has.
exp -= req; //subtract that amount from the exp available from the exp ball
if (exp <= 0) //Check if the exp is below zero, if so, we can't level from the amt remaining anymore
{
req = exp; //Make the two values equal. this way we add only what's left
}
Player.CurrentEXP += req; //Add the exp to the player
Player.LevelUp(); //Check for level up ie: show the anim, add the stats or stat points
//End pseudo code
}
}
break;
|
|
|
06/14/2008, 02:55
|
#12
|
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
|
Quote:
Originally Posted by Orochisuke
Lol, Exp *****?
Anyway, just define a const for the amount exp an exp ball would give.
Code:
public const int ExpBallValue = 5e7; //50 million exp points
...
//in RequestEquipItem
case 723700:
{
int exp = ExpBallValue;
while(true)
{
//Start Pseudo-code
int req = ExpForNextLevel - Player.CurrentEXP; //Get the amount of exp for the next level minus what the player already has.
exp -= req; //subtract that amount from the exp available from the exp ball
if (exp <= 0) //Check if the exp is below zero, if so, we can't level from the amt remaining anymore
{
req = exp; //Make the two values equal. this way we add only what's left
}
Player.CurrentEXP += req; //Add the exp to the player
Player.LevelUp(); //Check for level up ie: show the anim, add the stats or stat points
//End pseudo code
}
}
break;
|
That's looking nice. Yeah, I'd go with his code.
|
|
|
06/20/2008, 20:07
|
#13
|
elite*gold: 0
Join Date: Jun 2008
Posts: 113
Received Thanks: 58
|
Nvm mates, I got it working the way I want it too =D
|
|
|
 |
Similar Threads
|
[RELEASE]Conquer Online Private Server Code Put it in your general.cs (LOTF)
11/14/2009 - CO2 PServer Guides & Releases - 12 Replies
Console.WriteLine("If im noob im gonna copy");
Console.WriteLine("If I have experience im gonan make it self");
Console.WriteLine("If I ahvent made anything better i cant complain others work");
Console.WriteLine("ElitePvpers still sucks");
Console.WriteLine("Hybrids guide can help you get through this shit if you are noob");
Console.WriteLine("If i helped press thanks, if not then GTFO");
Console.WriteLine("Put this to general.cs");
You cant report me for this cause is not spam and it...
|
How do i Code Command on conquer private server?
09/19/2009 - Conquer Online 2 - 0 Replies
How do i Code Command on conquer private server?
Pliz need fast help
|
[Release]CoEmuV2 EXPBall code
07/10/2009 - CO2 PServer Guides & Releases - 28 Replies
This is converted from LOTF, but meh, here it goes.
1) Open your UseItem.cs
2) Add this code under one of the cases :
|
Code Character Stats (str, agi, etc) in a CO Private Server
05/01/2008 - Conquer Online 2 - 0 Replies
.
|
All times are GMT +1. The time now is 16:19.
|
|