Advertisement
Guest User

KonahEnch

a guest
Nov 20th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. ScriptName MagicEffect extends Form
  2. Bool IsEffectFlagSet(Int 0x00008000)
  3. ClearEffectFlag(1 0x00008000)
  4. SetEffectFlag(1 0x00008000)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. Method 1:
  12. Setting Enchantment with conditions???
  13.  
  14.  
  15. Method 2:
  16. Setting magic effect 'Hide in UI'-flag with conditions if possible
  17.  
  18. I need a bit of help with a script to change an enchantment based on a couple of conditions:
  19. if effect1 is active on the player set enchantment to ench1
  20. if effect1 is NOT active on the player AND effect2 IS set enchantment to ench2
  21. if effect1 is NOT active on the player AND effect3 IS set enchantment to ench3
  22. if effect1 is NOT active on the player AND effect4 IS set enchantment to ench4
  23. if effect1, effect2, effect3, effect4 ARE NOT active on the player set enchantment to ench5
  24. What i got so far is this:
  25. ```ScriptName KonahrikSwitchScript extends Form
  26. {Script to Switch Konahrik's Enchantment for Akatosh's Blessing, and each of the Meditation effects}
  27.  
  28. Effect property BlessingAkatosh auto
  29. bool KonahrikTIID
  30. Effect property KonahrikEffectFEIM auto
  31. bool KonahrikFEIM
  32. Effect property KonahrikEffectFUS auto
  33. bool KonahrikFUS
  34. Effect property KonahrikEffectYOL auto
  35. bool KonahrikYOL
  36.  
  37. ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
  38. Effect property BlessingAkatosh auto
  39. if Effect active on player set boolean "KonahrikTIID" to true
  40. if not set boolean "KonahrikTIID" to false
  41.  
  42. ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
  43. Effect property BlessingAkatosh auto
  44. KonahrikEffectFEIM
  45. if Effect NOT active on player
  46. AND
  47. ;Property containing the effect "GreybeardsFeimAbility "Eternal Spirit" [SPEL:000E827D]"
  48. effect active
  49. set boolean "KonahrikFEIM" to true
  50. if not set boolean "KonahrikFEIM" to false
  51.  
  52. ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
  53. Effect property BlessingAkatosh auto
  54. KonahrikEffectFUS
  55. if Effect NOT active on player
  56. AND
  57. ;Property containing the effect "GreybeardsFusAbility "Force Without Effort" [SPEL:000E8281]"
  58. effect active
  59. set boolean "KonahrikFUS" to true
  60. if not set boolean "KonahrikFUS" to false
  61.  
  62. ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
  63. Effect property BlessingAkatosh auto
  64. KonahrikEffectYOL
  65. if Effect NOT active on player
  66. AND
  67. ;Property containing the effect "GreybeardsYolAbility "The Fire Within" [SPEL:000E8282]"
  68. effect active
  69. set boolean "KonahrikYOL" to true
  70. if not set boolean "KonahrikYOL" to false
  71.  
  72. ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
  73. Effect property BlessingAkatosh auto
  74. ;Property containing the effect "GreybeardsFeimAbility "Eternal Spirit" [SPEL:000E827D]"
  75. Effect property KonahrikFEIM auto
  76. ;Property containing the effect "GreybeardsFusAbility "Force Without Effort" [SPEL:000E8281]"
  77. Effect property KonahrikFUS auto
  78. ;Property containing the effect "GreybeardsYolAbility "The Fire Within" [SPEL:000E8282]"
  79. Effect property KonahrikYOL auto
  80. if KonahrikTIID == false
  81. KonahrikFEIM == false
  82. KonahrikFUS == false
  83. KonahrikYOL == false
  84. AND
  85. none of the effects above are active
  86.  
  87. ;Property containing the enchantment "KonahrikEnchTIID"
  88. ;Property containing the enchantment "KonahrikEnchFEIM"
  89. ;Property containing the enchantment "KonahrikEnchFUS"
  90. ;Property containing the enchantment "KonahrikEnchYOL"
  91. ;Property containing the enchantment "KonahrikEnchDEF"
  92.  
  93. if KonahrikTIID == true
  94. SetEnchantment.KonahrikTIID
  95. elseif KonahrikFEIM == true
  96. SetEnchantment.KonahrikFEIM
  97. elseif KonahrikFUS == true
  98. SetEnchantment.KonahrikFUS
  99. elseif KonahrikYOL == true
  100. SetEnchantment.KonahrikYOL
  101. else
  102. SetEnchantment.KonahrikDEF```
  103.  
  104.  
  105.  
  106.  
  107. Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
  108.  
  109. Parameters
  110. akCaster: The ObjectReference that is responsible for the spell.
  111. akEffect: The MagicEffect that is attempting to be applied.
  112. Examples
  113. Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
  114. Debug.Trace(akCaster + " applied the " + akEffect + " on us")
  115. EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement