You last visited: Today at 20:14
Advertisement
[Guide]ExpPot
Discussion on [Guide]ExpPot within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
09/21/2008, 00:09
#1
elite*gold: 0
Join Date: Sep 2008
Posts: 92
Received Thanks: 21
[Guide]ExpPot
Heyaa
i got work Exp potion in PowerSourceCO
-Credits for Keving and for me
here is the code
in Character.cs search for
Quote:
public bool Alive = true;
Quote:
public byte dexp = 0;
public uint dexptime = 0;
now in Character.cs search for
Quote:
else if (ItemParts[0] == "725013")
above add
Quote:
else if (ItemParts[0] == "723017")
{
dexptime = 3600;
dexp = 1;
MyClient.SendPacket(General.MyPackets.Vital(UID, 19, dexptime));
RemoveItem(ItemUID);
}
nice,
now go to Client.cs search
Quote:
There = true;
World.SpawnMeToOthers(MyChar, true);
above add
Quote:
foreach (DictionaryEntry DE in World.AllChars)
{
Character Cli = (Character)DE.Value;
if (Cli.Name == MyChar.Name && Cli.dexp == 1 && Cli.dexptime != 0)
{
int ID = int.Parse("19");
SendPacket(General.MyPackets.Vital((long)MyChar.UI D, ID, MyChar.dexptime));
}
}
now go to Database.cs search for
Quote:
Charr.RealAgi = Charr.Agi;
it's located in "public static void GetCharInfo(Character Charr, string UserName)" and add it
Quote:
Charr.dexptime = (uint)DR["dexptime"];
Charr.dexp = Convert.ToByte(DR["dexp"]);
now go to General.cs
Add new Timer
Quote:
public static System.Timers.Timer General2;
and
Quote:
public static void General_System(object sender, ElapsedEventArgs e)
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Char != null && Char.dexp == 1)
{
if (Char.dexptime == 0)
{
Char.dexp = 0;
break;
}
int ID = int.Parse("19");
Char.dexptime -= 1;
Char.MyClient.SendPacket(General.MyPackets.Vital(( long)Char.UID, ID, Char.dexptime));
}
}
}
now go to Character.cs search
Quote:
public bool AddExp(ulong Amount, bool CountMisc)
And replace
with
Quote:
public bool AddExp(ulong Amount, bool CountMisc)
{
ulong dexp_exp1 = 0;
ulong dexp_exp2 = 0;
Ready = false;
if (CountMisc)
{
if (dexp == 1)
{
dexp_exp1 = (ulong)(Amount * ExternalDatabase.ExpRate * AddExpPc * (Convert.ToDouble(Potency) / 100 + 1));
dexp_exp2 = dexp_exp1 / 2;
Exp += dexp_exp2;
}
else
{
Exp += (ulong)(Amount * ExternalDatabase.ExpRate * AddExpPc * (Convert.ToDouble(Potency) / 100 + 1));
}
}
else
{
if (dexp == 1)
{
dexp_exp1 = Amount;
dexp_exp2 = dexp_exp1 / 2;
Exp += dexp_exp2;
}
else
{
Exp += (ulong)(Amount * ExternalDatabase.ExpRate * AddExpPc * (Convert.ToDouble(Potency) / 100 + 1));
}
}
bool Leveled = false;
if (Exp > ExternalDatabase.NeededXP(Level) && Level < 130)
{
Leveled = true;
while (Exp > ExternalDatabase.NeededXP(Level) && Level < 130)
{
Exp -= ExternalDatabase.NeededXP(Level);
Level++;
if (Level == 3)
{
if (Job < 16 && Job > 9)
LearnSkill(1110, 0);
if (Job < 16 && Job > 9 || Job < 26 && Job > 19)
LearnSkill(1015, 0);
if (Job < 26 && Job > 19)
LearnSkill(1025, 0);
}
}
}
if (Leveled)
{
if (MyGuild != null)
MyGuild.Refresh(this);
if (RBCount < 1)
InternalDatabase.GetStats(this);
GetEquipStats(1, true);
GetEquipStats(2, true);
GetEquipStats(3, true);
GetEquipStats(4, true);
GetEquipStats(5, true);
GetEquipStats(6, true);
GetEquipStats(8, true);
MaxHP = BaseMaxHP();
MinAtk = Str;
MaxAtk = Str;
Potency = Level;
GetEquipStats(1, false);
GetEquipStats(2, false);
GetEquipStats(3, false);
GetEquipStats(4, false);
GetEquipStats(5, false);
GetEquipStats(6, false);
GetEquipStats(8, false);
CurHP = MaxHP;
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 13, Level));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 16, Str));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 17, Agi));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 15, Vit));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 14, Spi));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 0, CurHP));
World.LevelUp(this);
}
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 5, Exp));
Ready = true;
if (Leveled)
return true;
else
return false;
}
now to save search for
Quote:
public static void SaveChar(Character Charr)
and add the command
Quote:
ExternalDatabase.DatabaseQueue.Enqueue(new MySqlCommand("UPDATE `Characters` SET `dexptime` = " + Charr.dexptime + ", `dexp` = " + Charr.dexp + " WHERE `Account` = '" + Charr.MyClient.Account + "'", ExternalDatabase.Connection));
now u need add 2 tables in database "characters"
look the image..
Done
09/21/2008, 00:32
#2
elite*gold: 0
Join Date: Jun 2007
Posts: 323
Received Thanks: 30
Why do you get credits x.x
And the codes are messed up..
09/21/2008, 03:57
#3
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Theres already 3-4 freaking guides out..>
STOP POSTING CRAPPY CODE OVER AND OVER AGAIN!
09/21/2008, 03:59
#4
elite*gold: 0
Join Date: Jun 2007
Posts: 323
Received Thanks: 30
Indeedy-do
09/21/2008, 04:29
#5
elite*gold: 0
Join Date: Aug 2008
Posts: 77
Received Thanks: 63
Nice, but instead of giving me more experience I get less: S
Can I put a guide for loft source?
09/21/2008, 04:47
#6
elite*gold: 0
Join Date: Jan 2008
Posts: 145
Received Thanks: 91
Im wandering what is that source, im sure its loft but that has different codes like ExternalDatabase and InternalDatabase.
09/21/2008, 10:46
#7
elite*gold: 0
Join Date: Aug 2006
Posts: 227
Received Thanks: 57
You only copyed my Code and with Errors
Credits for Keving not for Kevin
Use this AddExp:
Code:
public bool AddExp(ulong Amount, bool CountMisc)
{
ulong dexp_exp1 = 0;
ulong dexp_exp2 = 0;
ulong dexp_exp3 = 0;
Ready = false;
if (CountMisc)
{
if (dexp == 1)
{
dexp_exp1 = (ulong)(Amount * DataBase.ExpRate * AddExpPc * (Convert.ToDouble(Potency) / 100 + 1));
dexp_exp2 = dexp_exp1 / 2;
dexp_exp3 = dexp_exp1 + dexp_exp2;
Exp += dexp_exp3;
}
else
{
Exp += (ulong)(Amount * DataBase.ExpRate * AddExpPc * (Convert.ToDouble(Potency) / 100 + 1));
}
}
else
{
if (dexp == 1)
{
dexp_exp1 = Amount;
dexp_exp2 = dexp_exp1 / 2;
dexp_exp3 = dexp_exp1 + dexp_exp2;
Exp += dexp_exp3;
}
else
{
Exp += (ulong)(Amount * DataBase.ExpRate * AddExpPc * (Convert.ToDouble(Potency) / 100 + 1));
}
}
bool Leveled = false;
if (Exp > DataBase.NeededXP(Level) && Level < 130)
{
Leveled = true;
while (Exp > DataBase.NeededXP(Level) && Level < 130)
{
Exp -= DataBase.NeededXP(Level);
Level++;
if (Level == 3)
{
if (Job < 16 && Job > 9)
LearnSkill(1110, 0);
if (Job < 16 && Job > 9 || Job < 26 && Job > 19)
LearnSkill(1015, 0);
if (Job < 26 && Job > 19)
LearnSkill(1025, 0);
}
}
}
if (Leveled)
{
if (MyGuild != null)
MyGuild.Refresh(this);
if (RBCount < 1)
Database.GetStats(this);
GetEquipStats(1, true);
GetEquipStats(2, true);
GetEquipStats(3, true);
GetEquipStats(4, true);
GetEquipStats(5, true);
GetEquipStats(6, true);
GetEquipStats(8, true);
MaxHP = BaseMaxHP();
MinAtk = Str;
MaxAtk = Str;
Potency = Level;
GetEquipStats(1, false);
GetEquipStats(2, false);
GetEquipStats(3, false);
GetEquipStats(4, false);
GetEquipStats(5, false);
GetEquipStats(6, false);
GetEquipStats(8, false);
CurHP = MaxHP;
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 13, Level));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 16, Str));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 17, Agi));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 15, Vit));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 14, Spi));
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 0, CurHP));
World.LevelUp(this);
}
MyClient.SendPacket(General.MyPackets.Vital((long) UID, 5, Exp));
Ready = true;
if (Leveled)
return true;
else
return false;
}
09/21/2008, 11:18
#8
elite*gold: 0
Join Date: Jan 2008
Posts: 145
Received Thanks: 91
i have a source with ExternalDatabase and InternalDatabase but ShadowCO don't have it,
can someone tell me whats that source? i just get it from my friend
09/21/2008, 11:21
#9
elite*gold: 0
Join Date: Sep 2008
Posts: 34
Received Thanks: 11
failed (like my guide) and if it is a guide this is the wrong section
09/21/2008, 12:19
#10
elite*gold: 0
Join Date: Aug 2006
Posts: 227
Received Thanks: 57
Quote:
Originally Posted by
~Legend~
failed (like my guide) and if it is a guide this is the wrong section
You are wrong [Release] is like [Guide]
And this is about PrivateServer
the Guide Section is about Client and the Game
09/23/2008, 12:53
#11
elite*gold: 0
Join Date: May 2007
Posts: 46
Received Thanks: 0
The time is not saved and do not go up the experience.
Something is not right in the code.
09/23/2008, 13:19
#12
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by
lolex
The time is not saved and do not go up the experience.
Something is not right in the code.
Maybe because an idiot coded it and two bigger idiots tried to copy it? >_>
09/23/2008, 14:30
#13
elite*gold: 0
Join Date: Aug 2006
Posts: 227
Received Thanks: 57
Quote:
Originally Posted by
tao4229
Maybe because an idiot coded it and two bigger idiots tried to copy it? >_>
Shut up your ******* idiot Son of a *****
09/23/2008, 23:57
#14
elite*gold: 0
Join Date: Nov 2007
Posts: 306
Received Thanks: 75
Keving just turned an argument into a flame war..
Keving.Respect -= 11 * World.Rate;
09/24/2008, 00:48
#15
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by
keving
Shut up your ******* idiot Son of a *****
Yes, because that makes total sense.
Quote:
Similar Threads
[Release]ExpBall+ExpPot Experience Gain Fix[LOTF]
07/14/2009 - CO2 PServer Guides & Releases - 8 Replies
Ok... Well this isn't really anything too spectacular, but I know I myself got extremely annoyed at the fact that when I used an ExpBall while using an ExpPot, that I'd gain like 10x the normal amount of experience. So I went and made an adjustment to the ExpBall coding to change it.
Just so you guys know, my number may not be 100% accurate on this, I did make changes to my expballs, because I found after level 110, you gained too much, and just tried to remember the original rates.
By...
ExpPot - The real way.
07/02/2009 - CO2 Private Server - 28 Replies
Okay,here I am going to release ExpPot. Should work fine,no bugs whatsoever.
Follow this guide and you got exppot on your newbie server!:)
First, in character.cs
how to change prayingstone/exppot time
05/14/2007 - CO2 Exploits, Hacks & Tools - 8 Replies
like this u change prayingstone/exppotion time
http://i3.tinypic.com/66n25g4.jpg
All times are GMT +2. The time now is 20:15 .