Jump to content

Photo

Script Is not Working


2 replies to this topic

#1 Hicuty

Hicuty
  • Members
  • 59 posts

Posted 10 October 2018 - 02:55 AM

I am trying to edit script form Klatu mod but it is not working as intended.

 

IF
 
Global("kla#AIbuff","LOCALS",400)
CheckStat(Myself,0,WIZARD_SPELL_SHIELD)
HaveSpell(WIZARD_SPELL_SHIELD)  // SPWI519.SPL (Spell Shield)
 
THEN
 
RESPONSE #100
ReallyForceSpell(Myself,WIZARD_SPELL_SHIELD)  // SPWI519.SPL (Spell Shield)
RemoveSpell(WIZARD_SPELL_SHIELD)  // SPWI519.SPL (Spell Shield)
Continue()
 
END
 
It is casting spell shield although i have a spell shield already. I tried with CheckStatGT, it also failed. Is this a bug? Because other spells are not casted if i already have them but it is failing with spell shield.


#2 subtledoctor

subtledoctor
  • Modders
  • 2844 posts
  • Gender:Male

Posted 10 October 2018 - 06:44 AM

Probably the CheckStat is returning a false negative. What game are you trying this on? Open SPWI519.SPL and see whether it actually sets the WIZARD_SPELL_SHIELD stat. The stat might be called something else, or the spell might set a spellstate instead of the stat, etc. etc.

Out of curiosity, why are you using ReallyForceSpell there?

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#3 Hicuty

Hicuty
  • Members
  • 59 posts

Posted 10 October 2018 - 07:26 AM

Ty. I installed scs and it changes it to a spell state from what i see. I am on BG2. I don't know about ReallyForceSpell because it is Klatu's script but it applies buffs instantly with improved alacrity. I guess it is used for that.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users