ScriptName MankarCamoranScript
short FreezePlayer
float timer
short temp
short playHitEffect ; set to 1 after player hits Mankar in Dagon shrine
short toPortal ; set to 1 after Mankar finishes package
begin OnPackageDone MQ06MankarCamoranToParadisePortal
if toPortal == 0
set toPortal to 1
; message "MQ06MankarCamoranToParadisePortal"
MQ06ParadisePortalRef.activate MankarCamoranRef 1
endif
end
begin OnActivate
if isactionref player == 1
if getstage MQ06 >= 100
Activate
endif
else
Activate
endif
end
Begin Gamemode
if ( MQ06.convTimer <= 0 && MQ06.speaker == 1 && getstage MQ06 < 48 )
if MQ06.mankarSpeech == 9
setstage MQ06 48
else
; time to talk
set MQ06.convTimer to Say MQ06MankarSpeech 1
set MQ06.convTimer to MQ06.convTimer + 1
endif
endif
if timer > 0
set timer to timer - getsecondspassed
elseif freezeplayer == 1 && getstageDone MQ15 89 == 1
enableplayercontrols
set freezePlayer to 0
player.moveto MQ15PortalRef
endif
end
begin OnDeath
if getstagedone MQ15 89 == 0
set FreezePlayer to 1
; Message "DEBUG: MankarCamoranScript: Disabling player controls on Mankar's death"
setstage MQ15 89
endif
end
begin OnHit player
if getstage MQ06 < 48
setstage MQ06 46
stopcombat player
endif
if getquestrunning MQ06 == 1
stopcombat player
if playHitEffect == 0
set playHitEffect to 1
setghost 1
pme sabs
pme shld
endif
endif
if getstage MQ15 >= 70
setstage MQ15 80
endif
if getstage MQ15 >= 80 && getincell ParadiseCamoranFortress == 0
; Camoran won't respond until he's in his fortress
stopcombat player
setstage mq15 82
endif
if getstage MQ15 >= 80 && getincell ParadiseCamoranFortress == 1
; Camoran won't respond until he's in his fortress
setstage mq15 85
endif
end
|