Possible attack script bug

Ask here if you experience technical problems with X³: Terran Conflict, X³: Albion Prelude or X³: Farnham's Legacy.

Moderators: timon37, Moderators for English X Forum

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Possible attack script bug

Post by Gazz »

The comment in 45 suggests that the script should choose between the 2 attack scripts below.

Line 50 assigns the victim's race to $player.isowner
It does not check if this race = player

Line 54 always chooses the first script if $player.isowner has any value.
The second (reduced performance?) script can only be selected if the victim has no race at all.

Code: Select all

!fight.attack.object

044   fighter:
045   * if the player does not see the fight, why use high performance scripts?
046   $player.ships = [SECTOR] -> get player owned ship array from sector
047   $player.ships =  size of array $player.ships
048   $player.stations = [SECTOR] -> get player owned station array from sector
049   $player.stations =  size of array $player.stations
050   $player.isowner = $victim -> get owner race
051   $player.jumps = [PLAYERSHIP] -> get sector
052   $player.jumps = get jumps from sector [SECTOR] to sector $player.jumps
053   
054   if $player.ships OR $player.stations OR $player.isowner OR $player.jumps < 2
055 @ |= [THIS] -> call script '!plugin.acp.fight.attack.object' :  the victim=$victim  follow in new sector=$follow  Only attack shields?=$onlyShields
056   else
057 @ |= [THIS] -> call script '!fight.attack.object.std' :  the victim=$victim  follow in new sector=$follow  only target shields?=$onlyShields
058   end
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
User avatar
supakillaii
Posts: 2385
Joined: Mon, 19. Nov 07, 19:52
x4

Post by supakillaii »

Wow... uhm... Soon there will be no existance and they will rush out 1.4.5 :)
User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. »

FIXed

Return to “X³: Terran Conflict / Albion Prelude / Farnham's Legacy - Technical Support”