Jump to content
Sign in to follow this  
boris cardona

[Help]how to make it cost a lot of money to enter chaos argent

Recommended Posts

Give this one a try. 

--functions.lua
function CheckHasGoldBeforeEnter(role,map)
	local MoneyHave	= GetChaAttr(role,ATTR_GD)
	local MoneyNeed	= 1000000
	if GPF[map] ~= nil then
		MoneyNeed = GPF[map]
	end
end

GPF = {}
GPF["abandonedcity"]	= 10000000
GPF["darkswamp"]	= 10000000
GPF["puzzleworld"]	= 10000000
GPF["garner2"]		= 10000000



garner2 folder
entry.lua

function check_can_enter_garner2( player, copy_mgr )
	local FightingBook_Num = GetChaItem2(player, 2, 3849 )
	if FightingBook_Num == nil then
		SelfSay(player,"I dont have Medal of Valor. Unable to enter!" )
		return 0
	end
	local Team_In = IsInTeam(player)
	if Team_In == 1 then
		SystemNotice(player , "Cannot Enter while in Party to Chaos Argent" )
		return 0
	end
	local Lv = Lv(player)
	if Lv > 100 then
		return 1
	else
		SystemNotice(player,"Only for Lv101 and above.")
		return 0
	end
	if (CheckHasGoldBeforeEnter(player,"garner2") ~= 1) then
		return 0
	end
	return 1
end

 

Edited by xEvo7

Hit Like If You Like It!

Tekken-7.jpg

Share this post


Link to post
Share on other sites

 

There is missing part that's why its not working properly. 

--functions.lua
function CheckHasGoldBeforeEnter(role,map)
	local MoneyHave	= GetChaAttr(role,ATTR_GD)
	local MoneyNeed	= 1000000
	if GPF[map] ~= nil then
		MoneyNeed = GPF[map]
	end

	-- missing part.......
	if(MoneyHave >= MoneyNeed)then
		return 1
	end
	return 0
end

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...