Gem Effect

09/27/2011 18:06 shadowman123#16
Quote:
Originally Posted by F i n c h i View Post
Super Dragon Gem = goldendragon
Super Phoenix Gem = phoenix
Super Rainbow Gem = rainbow
Super Violet Gem = purpleray
Super Moon Gem = moon
Super Kylin Gem = goldenkylin
Super Fury Gem = fastflash
Super Tortoise Gem = recovery
Thx alot for that Finchi but did u try the code urself ?
09/27/2011 20:14 killersub#17
Quote:
Originally Posted by F i n c h i View Post
Super Dragon Gem = goldendragon
Super Phoenix Gem = phoenix
Super Rainbow Gem = rainbow
Super Violet Gem = purpleray
Super Moon Gem = moon
Super Kylin Gem = goldenkylin
Super Fury Gem = fastflash
Super Tortoise Gem = recovery
thanks (:. but I would actually like to find out where they came from?
09/28/2011 01:55 shadowman123#18
Quote:
Originally Posted by killersub View Post
thanks (:. but I would actually like to find out where they came from?
well it doesnt matter how they came from if they r working well ,till now i dont know how to call em ..i've already added em in handle.cs coudlnt do more than that :(
09/28/2011 02:21 killersub#19
Quote:
Originally Posted by shadowman123 View Post
well it doesnt matter how they came from if they r working well ,till now i dont know how to call em ..i've already added em in handle.cs coudlnt do more than that :(
I know how to call them. like marlyandedsel said
Quote:
You have to call it every time you take attack, not just copying and pasting it.
I was simply asking where are they in the client so I can fully understand their nature.
09/28/2011 02:59 shadowman123#20
Quote:
Originally Posted by killersub View Post
I know how to call them. like marlyandedsel said

I was simply asking where are they in the client so I can fully understand their nature.
could u tell me how to call this ?
09/28/2011 04:10 killersub#21
Quote:
Originally Posted by shadowman123 View Post
could u tell me how to call this ?
I can't simply tell you because I have a different source than you do.

but what I CAN tell you is that you need to call it every time a player attacks, by that I mean look for Attack.cs or in the Attack folder for Handle.cs and find the switch for each attack type and fiddle around with it until you find the place where the player sends the attack to the client and then call it right when that happens.

It's not "THAT" hard as it looks it just takes some time and practice until you master it. :)
09/28/2011 05:11 shadowman123#22
aha So Calling means putting the code inside it ??? but just in the right place where the player send attacks ??
09/28/2011 06:55 EviL|Shepherd#23
Or...you know...delete the folders that have the .dds files causing the effects to show the begin with.

I can't code to save my life, but I really don't see a point in this post at all.
09/28/2011 15:57 F i n c h i#24
Check for three types of attack; Melee, Ranged & Magic.
09/28/2011 18:10 shadowman123#25
well heres what i did i added the Code in Handle.cs and i called it back when player attack like that
Code:
#region Single magic damage spells
                                case 1000:
                                case 1001:
                                case 1002:
                                case 1150:
                                case 1160:
                                case 1180:
                                case 1320:
                                    {
                                        if (CanUseSpell(spell, attacker.Owner))
                                        {
                                            if (attacked != null)
                                            {
                                                if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance)
                                                {
                                                    CheckForSuperGems <<== i dont know what to write beside it
                                                    SpellUse suse = new SpellUse(true);
                                                    suse.Attacker = attacker.UID;
                                                    suse.SpellID = spell.ID;
                                                    suse.SpellLevel = spell.Level;
                                                    suse.X = X;
                                                    suse.Y = Y;
                                                    
                                                    if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
                                                    {
                                                        PrepareSpell(spell, attacker.Owner);
                                                        uint damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell);

                                                        damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell);

                                                        suse.Targets.Add(attacked.UID, damage);

                                                        if (attacked.EntityFlag == EntityFlag.Player)
                                                            attacked.Owner.Screen.SendScreen(suse, true);
                                                        else
                                                            attacked.MonsterInfo.SendScreen(suse);
                                                    }
                                                }
                                                else
                                                {
                                                    attacker.AttackPacket = null;
                                                }
                                            }
                                            else
                                            {
                                                if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance)
                                                {
                                                    SpellUse suse = new SpellUse(true);
                                                    suse.Attacker = attacker.UID;
                                                    suse.SpellID = spell.ID;
                                                    suse.SpellLevel = spell.Level;
                                                    suse.X = X;
                                                    suse.Y = Y;

                                                    if (CanAttack(attacker, attackedsob, spell))
                                                    {
                                                        PrepareSpell(spell, attacker.Owner);
                                                        uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell);

                                                        ReceiveAttack(attacker, attackedsob, attack, damage, spell);

                                                        suse.Targets.Add(attackedsob.UID, damage);

                                                        attacker.Owner.Screen.SendScreen(suse, true);
                                                    }
                                                }
                                            }
                                        }
                                        else
                                        {
                                            attacker.AttackPacket = null;
                                        }
                                        break;
                                    }
                                #endregion
So what should i write bet.Checkforgems .and is this what u say call ?
09/28/2011 21:44 killersub#26
Quote:
Originally Posted by shadowman123 View Post
well heres what i did i added the Code in Handle.cs and i called it back when player attack like that
Code:
#region Single magic damage spells
                                case 1000:
                                case 1001:
                                case 1002:
                                case 1150:
                                case 1160:
                                case 1180:
                                case 1320:
                                    {
                                        if (CanUseSpell(spell, attacker.Owner))
                                        {
                                            if (attacked != null)
                                            {
                                                if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance)
                                                {
                                                    CheckForSuperGems <<== i dont know what to write beside it
                                                    SpellUse suse = new SpellUse(true);
                                                    suse.Attacker = attacker.UID;
                                                    suse.SpellID = spell.ID;
                                                    suse.SpellLevel = spell.Level;
                                                    suse.X = X;
                                                    suse.Y = Y;
                                                    
                                                    if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
                                                    {
                                                        PrepareSpell(spell, attacker.Owner);
                                                        uint damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell);

                                                        damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell);

                                                        suse.Targets.Add(attacked.UID, damage);

                                                        if (attacked.EntityFlag == EntityFlag.Player)
                                                            attacked.Owner.Screen.SendScreen(suse, true);
                                                        else
                                                            attacked.MonsterInfo.SendScreen(suse);
                                                    }
                                                }
                                                else
                                                {
                                                    attacker.AttackPacket = null;
                                                }
                                            }
                                            else
                                            {
                                                if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance)
                                                {
                                                    SpellUse suse = new SpellUse(true);
                                                    suse.Attacker = attacker.UID;
                                                    suse.SpellID = spell.ID;
                                                    suse.SpellLevel = spell.Level;
                                                    suse.X = X;
                                                    suse.Y = Y;

                                                    if (CanAttack(attacker, attackedsob, spell))
                                                    {
                                                        PrepareSpell(spell, attacker.Owner);
                                                        uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell);

                                                        ReceiveAttack(attacker, attackedsob, attack, damage, spell);

                                                        suse.Targets.Add(attackedsob.UID, damage);

                                                        attacker.Owner.Screen.SendScreen(suse, true);
                                                    }
                                                }
                                            }
                                        }
                                        else
                                        {
                                            attacker.AttackPacket = null;
                                        }
                                        break;
                                    }
                                #endregion
So what should i write bet.Checkforgems .and is this what u say call ?
you're doing it all wrong lol.

Code:
CheckForSuperGems
shouldn't be alone without it's rightful parameters because it's a static VOID.

in the post you "Should" have "C+P" the code into your source and notice that it has the parameters beside saying:
Code:
CheckForSuperGems[COLOR="DarkRed"](Client.GameState Client)[/COLOR]
so you would put
Code:
CheckForSuperGems(Client.GameState Client);
instead.

and you have to check where you put it, because by the looks of it you have it in the Wong Wrong place, my friend.
09/28/2011 21:57 shadowman123#27
Aha Okay..thx Alot M8 i like Working and Trying ;)
09/28/2011 22:13 F i n c h i#28
Like I said, you should check for that void in each attack type (melee, raged, magic).
09/28/2011 22:29 shadowman123#29
Wooot it Works Like A charm ...Thx Both u gave me nice hint and infos Killer Sob
09/28/2011 22:33 F i n c h i#30
Quote:
Originally Posted by shadowman123 View Post
Wooot it Works Like A charm ...Thx Both :) u gave me nice hint and infos Killer Sob
Good job.