i need help its a hard problem

02/03/2014 02:31 elprofessor#1
hey coders

in my server \ rikardo updated , fixed source
problem : trojan can kill a flying archer using scentsword

my goal : cancel that

question : any one have any ideas about how to cancel that ?

regards
02/03/2014 02:35 Aceking#2
Add a check when the skill is cast to see if the target has the fly effect

Not so hard...
02/03/2014 02:49 elprofessor#3
can you please explain it more clearly . or just tell me about the place which i will edit .. i have thanked you for your instant respond :D
02/03/2014 02:56 Aceking#4
When someone casts any kind of physical attack, you need to check that the target isn't flying.

So in your attack processor, you need to add a check to see if the target has the fly effect.

I really can't explain it any further, and if you truly cannot understand that, then I get the feeling nobody will be able to help you.

Example:
Code:
if (!ContainsFlag1(Effect1.Fly))
02/03/2014 03:00 elprofessor#5
look the Trojan cannot melee attack a flying archer but it can attack a flying archer using scent sword

where to edit that bro where to search and edit where ?
02/03/2014 03:05 Spirited#6
Time for you to check [Only registered and activated users can see links. Click Here To Register...]. If you can't add a simple boolean check to your source, then yikes. I will give you a tip though, it's in your attack handler file. Depends on the source you have, which you didn't specify. If you're looking for a specific answer, don't ask a general question.
02/03/2014 03:09 elprofessor#7
Quote:
Originally Posted by Spirited Fang View Post
Time for you to check [Only registered and activated users can see links. Click Here To Register...]. If you can't add a simple boolean check to your source, then yikes. I will give you a tip though, it's in your attack handler file. Depends on the source you have, which you didn't specify. If you're looking for a specific answer, don't ask a general question.
cant you give a little help man :D
02/03/2014 03:13 Spirited#8
Quote:
Originally Posted by elprofessor View Post
cant you give a little help man :D
No. I'm not going to participate as such a negative influence. I don't mean to be harsh, but nobody can help you without handing you code every time you ask a question. Although we're here to help, what you're trying to take advantage of is not what we're here for. We're here to help and support the talented and not so talented programmers of the Conquer Online development community. If that's sharing code, so be it; however, we're not here to hand you code every time you want to add a conditional statement. A conditional statement is the simplest form of logic in software development - you're expected to understand it from basic algebraic theorems or prior experience in programming. Looking at your small history here, everything you've asked for so far has been adding simple things like a conditional statement or changing a constant. That's just ridiculous. We've given you very helpful advice so far, so please use that to your advantage to learn how to correctly manage your server.
02/03/2014 13:17 Yupmoh#9
Just add a check to see if its a ground attack or not, also check for the fly status... That's like 2 lines of code.
02/03/2014 14:19 elprofessor#10
it is rikardo updated fixed source ,,, 5165 ,, i have fixed most bugs but still want to fix the flying archer thing and melee attack for now ,, still testing the source but that's what i need to fix for now ,,, i would be thankful and glad if some body can share me some info :D
02/03/2014 14:33 Dr.unreal#11
Okay , let me translate what the people above suggested into your lang .
"We gief you teh codez but the codez no work in your sources . You needs to adjust them to make them work . Use the l33t search functions ! "

Best of luck
02/03/2014 18:18 EgyptianMano#12
Check your attack handler class , search there for function that checks if can attack, usually it will has the same name "bool CanAttack(" or something like that
when u find it put a check there to c if the target is flying something like
if (Attacked.Fly) return false;
or
if(Attacked.ContainsFlag(the fly flag here)) return false;
02/04/2014 15:56 turk55#13
Quote:
Originally Posted by EgyptianMano View Post
Check your attack handler class , search there for function that checks if can attack, usually it will has the same name "bool CanAttack(" or something like that
when u find it put a check there to c if the target is flying something like
if (Attacked.Fly) return false;
or
if(Attacked.ContainsFlag(the fly flag here)) return false;
You just said the same thing as what Aceking said.

Quote:
Originally Posted by Aceking View Post
When someone casts any kind of physical attack, you need to check that the target isn't flying.

So in your attack processor, you need to add a check to see if the target has the fly effect.

I really can't explain it any further, and if you truly cannot understand that, then I get the feeling nobody will be able to help you.

Example:
Code:
if (!ContainsFlag1(Effect1.Fly))