;New code to stop people bringing in too many scrolls
If HasItem(#USERID,79) = 1
	While HasItem(#USERID,79) = 1
		TakeItem(#USERID,79)
	Wend
	GiveItem(#USERID,79)
EndIf

If HasItem(#USERID,78) = 1
	While HasItem(#USERID,78) = 1
		TakeItem(#USERID,78)
	Wend
	GiveItem(#USERID,78)
EndIf

If HasItem(#USERID,77) = 1
	While HasItem(#USERID,77) = 1
		TakeItem(#USERID,77)
	Wend
	GiveItem(#USERID,77)
EndIf
;New code ends


If GetUserX(#USERID)=8
	Goto LifeScroll
Endif

If GetUserX(#USERID)=10
	Goto LimboScroll
Endif

If GetUserX(#USERID)=12
	Goto DeathScroll
Endif

label LifeScroll
If HasItem(#USERID,77)=0
	WarpUser(#USERID,#MAPID,#XPOS,#YPOS+2)
	SendMessageToUser(#USERID,"You do not have the Life Scroll!", #MSG_CRITICAL)
Endif
If HasItem(#USERID,77)=1
Goto LifeScrollTake
label LifeScrollTake
	TakeItem(#USERID,77)
	If HasItem(#USERID,77)=1
		Goto LifeScrollTake
	Else
		GiveItem(#USERID,77)
	Endif
	
	;New code
	TakeItem(#USERID,78)
	TakeItem(#USERID,79)
	;New code ends
	
	WarpUser(#USERID,417,7,1)
	SendMessageToMap(417,GetUserName(#USERID)+" enters the Sanctum with the Life Scroll!", #MSG_SERVER)
Endif
Goto End

label LimboScroll
If HasItem(#USERID,79)=0
	WarpUser(#USERID,#MAPID,#XPOS,#YPOS+2)
	SendMessageToUser(#USERID,"You do not have the Summoning Scroll!", #MSG_CRITICAL)
Endif
If HasItem(#USERID,79)=1
Goto SummoningScrollTake
Label SummoningScrollTake
	TakeItem(#USERID,79)
	If HasItem(#USERID,79)=1
		Goto SummoningScrollTake
	Else
		GiveItem(#USERID,79)
	Endif

	;New code
	TakeItem(#USERID,77)
	TakeItem(#USERID,78)
	;New code ends

	WarpUser(#USERID,417,10,1)
	SendMessageToMap(417,GetUserName(#USERID)+" enters the Sanctum with the Summoning Scroll!", #MSG_SERVER)
Endif
Goto End

label DeathScroll
If HasItem(#USERID,78)=0
	WarpUser(#USERID,#MAPID,#XPOS,#YPOS+2)
	SendMessageToUser(#USERID,"You do not have the Death Scroll!", #MSG_CRITICAL)
Endif
If HasItem(#USERID,78)=1
Goto DeathScrollTake
Label DeathScrollTake
	TakeItem(#USERID,78)
	If HasItem(#USERID,78)=1
		Goto DeathScrollTake
	Else
		GiveItem(#USERID,78)
	Endif

	;New code
	TakeItem(#USERID,77)
	TakeItem(#USERID,79)
	;New code ends

	WarpUser(#USERID,417,13,1)
	SendMessageToMap(417,GetUserName(#USERID)+" enters the Sanctum with the Death Scroll!", #MSG_SERVER)
Endif
Goto End

label End

Continue = 1