Register for your free account! | Forgot your password?

You last visited: Today at 04:30

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

Advertisement



[Help] NPC health?

Discussion on [Help] NPC health? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
[Help] NPC health?

alright so I've currently checked my server again and found out dat once u attack npcs with like skills (not including fb/ss) they get attacked with a random dmg amount...wtf lol? anyone kno how can I fix it so u cant ATTACK ANY npc lol? most of the new sources released nowadays have dis problem but I have not yet fixed it since idk how to...any help would be appreciated
killersub is offline  
Old 08/17/2010, 21:48   #2
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
It's just a basic bit of code, it's in the attack.cs your better off not using newestcoserver to be fair.
_DreadNought_ is offline  
Thanks
1 User
Old 08/17/2010, 22:36   #3
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by Eliminationn View Post
It's just a basic bit of code, it's in the attack.cs your better off not using newestcoserver to be fair.
meh I'm jus seeing how much I can code into it for it to actually be playable to other people lol...anyways +thanks
killersub is offline  
Thanks
1 User
Old 08/18/2010, 02:37   #4
 
elite*gold: 0
Join Date: Sep 2006
Posts: 42
Received Thanks: 14
hahaha , thats funny but the npc never dies xd
sagitarius2118 is offline  
Old 08/18/2010, 10:02   #5
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
put a check in attack.cs for if it is a npc, i will reply back, when i get home.
Fish* is offline  
Old 08/18/2010, 11:37   #6


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
You are spawning npcs with the type which allows them to be attacked, this should only really be used for scarecrows and stakes in Training ground. After thats been corrected you should no longer be able to target npcs or attack them.
Korvacs is offline  
Old 08/18/2010, 11:49   #7
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Quote:
Originally Posted by grillmad View Post
put a check in attack.cs for if it is a npc, i will reply back, when i get home.
Yeah check if what your attacking has a flag that = a npc
_DreadNought_ is offline  
Old 08/18/2010, 13:01   #8
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
I know, I know.
But im at my school right now =]
Fish* is offline  
Old 08/18/2010, 16:59   #9
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by Eliminationn View Post
Yeah check if what your attacking has a flag that = a npc
I found this In Attack.cs It might be da cause of da problem idk, just putting it out here cuz I didnt have this bit of code in any of my other sources...

Code:
if (PossChar == null && PossMob == null)
                        {
                            Game.NPC PossNPC = (Game.NPC)Game.World.H_NPCs[TargetUID];
                            if (PossNPC != null && PossNPC.Flags == 21 && (MyMath.PointDistance(GC.MyChar.Loc.X, GC.MyChar.Loc.Y, PossNPC.Loc.X, PossNPC.Loc.Y) <= 3 || AttackType == 28 && MyMath.PointDistance(GC.MyChar.Loc.X, GC.MyChar.Loc.Y, PossNPC.Loc.X, PossNPC.Loc.Y) <= 15))
                            {
                                GC.MyChar.AtkMem.Target = TargetUID;
                                GC.MyChar.AtkMem.Attacking = true;

                                if (DateTime.Now > GC.MyChar.AtkMem.LastAttack.AddMilliseconds(GC.MyChar.AtkFrequence))
                                {
                                    uint Damage = GC.MyChar.PrepareAttack((byte)AttackType, true);
                                    //if (!GC.MyChar.WeaponSkill(PossNPC.Loc.X, PossNPC.Loc.Y, PossNPC.EntityID))
                                        //PossNPC.TakeAttack(GC.MyChar, Damage, (ConquerSx.Game.AttackType)AttackType, false);
                                }
                            }
                        }
                    }
might dat be da problem ?
killersub is offline  
Old 08/18/2010, 17:10   #10
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
make a check for that npc flag is only tg npcs XD
Fish* is offline  
Old 08/18/2010, 17:25   #11
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
21 is scarecrow type. Change your npc types to something the client doesnt view as attackable and change server side too..


Could be wrong but i seeem to remember 21 being scarecrow and 22 or something being stake. Trst out some flag values for your spawn to see what they do ^^. Seem to remember 1 being store and 2 being npc
pro4never is offline  
Old 08/18/2010, 23:45   #12
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
pro4never I believe you are correct. Here
Code:
Shop = 1,
        Dialog = 2,//3, 4, 10, 15, 27
        FaceChange = 5,
        TCUpgrade = 6,
        GemSocket = 7,
        ShopCarpet = 14,
        AskVending = 16,
        Gamble = 19,
        Stake = 21,
        Scarecrow = 22
.Beatz is offline  
Old 08/18/2010, 23:53   #13


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Indeed so you need to change the npc type to the correct npc type which doesnt allow attacking (ie not a stake or scarecrow), for a standard npc thats type 2, like i said its as simple as that.
Korvacs is offline  
Reply


Similar Threads Similar Threads
[HELP]Health Bar(HP) BUG...
01/20/2011 - EO PServer Hosting - 3 Replies
My character Health Bar(HP) always keep low...after i take Hp potion..still the same..how to fix the character health bar(HP)??im using revo client + db..anyone plss help me fix this bug..
PC health
01/24/2008 - Off Topic - 6 Replies
ok i need a favor cose i have a hard time finding a program that shoes you all you PC hardweare, fan RPM and temperature... post if you have anything
health bs
09/25/2007 - Conquer Online 2 - 2 Replies
I was just wondering how much the health backsword sells for. I have one and im thinking of getting rid of it. thanks
Health
12/03/2006 - World of Warcraft - 0 Replies
ich bin klein doof und bekomme nun ein bann
Health Bar
02/26/2006 - Conquer Online 2 - 4 Replies
why is it that all the monsters and the quards have no HP bar??? what file contains this info so maybe i can reverse it? tnx in advance



All times are GMT +2. The time now is 04:30.


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