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
Now,search for void TimerElapsed
Under that {, put this:
Now, search for public void RemoveItem, and under that void, add this:
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:
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:
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!!
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!!