|
You last visited: Today at 11:56
Advertisement
ExpPot - The real way.
Discussion on ExpPot - The real way. within the CO2 Private Server forum part of the Conquer Online 2 category.
10/25/2008, 15:52
|
#1
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
|
ExpPot - The real way.
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
Quote:
public uint EPotXP = 0;
public uint EPotXP2 = 0;
public bool EPotRate = false;
public bool EPot = false;
public Timer EPotTimer = new Timer();
|
Now,search for void TimerElapsed
Under that {, put this:
Quote:
if (EPotRate == true)
{
EPotXP2 -= 1;
}
//--This code stops exppot time--
if (EPotXP2 <= 0)
{
if (EPotRate)
{
EPotRate = false;
EPotXP = 0;
EPotXP2 = 0;
MyClient.SendPacket(General.MyPackets.Vital(UID, 19, EPotXP));
MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
World.UpdateSpawn(this);
}
}
|
Now, search for public void RemoveItem, and under that void, add this:
Quote:
public void EPotTimer_Elapsed(object sender, ElapsedEventArgs e)
{
EPot = false;
MyClient.SendPacket(General.MyPackets.SendMsg(MyCl ient.MessageId, "SYSTEM", Name, "Your exppot is over, please buy a new one to refill!", e2000));
}
|
Now,we need to code so you actually get doubleexp. Search for public bool AddExp, and replace from public bool AddExp to bool Leveled = false , with this:
Quote:
public bool AddExp(ulong Amount, bool CountMisc)
{
Ready = false;
if (RBCount < 1)
Amount /= 3;
if (CountMisc && !EPot)
Exp += (ulong)(Amount * DataBase.ExpRate * AddExpPc * (Convert.ToDouble(Potency) / 100 + 1));
else if (EPot)
Exp += (ulong)((Amount * DataBase.ExpRate * AddExpPc * (Convert.ToDouble(Potency) / 100 + 1))*2);
else
if(EPot)
{
Exp *= 2;
}
Exp += Amount;
if (EPotRate == true)
Exp += (ulong)((double)Amount * (double)DataBase.ExpRate * (double)AddExpPc * (Convert.ToDouble(Potency) / 100 + 1));
bool Leveled = false;
|
Now,lets get to the part to add the actual item ExpPot:
Search for else if (ItemParts[0] == "723700"), and under the code for that item ( expball ) , add this:
Quote:
else if (ItemParts[0] == "723017")//ExpPot
{
if (!EPotRate)
{
EPotXP = 3600;
EPotXP2= EPotXP * 2;
EPotRate = true;
MyClient.SendPacket(General.MyPackets.Vital(UID, 19, EPotXP));
MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
World.UpdateSpawn(this);
RemoveItem(ItemUID);
}
else
{
MyClient.SendPacket(General.MyPackets.SendMsg(MyCl ient.MessageId, "SYSTEM", Name, "You still have doubleexp. Its a waste to use another one!", 2005));
}
}
|
I think thats it,not really sure. Just post here if you get any error/bugs with it.
Also,this doubleexp get you a few errors on your server,ofcourse I know how to fix them ( LOL? ) , but dunno if its worth,not really big ones:
*When you have doubleexp, expball gives double exp
* Same with all the other stuffs that gives you directly exp and not an expball.
Added two features at the end of this thread!
PRESS THANKS FOR GOD SAKE AND ILL KEEP RELEASING!!
|
|
|
10/25/2008, 15:56
|
#2
|
elite*gold: 0
Join Date: Apr 2008
Posts: 248
Received Thanks: 11
|
Never tried but thanks for the effort.
|
|
|
10/25/2008, 16:01
|
#3
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
|
Thank you to
Later today I will release an very simple but awesome OfflineTG code.
|
|
|
10/25/2008, 16:24
|
#4
|
elite*gold: 0
Join Date: Jan 2007
Posts: 220
Received Thanks: 63
|
yeah...its a very easy and simple code...but the prob. is that when you dc..the timer will keep running O.O
|
|
|
10/25/2008, 16:30
|
#5
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
|
Ofcourse it will,thats the CO way? Or you can just do so it saves the time when you logout, and start it again when you login,not really that hard.
|
|
|
10/25/2008, 17:23
|
#6
|
elite*gold: 0
Join Date: Apr 2008
Posts: 470
Received Thanks: 264
|
nice, added to my all in 1 thread
|
|
|
10/30/2008, 13:10
|
#7
|
elite*gold: 0
Join Date: Feb 2008
Posts: 240
Received Thanks: 10
|
Ty emme. just one problem with this public Timer EPotTimer = new Timer();
Error 1 'Timer' is an ambiguous reference between 'System.Timers.Timer' and 'System.Threading.Timer' C:\Documents and Settings\Owner\Desktop\ShadowCO\COServerProject\Ch aracter.cs 135 16 COServerProject
|
|
|
10/30/2008, 14:20
|
#8
|
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,000
|
public System.Timers.Timer EPotTimer = new System.Timers.Timer();
|
|
|
10/30/2008, 22:15
|
#9
|
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
|
help me
error
Error 1 'Timer' is an ambiguous reference between 'System.Timers.Timer' and 'System.Threading.Timer' D:\Desktop\UltimateCo\Character.cs 92 16 COServerProject
sulutions??
|
|
|
10/30/2008, 22:20
|
#10
|
elite*gold: 0
Join Date: Feb 2008
Posts: 240
Received Thanks: 10
|
Quote:
Originally Posted by felipeboladao
help me
error
Error 1 'Timer' is an ambiguous reference between 'System.Timers.Timer' and 'System.Threading.Timer' D:\Desktop\UltimateCo\Character.cs 92 16 COServerProject
sulutions??
|
heyyy dumb dumb the guy ^^^ a post said how to do it public System.Timers.Timer EPotTimer = new System.Timers.Timer(); instead of that line and btw ty moderator for ur help. Now i just gotta figure out why i got like an error saying Blessed isn't in the current dictionary thing lol
|
|
|
10/30/2008, 22:23
|
#11
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
|
Quote:
Originally Posted by Bottingpunk
heyyy dumb dumb the guy ^^^ a post said how to do it public System.Timers.Timer EPotTimer = new System.Timers.Timer(); instead of that line and btw ty moderator for ur help. Now i just gotta figure out why i got like an error saying Blessed isn't in the current dictionary thing lol
|
the word "blessed" is not even in this code -_-
|
|
|
10/30/2008, 22:52
|
#12
|
elite*gold: 0
Join Date: Feb 2008
Posts: 240
Received Thanks: 10
|
no durr but i was meaning once i changed that thing then it was saying blah blah blah Blessing isn't in the current dictionary. Bless from the heaven blessing thing but i think i figured it out but ill go onto the right place but well okay i made it like this public bool Blessed = true; or should it be null or somthing else but going onto right place and asking
|
|
|
11/02/2008, 17:03
|
#13
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
|
Okay,here are some features I'd like to give you,about exppot.
The first is, when exppot runs out,it brings up an NPC chat and ask you if you want to automaticlly use a new exppot,for a fee of 27 CPs.
The other one is, unlike ConquerOnline( TQ ), you can join two exppots into one,lets say you have 37 minutes left on your exppot,you can use a new one and get a total time of 1 hour and 37 minutes.
First one:
Search for //--This code stops exppot time-- , and above that , add:
Code:
if (EPotXP == 8)
{
if (EPotRate)
{
MyClient.CurrentNPC = 63421;
MyClient.SendPacket(General.MyPackets.NPCSay("Your exppot has ended,and you now have normal Exp."));
MyClient.SendPacket(General.MyPackets.NPCSay("Would you like to use 27 CPs to active a new ExpPot?"));
MyClient.SendPacket(General.MyPackets.NPCLink("Yeah,why not", 1));
MyClient.SendPacket(General.MyPackets.NPCLink("No, thank you", 255));
MyClient.SendPacket(General.MyPackets.NPCSetFace(30));
MyClient.SendPacket(General.MyPackets.NPCFinish());
}
}
Now, search for :
if (CurrentNPC == 44)
Above it , add :
Code:
if (CurrentNPC == 63421)
{
if (Control == 1)
{
if (MyChar.CPs >= 27)
{
MyChar.EPotXP = 3600;
MyChar.EPotXP2 = MyChar.EPotXP * 2;
MyChar.EPotRate = true;
SendPacket(General.MyPackets.Vital(MyChar.UID, 19, MyChar.EPotXP));
SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
World.UpdateSpawn(MyChar);
MyChar.CPs -= 27;
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
}
else
{
SendPacket(General.MyPackets.NPCSay("You do not have 27 CPs"));
SendPacket(General.MyPackets.NPCLink("Ah shit, sorry!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
Feature 2:
Search for :
Code:
else if (ItemParts[0] == "723017")
{
EPotXP = 3600;
EPotXP2 = EPotXP * 2;
EPotRate = true;
MyClient.SendPacket(General.MyPackets.Vital(UID, 19, EPotXP));
MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
World.UpdateSpawn(this);
RemoveItem(ItemUID);
}
Replace with:
Code:
else if (ItemParts[0] == "723017")
{
uint TotDblExp = EPotXP += 3600;
EPotXP = TotDblExp;
EPotXP2 = EPotXP * 2;
EPotRate = true;
MyClient.SendPacket(General.MyPackets.Vital(UID, 19, EPotXP));
MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
World.UpdateSpawn(this);
RemoveItem(ItemUID);
}
There ya go, enjoy!
Emme
|
|
|
11/02/2008, 17:15
|
#14
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
|
Nice now make it that the pot won't disappear at logout (TQ's CO "pauses" the timer untill you login)
|
|
|
11/06/2008, 11:27
|
#15
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
Nice code, had an issue with this line on 2 sections.
Quote:
MyClient.SendPacket(General.MyPackets.SendMsg(MyCl ient.MessageId, "SYSTEM", Name, "Your exppot is over, please buy a new one to refill!", e2000));
|
But I simply removed, the message isn't needed anyway. Other then that, works great.
|
|
|
|
|
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...
|
[Guide]ExpPot
11/13/2008 - CO2 PServer Guides & Releases - 17 Replies
Heyaa
i got work Exp potion in PowerSourceCO
-Credits for Keving and for me :D
here is the code
in Character.cs search for
now in Character.cs search for
|
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 +1. The time now is 11:56.
|
|