Jump to content

Fallen paladin quest: Paladins do not attack smuggler-cleric


jastey

Recommended Posts

The fallen paladin quest in the bridge district does not work every time. After fallen paladins and smugglers exchanged their lines, they start fighting each other. In some games, the f.paladins manage to kill all smugglers (my party didn't interfere). But in most games, the smuggler cleric would be the last one standing, hitting at the f.paladins, but they do not attack her.

 

From the smugglers, there are 7 smugglers. Rindus, "kaysmg01.cre" is the leader, with the DV "kaysmgl". The other 6 are 5 thieves and one cleric, all with the DV "kaysmg".

 

I noticed the following: Reynald de Chatillon (f.Paladin) attacks the cleric, but he doesn't go to her if she is further away. The other f.paladins do not attack her. They stand and wince periodically, but do not move after the last thief smuggler is dead.

The cleric healed one of the f.paladins, before attackim him.

 

I had a look at the scripts, I assume there is some kind of "!Dead(NearestEnemyOfMyself)" trigger missing, but I can't spot it right away.

 

This is the script of Reynald de Chatillon "kaypal02.cre" ("kaypal02.bcs"):

IF
Detect([PC])
Range(LastSeenBy(Myself),15)
NumTimesTalkedTo(0)
!Allegiance(Myself,ENEMY)
Global("KaylFallenPaladinPlot","GLOBAL",1)
THEN
RESPONSE #100
	StartDialogueNoSet(LastSeenBy(Myself))
END

IF
Global("KaylStartFight","GLOBAL",0)
OR(2)
	Allegiance("kaysmgl",ENEMY)
	Allegiance("kaysmg",ENEMY)
!Allegiance(Myself,ENEMY)
!CombatCounter(0)
THEN
RESPONSE #100
	SetGlobal("KaylStartFight","GLOBAL",1)
END

IF
See("kaypala")
!Range("kaypala",10)
!Allegiance(Myself,ENEMY)
CombatCounter(0)
THEN
RESPONSE #100
	MoveToObjectFollow("kaypala")
END

IF
Global("KaylStartFight","GLOBAL",2)
!Range([PC],10)
NumTimesTalkedTo(1)
THEN
RESPONSE #100
	MoveToObject([PC])
END

IF
Detect([PC])
Global("KaylStartFight","GLOBAL",2)
Global("TalkedAfterFight","LOCALS",0)
Range(LastSeenBy(Myself),15)
NumTimesTalkedToGT(0)
!Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
	StartDialogueNoSet(LastSeenBy(Myself))
END

IF
Heard("kaypala",89)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Enemy()
END

IF
Heard("kaypal",89)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Enemy()
END

IF
See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate(NearestEnemyOf(Myself),15)
END

IF
Global("KaylAnargAttack","GLOBAL",1)
THEN
RESPONSE #100
	Enemy()
END

IF
AttackedBy([GOODCUTOFF],DEFAULT)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Shout(89)
	Enemy()
END

IF
Dead("kaysmgl")
NumDeadGT("kaysmg",5)
THEN
RESPONSE #100
	SetGlobal("KaylStartFight","GLOBAL",2)
END

IF
Global("KaylStartFight","GLOBAL",1)
See("kaysmgl")
!Dead("kaysmgl")
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate("kaysmgl",15)
END

IF
Global("KaylStartFight","GLOBAL",1)
OR(2)
	See([NEUTRAL.0.HUMAN.THIEF])
	See([ENEMY.0.HUMAN.THIEF])
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate(NearestEnemyOf(Myself),15)
END

IF
Global("KaylStartFight","GLOBAL",1)
See("kaysmg")
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate("kaysmg",15)
END

 

This is the script of the other fallen paladins "kaypal03.cre" ("kaypal03.bcs"):

IF
Global("KaylStartFight","GLOBAL",2)
Dead("kaypall")
!Allegiance(Myself,ENEMY)
Global("KaylAlreadyTalked","GLOBAL",0)
!Global("KaylStartFight","GLOBAL",3)
THEN
RESPONSE #100
	EscapeArea()
END

IF
See("kaypall")
!Dead("kaypall")
!Range("kaypall",20)
!CombatCounter(0)
THEN
RESPONSE #100
	MoveToObjectFollow("kaypall")
END

IF
Heard("kaypala",89)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Enemy()
END

IF
Heard("kaypall",89)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Enemy()
END

IF
Heard("kaypal",89)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Enemy()
END

IF
Global("KaylAnargAttack","GLOBAL",1)
!Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
	Enemy()
END

IF
AttackedBy([GOODCUTOFF],DEFAULT)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Shout(89)
	Enemy()
END

IF
Dead("kaysmgl")
NumDeadGT("kaysmg",5)
Global("KaylStartFight","GLOBAL",1)
THEN
RESPONSE #100
	SetGlobal("KaylStartFight","GLOBAL",2)
END

IF
Global("KaylStartFight","GLOBAL",1)
OR(2)
	See([ENEMY.0.HUMAN.THIEF])
	See([NEUTRAL.0.HUMAN.THIEF])
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate(LastSeenBy(Myself),30)
END

IF
Global("KaylStartFight","GLOBAL",1)
!See([ENEMY.0.HUMAN.THIEF])
!See([NEUTRAL.0.HUMAN.THIEF])
OR(3)
	See([NEUTRAL.0.HUMAN.CLERIC])
	See([ENEMY.0.HUMAN.CLERIC])
	See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate(NearestEnemyOf(Myself),30)
END

IF
!Global("KaylStartFight","GLOBAL",1)
See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate(LastSeenBy(Myself),30)
END

 

This is the script of the cleric smuggler "KAYSMG04.cre" ("KAYSMG04.bcs"):

IF
AttackedBy([GOODCUTOFF],DEFAULT)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Shout(89)
	Enemy()
	SetGlobal("KaylPartyHelped","GLOBAL",1)
END

IF
Heard("kaysmg",89)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Enemy()
END

IF
Heard("kaysmgl",89)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Enemy()
END

IF
Heard([0.0.HUMAN.THIEF],89)
Allegiance(Myself,NEUTRAL)
THEN
RESPONSE #100
	Enemy()
END

IF
Global("KaylStartFight","GLOBAL",1)
HaveSpell(CLERIC_ARMOR_OF_FAITH)
OR(3)
	See(NearestEnemyOf(Myself))
	See("kaypall")
	See("kaypal")
THEN
RESPONSE #100
	Spell(Myself,CLERIC_ARMOR_OF_FAITH)
	Continue()
END

IF
Global("KaylStartFight","GLOBAL",1)
HaveSpell(CLERIC_ENTANGLE)
OR(3)
	See(NearestEnemyOf(Myself))
	See("kaypall")
	See("kaypal")
!StateCheck(LastSeenBy(Myself),STATE_SLEEPING)
!StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
THEN
RESPONSE #100
	Spell(LastSeenBy(Myself),CLERIC_ENTANGLE)
	Continue()
END

IF
Global("KaylStartFight","GLOBAL",1)
HPPercentLT(Myself,50)
HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
THEN
RESPONSE #100
	Help()
	Spell(Myself,CLERIC_CURE_SERIOUS_WOUNDS)
	Continue()
END

IF
Global("KaylStartFight","GLOBAL",1)
HPPercentLT("kaysmgl",50)
See("kaysmgl")
HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
THEN
RESPONSE #100
	Spell(LastSeenBy(Myself),CLERIC_CURE_SERIOUS_WOUNDS)
	Continue()
END

IF
Global("KaylStartFight","GLOBAL",1)
HPPercentLT("kaysmg",30)
See("kaysmg")
HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
THEN
RESPONSE #100
	Spell(LastSeenBy(Myself),CLERIC_CURE_LIGHT_WOUNDS)
	Continue()
END

IF
Global("KaylStartFight","GLOBAL",1)
HaveSpell(CLERIC_ARMOR_OF_FAITH)
OR(2)
	See("kaysmgl")
	See("kaysmg")
CheckStatGT(LastSeenBy(Myself),2,ARMORCLASS)
THEN
RESPONSE #100
	Spell(LastSeenBy(Myself),CLERIC_ARMOR_OF_FAITH)
	Continue()
END

IF
Global("KaylStartFight","GLOBAL",1)
HaveSpell(CLERIC_BARKSKIN)
OR(3)
	See(NearestEnemyOf(Myself))
	See("kaypall")
	See("kaypal")
THEN
RESPONSE #100
	Spell(Myself,CLERIC_BARKSKIN)
	Continue()
END

IF
Global("KaylStartFight","GLOBAL",1)
HaveSpell(CLERIC_HOLD_PERSON)
!StateCheck(NearestEnemyOf(Myself),STATE_SLEEPING)
!StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
OR(3)
	See(NearestEnemyOf(Myself))
	See("kaypall")
	See("kaypal")
THEN
RESPONSE #100
	Spell(LastSeenBy(Myself),CLERIC_HOLD_PERSON)
	Continue()
END

IF
Global("KaylStartFight","GLOBAL",1)
OR(3)
	See(NearestEnemyOf(Myself))
	See([NEUTRAL.0.HUMAN.FIGHTER])
	See([ENEMY.0.HUMAN.FIGHTER])
!Dead("astSeenBy(Myself))")
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate(LastSeenBy(Myself),30)
END

IF
Dead("kaypall")
NumDeadGT("kaypal",3)
!See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
	EscapeArea()
END

Link to comment

First:

we have to be careful not to make the scripts too loose, lest the fallen paladins go on a rampage and kill humans that wander into the area.

 

This block from the first script

IF
Global("KaylStartFight","GLOBAL",1)
OR(2)
	See([NEUTRAL.0.HUMAN.THIEF])
	See([ENEMY.0.HUMAN.THIEF])
THEN

should be changed to

//Naive fix IF
//Naive fix 	Global("KaylStartFight","GLOBAL",1)
//Naive fix 	OR(2)
//Naive fix 		See([NEUTRAL.0.HUMAN)
//Naive fix 		See([ENEMY.0.HUMAN])
//Naive fix 	Name("kaysmg",LastSeenBy(Myself))
//Naive fix THEN

So that Raynald will attack the cleric and thieves, but not bystanders

 

Edit: blech! the worst targeting I have ever seen, they stood about and got murdered. Must be made smarter. Oh, duh, they had a script to target Nuetral or Enemy, but then attack "NearestEnemyOf" - and the smugglers aren't enemies if the PC doesn't attack. Oh, of course, I messed them up by parking my party in the middle of the fallen paladins, so the Nearest Nuetral was me.

 

Well, this fixes that...

IF
!Global("KaylStartFight","GLOBAL",1)
THEN
RESPONSE #100
	Wait(6)
END

IF
Global("KaylStartFight","GLOBAL",1)
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	Continue()
END

IF
See([ENEMY.0.HUMAN])
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(SecondNearest([ENEMY.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(ThirdNearest([ENEMY.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(FourthNearest([ENEMY.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(FifthNearest([ENEMY.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(SixthNearest([ENEMY.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See([NEUTRAL.0.HUMAN])
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(SecondNearest([NEUTRAL.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(ThirdNearest([NEUTRAL.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(FourthNearest([NEUTRAL.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(FifthNearest([NEUTRAL.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

IF
See(SixthNearest([NEUTRAL.0.HUMAN]))
Name("kaysmg",LastSeenBy(Myself))
THEN
RESPONSE #100
	AttackReevaluate(LastSeenBy(Myself),15)
END

The only trouble I had then was a fallen paladin turning on the PC after all the smugglers died, annoying - but that was from using an empty RESPONSE block as a block, changing the empty block to this Wait(6) block fixed that bug.

 

Blast, that didn't target them after you join in the battle. Only Reynald has the NearestEnemyOf(Myself) block, it seems

 

Then, a similar change to these blocks for the other paladins:

IF
Global("KaylStartFight","GLOBAL",1)
OR(2)
	See([ENEMY.0.HUMAN.THIEF])
	See([NEUTRAL.0.HUMAN.THIEF])
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate(LastSeenBy(Myself),30)
END

IF
Global("KaylStartFight","GLOBAL",1)
!See([ENEMY.0.HUMAN.THIEF])
!See([NEUTRAL.0.HUMAN.THIEF])
OR(3)
	See([NEUTRAL.0.HUMAN.CLERIC])
	See([ENEMY.0.HUMAN.CLERIC])
	See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate(NearestEnemyOf(Myself),30)
END

 

Again, just use the targeting block with the check for death variable. No need to check for dead things - a "see" will ignore dead enemies.

 

As for the cleric healing...

The line

!Dead("astSeenBy(Myself))")

is a clear syntax error... but that's in an attack targeting block.

 

The only way a paladin would get healed is if

IF
Global("KaylStartFight","GLOBAL",1)
HPPercentLT("kaysmg",30)
See("kaysmg")
HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
THEN
RESPONSE #100
	Spell(LastSeenBy(Myself),CLERIC_CURE_LIGHT_WOUNDS)
	Continue()
END

Was somehow not doing the "LastSeenBy" check right. Which, honestly, I can't fathom how to fix, except perhaps swapping the HaveSpell() check to be the first trigger check.

Link to comment

And yeah, I see the problem here. kaysmg01 uses an elven avatar, so FP is changing his race to half-elf--causing him to be ignored by those [HUMAN] triggers. We should be changing his animation to human instead.

 

It'd be simpler to simply assign each faction a specifics value and turn them loose instead of some loose race/class targeting.

Link to comment
And yeah, I see the problem here. kaysmg01 uses an elven avatar, so FP is changing his race to half-elf--causing him to be ignored by those [HUMAN] triggers. We should be changing his animation to human instead.

 

 

It'd be simpler to simply assign each faction a specifics value and turn them loose instead of some loose race/class targeting.

 

Er, KAYCMG01/"kaysmgl" is attacked explicitly first if they can see it, by name. So, it's no problem if it's a half-elf or whatever.

 

The problem was the cleric not being attacked properly.

 

My change to 7 blocks to target the neutrals without regard to class, but checking the D.V. (because there is an earlier targeting for NearestEnemy) fixes that glitch.

 

Edit: We'll need to also add a

IF
See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate(NearestEnemyOf(Myself),15)
END

block near the top of KAYPAL03.BCS

 

bother that did not work - the only other difference between KAYPAL02 and KAYPAL03 (other than the dialog triggering) is the block at the end

IF
Global("KaylStartFight","GLOBAL",1)
See("kaysmg")
THEN
RESPONSE #100
	EquipMostDamagingMelee()
	AttackReevaluate("kaysmg",15)
END

Nah, that didn't work... I guess we need another 6 blocks accounting for ENEMYs - Ok, that script tested through the smuggler fight, and worked. Now to make sure they aren't brain dead during the Anarg battle.

Link to comment

See("name") picks up the nearest name and then runs with it. The problem is that it includes the dead, so they just get stuck on a particular dead fool.

 

NearestEnemyOf() won't work unless they turn GOODBUTBLUE (neutrals don't have enemies).

 

See([blahblah]) Name("blah",LastSeenBy()) should work fine:

IF
Global("KAYLSTARTFIGHT","GLOBAL",1)
Or(2)
See([31.0.0.3])
See([31.0.0.4])
Name("KAYSMG",LastSeenBy())
THEN
RESPONSE #100
AttackReevaluate(LastSeenBy(),15)
END

Link to comment
See("name") picks up the nearest name and then runs with it. The problem is that it includes the dead, so they just get stuck on a particular dead fool.

 

NearestEnemyOf() won't work unless they turn GOODBUTBLUE (neutrals don't have enemies).

 

See([blahblah]) Name("blah",LastSeenBy()) should work fine:

IF
Global("KAYLSTARTFIGHT","GLOBAL",1)
Or(2)
See([31.0.0.3])
See([31.0.0.4])
Name("KAYSMG",LastSeenBy())
THEN
RESPONSE #100
AttackReevaluate(LastSeenBy(),15)
END

 

I TRIED that block in my naivete before expanding to the horrible nasty targeting I ended up with. It did not work properly - the paladins stand around and get murdered by the thieves.

Link to comment

You pointed out NearestEnemyOf() in your comments, which wouldn't work on the paladins while they're neutral (they won't do anything if instructed to attack NearestEnemyOf()). The block should work fine (replacing the second to last block in the original KAYPAL02; the final block is unnecessary, but it won't hurt anything).

Link to comment

From the script I have no idea why the cleric healed the f. paladin either, but it happened twice for me (after she just killed his comrade). (Maybe a forbidden love? You never know...)

 

CamDawg: As WizWom pointed out, the culprit is kaysmg04.cre, the cleric. I didn't check on her race, though.

As I said, kaypal01 (Chantellier) was the only one who attacked her - if he moved towards her while chasing the chief smuggler. But in most cases, he remained standing at his original spot. He doesn't even go to attack smugglers that fire arrows at him.

Link to comment

I just want to make sure I'm following everything before I write up a patch.

 

[31.0.0.3] replaces NEUTRAL.0.0.THIEF and ENEMY.0.0.THIEF, and [31.0.04] for CLERICs, in the paladin targeting. Name("kaysmg",LastSeenBy()) following a block like this would actually exclude the smuggler leader. Specific blocks to be replaced with this are the second-to-last block in kaypal02.bcs and second- and third-to-last blocks in kaypal03.bcs.

 

Does HPPercentLT("kaysmg",30) return true for a dead creature? If so, we need to add a !Dead trigger in the kaysmg04 blocks. Dunno if that's causing the badly targeted healing, but it can't be helping.

Link to comment
[31.0.0.3] replaces NEUTRAL.0.0.THIEF and ENEMY.0.0.THIEF, and [31.0.04] for CLERICs, in the paladin targeting. Name("kaysmg",LastSeenBy()) following a block like this would actually exclude the smuggler leader. Specific blocks to be replaced with this are the second-to-last block in kaypal02.bcs and second- and third-to-last blocks in kaypal03.bcs.
Correct. This will cause them to target the nearest living, visible not-good (neutral or enemy) thief or the nearest living, visible not-good cleric (in that order) and attack it. Name() ensures that the script name of the target matches the actors we actually want to target (the chances of this not being the case are slim); Rindus is already accounted for in KAYPAL02. To keep from overdoing script fixes, we could alternately extend that block to Or(4) See(Neutral cleric) See(Enemy Cleric) See(NTh) See(ETh) and make them attack LastSeenBy(); your choice. For KAYPAL03, I'd just change the second to last AttackReevaluate() to target LastSeenBy() (as it should) and let it alone -- it will already account for Rindus and the theives and then move onto the cleric or an enemy (a PC, if the party attacks).

 

Does HPPercentLT("kaysmg",30) return true for a dead creature? If so, we need to add a !Dead trigger in the kaysmg04 blocks. Dunno if that's causing the badly targeted healing, but it can't be helping.
Probably; it's either that or it only applies to the one the engine decides to keep (hopefully, in combat, the engine follows the nearest rule, but in some cases, multiple script names are handled according to the order the actors are loaded into memory -- either the first or last (can't remember) is the only "KAYSMG" that the engine will actually acknowledge by name). In either case, !Dead() probably wouldn't help (would actually be !StateCheck() since one or more "KAYSMG"s could be dead without affecting that block's intent, but it won't otherwise make any difference), but it's fine to add.
Link to comment

Alrighty then.

 

// script fixes for anarg-smuggler battle
COPY_EXISTING ~kaypal02.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
  REPLACE_TEXTUALLY ~(\[NEUTRAL\.0\.HUMAN\.THIEF\])~ ~([NOTGOOD.0.0.CLERIC])~
  REPLACE_TEXTUALLY ~(\[ENEMY\.0\.HUMAN\.THIEF\])~   ~([NOTGOOD.0.0.THIEF]) Name("kaysmg",LastSeenBy(Myself))~
  REPLACE_TEXTUALLY ~AttackReevaluate(NearestEnemyOf(Myself),15)~
                    ~AttackReevaluate(LastSeenBy(Myself),15)~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

// script fixes for anarg-smuggler battle
COPY_EXISTING ~kaypal03.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
  REPLACE_TEXTUALLY ~AttackReevaluate(NearestEnemyOf(Myself),30)~ 
                    ~AttackReevaluate(LastSeenBy(Myself),30)~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

// script fixes for anarg-smuggler battle
COPY_EXISTING ~kaysmg04.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
  REPLACE_TEXTUALLY ~\(HPPercentLT("kaysmgl",50)[%tab% %lnl%%mnl%%wnl%]+See("kaysmgl")\)~ ~\1 !Dead("kaysmgl")~
  REPLACE_TEXTUALLY ~HPPercentLT("kaysmg",30)[%tab% %lnl%%mnl%%wnl%]+See("kaysmg")~ 
                    ~See([NOTGOOD.0.0.THIEF]) HPPercentLT(LastSeenBy(Myself),30) Name("kaysmg",LastSeenBy(Myself))~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

 

Before and after, second-to-last block in kaypal02:

 

IF
 Global("KaylStartFight","GLOBAL",1)
 OR(2)
See([NEUTRAL.0.HUMAN.THIEF])
See([ENEMY.0.HUMAN.THIEF])
THEN
 RESPONSE #100
EquipMostDamagingMelee()
AttackReevaluate(NearestEnemyOf(Myself),15)
END

 

IF
 Global("KaylStartFight","GLOBAL",1)
 OR(2)
See([NOTGOOD.0.0.CLERIC])
See([NOTGOOD.0.0.THIEF])
 Name("kaysmg",LastSeenBy(Myself))
THEN
 RESPONSE #100
EquipMostDamagingMelee()
AttackReevaluate(LastSeenBy(Myself),15)
END

 

Before and after, second-to-last block in kaypal03:

 

IF
 Global("KaylStartFight","GLOBAL",1)
 !See([ENEMY.0.HUMAN.THIEF])
 !See([NEUTRAL.0.HUMAN.THIEF])
 OR(3)
See([NEUTRAL.0.HUMAN.CLERIC])
See([ENEMY.0.HUMAN.CLERIC])
See(NearestEnemyOf(Myself))
THEN
 RESPONSE #100
EquipMostDamagingMelee()
AttackReevaluate(NearestEnemyOf(Myself),30)
END

 

IF
 Global("KaylStartFight","GLOBAL",1)
 !See([ENEMY.0.HUMAN.THIEF])
 !See([NEUTRAL.0.HUMAN.THIEF])
 OR(3)
See([NEUTRAL.0.HUMAN.CLERIC])
See([ENEMY.0.HUMAN.CLERIC])
See(NearestEnemyOf(Myself))
THEN
 RESPONSE #100
EquipMostDamagingMelee()
AttackReevaluate(LastSeenBy(Myself),30)
END

 

And changes to the two healing blocks for the smuggler cleric:

 

IF
 Global("KaylStartFight","GLOBAL",1)
 HPPercentLT("kaysmgl",50)
 See("kaysmgl")
 HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
THEN
 RESPONSE #100
Spell(LastSeenBy(Myself),CLERIC_CURE_SERIOUS_WOUNDS)
Continue()
END

IF
 Global("KaylStartFight","GLOBAL",1)
 HPPercentLT("kaysmg",30)
 See("kaysmg")
 HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
THEN
 RESPONSE #100
Spell(LastSeenBy(Myself),CLERIC_CURE_LIGHT_WOUNDS)
Continue()
END

 

IF
 Global("KaylStartFight","GLOBAL",1)
 HPPercentLT("kaysmgl",50)
 See("kaysmgl")
 !Dead("kaysmgl")
 HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
THEN
 RESPONSE #100
Spell(LastSeenBy(Myself),CLERIC_CURE_SERIOUS_WOUNDS)
Continue()
END

IF
 Global("KaylStartFight","GLOBAL",1)
 See([NOTGOOD.0.0.THIEF])
 HPPercentLT(LastSeenBy(Myself),30)
 Name("kaysmg",LastSeenBy(Myself))
 HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
THEN
 RESPONSE #100
Spell(LastSeenBy(Myself),CLERIC_CURE_LIGHT_WOUNDS)
Continue()
END

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...