Register for your free account! | Forgot your password?

You last visited: Today at 23:57

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


[Release]Expball-limit peer day

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
[Release]Expball-limit peer day

ok
here i show you how you can add a axpball limit peer day

add in Character.cs
Code:
        // ExpBall-limit
        public uint expball = 0;
        public DateTime expballend;
        public string expballend2 = "";
then search for: else if (ItemParts[0] == "723700")
and replace this item with:
Code:
else if (ItemParts[0] == "723700")
            {
                if (expball < 10)
                {
                    expball++;
                    expballend = DateTime.Now.AddDays(1);
                    SaveExpball();

                    if (Level < 100)
                        AddExp((ulong)(1295000 + Level * 50000), false);
                    else if (Level < 110)
                        AddExp((ulong)(1395000 + Level * 80000), false);
                    else if (Level < 115)
                        AddExp((ulong)(1595000 + Level * 100000), false);
                    else if (Level < 120)
                        AddExp((ulong)(1895000 + Level * 120000), false);
                    else if (Level < 125)
                        AddExp((ulong)(2095000 + Level * 150000), false);
                    else if (Level < 130)
                        AddExp((ulong)(2395000 + Level * 180000), false);
                    else if (Level < 135)
                        AddExp((ulong)(2895000 + Level * 200000), false);
                    RemoveItem(ItemUID);
                }
                else
                {
                    MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "You used allready 10 used ExpBalls", 2005));
                }
                
            }
search for : if (DateTime.Now > GotBlueName.AddMilliseconds(35000))
and an before:
Code:
            if (DateTime.Now >= expballend)
            {
                
                expballend2 = "";
                expball = 0;
                SaveExpball();
                MyClient.SendPacket(General.MyPackets.Vital(UID, 18, 0));
                MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                World.UpdateSpawn(this);
            }
then search for: public void Save()
and add before
Code:
        public void SaveExpball()
        {
            if (MyClient.There)
                if (MyClient.Online)
                    DataBase.SaveExpball(this);
        }
now search for you wellcomemess and add before:
Code:
                                        if (MyChar.expball > 0)
                                        {
                       
                                            MyChar.expballend = DateTime.Parse(MyChar.expballend2);
                                            SendPacket(General.MyPackets.String(MyChar.UID, 10, "zf2-e128"));

                                            SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            World.UpdateSpawn(MyChar);
                                        }
search for: public static void SaveChar(Character Charr)
and add befor:
Code:
public static void Expball(Character Charr)
        {
            try
            {
                MySqlCommand Command = null;
                Command = new MySqlCommand("UPDATE `Characters` SET `expballend` = '" + Charr.expballend.ToString() + "',`expball` = '" + Charr.expball + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();

            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
Now,search for:
Charr.RealModel = Charr.Model;
and add before
Code:
Charr.expballend2 = (string)DR["expballend"];
                    Charr.expball = (byte)DR["expball"];
Last part,add this into your Character table in database :
Code:
Field: expballend
Type : VARCHAR
Lenght : 32
null : not null
and
Code:
Field: expball
Type : TINYINT
Lenght : 10
Attribute : UNSIGNED
null : not null
Default : 0
thatīs all



koio is offline  
Thanks
11 Users
Old 05/11/2009, 21:45   #2
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
Even thought i`ll never use this code, very nice! Congratulation.


alexbigfoot is offline  
Thanks
1 User
Old 05/11/2009, 21:49   #3
 
elite*gold: 0
Join Date: Sep 2007
Posts: 370
Received Thanks: 115
Great realse, 100% working im testing good job GZ
mejo33 is offline  
Thanks
1 User
Old 05/11/2009, 21:53   #4
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 490
+K teaches me more about timers to help others with some things

great release also


PeTe Ninja is offline  
Thanks
1 User
Old 05/11/2009, 21:56   #5
 
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
Very good , i will use it Thanks
danielachraf is offline  
Thanks
1 User
Old 05/11/2009, 22:39   #6
 
elite*gold: 0
Join Date: May 2008
Posts: 80
Received Thanks: 25
Quote:
Originally Posted by koio View Post
ok
here i show you how you can add a axpball limit peer day

add in Character.cs
Code:
        // ExpBall-limit
        public uint expball = 0;
        public DateTime expballend;
        public string expballend2 = "";
then search for: else if (ItemParts[0] == "723700")
and replace this item with:
Code:
else if (ItemParts[0] == "723700")
            {
                if (expball < 10)
                {
                    expball++;
                    expballend = DateTime.Now.AddDays(1);
                    SaveExpball();

                    if (Level < 100)
                        AddExp((ulong)(1295000 + Level * 50000), false);
                    else if (Level < 110)
                        AddExp((ulong)(1395000 + Level * 80000), false);
                    else if (Level < 115)
                        AddExp((ulong)(1595000 + Level * 100000), false);
                    else if (Level < 120)
                        AddExp((ulong)(1895000 + Level * 120000), false);
                    else if (Level < 125)
                        AddExp((ulong)(2095000 + Level * 150000), false);
                    else if (Level < 130)
                        AddExp((ulong)(2395000 + Level * 180000), false);
                    else if (Level < 135)
                        AddExp((ulong)(2895000 + Level * 200000), false);
                    RemoveItem(ItemUID);
                }
                else
                {
                    MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "You used allready 10 used ExpBalls", 2005));
                }
                
            }
search for : if (DateTime.Now > GotBlueName.AddMilliseconds(35000))
and an before:
Code:
            if (DateTime.Now >= expballend)
            {
                
                expballend2 = "";
                expball = 0;
                SaveExpball();
                MyClient.SendPacket(General.MyPackets.Vital(UID, 18, 0));
                MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                World.UpdateSpawn(this);
            }
then search for: public void Save()
and add before
Code:
        public void SaveExpball()
        {
            if (MyClient.There)
                if (MyClient.Online)
                    DataBase.SaveExpball(this);
        }
now search for you wellcomemess and add before:
Code:
                                        if (MyChar.expball > 0)
                                        {
                       
                                            MyChar.expballend = DateTime.Parse(MyChar.expballend2);
                                            SendPacket(General.MyPackets.String(MyChar.UID, 10, "zf2-e128"));

                                            SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            World.UpdateSpawn(MyChar);
                                        }
search for: public static void SaveChar(Character Charr)
and add befor:
Code:
public static void SaveHB(Character Charr)
        {
            try
            {
                MySqlCommand Command = null;
                Command = new MySqlCommand("UPDATE `Characters` SET `expballend` = '" + Charr.expballend.ToString() + "',`expball` = '" + Charr.expball + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();

            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
Now,search for:
Charr.RealModel = Charr.Model;
and add before
Code:
Charr.expballend2 = (string)DR["expballend"];
                    Charr.expball = (byte)DR["expball"];
Last part,add this into your Character table in database :
Code:
Field: expballend
Type : VARCHAR
Lenght : 32
null : not null
and
Code:
Field: expball
Type : TINYINT
Lenght : 10
Attribute : UNSIGNED
null : not null
Default : 0
thatīs all

Heres a question would lottery be about the same? Adding a 10 limit to it? I mean a few things go but basic idea.
spade12 is offline  
Thanks
1 User
Old 05/11/2009, 22:40   #7
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
uhm...yeah.
alexbigfoot is offline  
Thanks
1 User
Old 05/12/2009, 00:01   #8
 
elite*gold: 0
Join Date: Mar 2009
Posts: 510
Received Thanks: 104
nice release!! even though i dont copy and paste codes i will use this as a referal for when im going to code it in my own server.. thx!
AndreaCo is offline  
Thanks
1 User
Old 05/12/2009, 02:16   #9
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 490
Quote:
Originally Posted by spade12 View Post
Heres a question would lottery be about the same? Adding a 10 limit to it? I mean a few things go but basic idea.
yeah i was going to make one and release but i thought since this is like a quick guide anyone can do it ... also why you quoted the whole thing lol :d
PeTe Ninja is offline  
Old 05/12/2009, 02:45   #10
 
elite*gold: 0
Join Date: May 2008
Posts: 80
Received Thanks: 25
Quote:
Originally Posted by PeTe Ninja View Post
yeah i was going to make one and release but i thought since this is like a quick guide anyone can do it ... also why you quoted the whole thing lol :d
I dont know lol just felt like it. I was just making sure because I was going about the entire lotto limit differently. I wasn't using SQL to limit it I was doing it server sided, BUT SQL would be MUCH less time consuming and YES I have to capitalize every word or so its what make this FUN.

Thanks Though
spade12 is offline  
Thanks
1 User
Old 05/12/2009, 03:36   #11
 
elite*gold: 0
Join Date: Aug 2008
Posts: 275
Received Thanks: 23
nice release even tho i like spamming xp ***** xD
superplox is offline  
Old 05/19/2009, 12:54   #12
 
elite*gold: 0
Join Date: Jun 2008
Posts: 20
Received Thanks: 0
hey how where can i find welcommess?
vladrage08 is offline  
Old 07/25/2009, 09:00   #13
 
elite*gold: 0
Join Date: Jun 2008
Posts: 80
Received Thanks: 7
Quote:
Originally Posted by vladrage08 View Post
hey how where can i find welcommess?
Same question...
ZkiNeF is offline  
Old 07/25/2009, 10:44   #14
 
elite*gold: 0
Join Date: May 2008
Posts: 103
Received Thanks: 3
what this **** this code by ~Yuki~ and link here
m7med is offline  
Old 07/25/2009, 16:07   #15
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
Quote:
Originally Posted by m7med View Post
what this **** this code by ~Yuki~ and link here
no... lol he probably copied it from here ><


f0am is offline  
Reply



« [Release]CrasusCO | [RELEASE]MySQL TableEditor »

Similar Threads
[Release]Nearly Perfect Expball Calculations
01/03/2010 - CO2 PServer Guides & Releases - 30 Replies
I went and tested these calculations for expballs for the 5165 source. I'll release them here. Keep in mind that these are not perfect. They are almost perfect. Enjoy. public uint ExpBallExp { get { ...
[Release] ExpBall Max use (CoEmu v2)
10/31/2009 - CO2 PServer Guides & Releases - 5 Replies
Hya!! Maybe this will be a stupid thing but here we go! first add this at character.cs: public bool ExpUsed = false; public int ExpBallN = 0; then go to useitem.cs and use this expball code ( or use your and add what's needed only... ):...
[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...
[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 :



All times are GMT +2. The time now is 23:57.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.