⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 itemgetmission.lua

📁 top web admin panel (tales of pirates)
💻 LUA
📖 第 1 页 / 共 5 页
字号:
	local Need_CheckPos	= -1			-- 是否判断坐标 ( 1 为 判断 , -1 为不判断 , 如果不判断则坐标和地图均填 0 )
	local Cha_x_max		= 4096			-- 判断人物ID 的 X 坐标最大值
	local Cha_x_min		= 0			-- 判断人物ID 的 X 坐标最小值
	local Cha_y_max		= 4096			-- 判断人物ID 的 Y 坐标最大值
	local Cha_y_min		= 0			-- 判断人物ID 的 Y 坐标最小值
	local MapName		= -1			-- 判断人物所在地图名
	local GuildType		= -1			-- 判断人物的公会类型 ( 1 为海军 , 2 为海盗 , 0 为没有公会 , -1 为不判断 )
	local CheckType		= 1			-- 判断人物公会类型的方式 ( 1 为是某种公会类型 , 2 为不是某种公会类型 )


	local HasRecordNotice	 = "This ancient key has the logo of Thundoria Bank on it"		--判断 HasRecord 失败提示
	local HasRecordNotice_1  = "This ancient key has the logo of Thundoria Bank on it"		--判断 HasRecord 失败提示
	local NoRecordNotice	 = "This ancient key has the logo of Thundoria Bank on it"		--判断 NoRecord 失败提示
	local NoRecordNotice_1	 = "This ancient key has the logo of Thundoria Bank on it"		--判断 NoRecord 失败提示
	local HasMissionNotice	 = "This ancient key has the logo of Thundoria Bank on it"		--判断 HasMission 失败提示
	local HasMissionNotice_1 = "This ancient key has the logo of Thundoria Bank on it"		--判断 HasMission 失败提示
	local NoMissionNotice	 = "This ancient key has the logo of Thundoria Bank on it"		--判断 NoMission 失败提示
	local NoMissionNotice_1	 = "This ancient key has the logo of Thundoria Bank on it"		--判断 NoMission 失败提示
	local CheckBoatNotice	 = "This ancient key has the logo of Thundoria Bank on it"		--判断 人或船 失败提示
	local CheckPosNotice	 = "This ancient key has the logo of Thundoria Bank on it"		--判断 坐标 失败提示
	local GuildTypeNotice	 = "This ancient key has the logo of Thundoria Bank on it"		--判断 公会类型 失败提示

	local CheckMissionMsg_1  = MissionMsgCheck ( role , HasRecordID , NoRecordID , HasMissionID , No_MissionID , HasRecordNotice , NoRecordNotice , HasMissionNotice , NoMissionNotice )
--	Notice("CheckMissionMsg_1 = "..CheckMissionMsg_1 ) 
	local CheckMissionMsg_2	 = MissionMsgCheck ( role , HasRecordID_1 , NoRecordID_1 , HasMissionID_1 , No_MissionID_1 , HasRecordNotice_1 , NoRecordNotice_1 , HasMissionNotice_1 , NoMissionNotice_1 )
--	Notice("CheckMissionMsg_2 = "..CheckMissionMsg_2 ) 
	local CheckChaMsg	 = ChaMsgCheck ( role , ChaType , Need_CheckPos ,Cha_x_max , Cha_x_min , Cha_y_max , Cha_y_min , MapName , GuildType , CheckType , CheckBoatNotice , CheckPosNotice ,GuildTypeNotice )
--	Notice("CheckChaMsg = "..CheckChaMsg ) 

	if CheckMissionMsg_1 ~= 1 or CheckMissionMsg_2 ~= 1 or CheckChaMsg ~= 1 then
		UseItemFailed ( role )
		return
	end





	local GiveMisson_1	=	15	--海军给与任务 (-1 为不给 )
	local GiveMisson_2	=	15	--海盗给与任务 (-1 为不给 )
	local GiveMisson_0	=	15	--无公会给与任务 ( -1 为不给 )
	local ItemID		=	-1	--给与道具 ( -1 为不给 )
	local ItemNum		=	0	--给与道具数量
	local Give_Exp		= 	-1	-- 要给与的经验 ( 如果为 -1 为不给 )
	local Give_Money	= 	-1	-- 要给与的钱 ( 如果为 -1 为不给 )
	local DelItem		=	0	--是否在使用后删除道具( 1 删, 0 不删 )

	local Cha_GuildID = GetChaGuildID( role )
	
	local ChaGuildType_Get = -1
	if Cha_GuildID == 0 then
		ChaGuildType_Get = 0
	elseif Cha_GuildID > 0 and Cha_GuildID <= 100 then
		ChaGuildType_Get = 1
	elseif Cha_GuildID > 100 and Cha_GuildID <= 200 then
		ChaGuildType_Get = 2
	else
		SystemNotice ( role , "Illegal Guild ID" )
	end

	
	if ChaGuildType_Get == 1 then
		if GiveMisson_1 ~= -1 then
			GiveMission( role, GiveMisson_1 )
		end
	end

	if ChaGuildType_Get == 2 then
		if GiveMisson_2 ~= -1 then
			GiveMission( role, GiveMisson_2 )
		end
	end

	if ChaGuildType_Get == 0 then
		if GiveMisson_0 ~= -1 then
			GiveMission( role, GiveMisson_0 )
		end
	end

	if ItemID ~= -1 then
		GiveItem ( role , 0 , ItemID , ItemNum , 0 )
	end



	if Give_Money > 0 then
		AddMoney ( role , 0 , Give_Money )
	end

	if Give_Exp > 0 then
		local exp = Exp ( role )
		if Lv ( TurnToCha ( role )  )  >= 80 then 
			Give_Exp = math.floor ( exp_dif / 50  ) 
		end 
		local exp_new = exp + Give_Exp
		
		SetCharaAttr ( exp_new , role , ATTR_CEXP )
	end


	if DelItem == 0 then
		UseItemFailed ( role )
		return
	end

end 



function ItemUse_LDADYS (role) --[[鲁德安的遗书]]--

	local HasRecordID	= -1			-- 判断是否带有某记录 ( 填要判断的记录 ID , -1 为不判断 )
	local HasRecordID_1	= -1			-- 判断是否带有某记录 ( 填要判断的记录 ID , -1 为不判断 )
	local NoRecordID	= 16			-- 判断是否不带有某记录 ( 填要判断的记录 ID , -1为不判断 )
	local NoRecordID_1	= -1			-- 判断是否不带有某记录 ( 填要判断的记录 ID , -1为不判断 )
	local HasMissionID	= -1			-- 判断是否带有某任务 ( 填要判断的任务 ID , -1 为不判断 )
	local HasMissionID_1	= -1			-- 判断是否带有某任务 ( 填要判断的任务 ID , -1 为不判断 )
	local No_MissionID	= 16			-- 判断没有带某任务 ( 填要判断的任务 ID ,-1 为不判断 )
	local No_MissionID_1	= -1			-- 判断没有带某任务 ( 填要判断的任务 ID ,-1 为不判断 )
	local ChaType		= -1			-- 判断是否为人或船只 ( 1 为 人 , 2 为 船 , -1 为不判断 )
	local Need_CheckPos	= -1			-- 是否判断坐标 ( 1 为 判断 , -1 为不判断 , 如果不判断则坐标和地图均填 0 )
	local Cha_x_max		= 4096			-- 判断人物ID 的 X 坐标最大值
	local Cha_x_min		= 0			-- 判断人物ID 的 X 坐标最小值
	local Cha_y_max		= 4096			-- 判断人物ID 的 Y 坐标最大值
	local Cha_y_min		= 0			-- 判断人物ID 的 Y 坐标最小值
	local MapName		= -1			-- 判断人物所在地图名
	local GuildType		= -1			-- 判断人物的公会类型 ( 1 为海军 , 2 为海盗 , 0 为没有公会 , -1 为不判断 )
	local CheckType		= 1			-- 判断人物公会类型的方式 ( 1 为是某种公会类型 , 2 为不是某种公会类型 )


	local HasRecordNotice	 = "Andrew's Will has some unknown scribbling on it"		--判断 HasRecord 失败提示
	local HasRecordNotice_1  = "Andrew's Will has some unknown scribbling on it"		--判断 HasRecord 失败提示
	local NoRecordNotice	 = "Andrew's Will has some unknown scribbling on it"		--判断 NoRecord 失败提示
	local NoRecordNotice_1	 = "Andrew's Will has some unknown scribbling on it"		--判断 NoRecord 失败提示
	local HasMissionNotice	 = "Andrew's Will has some unknown scribbling on it"		--判断 HasMission 失败提示
	local HasMissionNotice_1 = "Andrew's Will has some unknown scribbling on it"		--判断 HasMission 失败提示
	local NoMissionNotice	 = "Andrew's Will has some unknown scribbling on it"		--判断 NoMission 失败提示
	local NoMissionNotice_1	 = "Andrew's Will has some unknown scribbling on it"		--判断 NoMission 失败提示
	local CheckBoatNotice	 = "Andrew's Will has some unknown scribbling on it"		--判断 人或船 失败提示
	local CheckPosNotice	 = "Andrew's Will has some unknown scribbling on it"		--判断 坐标 失败提示
	local GuildTypeNotice	 = "Andrew's Will has some unknown scribbling on it"		--判断 公会类型 失败提示

	local CheckMissionMsg_1  = MissionMsgCheck ( role , HasRecordID , NoRecordID , HasMissionID , No_MissionID , HasRecordNotice , NoRecordNotice , HasMissionNotice , NoMissionNotice )
--	Notice("CheckMissionMsg_1 = "..CheckMissionMsg_1 ) 
	local CheckMissionMsg_2	 = MissionMsgCheck ( role , HasRecordID_1 , NoRecordID_1 , HasMissionID_1 , No_MissionID_1 , HasRecordNotice_1 , NoRecordNotice_1 , HasMissionNotice_1 , NoMissionNotice_1 )
--	Notice("CheckMissionMsg_2 = "..CheckMissionMsg_2 ) 
	local CheckChaMsg	 = ChaMsgCheck ( role , ChaType , Need_CheckPos ,Cha_x_max , Cha_x_min , Cha_y_max , Cha_y_min , MapName , GuildType , CheckType , CheckBoatNotice , CheckPosNotice ,GuildTypeNotice )
--	Notice("CheckChaMsg = "..CheckChaMsg ) 

	if CheckMissionMsg_1 ~= 1 or CheckMissionMsg_2 ~= 1 or CheckChaMsg ~= 1 then
		UseItemFailed ( role )
		return
	end





	local GiveMisson_1	=	16	--海军给与任务 (-1 为不给 )
	local GiveMisson_2	=	16	--海盗给与任务 (-1 为不给 )
	local GiveMisson_0	=	16	--无公会给与任务 ( -1 为不给 )
	local ItemID		=	-1	--给与道具 ( -1 为不给 )
	local ItemNum		=	0	--给与道具数量
	local Give_Exp		= 	-1	-- 要给与的经验 ( 如果为 -1 为不给 )
	local Give_Money	= 	-1	-- 要给与的钱 ( 如果为 -1 为不给 )
	local DelItem		=	0	--是否在使用后删除道具( 1 删, 0 不删 )

	local Cha_GuildID = GetChaGuildID( role )
	
	local ChaGuildType_Get = -1
	if Cha_GuildID == 0 then
		ChaGuildType_Get = 0
	elseif Cha_GuildID > 0 and Cha_GuildID <= 100 then
		ChaGuildType_Get = 1
	elseif Cha_GuildID > 100 and Cha_GuildID <= 200 then
		ChaGuildType_Get = 2
	else
		SystemNotice ( role , "Illegal Guild ID" )
	end

	
	if ChaGuildType_Get == 1 then
		if GiveMisson_1 ~= -1 then
			GiveMission( role, GiveMisson_1 )
		end
	end

	if ChaGuildType_Get == 2 then
		if GiveMisson_2 ~= -1 then
			GiveMission( role, GiveMisson_2 )
		end
	end

	if ChaGuildType_Get == 0 then
		if GiveMisson_0 ~= -1 then
			GiveMission( role, GiveMisson_0 )
		end
	end

	if ItemID ~= -1 then
		GiveItem ( role , 0 , ItemID , ItemNum , 0 )
	end



	if Give_Money > 0 then
		AddMoney ( role , 0 , Give_Money )
	end

	if Give_Exp > 0 then
		local exp = Exp ( role )
		if Lv ( TurnToCha ( role )  )  >= 80 then 
			Give_Exp = math.floor ( exp_dif / 50  ) 
		end 
		local exp_new = exp + Give_Exp
		
		SetCharaAttr ( exp_new , role , ATTR_CEXP )
	end


	if DelItem == 0 then
		UseItemFailed ( role )
		return
	end

end 


function ItemUse_YXYSJY (role) --[[隐形药水解药]]--

	local HasRecordID	= -1			-- 判断是否带有某记录 ( 填要判断的记录 ID , -1 为不判断 )
	local HasRecordID_1	= -1			-- 判断是否带有某记录 ( 填要判断的记录 ID , -1 为不判断 )
	local NoRecordID	= 18			-- 判断是否不带有某记录 ( 填要判断的记录 ID , -1为不判断 )
	local NoRecordID_1	= -1			-- 判断是否不带有某记录 ( 填要判断的记录 ID , -1为不判断 )
	local HasMissionID	= -1			-- 判断是否带有某任务 ( 填要判断的任务 ID , -1 为不判断 )
	local HasMissionID_1	= -1			-- 判断是否带有某任务 ( 填要判断的任务 ID , -1 为不判断 )
	local No_MissionID	= 18			-- 判断没有带某任务 ( 填要判断的任务 ID ,-1 为不判断 )
	local No_MissionID_1	= -1			-- 判断没有带某任务 ( 填要判断的任务 ID ,-1 为不判断 )
	local ChaType		= -1			-- 判断是否为人或船只 ( 1 为 人 , 2 为 船 , -1 为不判断 )
	local Need_CheckPos	= -1			-- 是否判断坐标 ( 1 为 判断 , -1 为不判断 , 如果不判断则坐标和地图均填 0 )
	local Cha_x_max		= 1845			-- 判断人物ID 的 X 坐标最大值
	local Cha_x_min		= 1841			-- 判断人物ID 的 X 坐标最小值
	local Cha_y_max		= 1719			-- 判断人物ID 的 Y 坐标最大值
	local Cha_y_min		= 1715			-- 判断人物ID 的 Y 坐标最小值
	local MapName		= "magicsea"			-- 判断人物所在地图名
	local GuildType		= -1			-- 判断人物的公会类型 ( 1 为海军 , 2 为海盗 , 0 为没有公会 , -1 为不判断 )
	local CheckType		= 1			-- 判断人物公会类型的方式 ( 1 为是某种公会类型 , 2 为不是某种公会类型 )


	local HasRecordNotice	 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 HasRecord 失败提示
	local HasRecordNotice_1  = "Where do you wish to apply the Invisible Ink Negator?"		--判断 HasRecord 失败提示
	local NoRecordNotice	 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 NoRecord 失败提示
	local NoRecordNotice_1	 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 NoRecord 失败提示
	local HasMissionNotice	 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 HasMission 失败提示
	local HasMissionNotice_1 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 HasMission 失败提示
	local NoMissionNotice	 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 NoMission 失败提示
	local NoMissionNotice_1	 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 NoMission 失败提示
	local CheckBoatNotice	 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 人或船 失败提示
	local CheckPosNotice	 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 坐标 失败提示
	local GuildTypeNotice	 = "Where do you wish to apply the Invisible Ink Negator?"		--判断 公会类型 失败提示

	local CheckMissionMsg_1  = MissionMsgCheck ( role , HasRecordID , NoRecordID , HasMissionID , No_MissionID , HasRecordNotice , NoRecordNotice , HasMissionNotice , NoMissionNotice )
--	Notice("CheckMissionMsg_1 = "..CheckMissionMsg_1 ) 
	local CheckMissionMsg_2	 = MissionMsgCheck ( role , HasRecordID_1 , NoRecordID_1 , HasMissionID_1 , No_MissionID_1 , HasRecordNotice_1 , NoRecordNotice_1 , HasMissionNotice_1 , NoMissionNotice_1 )
--	Notice("CheckMissionMsg_2 = "..CheckMissionMsg_2 ) 
	local CheckChaMsg	 = ChaMsgCheck ( role , ChaType , Need_CheckPos ,Cha_x_max , Cha_x_min , Cha_y_max , Cha_y_min , MapName , GuildType , CheckType , CheckBoatNotice , CheckPosNotice ,GuildTypeNotice )
--	Notice("CheckChaMsg = "..CheckChaMsg ) 

	if CheckMissionMsg_1 ~= 1 or CheckMissionMsg_2 ~= 1 or CheckChaMsg ~= 1 then
		UseItemFailed ( role )
		return
	end





	local GiveMisson_1	=	18	--海军给与任务 (-1 为不给 )
	local GiveMisson_2	=	18	--海盗给与任务 (-1 为不给 )
	local GiveMisson_0	=	18	--无公会给与任务 ( -1 为不给 )
	local ItemID		=	-1	--给与道具 ( -1 为不给 )
	local ItemNum		=	0	--给与道具数量
	local Give_Exp		= 	-1	-- 要给与的经验 ( 如果为 -1 为不给 )
	local Give_Money	= 	-1	-- 要给与的钱 ( 如果为 -1 为不给 )
	local DelItem		=	0	--是否在使用后删除道具( 1 删, 0 不删 )

	local Cha_GuildID = GetChaGuildID( role )
	
	local ChaGuildType_Get = -1
	if Cha_GuildID == 0 then
		ChaGuildType_Get = 0
	elseif Cha_GuildID > 0 and Cha_GuildID <= 100 then
		ChaGuildType_Get = 1
	elseif Cha_GuildID > 100 and Cha_GuildID <= 200 then
		ChaGuildType_Get = 2
	else
		SystemNotice ( role , "Illegal Guild ID" )
	end

	
	if ChaGuildType_Get == 1 then
		if GiveMisson_1 ~= -1 then
			GiveMission( role, GiveMisson_1 )
		end
	end

	if ChaGuildType_Get == 2 then

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -