Scriptname dcur_lb_cage extends ObjectReference  

dcur_lbquestScript Property lbqs Auto
dcur_mcmconfig Property dcumenu  Auto  
zadlibs Property libs  Auto  
Message Property dcur_lb_cagemsg  Auto  
Idle Property ZazAPC017  Auto  

Event OnActivate(ObjectReference akActionRef)
	if !lbqs.lb_hasremoved_Armbinder
		;libs.notify("There is no way you can open this door with your hands sealed inside the armbinder.", messagebox = true)
		libs.notify("あなたはアームバインダーで腕を固定されているので、このドアを開けられません。", messagebox = true)
		return
	endif
	if dcur_lb_cagemsg.Show() == 0
		libs.playerref.PlayIdle(ZazAPC017)
		Utility.Wait(5)
		if Utility.RandomInt(1,5) == 1
			;libs.notify("After blindly rummaging in the dirt with your bound hands for a while, you find a little metal pick and carefully probe the cage door's lock...", messagebox = true)
			libs.notify("しばらくの間、盲目の中縛られた手で地面を引っ掻くと、あなたは小さな金属片を見つけ、注意して檻のドアの鍵を調べます...", messagebox = true)
			if IsLocked()
				Lock(false)
				SetOpen(true)
				RegisterForSingleUpdate(10)
			endif
		else
			;libs.notify("You search the ground but can't find anything useful. Maybe you need to try again...", messagebox = true)
			libs.notify("あなたは地面を調べますが、使えるものは何も見つけられません。再度試す必要がありそうです...", messagebox = true)
		endif
	endif
EndEvent

Event OnUpdate()
	Lock()
	SetLockLevel(255)
EndEvent



