Account
News
Downloads
Community
Wiki
Walkthrough

XPEbroccaHungerCustomSCRIPT

Editor ID:
XPEbroccaHungerCustomSCRIPT


Form ID:
0005DB5F


Type:
Object


Script:
scn XPEbroccaHungerCustomSCRIPT

; fires a ring of spells from conglomeration of hunger statues in cell 05
; [Base Statue 1]
; |___>>>>>>>> [Target 1]
; |_____>>>>>[Statue 2]
; |___>>>>>>[Target 3] etc. up to 8 statue/targets

ref LvlSpell
ref Statue1
ref Target1
ref Statue2
ref Target2
ref Statue3
ref Target3
ref Statue4
ref Target4
ref Statue5
ref Target5
ref Statue6
ref Target6
ref Statue7
ref Target7
ref Statue8
ref Target8

short triggered
short count

float timer
float interval

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

begin onLoad

set count to 1 ; we want to count from one, not zero for this.

set interval to 0.5 ; determine how much a pause we want between firings

set Statue1 to getSelf ; set up the refs. Modular in case we choose to re-use
set Target1 to Statue1.getParentRef
set Statue2 to Target1.getParentRef
set Target2 to Statue2.getParentRef
set Statue3 to Target2.getParentRef
set Target3 to Statue3.getParentRef
set Statue4 to Target3.getParentRef
set Target4 to Statue4.getParentRef
set Statue5 to Target4.getParentRef
set Target5 to Statue5.getParentRef
set Statue6 to Target5.getParentRef
set Target6 to Statue6.getParentRef
set Statue7 to Target6.getParentRef
set Target7 to Statue7.getParentRef
set Statue8 to Target7.getParentRef
set Target8 to Statue8.getParentRef

if player.GetLevel <= 5 ;Standard Leveled spell casting, tops out at lvl 21+
set LvlSpell to TRAPDamageHealthTarget01
elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 )
set LvlSpell to TRAPDamageHealthTarget02
elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 )
set LvlSpell to TRAPDamageHealthTarget03
elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 )
set LvlSpell to TRAPDamageHealthTarget04
elseif player.GetLevel >= 21
set LvlSpell to TRAPDamageHealthTarget05
endif

end

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

begin onActivate

if triggered == 0
set triggered to 1
endif

end

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

begin gameMode

if triggered == 1

if timer > 0
set timer to (timer - getSecondsPassed)
elseif timer <= 0
set timer to interval ; set the timer up for next loop

if count == 1 ; check our progress to where to fire
Statue1.cast LvlSpell Target1
elseif count == 2
Statue2.cast LvlSpell Target2
elseif count == 3
Statue3.cast LvlSpell Target3
elseif count == 4
Statue4.cast LvlSpell Target4
elseif count == 5
Statue5.cast LvlSpell Target5
elseif count == 6
Statue6.cast LvlSpell Target6
elseif count == 7
Statue7.cast LvlSpell Target7
elseif count == 8
Statue8.cast LvlSpell Target8
endif

if count >= 1 && count <= 7 ; increment count if we're in progress
set count to (count + 1)
elseif count >= 8
set count to 1 ; otherwise reset it
set triggered to 0 ; and break the loop
endif

endif

endif

end


Mit der Nutzung dieser Website erklären Sie sich damit einverstanden, dass wir Cookies verwenden. Weitere Informationen hierzu finden Sie in unserer Datenschutzerklärung.
OK