[Release] BlessEffect -

02/20/2010 07:44 -Shunsui-#1
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
02/20/2010 07:46 12tails#2
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
02/20/2010 07:51 -Shunsui-#3
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,
02/20/2010 15:58 Decker_#4
Good job Jose!
02/20/2010 17:51 -Shunsui-#5
Thanks,
02/20/2010 17:55 copz1337#6
I don't see any effect
02/20/2010 18:19 -Shunsui-#7
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 ?
02/20/2010 20:54 walmartboi#8
Just pointing this out, adding the BlessEffect.Handler(GC) in Attack.cs will make you have the effect even when you attack. lol.
02/20/2010 23:55 -Shunsui-#9
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
02/21/2010 00:11 ArtOfWar#10
Goodjob dude
02/21/2010 00:16 hunterman01#11
Yeah your not supposed to see the effect when your attacking only when your being attacked
02/21/2010 00:19 glover#12
Good job karma for you. This much help to all to up server stats
02/21/2010 00:44 NukingFuts#13
woot nice work :)
02/21/2010 07:08 gulpi_de_gulat#14
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
02/21/2010 11:18 salem rey#15
How can i add this one, if your making negative in your items in market.