
While HasItem(#USERID,76) = 1
	TakeItem(#USERID,76)
	Forbidden=1
Wend
While HasItem(#USERID,77) = 1
	TakeItem(#USERID,77)
	Forbidden=1
Wend
While HasItem(#USERID,78) = 1
	TakeItem(#USERID,78)
	Forbidden=1
Wend
While HasItem(#USERID,79) = 1
	TakeItem(#USERID,79)
	Forbidden=1
Wend

If GetUserHP(#USERID) > GetUserMaxHP(#USERID)
	SetUserHP(#USERID,GetUserMaxHP(#USERID))
EndIf
If GetUserMana(#USERID) > GetUserMaxMana(#USERID)
	SetUserMana(#USERID,GetUserMaxMana(#USERID))
EndIf

If Forbidden=1
	SendMessageToUser(#USERID,"Your forbidden items have disolved.", #MSG_CRITICAL)
Endif

Goto END

;Old code:
If HasItem(#USERID,76)=1
	Forbidden=1
Endif
If HasItem(#USERID,77)=1
	Forbidden=1
Endif
If HasItem(#USERID,78)=1
	Forbidden=1
Endif
If HasItem(#USERID,79)=1
	Forbidden=1
Endif

;New code
TakeItem(#USERID,76)
;End of new code

If Forbidden=1
	WarpUser(#USERID,#MAPID,18,12)
	SendMessageToUser(#USERID,"You are carrying forbidden items.", #MSG_CRITICAL)
Endif
;End of old code.

Label END

Continue = 1