Register for your free account! | Forgot your password?

You last visited: Today at 14:39

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

Advertisement



[Release] BlessEffect -

Discussion on [Release] BlessEffect - within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
[Release] BlessEffect -

Well, First of all Most of all the credits go to 12Talys, if He post here thanks him, This is Just a Simply BlessEffect of - Damage of Gears,
if you dont know...

First, Create a File BlessEffect.cs In Extra Folder of Your Source, And Paste This in there,

Code:
using System;
using System.Collections.Generic;
using System.Text;

namespace NewestCOServer.Extra
{
    public class BlessEffect
    {
        public static void Handler(Main.GameClient GC)
        {
            byte bless1 = 0;
            byte bless3 = 0;
            byte bless5 = 0;
            byte bless7 = 0;
            for (byte i = 1; i < 12; i++)
            {
                if (i != 7)
                {
                    Game.Item I = (Game.Item)GC.MyChar.Equips.Get(i);
                    if (I.Bless == 1)
                        bless1++;
                    if (I.Bless == 3)
                        bless3++;
                    if (I.Bless == 5)
                        bless5++;
                    if (I.Bless == 7)
                        bless7++;
                }
            }
            #region Check for bless 7
            if (bless7 > bless5 && bless7 > bless3 && bless7 > bless1)
            {
                if (MyMath.ChanceSuccess(10)) { Game.World.Action(GC.MyChar, Packets.String(GC.MyChar.EntityID, 10, "Aegis4").Get); }
            }
            #endregion
            #region Check for bless 5
            else if (bless5 > bless7 && bless5 > bless3 && bless5 > bless1)
            {
                if (MyMath.ChanceSuccess(10)) { Game.World.Action(GC.MyChar, Packets.String(GC.MyChar.EntityID, 10, "Aegis3").Get); }
                goto end;
            }
            #endregion
            #region Check for bless 3
            else if (bless3 > bless7 && bless3 > bless5 && bless3 > bless1)
            {
                if (MyMath.ChanceSuccess(10)) { Game.World.Action(GC.MyChar, Packets.String(GC.MyChar.EntityID, 10, "Aegis2").Get); }
                goto end;
            }
            #endregion
            #region Check for bless 1
            else if (bless1 > bless7 && bless1 > bless5 && bless1 > bless3)
            {
                if (MyMath.ChanceSuccess(10)) { Game.World.Action(GC.MyChar, Packets.String(GC.MyChar.EntityID, 10, "Aegis1").Get); }
                goto end;
            }
            #endregion
        end:
            //Console.WriteLine("This");
            return;
        }
    }
}

Then Go to Character.cs Search for
Code:
 public void TakeAttack(Companion Attacker, uint Damage, AttackType AT)
        {
            if (Damage != 0)
            {
Under that last bracket Add,
Code:
Extra.BlessEffect.Handler(MyClient);
Then Again Search for
Code:
public void TakeAttack(Character Attacker, uint Damage, AttackType AT, bool IsSkill)
        {
            if (Alive)
            {
Under that bracket add
Code:
Extra.BlessEffect.Handler(MyClient);
And last Search for
Code:
public void TakeAttack(Mob Attacker, uint Damage, AttackType AT)
        {
            if (Damage != 0)
            {
Under that bracket add,
Code:
Extra.BlessEffect.Handler(MyClient);
To change the rate of the effect to happen Just Change this in BlessEffect.cs
Code:
if (MyMath.ChanceSuccess([COLOR="Red"]10[/COLOR]))
To what you want, Enjoy
-Shunsui- is offline  
Thanks
11 Users
Old 02/20/2010, 07:46   #2
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
haha i get the wrong effect.....

see that you fixed it bro.... +k for releasing it : D (for you not me)

but i think by that way the other's aren't abble to see the effect... i don't try... but if don't show to others.... make using a World.Action

that will become like this:

Game.World.Action(GC.MyChar, Packets.String(GC.MyChar.EntityID, 10, "effecthere").Get);

EDIT:

Fixed them... : D
12tails is offline  
Thanks
4 Users
Old 02/20/2010, 07:51   #3
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Quote:
Originally Posted by 12tails View Post
haha i get the wrong effect.....

see that you fixed it bro.... +k for releasing it : D (for you not me)

but i think by that way the other's aren't abble to see the effect... i don't try... but if don't show to others.... make using a World.Action

that will become like this:

Game.World.Action(GC.MyChar, Packets.String(GC.MyChar.EntityID, 10, "effecthere"));
you Just Pwn, yeah that seems to work Updating the thread,
-Shunsui- is offline  
Old 02/20/2010, 15:58   #4
 
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
Good job Jose!
Decker_ is offline  
Thanks
1 User
Old 02/20/2010, 17:51   #5
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Thanks,
-Shunsui- is offline  
Old 02/20/2010, 17:55   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
I don't see any effect
copz1337 is offline  
Old 02/20/2010, 18:19   #7
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Quote:
Originally Posted by copz1337 View Post
I don't see any effect
What do you not see? This should work 100% Do you have Bless in your Gears ?
-Shunsui- is offline  
Old 02/20/2010, 20:54   #8
 
walmartboi's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
Just pointing this out, adding the BlessEffect.Handler(GC) in Attack.cs will make you have the effect even when you attack. lol.
walmartboi is offline  
Old 02/20/2010, 23:55   #9
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Quote:
Originally Posted by walmartboi View Post
Just pointing this out, adding the BlessEffect.Handler(GC) in Attack.cs will make you have the effect even when you attack. lol.
Well there updated, didint know i thod it was like that in real co
-Shunsui- is offline  
Old 02/21/2010, 00:11   #10
 
elite*gold: 40
Join Date: Feb 2010
Posts: 78
Received Thanks: 17
Goodjob dude
ArtOfWar is offline  
Old 02/21/2010, 00:16   #11
 
hunterman01's Avatar
 
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
Yeah your not supposed to see the effect when your attacking only when your being attacked
hunterman01 is offline  
Thanks
1 User
Old 02/21/2010, 00:19   #12
 
glover's Avatar
 
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
Good job karma for you. This much help to all to up server stats
glover is offline  
Old 02/21/2010, 00:44   #13
 
NukingFuts's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 480
Received Thanks: 112
woot nice work
NukingFuts is offline  
Old 02/21/2010, 07:08   #14
 
gulpi_de_gulat's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 71
Received Thanks: 40
Quote:
Originally Posted by hunterman01 View Post
Yeah your not supposed to see the effect when your attacking only when your being attacked
it work to 100% i didnt see the effect when im attacking only when char or mobs attacks me.
this is very nice release
gulpi_de_gulat is offline  
Old 02/21/2010, 11:18   #15
 
salem rey's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 275
Received Thanks: 43
How can i add this one, if your making negative in your items in market.
salem rey is offline  
Reply




All times are GMT +1. The time now is 14:40.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.