# cross the attack from inside

#### 3688599

##### Darkness-babek.no-ip.org
I want to cross the attacks from the outside only, not from the inside
example for my problem :-

example for my idea i want to doing :-

this all I need to cross the attacks from the outside only, not from the inside
- someone help me

#### Waldra1999

##### New Member
I want to cross the attacks from the outside only, not from the inside
example for my problem :-View attachment 60489

example for my idea i want to doing :-
View attachment 60490
this all I need to cross the attacks from the outside only, not from the inside
- someone help me

Hey let the people who are inside the magic wall field live in peace because u cant attack them xD

#### Xikini

##### I whore myself out for likes
Support Team
This is a coding nightmare situation btw.

How do you determine what's outside and inside?

What if 2 people are trapped inside their own 3 by 3 area, but they want to attack each other? Is it classified as inside or outside?

What if someone is in a 1 wide corridor, and they have 2 tiles to walk around? How would you determine if they are trapped or not?

What if someone is trapped in a 4 by 3 area, with another person beside them? Are they considered trapped?

What if someone is walled in on a roof, but have the option of levitating up/down?

If 2 people are in a 3 square straight area, and they put a wild growth in the middle block, are they both considered trapped?

What if someone is trapped in a 3 by 3 area, but they have a rope spot under their feet? A ladder? Stairs nearby?

How do you explain all of these edge cases to a player without confusing them?

#### M0ustafa

##### 1337
Senator
He doesn't mean only when player is completely trapped, What he is referring to is an old known bug on few XML engines 8.00/8.10 where in specific positions/situations one player can attack but the other won't be able to attack back.
I will post this gif showing which position are used to be able to attack without being reached by the other player, When `Test Three` stands on any of the `100 crystal coins` positions he'll be able to attack `Test One`, But in the opposite `Test One` won't be able to attack him back on those specific positions, So it looks like this.

So players who are still playing XML servers 8.00/8.10 are far used to this PVP style/tactics that most of them don't even recognize it is a bug and they think that's how the game works.
They use it in many different situations like in this example.

#### Xikini

##### I whore myself out for likes
Support Team
He doesn't mean only when player is completely trapped, What he is referring to is an old known bug on few XML engines 8.00/8.10 where in specific positions/situations one player can attack but the other won't be able to attack back.
I will post this gif showing which position are used to be able to attack without being reached by the other player, When `Test Three` stands on any of the `100 crystal coins` positions he'll be able to attack `Test One`, But in the opposite `Test One` won't be able to attack him back on those specific positions, So it looks like this.
View attachment 60882
So players who are still playing XML servers 8.00/8.10 are far used to this PVP style/tactics that most of them don't even recognize it is a bug and they think that's how the game works.
They use it in many different situations like in this example.
View attachment 60883
I appreciate the clarification.

#### zbizu

##### Legendary OT User
Been working on it recently. It's isSightClear, very likely located in game.cpp although can be placed somewhere else in old engines.

My guess is they cast just one ray instead of two - this is why it doesn't connect from the other side.

#### M0ustafa

##### 1337
Senator
Been working on it recently. It's isSightClear, very likely located in game.cpp although can be placed somewhere else in old engines.
As far as I know from his previous threads, He is not trying to fix it here so both be able to attack.
He wants to stop using XML and wants to make his OTX2 works the same as in the gifs because his players can't play without this bug.
But yeah he can compare the function on old XML engine with `isSightClear` in OTX2, Looks like Evolutions XML just uses `canThrowObjectTo` function instead of `isSightClear` (As far as I understand).
Evolutions XML lines
C++:
``````    if(g_game.canThrowObjectTo(getPosition(), attackedCreature->getPosition())){
doAttacking(interval);``````
OTX2 lines
C++:
``````    if(g_game.isSightClear(getPosition(), attackedCreature->getPosition(), true))
doAttacking(interval);``````

Replies
0
Views
137
Replies
2
Views
124
Replies
0
Views
270
Replies
0
Views
171
Replies
12
Views
304
Replies
0
Views
131
Replies
0
Views
90
Replies
6
Views
250
Replies
2
Views
367
Replies
5
Views
379