Boss immune to superman

05/19/2012 04:58 zakkwilde_17#1
Hi guys, i'm here just to request one help...

i'm working on a 5525 source and need to learn how to do a Boss immune to Superman skill. Warriors can kill a boss so easy =(

some one know how to make a Boss immune to superman?

thanks guys.
05/19/2012 07:08 Spirited#2
Quote:
Originally Posted by zakkwilde_17 View Post
some one know how to make a Boss immune to superman?
kryptonite?
05/19/2012 09:14 pro4never#3
Go to where you calculate damage. Inside the calculation, go where superman bonus damage is calculated and say something like.

if(!Target.IsBoss)
Damage *= 9.9;

Simple stuff, just need to check conditions and react accordingly.
05/19/2012 17:51 shadowman123#4
What About the Immunity Blue Word Under Boss Name how can i Make This Work ?
05/19/2012 18:15 Spirited#5
Quote:
Originally Posted by shadowman123 View Post
What About the Immunity Blue Word Under Boss Name how can i Make This Work ?
It's probably an attack packet (1022) subtype. Just make a command that tests subtypes. You'll find it eventually. There aren't that many.
05/19/2012 18:57 shadowman123#6
Quote:
Originally Posted by Fаng View Post
It's probably an attack packet (1022) subtype. Just make a command that tests subtypes. You'll find it eventually. There aren't that many.
i Already did that b4 and all i could get is Absorb Damage beside some Types ...ill Do packet sniffer And check how it works
05/20/2012 02:03 zakkwilde_17#7
Quote:
Originally Posted by Fаng View Post
kryptonite?
hahahaha xD no no man!

Quote:
Originally Posted by pro4never View Post
Go to where you calculate damage. Inside the calculation, go where superman bonus damage is calculated and say something like.

if(!Target.IsBoss)
Damage *= 9.9;

Simple stuff, just need to check conditions and react accordingly.
ha! thanks man. I have fixed it. (Y)
I'm just following your instruction and make a alteration here... I have made this:

Code:
            if (attacker.OnSuperman())
            {
                if (attacked.Name.Contains("TeratoDragon"))
                    Damage = (int)(Damage * 0.9);
                else
                    Damage *= 10;
                if (attacked.EntityFlag == EntityFlag.Player)
                    Damage = (int)(Damage * 0.1);
   
            }
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

Tnks for you help bro
^^

Request Closed
05/20/2012 02:22 shadowman123#8
well i have some notice on your code which is

PHP Code:
            if (attacker.OnSuperman())
            {
                if (
attacked.Name.Contains("TeratoDragon"))
                    
Damage = (int)(Damage 0.9);
                else
                    
Damage *= 10;
                if (
attacked.EntityFlag == EntityFlag.Player)
                    
Damage = (int)(Damage 0.1);
            } 
well This Code is weakly coded for SOme reasons 1st :-

1 - You have to make another 4 cases cuz u r making checkers using name so u would need to add cases of SnowBanshee , and other super bosses so thats
inefficient it should Be bool instance Named Bosses for example and then its set to True once the monster is Boss and luckly u seem to be using Impulse Source in this Case its already been Added..

2 - Superman damage x 2 in case you attacks player not 0.1 as i guess

3 - y did u make Damage = (uint)Damage * 0.9 while it should had written this way Damage *= 10;

Anyways Heres A Code For all cases

PHP Code:
            if (attacker.EntityFlag == EntityFlag.Player && attacker.OnSuperman())
            {
                switch (
attacked.EntityFlag)
                {
                    case 
EntityFlag.Player:
                        {
                            
Damage *= 2;
                            break;
                        }
                    case 
EntityFlag.Monster:
                        {
                            if (
attacked.MonsterInfo.Boss == true)
                            {
                                
Damage *= 1;
                            }
                            else
                            {
                                
Damage *= 10;
                            }
                            break;
                        }
                }
            } 
05/20/2012 03:07 zakkwilde_17#9
Quote:
Originally Posted by shadowman123 View Post
well i have some notice on your code which is

PHP Code:
            if (attacker.OnSuperman())
            {
                if (
attacked.Name.Contains("TeratoDragon"))
                    
Damage = (int)(Damage 0.9);
                else
                    
Damage *= 10;
                if (
attacked.EntityFlag == EntityFlag.Player)
                    
Damage = (int)(Damage 0.1);
            } 
well This Code is weakly coded for SOme reasons 1st :-

1 - You have to make another 4 cases cuz u r making checkers using name so u would need to add cases of SnowBanshee , and other super bosses so thats
inefficient it should Be bool instance Named Bosses for example and then its set to True once the monster is Boss and luckly u seem to be using Impulse Source in this Case its already been Added..

2 - Superman damage x 2 in case you attacks player not 0.1 as i guess

3 - y did u make Damage = (uint)Damage * 0.9 while it should had written this way Damage *= 10;

Anyways Heres A Code For all cases

PHP Code:
            if (attacker.EntityFlag == EntityFlag.Player && attacker.OnSuperman())
            {
                switch (
attacked.EntityFlag)
                {
                    case 
EntityFlag.Player:
                        {
                            
Damage *= 2;
                            break;
                        }
                    case 
EntityFlag.Monster:
                        {
                            if (
attacked.MonsterInfo.Boss == true)
                            {
                                
Damage *= 1;
                            }
                            else
                            {
                                
Damage *= 10;
                            }
                            break;
                        }
                }
            } 
ah! very good! thanks man ^^
i'm not good in codes ... I started working with this two weeks ago... now i solved my problem 100%.
05/20/2012 03:12 shadowman123#10
Quote:
Originally Posted by zakkwilde_17 View Post
ah! very good! thanks man ^^
i'm not good in codes ... I started working with this two weeks ago... now i solved my problem 100%.
No worries You gonna become Better one day
05/20/2012 05:59 CptSky#11
Quote:
Originally Posted by shadowman123 View Post
[...]
For 2 statements, a switch require more CIL code than an if/else statement. Plus, a *= 1 is completely useless... (I hope that the C# compiler will optimize it by removing it.


PHP Code:
            if (attacker.EntityFlag == EntityFlag.Player && attacker.OnSuperman())
            {
                if (
attacked.EntityFlag == EntityFlag.Player)
                    
Damage *= 2;
                else if (
attacked.EntityFlag == EntityFlag.Monster && !attacked.MonsterInfo.Boss)
                    
Damage *= 10;
            } 
05/20/2012 06:44 pro4never#12
Quote:
Originally Posted by CptSky View Post
For 2 statements, a switch require more CIL code than an if/else statement. Plus, a *= 1 is completely useless... (I hope that the C# compiler will optimize it by removing it.


PHP Code:
            if (attacker.EntityFlag == EntityFlag.Player && attacker.OnSuperman())
            {
                if (
attacked.EntityFlag == EntityFlag.Player)
                    
Damage *= 2;
                else if (
attacked.EntityFlag == EntityFlag.Monster && !attacked.MonsterInfo.Boss)
                    
Damage *= 10;
            } 

Thank you so much for pointing this out.

I saw it and was like "da fuck... you're taking your damage, multiplying it by 10 then dividing it by 10?" then I saw the "fix" which was to multiply it by 1. Very odd indeed.