Register for your free account! | Forgot your password?

You last visited: Today at 05:11

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

Advertisement



[Release]XP Shield(LOTF)

Discussion on [Release]XP Shield(LOTF) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
[Release]XP Shield(LOTF)

I haven't released anything in awhile, and I removed all my other releases so... I'll throw a random lotf release since a bunch of people are using lotf lately for practise. This is handy, and can be used as a reference when making skills of similar style.

First, add in database.cs

Code:
            SkillAttributes[1020] = new ushort[1][];
            SkillAttributes[1020][0] = new ushort[6] { 7, 0, 0, 0, 0, 0 };
            SkillsDone.Add(1020, 0);
Now the rest goes into character.cs, just search the lines I provide. This isn't done in any specific order, try not to build until it's all in to avoid errors, and please, backup your source files before doing this, incase something goes wrong.

below

Code:
public bool SMOn = false;
add

Code:
public bool ShieldOn = false;
------------------------------------------------------------

below

Code:
            if (SMOn)
                it += 262144;
add

Code:
            if (ShieldOn)
                it += 256;
------------------------------------------------------------

find this section

Code:
                XpList = false;
                SMOn = false;
                CycloneOn = false;
                XpCircle = 0;

                MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                MyClient.SendPacket(General.MyPackets.Status1(UID, EModel));
                MyClient.SendPacket(General.MyPackets.Death(this));
and below

Code:
CycloneOn = false;
add

Code:
ShieldOn = false;
---------------------------------------------------------------

find

Code:
public void XPEnd()
and below

Code:
SMOn = false;
add

Code:
ShieldOn = false;
---------------------------------------------------------------

search

Code:
                        if (SkillId == 1025)
                        {
                            SMOn = true;
                            XpList = false;
                            XpCircle = 0;
                            Sheildactivated = DateTime.Now;
                            ExtraXP = 20000;

                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                        }
then add below

Code:
                        if (SkillId == 1020)
                        {
                            ShieldOn = true;
                            XpList = false;
                            XpCircle = 0;
                            Shieldactivated = DateTime.Now;
                            Defense *= 3;
                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                            MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "Shield XP: Your defense will be increased for 120 seconds.", 2005));
                        }
---------------------------------------------------------------

find

Code:
public DateTime AccuracyActivated = DateTime.Now;
add below

Code:
public DateTime Shieldactivated = DateTime.Now;
---------------------------------------------------------------

find

Code:
            if (AccuracyOn)
                if (DateTime.Now > AccuracyActivated.AddSeconds(200))
                    AccuracyOn = false;
above it add

Code:
            if (ShieldOn)
            {
                if (DateTime.Now > Shieldactivated.AddSeconds(120))
                {
                    ShieldOn = false;
                    Defense /= 3;
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                }
                World.UpdateSpawn(this);
            }
---------------------------------------------------------------

find

Code:
public DateTime Stigged = DateTime.Now;
below it add

Code:
public DateTime ShieldTime = DateTime.Now;
--------------------------------------------------------------

find

Code:
public byte StigLevel = 0;
below it add

Code:
public byte ShieldLevel = 0;
--------------------------------------------------------------

search

Code:
else if (PTarget != null && (PKMode == 2 || PKMode == 0) && !Other.NoPK(LocMap) && PTarget.Alive)
scroll down to find

Code:
                                        if (SMOn)
                                            Damage *= 2;
below it add

Code:
                                        if (ShieldOn)
                                            Defense *= 2;
--------------------------------------------------------------

search for

Code:
            if (AccuracyBuff)
                it += 128;
add below

Code:
            if (ShieldBuff)
                it += 256;
--------------------------------------------------------------

search

Code:
public bool AccuracyBuff = false;
add below

Code:
public bool ShieldBuff = false;
--------------------------------------------------------------

search

Code:
public void Die()
scroll down to find

Code:
CycloneOn = false;
add below it

Code:
ShieldOn = false;
--------------------------------------------------------------

search

Code:
            if (AccuracyBuff)
                if (DateTime.Now > AccuracyTime.AddSeconds(60 + AccuracyLevel * 10))
                {
                    AccuracyBuff = false;
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                    World.UpdateSpawn(this);
                }
above it add

Code:
            if (ShieldBuff)
                if (DateTime.Now > ShieldTime.AddSeconds(60 + ShieldLevel * 10))
                {
                    ShieldBuff = false;
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                    World.UpdateSpawn(this);
                }
-----------------------------------------------------------------

now aside from that, if you want to make the multiplication for xpshield a number consisting of a decimal (example *2.3)

find

Code:
Damage -= PTarget.Defense;
and replace with

Code:
Damage = (int)(Damage - PTarget.Defense);
then in other.cs find

Code:
Damage -= Attacked.Defence;
and replace with

Code:
Damage -= (int)(Damage - Attacked.Defense);
-------------------------------------------------------------------

I believe that's all there is to it, if you have issues, let me know. Don't give me thanks until you know for sure it's working for you.

Big Thanks to tao4229 for some assistance with this code.

-------------------------------------------------------------------

Edit: Realized some of the coding for MagicShield (taoist skill) was added on here, wasn't paying attention when I was searching it all and posting, but w/e, going to leave it there for more help.
Incariuz is offline  
Thanks
5 Users
Old 07/22/2009, 21:46   #2
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
#edit..

i searched stigbuff, lol i have accuracy and shield now
f0am is offline  
Old 07/22/2009, 21:51   #3
 
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
Quote:
Originally Posted by Incariuz View Post
I haven't released anything in awhile, and I removed all my other releases so... I'll throw a random lotf release since a bunch of people are using lotf lately for practise. This is handy, and can be used as a reference when making skills of similar style.

First, add in database.cs

Code:
            SkillAttributes[1020] = new ushort[1][];
            SkillAttributes[1020][0] = new ushort[6] { 7, 0, 0, 0, 0, 0 };
            SkillsDone.Add(1020, 0);
Now the rest goes into character.cs, just search the lines I provide. This isn't done in any specific order, try not to build until it's all in to avoid errors, and please, backup your source files before doing this, incase something goes wrong.

below

Code:
public bool SMOn = false;
add

Code:
public bool ShieldOn = false;
------------------------------------------------------------

below

Code:
            if (SMOn)
                it += 262144;
add

Code:
            if (ShieldOn)
                it += 256;
------------------------------------------------------------

find this section

Code:
                XpList = false;
                SMOn = false;
                CycloneOn = false;
                XpCircle = 0;

                MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                MyClient.SendPacket(General.MyPackets.Status1(UID, EModel));
                MyClient.SendPacket(General.MyPackets.Death(this));
and below

Code:
CycloneOn = false;
add

Code:
ShieldOn = false;
---------------------------------------------------------------

find

Code:
public void XPEnd()
and below

Code:
SMOn = false;
add

Code:
ShieldOn = false;
---------------------------------------------------------------

search

Code:
                        if (SkillId == 1025)
                        {
                            SMOn = true;
                            XpList = false;
                            XpCircle = 0;
                            Sheildactivated = DateTime.Now;
                            ExtraXP = 20000;

                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                        }
then add below

Code:
                        if (SkillId == 1020)
                        {
                            ShieldOn = true;
                            XpList = false;
                            XpCircle = 0;
                            Shieldactivated = DateTime.Now;
                            Defense *= 3;
                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                            MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "Shield XP: Your defense will be increased for 120 seconds.", 2005));
                        }
---------------------------------------------------------------

find

Code:
public DateTime AccuracyActivated = DateTime.Now;
add below

Code:
public DateTime Shieldactivated = DateTime.Now;
---------------------------------------------------------------

find

Code:
            if (AccuracyOn)
                if (DateTime.Now > AccuracyActivated.AddSeconds(200))
                    AccuracyOn = false;
above it add

Code:
            if (ShieldOn)
            {
                if (DateTime.Now > Shieldactivated.AddSeconds(120))
                {
                    ShieldOn = false;
                    Defense /= 3;
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                }
                World.UpdateSpawn(this);
            }
---------------------------------------------------------------

find

Code:
public DateTime Stigged = DateTime.Now;
below it add

Code:
public DateTime ShieldTime = DateTime.Now;
--------------------------------------------------------------

find

Code:
public byte StigLevel = 0;
below it add

Code:
public byte ShieldLevel = 0;
--------------------------------------------------------------

search

Code:
else if (PTarget != null && (PKMode == 2 || PKMode == 0) && !Other.NoPK(LocMap) && PTarget.Alive)
scroll down to find

Code:
                                        if (SMOn)
                                            Damage *= 2;
below it add

Code:
                                        if (ShieldOn)
                                            Defense *= 2;
--------------------------------------------------------------

search for

Code:
            if (AccuracyBuff)
                it += 128;
add below

Code:
            if (ShieldBuff)
                it += 256;
--------------------------------------------------------------

search

Code:
public bool AccuracyBuff = false;
add below

Code:
public bool ShieldBuff = false;
--------------------------------------------------------------

search

Code:
public void Die()
scroll down to find

Code:
CycloneOn = false;
add below it

Code:
ShieldOn = false;
--------------------------------------------------------------

search

Code:
            if (AccuracyBuff)
                if (DateTime.Now > AccuracyTime.AddSeconds(60 + AccuracyLevel * 10))
                {
                    AccuracyBuff = false;
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                    World.UpdateSpawn(this);
                }
above it add

Code:
            if (ShieldBuff)
                if (DateTime.Now > ShieldTime.AddSeconds(60 + ShieldLevel * 10))
                {
                    ShieldBuff = false;
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                    World.UpdateSpawn(this);
                }
-----------------------------------------------------------------

now aside from that, if you want to make the multiplication for xpshield a number consisting of a decimal (example *2.3)

find

Code:
Damage -= PTarget.Defense;
and replace with

Code:
Damage = (int)(Damage - PTarget.Defense);
then in other.cs find

Code:
Damage -= Attacked.Defence;
and replace with

Code:
Damage -= (int)(Damage - Attacked.Defense);
-------------------------------------------------------------------

I believe that's all there is to it, if you have issues, let me know. Don't give me thanks until you know for sure it's working for you.

Big Thanks to tao4229 for some assistance with this code.
Good job
Pete1990 is offline  
Old 07/22/2009, 21:59   #4
 
elite*gold: 0
Join Date: May 2009
Posts: 874
Received Thanks: 174
jsut wondering
i never got it in real co so idk
what does xp shield do?
Arcotemple:) is offline  
Old 07/22/2009, 22:09   #5
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
defense 3x more for two minutes i think
f0am is offline  
Old 07/22/2009, 22:18   #6
 
elite*gold: 0
Join Date: May 2009
Posts: 874
Received Thanks: 174
hmm wonder if anyone would actually use that on a privvy serv
Arcotemple:) is offline  
Old 07/22/2009, 22:26   #7
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
Its an important part for a warrrior
f0am is offline  
Old 07/23/2009, 00:17   #8
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
very nice release

GoodJob
coreymills is offline  
Old 07/23/2009, 00:21   #9
 
n0mansland's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
Nice release.. Maybe when I sit down and have a few minutes to do some coding I'll add this.. (LONG) +Thanks from me.. Helping the community
n0mansland is offline  
Old 07/23/2009, 00:40   #10
 
elite*gold: 0
Join Date: Jun 2009
Posts: 140
Received Thanks: 12
I would be careful on what you all post, could be useless. Thats alot for a little skill xD
JustChillin is offline  
Old 07/23/2009, 00:58   #11
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
So it's working alright for you guys? Wasn't sure if I had forgotten a part of it or not. Oh, and I'm not certain if it's meant to be 3x defense, that just happens to be what I set it for, it's probably less though, no clue.

Anyway, I'll be laying down to sleep in a little bit, so if anyone has any issues, may take awhile for me to respond.

Edit:

@JustChillin

If you think it's a lot, press ctrl+f, search SM, and look how much you find. Pretty much everywhere you'll put something for shield, there is something for SM, and it's simply 10x damage.

All the information here helps to accomplish dirrent functions with the skill, starting with basics of having it activate, calculating 3x defense against monsters, 2x against other playes, a timer, making your defense reset once the timer ends, making the skill stop if you die, etc... Sometimes things just seem to be more simple then they are.

On a side note though, if anyone knows a way to make this more effective, feel free to add input.

Edit2: I just realized, I added in some stuff for MagicShield or w/e it's called, the tao shield skill, lol. Don't believe I have the full thing there, but w/e, it won't hurt, gives you a start. The stuff that says ShieldBuff.
Incariuz is offline  
Old 07/28/2009, 06:42   #12
 
elite*gold: 0
Join Date: Jul 2007
Posts: 16
Received Thanks: 2
good
cecl33 is offline  
Old 07/28/2009, 19:35   #13
 
elite*gold: 0
Join Date: Jul 2009
Posts: 119
Received Thanks: 3
ima use this in my server
Arcotemple:] is offline  
Old 07/30/2009, 03:56   #14
 
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
if (AccuracyBuff)
if (DateTime.Now > AccuracyTime.AddSeconds(60 + AccuracyLevel * 10))
{
AccuracyBuff = false;
MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
World.UpdateSpawn(this);
}

Does not exist..wtf?
Jay1029 is offline  
Old 07/30/2009, 06:52   #15
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
I don't recall adding the accuracy skill onto my client. Might have, but don't think so. Either way though, the portions of code I have in this guide that add near those are for MagicShield, I didn't notice at first when posting, was a quick job. Without them, XP shield should still operate properly. If it does present issues, leave me a message.
Incariuz is offline  
Reply


Similar Threads Similar Threads
[Release] CS 1.6 Shield Skins
12/27/2010 - Counter-Strike Hacks, Bots, Cheats & Exploits - 2 Replies
* ( I do not own the following skins credits will be given to the owners) dust&aztec texture2 Credits * Valve * == Screenshots* http://dog.fpsbanana.com/ss/skins/thm_70674b.jpg http://dog.fpsbanana.com/ss/skins/thm_70674d.jpg
[Release]Str bug für wep/shield slot!
04/24/2010 - Diablo 2 - 3 Replies
hab ich grade eben versehentlich rausgefunden... noch nie davon gehört, also denke ich mal dass noch nicht bekannt is :mofo: ihr wollt zb stormy tragen könnt ihn aber nur mit der stärke die stormy added tragen? is ja bekannt dass man einfach nur mal kurz ein item tragen muss mit dem man genug stärke hat und das item wieder entfernen kann wenn man stormy trägt hab allerdings grade rausgefunden dass man einfach waffenslot wechseln muss!
[LOTF RELEASE] Ip Ban!!
05/18/2009 - CO2 PServer Guides & Releases - 22 Replies
Ip Ban! Credits to Ultimatum First...Search this ( It is in General.cs ) public static System.IO.StreamWriter sw = new System.IO.StreamWriter(Application.StartupPath + @"\ServerLog.txt", true);
[Release] Those still using LOTF
04/17/2009 - CO2 PServer Guides & Releases - 23 Replies
Help yourself be a better coder and listen to what the community is trying to say. One day you will understand why some are trying to encourage people still using LOTF to move to a more stable source and only use LOFT as a basis of learning and how you can improve (A LOT) on the LOTF coding. There's a lot of GREAT coding examples in InfamousNoone's source which you can actually learn from and gain a greater understanding of how a PROPER server operates. After all why do you think...



All times are GMT +2. The time now is 05:11.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.