Jump to content
Sign in to follow this  
habs8024

Hexa "The Sixth Task"

Recommended Posts

Hey guys, i've ran into a problem when doing hexa quest, when i reach "The Sixth Task" the last mission doesnt show up at "Icicle Swordsman - Ray" after making a party.

 

any ideas why?

 

Here's the ray npcsript

function r_talk78 ()
	
	-------------------
	Talk( 1, "Ray: I am a bounty hunter. I love to hunt for undeads. If you are interested, I can recommend a few places to you." )

		
	InitTrigger()
	TriggerCondition( 1, LvCheck, ">", 9 )
	TriggerCondition( 1, IsCategory, 1 )
	TriggerCondition( 1, PfEqual, 0 )
	TriggerCondition( 1, HasMoney, 1000 )
	TriggerCondition( 1, HasItem, 3955, 1 )
	TriggerAction( 1, TakeItem, 3955, 1 )
	TriggerAction( 1, TakeMoney, 1000 )
	TriggerAction( 1, GiveItem, 3187, 1 , 4)
	TriggerAction( 1, GiveItem, 25, 1 , 4)
	TriggerAction( 1, SetProfession, 2 )
	TriggerAction( 1, JumpPage, 3 )
	TriggerCondition( 2, LvCheck, ">", 9 )
	TriggerCondition( 2, IsCategory, 3 )
	TriggerCondition( 2, PfEqual, 0 )
	TriggerCondition( 2, HasMoney, 1000 )
	TriggerCondition( 2, HasItem, 3955, 1 )
	TriggerAction( 2, TakeItem, 3955, 1 )
	TriggerAction( 2, TakeMoney, 1000 )
	TriggerAction( 2, GiveItem, 3187, 1 , 4)
	TriggerAction( 2, GiveItem, 25, 1, 4)
	TriggerAction( 2, SetProfession, 2  )
	TriggerAction( 2, JumpPage, 3 )
	TriggerFailure( 2, JumpPage, 4 )

	Talk(2, "Hi my friend. You have great reflexes, suitable to become a hunter. Why don't you become a hunter now? I believe that you will not be disappointed.")
	Text(2, "Ok, class change to be Hunter", MultiTrigger, GetMultiTrigger(), 2)
	Text(2, "No, it is good enough for now.", CloseTalk)

	Talk(3, "I have told you all I can about being a Hunter. Now its up to you to become the best Hunter.")

	Talk(4, "Want to be a Hunter? Only players Lv 8 and above who possess a Hunter Manual can register with me for 1000G. Muscular guy or little girl are not suitable.")

	InitTrigger()
	TriggerCondition( 1, LvCheck, ">", 39 )
	TriggerCondition( 1, IsCategory, 1 )
	TriggerCondition( 1, PfEqual, 2 )
	TriggerCondition( 1, HasMoney, 15000 )
	TriggerCondition( 1, HasItem, 3364, 1 )
	TriggerAction( 1, TakeItem, 3364, 1 )
	TriggerAction( 1, TakeMoney, 15000 )
	TriggerAction( 1, SetProfession, 12 )
	TriggerAction( 1, JumpPage, 6 )
	TriggerCondition( 2, LvCheck, ">", 39 )
	TriggerCondition( 2, IsCategory, 3 )
	TriggerCondition( 2, PfEqual, 2 )
	TriggerCondition( 2, HasMoney, 15000 )
	TriggerCondition( 2, HasItem, 3364, 1 )
	TriggerAction( 2, TakeItem, 3364, 1 )
	TriggerAction( 2, TakeMoney, 15000 )
	TriggerAction( 2, SetProfession, 12  )
	TriggerAction( 2, JumpPage, 6 )
	TriggerFailure( 2, JumpPage, 7 )

	Talk(5, "Sharpshoots nowadays only want to earn more money. They will kill anyone on sight as long as there is a bounty. Friend, it seems that you are suitable to become a sharpshooter. You have a good character and build. Would you consider to be one so that you might restore the glory of the Sharpshooters one day?")
	Text(5, "Ok, I will become a Sharpshooter", MultiTrigger, GetMultiTrigger(), 2)
	Text(5, "No, it is good enough for now.", CloseTalk)

	Talk(6, "Sharpshooters are not assassins. You must not forget the principles of the sharpshooters in the future.")

	Talk(7, "Want to become a Sharpshooter? Come back here when you are Lv 40. Remember to bring along 1 Clarity Crystal and 15000G too!")

	--InitTrigger()

-------------------
	--TriggerCondition( 1, LvCheck, ">", 9 )
	----TriggerCondition( 1, IsCategory, 1 )
	--TriggerCondition( 1, PfEqual, 0 )
	--TriggerAction( 1, JumpPage, 2 )
	--TriggerCondition( 2, LvCheck, ">", 9 )
	--TriggerCondition( 2, IsCategory, 3 )
	--TriggerCondition( 2, PfEqual, 0 )
	--TriggerAction( 2, JumpPage, 2 )
	--TriggerFailure( 2, JumpPage, 1 )

----------------

	--TriggerCondition( 3, LvCheck, ">", 39 )
	--TriggerCondition( 3, IsCategory, 1 )
	--TriggerCondition( 3, PfEqual, 2 )
	--TriggerAction( 3, JumpPage, 5 )
	--TriggerCondition( 4, LvCheck, ">", 39 )
	--TriggerCondition( 4, IsCategory, 3 )
	--TriggerCondition( 4, PfEqual, 2 )
	--TriggerAction( 4, JumpPage, 5 )
	--TriggerFailure( 4, JumpPage, 1 )

	--Start( GetMultiTrigger(), 2 )
	
	--AddNpcMission ( 729 )
	AddNpcMission ( 101 )
	AddNpcMission ( 251 )
	AddNpcMission ( 252 )
	AddNpcMission ( 260 )
	AddNpcMission ( 261 )
	--AddNpcMission 	(410)
	AddNpcMission 	(757)
	AddNpcMission 	(167)
	AddNpcMission 	(168)
	AddNpcMission 	(169)
	AddNpcMission 	(174)
	--AddNpcMission 	(175)
	AddNpcMission 	(176)
	AddNpcMission 	(180)
	AddNpcMission 	(523)
	AddNpcMission(	1237	)
-------------eleven
	AddNpcMission(	5057	)
	AddNpcMission(	5061	)	
	AddNpcMission(	5069	)
----------1.7
	AddNpcMission(	5168	)
	AddNpcMission(	5090	)
	AddNpcMission (5097 )
	AddNpcMission (5098 )
	AddNpcMission (5099 )
	AddNpcMission (5100 )
	AddNpcMission (5111 )
	---------------2.0
	AddNpcMission ( 6382 )
	AddNpcMission ( 6383 )

	MisListPage(2)


	-----
	AddNpcMission ( 6125 )


end

 

 

And here's the CheckTeam ( role ) in functions.lua

 

function CheckTeam ( role )
    local player = {}
    player[1] = role
    player[2] = GetTeamCha( role , 0 )
    player[3] = GetTeamCha( role , 1 )
    player[4] = GetTeamCha( role , 2 )
    player[5] = GetTeamCha( role , 3 )
    local n1 = 0
    local n2 = 0
    local n3 = 0
 
    for j = 0 , 5 , 1 do   
        if ValidCha( player[j] )== 1  then                 
            local lv_p = GetChaAttr ( player[j] , ATTR_LV )
            if lv_p >= 20 and lv_p <= 30 then
                n1 = n1 + 1
            elseif lv_p > 30 and lv_p <= 40 then
                n2 = n2 + 1
            elseif lv_p > 40 then
                n3 = n3 + 1
            end
        end
    end
    if n1 >= 1 and n2 >= 1 and n3>= 1 then
        return LUA_TRUE
    end
end
 
            --MissionSdk.lua, around line 2688!
            elseif conditions[i].func == CheckTeam then
                PRINT( "ConditionsTest: CheckTeam, p1 = ", conditions[i].p1 )
                local ret = CheckTeam( character, conditions[i].p1 )
                if ret ~= LUA_TRUE then
                    PRINT( "ConditionsTest:CheckTeam = false" )
                    return LUA_FALSE
                end

 

 

Please help me ._.

Edited by habs8024

Share this post


Link to post
Share on other sites
function CheckTeam ( role )
    local player = {}
    player[1] = role
    player[2] = GetTeamCha( role , 0 )
    player[3] = GetTeamCha( role , 1 )
    player[4] = GetTeamCha( role , 2 )
    player[5] = GetTeamCha( role , 3 )
    local n1 = 0
    local n2 = 0
    local n3 = 0
 
    for j = 0 , 5 , 1 do   
        if ValidCha( player[j] )== 1  then                 
            local lv_p = GetChaAttr ( player[j] , ATTR_LV )
            if lv_p >= 20 and lv_p <= 30 then
                n1 = n1 + 1
            elseif lv_p > 30 and lv_p <= 40 then
                n2 = n2 + 1
            elseif lv_p > 40 then
                n3 = n3 + 1
            end
        end
    end
    if n1 >= 1 and n2 >= 1 and n3>= 1 then
        return LUA_TRUE
    end
end

I've tried this aswell, Still won't work :(

Share this post


Link to post
Share on other sites
function CheckTeam(role)  --¼ì²éÅŶӵĶÓÎéÊÇ·ñ·ûºÏÌõ¼þ
	local TeamLeadName = GetChaDefaultName (role)
	local teamlv = GetTeamLV(role)

	if teamlv == 0 then
		return "ÄãµÄ¶ÓÎéµÈ¼¶Ì«µÍ²»ÄܲμӾº¼¼³¡"
	end
	local i =0 
	local PeoperNum= 1 
	local teamrole = {}
	teamrole[0]= role 
	local teammentNum = 1 
	for i = 0, 3, 1 do 
		teamrole[i+1] = GetTeamCha(role, i)
		if ValidCha(teamrole[i+1]) == 1 then
			PeoperNum= PeoperNum+1
		end
		if ValidCha(teamrole[i+1]) == 1 then 
			teammentNum = i+2
		end
		if teammentNum ~= PeoperNum then 
		return "ÄãµÄ¶ÓÎé²»ÔÚͬһ¸öµØͼ£¬Ç뼯ºÏ¶ÓÔ±ÔÙÅŶӡ£" 
		end
	end

	if PeoperNum ~=  JJCteam[1].players and PeoperNum~=JJCteam[2].players and  PeoperNum~=JJCteam[3].players then
		
		return "ÄãµÄ¶ÓÎéÈËÊý²»·ûºÏ²Î¼Ó¾º¼¼³¡µÄÈËÊý,ÄãµÄ¶ÓÎé²»ÄܲμӾº¼¼³¡¡£Ö»ÓжÓÎéÈËÊýΪ"..JJCteam[1].players.."¡¢"..JJCteam[2].players.."»òÕß"..JJCteam[3].players.."ʱ²ÅÄܲμӾº¼¼³¡¡£"
	end

	local job= {}
	for i = 0, PeoperNum -1, 1 do
		local TeammentName = GetChaDefaultName (teamrole[i])
		local TeamLeadName = GetChaDefaultName (role)
		local TeamNotice = "ÄãµÄ¶ÓÓÑ"..TeammentName
		if TeammentName == TeamLeadName then
			TeamNotice = "Äã"
		end
		local	role_lv = GetTeamLV(teamrole[i])
		if role_lv~= teamlv then
			return "ÄãµÄ¶ÓÓÑ"..TeammentName.."ÓëÄãµÄµÈ¼¶²»ÔÚͬһ¸ö¼¶±ð,ÄãµÄ¶ÓÎé²»ÄܲμӾº¼¼³¡¡£" 
		end
		if CheckJJCItem(teamrole[i]) == 0 then
			return TeamNotice.."ûÓоº¼¼³¡Ö®Ö¤,ÄãµÄ¶ÓÎé²»ÄܲμӾº¼¼³¡" 
		end	
		job[i] = GetChaAttr ( teamrole[i] , ATTR_JOB)
		if job[i] < 8 then
			return TeamNotice.."ûÓжþ´Îתְ,ÄãµÄ¶ÓÎé²»ÄܲμӾº¼¼³¡" 
		end
	end
	local JobCheck = 1 
	local JobArg = math.floor (PeoperNum /5)
	local j = 0 
	local reJob = 0
	for i = 0 , PeoperNum -2, 1  do 
		for j = i+1, PeoperNum -1 , 1 do
			if job[i] == job[j] then
				reJob = reJob+1 
			end
		end
	end
	if reJob > JobArg then
		local falsenum = PeoperNum - JobArg 
		return "ÄãµÄ¶ÓÎéÖÐûÓÐ "..falsenum.." ÖÖ²»Í¬µÄÖ°Òµ£¬²»ÄܲμÓ"..PeoperNum.."È˾º¼¼³¡¡£"  
	end	
	local ret = CanPaiDui(role,PeoperNum)

	return ret 
end

if you have this function remove it, check sdk also if checkteam is duplicated

 

  • Like 1

Share this post


Link to post
Share on other sites

I've removed all other checkteam functions in the functions.lua now

 

And checked missionsdk for dupes, there was only one checkteam and it's this

 

			elseif conditions[i].func == CheckTeam1 then
				PRINT( "ConditionsTest:CheckTeam1, p1 =, p2 =", conditions[i].p1, conditions[i].p2 )
				local ret = CheckTeam1( character, conditions[i].p1, conditions[i].p2 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:CheckTeam1 = false" )
					return LUA_FALSE
				end

But why is it called "CheckTeam1" ? should i change it to just CheckTeam?

 

Share this post


Link to post
Share on other sites

so you have 1 function named CheckTeam and 2 sdks? CheckTeam and CheckTeam1? if so, CheckTeam should work.

If you have only one sdk, be sure it matches with the function name (CheckTeam instead CheckTeam1), so you should change atleast the line 

local ret = CheckTeam1( character, conditions.p1, conditions.p2 )

local ret = CheckTeam1( character, conditions[i].p1, conditions[i].p2 )

but my suggestion is to change "elseif conditions.func == CheckTeam1 then" aswell

  • Like 1

Share this post


Link to post
Share on other sites

Not sure why i hadn't tried that lol, thanks a bunch both of you :D i changed CheckTeam1 to CheckTeam in missionsdk and works fine now =) 

 

For anyone watching this thread with the same problem this is what u gotta do

 

go to -> \Resource\script\MisSdk open MissionSdk.lua 

 

Search for this function 

			elseif conditions[i].func == CheckTeam1 then
				PRINT( "ConditionsTest:CheckTeam1, p1 =, p2 =", conditions[i].p1, conditions[i].p2 )
				local ret = CheckTeam1( character, conditions[i].p1, conditions[i].p2 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:CheckTeam1 = false" )
					return LUA_FALSE
				end

 

 

And replace with this

 

			elseif conditions[i].func == CheckTeam then
				PRINT( "ConditionsTest:CheckTeam, p1 =, p2 =", conditions[i].p1, conditions[i].p2 )
				local ret = CheckTeam( character, conditions[i].p1, conditions[i].p2 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:CheckTeam = false" )
					return LUA_FALSE
				end

 

 

next go to  -> \Resource\script\calculate

 

And open functions.lua

 

Search for this  function CheckTeam ( role )

and make sure there's no duplicates of this function.

 

Credits to @iZae   and @Lucky for helping

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