Gem Effect

09/11/2011 07:37 marlyandedsel#1
This is Phoenix Gem Effect only, in my working source I have add all of them and its working fine now.
I will not tell you where to put this and how to complete all the gem effect, you have to figure it out.
PHP Code:
public void CheckForSuperGems(Client.GameState client)
        {
            for (
uint i 112i++)
            {
                if (
!= 7)
                {
                    
Interfaces.IConquerItem item client.Equipment.TryGetItem(i);
                    if (
item != null && item.ID != 0)
                    {                        
                        if (
item.SocketOne != 0)
                        {  
                            if (
item.SocketOne == Enums.Gem.SuperPhoenixGem)
                            {
                                if (
ServerBase.Kernel.Rate(3)) //this is where your chances when to display the phoenix gem effect
                                
{
                                    
_String str = new _String(true);
                                    
str.UID attacker.UID;
                                    
str.TextsCount 1;
                                    
str.Type _String.Effect;
                                    
str.Texts.Add("phoenix");
                                    
attacker.Owner.Screen.SendScreen(strtrue);
                                }
                            }
                        }
                    }                    
                }
            }
        } 
09/11/2011 10:57 MegaArcherZGX#2
Double Rainbows Dude xD,thx for dis <3
09/11/2011 11:47 marlyandedsel#3
Quote:
Originally Posted by MegaArcherZGX View Post
Double Rainbows Dude xD,thx for dis <3
Your Welcome!
09/11/2011 15:58 HerpDerpNigga#4
Doesn't work, I added the code in Game > Attacking > Handle.cs I debugged, nothing...
I even changed the chance to 100%
I am missing something?
09/11/2011 16:37 pro4never#5
Constructive criticism.


#1: Do NOT calculate how many gems you have every time there's an attack... The only time it would change is when you equip an item... Therefor in your equip code you call a Recalculate type method which updates all your stats including how many super gems of each type you have equipped (or better yet... a percent chance for a gem effect to go off so you avoid extra math operations!)

#2: A simple "DisplayGems" type method might be nice to have inside your client. Call THAT when you attack someone. Then inside the display gems just say if(PercentChance(RainbowGems)) DisplayRainbowGems; if(PercentChance(DragonGEms)) DisplayDragonGems;

etc
09/11/2011 17:24 marlyandedsel#6
@pro4never: Thanks, you have enlightened me about that, anyway its working fine for now, I will just try to use the one you suggested.

@HerpDerpNigga: You have to call it every time you take attack, not just copying and pasting it.
09/26/2011 02:44 shadowman123#7
So i Added it Too into handle.cs but nothing changed :(
09/26/2011 03:05 marlyandedsel#8
You have to call it every time you take attack, not just copying and pasting it.
09/26/2011 03:32 shadowman123#9
Quote:
Originally Posted by marlyandedsel View Post
You have to call it every time you take attack, not just copying and pasting it.
Aha..i guess i understood u gonna try it now thx

i couldnt add it successfuly ..Well i wanna ASk a Question .when i Add it successfuly will the Phoenix wings appear to me after Attacking ??
09/26/2011 12:13 marlyandedsel#10
yea of course when you take attack, it depends on the chances rate.
09/26/2011 17:56 shadowman123#11
Well it took me 2 hours or trying to get code work after i added the code in the right place which obviously in Handle.cs but the Main problem how to make This Work ...Could u Help me in that ?
09/27/2011 00:24 marlyandedsel#12
nah! Find where you take attack melee and range attack and call it there
09/27/2011 04:18 killersub#13
very nice. although I have a question, how can I find the effect names of each effect? or what are they?
09/27/2011 06:25 maksod7#14
I add codes effects not Chagall Avatar
09/27/2011 14:27 F i n c h i#15
Quote:
Originally Posted by killersub View Post
very nice. although I have a question, how can I find the effect names of each effect? or what are they?
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