;'Ring of Death' - Unequip script

Sprite = 72

While HasItem(#USERID,256) = 1
	TakeItem(#USERID,256)
	GiveItem(#USERID,257)
Wend

SetUserWisdomBonus(#USERID,GetUserWisdomBonus(#USERID)-5)

If GetUserAccess(#USERID) < 5
	Sprite = GetClassSprite(GetUserClass(#USERID))
	Guild = GetUserGuild(#USERID)
	If Guild > 0
		GuildSprite = GetGuildSprite(Guild) 
		If GuildSprite > 0
			Sprite = GuildSprite
		EndIf 
	EndIf
	
	SetUserSprite(#USERID,Sprite)
	SetUserDisplayName(#USERID,GetUserName(#USERID))

	;NOT NEEDED AS OF 0.86 - WarpUser(#USERID,GetUserMap(#USERID),GetUserX(#USERID),GetUserY(#USERID))
EndIf

;WarpUser(#USERID,#MAPID,#XPOS,#YPOS)

;If unequiped due to death, we must remove from the map
RemoveItem(#MAPID,258)

Label END

Continue = 1