Jump to content
Sign in to follow this  
Brothers

Entry check

Recommended Posts

Hi guys, small question.

I want to make a map, where only rebirth can entry. I know the code what checks inventory, but not like class.
Does anyone know?

 

- Ivy

Share this post


Link to post
Share on other sites

Hello @Brothers!

This should work, didn't tested as well.

 

-- End of functions.lua.
function GetRebirthLevel(role)
	local Rebirth 			= 0
	local rebirthEXP		= GetChaAttr(role, ATTR_CSAILEXP)	
	if (rebirthEXP > 0) and (rebirthEXP < 900) then
		Rebirth 		= 1
	elseif (rebirthEXP >= 9000) and (rebirthEXP < 1200) then
		Rebirth 		= 2
	elseif (rebirthEXP >= 1200) then	
		Rebirth			= 3
	end
	return Rebirth
end

--Entry.lua of map, checking if player has at least rebirth 1.
function check_can_enter_garner2( role, copy_mgr )
	if (GetRebirthLevel(role) < 1) then
		SystemNotice(role, "Only reborn characters may enter Chaos Argent!")
		return
	end
end

 

 

  • Like 1

lelouch_signature_by_vahntheknight-d4uafwj.png

Share this post


Link to post
Share on other sites

you don't need all of this i guess
can be in this simple way
 

if GetSkillLv (role,459) < 1 then
	--systemnotice here bla bla
	return
end

 

Edited by mkhzaleh
  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...