Account
News
Downloads
Community
Wiki
Walkthrough

XPEbroccaUniqueStatueSCRIPT

Editor ID:
XPEbroccaUniqueStatueSCRIPT


Form ID:
0005A490


Type:
Object


Script:
scn XPEbroccaUniqueStatueSCRIPT
; test test blah blah blah


short activated
short count
short TargetCount
short DoOnceDEBUG

float timer ; holds current time
float timeTotal ; controls length of timer
float interval ; controls rate of fire (timeTotal / # of marker targets)

float nextTimeActivated

ref mySelf
ref myTargetDummy
ref CurrentTarget

ref Target01 ;onLoad populates these ref vars
ref Target02
ref Target03
ref Target04
ref Target05
ref Target06
ref Target07
ref Target08
ref Target09
ref Target10
ref Target11
ref Target12

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

begin onLoad

set mySelf to getSelf
set timeTotal to 1
set activated to 0
set count to 0
set timer to 0
set nextTimeActivated to 0

set Target01 to mySelf.getParentRef
if Target01 != 0
set targetCount to (targetCount + 1)
endif
set Target02 to Target01.getParentRef
if Target02 != 0
set targetCount to (targetCount + 1)
endif
set Target03 to Target02.getParentRef
if Target03 != 0
set targetCount to (targetCount + 1)
endif
set Target04 to Target03.getParentRef
if Target04 != 0
set targetCount to (targetCount + 1)
endif
set Target05 to Target04.getParentRef
if Target05 != 0
set targetCount to (targetCount + 1)
endif
set Target06 to Target05.getParentRef
if Target06 != 0
set targetCount to (targetCount + 1)
endif
set Target07 to Target06.getParentRef
if Target07 != 0
set targetCount to (targetCount + 1)
endif
set Target08 to Target07.getParentRef
if Target08 != 0
set targetCount to (targetCount + 1)
endif
set Target09 to Target08.getParentRef
if Target09 != 0
set targetCount to (targetCount + 1)
endif
set Target10 to Target09.getParentRef
if Target10 != 0
set targetCount to (targetCount + 1)
endif
set Target11 to Target10.getParentRef
if Target11 != 0
set targetCount to (targetCount + 1)
endif
set Target12 to Target11.getParentRef
if Target12 != 0
set targetCount to (targetCount + 1)
endif

end

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

begin onActivate

if DoOnceDEBUG != 1 && TargetCount > 0
;fix 0 value for endian conversion
if TargetCount == 0
set TargetCount to 1
endif
set DoOnceDEBUG to 1
set interval to (timeTotal/targetCount)
endif

if isActionRef player == 0 && activated == 0
set activated to 1
set count to 0
set timer to 0
set nextTimeActivated to 0
endif

end

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

begin gameMode

if activated == 1

set timer to (timer + getSecondsPassed)
if timer >= nextTimeActivated
set count to (count + 1)
set nextTimeActivated to (nextTimeActivated + interval)

if count == 0 && targetCount >= 1
set currentTarget to Target01.getSelf ; is the getSelf needed? Check later.
if targetCount == 1
set activated to 0
endif
elseif count == 1 && targetCount >= 2
set currentTarget to Target02.getSelf
if targetCount == 2
set activated to 0
endif
elseif count == 2 && targetCount >= 3
set currentTarget to Target03.getSelf
if targetCount == 3
set activated to 0
endif
elseif count == 3 && targetCount >= 4
set currentTarget to Target04.getSelf
if targetCount == 4
set activated to 0
endif
elseif count == 4 && targetCount >= 5
set currentTarget to Target05.getSelf
if targetCount == 5
set activated to 0
endif
elseif count == 5 && targetCount >= 6
set currentTarget to Target06.getSelf
if targetCount == 6
set activated to 0
endif
elseif count == 6 && targetCount >= 7
set currentTarget to Target07.getSelf
if targetCount == 7
set activated to 0
endif
elseif count == 7 && targetCount >= 8
set currentTarget to Target08.getSelf
if targetCount == 8
set activated to 0
endif
elseif count == 8 && targetCount >= 9
set currentTarget to Target09.getSelf
if targetCount == 9
set activated to 0
endif
elseif count == 9 && targetCount >= 10
set currentTarget to Target10.getSelf
if targetCount == 10
set activated to 0
endif
elseif count == 10 && targetCount >= 11
set currentTarget to Target11.getSelf
if targetCount == 11
set activated to 0
endif
elseif count == 12 && targetCount >=12
set currentTarget to Target12.getSelf
if targetCount == 12
set activated to 0
endif
endif

if player.GetLevel <= 5 ;Leveled spell casting, tops out at lvl 21+
cast TRAPFireballArea01 currentTarget ;This uses a new *shock* spell that copies the standard damage health
elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 )
cast TRAPFireballArea02 currentTarget
elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 )
cast TRAPFireballArea03 currentTarget
elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 )
cast TRAPFireballArea04 currentTarget
elseif player.GetLevel >= 21
cast TRAPFireballArea05 currentTarget
endif

endif

endif

end

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

begin onReset
set activated to 0
set count to 0
set nextTimeActivated to 0
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