|
You last visited: Today at 04:30
Advertisement
[Help] NPC health?
Discussion on [Help] NPC health? within the CO2 Private Server forum part of the Conquer Online 2 category.
08/17/2010, 20:24
|
#1
|
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
|
|
|
08/17/2010, 21:48
|
#2
|
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.
|
|
|
08/17/2010, 22:36
|
#3
|
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
|
Quote:
Originally Posted by Eliminationn
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
|
|
|
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
|
|
|
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.
|
|
|
08/18/2010, 11:37
|
#6
|
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.
|
|
|
08/18/2010, 11:49
|
#7
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
|
Quote:
Originally Posted by grillmad
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
|
|
|
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 =]
|
|
|
08/18/2010, 16:59
|
#9
|
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
|
Quote:
Originally Posted by Eliminationn
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 ?
|
|
|
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
|
|
|
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
|
|
|
08/18/2010, 23:45
|
#12
|
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
|
|
|
08/18/2010, 23:53
|
#13
|
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.
|
|
|
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.
|
|