IF
	OnCreation()
THEN
	RESPONSE #100
		TriggerActivation("RUMTRIGGER0",FALSE)
		TriggerActivation("RUMTRIGGER1",TRUE)
END

IF
	HPGT("rumaster",0)
	HPLT("rumaster",10)
        XPGT(Protagonist,7999999)
        InParty(Player3)
        Global("RumasterChanging","GLOBAL",0)
THEN
	RESPONSE #100
		CreateVisualEffectObject("SPUNHOLY","rumaster")
                SetGlobal("RumasterChanging","GLOBAL",1)
		ActionOverride("rumaster",DestroySelf())
                Wait(3)
                CreateVisualEffect("SPPORTAL",[443.303])

                ScreenShake([100.100],3)
                Wait(2)
                CreateCreature("rumastcr",[443.303],0)
                ClearAllActions()
                Wait(1)
                ClearAllActions()

                ActionOverride("rumastcr",StartDialogNoSet(Protagonist))
END

IF
	HPGT("rumaster",0)
	HPLT("rumaster",10)
        !XPGT(Protagonist,7999999)
THEN
	RESPONSE #100
		CreateVisualEffectObject("SPUNHOLY","rumaster")
		Kill("rumaster")
END

IF
	Dead("rumaster")
	Global("RumasterDeadActive","GLOBAL",0)
        InParty("rukrakia")
        !Dead("rukrakia")
        !Global("RumasterChanging","GLOBAL",1)
THEN
	RESPONSE #100
		TriggerActivation("RUMTRIGGER0",TRUE)
		TriggerActivation("RUMTRIGGER1",FALSE)
                DisplayString(Protagonist,@97)
                SetGlobal("RumasterDeadActive","GLOBAL",1)
                Wait(6)
                ActionOverride("rukrakia",SetGlobal("RumasterDeadRukTalk","LOCALS",1))
                ActionOverride("rukrakia",StartDialogNoSet(Protagonist))
END

IF
	Dead("rumaster")
	Global("RumasterDeadActive","GLOBAL",0)
        InParty("rukrakia")
        Dead("rukrakia")
        !Global("RumasterChanging","GLOBAL",1)
THEN
	RESPONSE #100
		TriggerActivation("RUMTRIGGER0",TRUE)
		TriggerActivation("RUMTRIGGER1",FALSE)
                DisplayString(Protagonist,@97)
                SetGlobal("RumasterDeadActive","GLOBAL",1)
END

IF
	Dead("rumastcr")
	Global("RumasterDeadActive","GLOBAL",0)
        InParty("rukrakia")
        !Dead("rukrakia")
        Global("RumasterChanging","GLOBAL",1)
THEN
	RESPONSE #100
		TriggerActivation("RUMTRIGGER0",TRUE)
		TriggerActivation("RUMTRIGGER1",FALSE)
                DisplayString(Protagonist,@97)
                SetGlobal("RumasterDeadActive","GLOBAL",1)
                Wait(6)
                ActionOverride("rukrakia",SetGlobal("RumasterDeadRukTalk","LOCALS",1))
                ActionOverride("rukrakia",StartDialogNoSet(Protagonist))
END

IF
	Dead("rumastcr")
	Global("RumasterDeadActive","GLOBAL",0)
        InParty("rukrakia")
        Dead("rukrakia")
        Global("RumasterChanging","GLOBAL",1)
THEN
	RESPONSE #100
		TriggerActivation("RUMTRIGGER0",TRUE)
		TriggerActivation("RUMTRIGGER1",FALSE)
                DisplayString(Protagonist,@97)
                SetGlobal("RumasterDeadActive","GLOBAL",1)
END