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

📄 missionscript06.lua

📁 top web admin panel (tales of pirates)
💻 LUA
📖 第 1 页 / 共 2 页
字号:
-------------------------------------------------------------------
--									--
--									--
--NPCScript06.lua Created by Robin.Zeng 2005.9.22.				--
--									--
--									--
--------------------------------------------------------------------------
print( "loading NPCScript06.lua" )

jp= JumpPage
amp=AutoMissionPage
ct=CloseTalk
am=AddMission
MissionCheck = HasFlag
mc=MissionCheck

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


--                 副本任务


--------------------------------------------
function DuplicateMission001()
-----------------------------------酒鬼的秘密
	DefineMission( 500, "Drunkyard Secrets", 500 )
	
	MisBeginTalk( "I have not taste any wine for a long time...Young fellow, wine is like oxygen to me! I cannot live without it! <n><t>Can you buy a bottle of good wine for me from the bar in Argent? I will tell you a secret if you do it." )
	MisBeginCondition(LvCheck, ">", 29 )
	MisBeginCondition(NoMission, 500)
	MisBeginCondition(NoRecord, 500)
	MisBeginAction(AddMission, 500)
	MisBeginAction(AddTrigger, 5001, TE_GETITEM, 3916, 1 )
	MisCancelAction(ClearMission, 500)

	MisNeed(MIS_NEED_DESP, "Buy 1 Coconut Wine for Drunkyard in Argent Bar at (2222, 2889).")
	MisNeed(MIS_NEED_ITEM, 3916, 1, 10, 1)
		
	MisHelpTalk("What? That girl is not willing to sell wine to you? Or you have not visited her? Go now! Don't make me angry. I will forgot what you want to find out..")
	MisResultTalk("Hmm…This is indeed a good wine! It's a long time since I have tasted such quality! Do you want some? Ah… ZZzzzZZZzzz")
	MisResultCondition(NoRecord, 500)
	MisResultCondition(HasMission, 500)
	MisResultCondition(HasItem, 3916, 1)
	MisResultAction(TakeItem, 3916, 1)
	MisResultAction(ClearMission, 500)
	MisResultAction(SetRecord, 500)
	MisResultAction(AddExp, 5000, 5000)
	--MisResultAction(AddMoney,270,270)

	InitTrigger()
	TriggerCondition( 1, IsItem, 3916 )	
	TriggerAction( 1, AddNextFlag, 500, 10, 1 )
	RegCurTrigger( 5001 )

-----------------------------------再来一杯
	DefineMission( 501, "Another Cup Please!", 501 )
	
	MisBeginTalk( "<t>Oh my...The last drop of my wine is gone! But I am still thirsty for more...<n><t>Young adventurer, get me the famous \"Drunkern Dream\" from Argent bar. Faster!<n><t>Some Sashimi too will be nice..." )
	MisBeginCondition(NoMission, 501)
	MisBeginCondition(NoRecord, 501)
	MisBeginCondition(HasRecord, 500)
	MisBeginAction(AddMission, 501)
	MisBeginAction(AddTrigger, 5011, TE_GETITEM, 3926, 1 )
	MisBeginAction(AddTrigger, 5012, TE_GETITEM, 1478, 20 )
	MisCancelAction(ClearMission, 501)

	MisNeed(MIS_NEED_DESP, "Argent Drunkyard at (2222, 2889) requires a bottle of Drunken Dreams and 20 Sashimi")
	MisNeed(MIS_NEED_ITEM, 3926, 1, 10, 1)
	MisNeed(MIS_NEED_ITEM, 1478, 20, 20, 20)
		
	MisHelpTalk("zZZZzzzZZZ…I want more wine!")
	MisResultTalk(" Ah…Good wine! I will tell you the secret now.<n><t>When I was young around your age, I gathered a group of enthusiastic adventurers like you and me. We went on a sea expedition once and salvage an ancient looking compass. We sail towards the direction it was pointing and suddenly, a hugh whirlpool appears in front of our ship and suck us into the portal.<n><t>Through the portal is a small island with a forsaken city in the middle of it. Piles of treasures litters the street of the city!<n><t>However, none of us are able to leave with any treasures. Anyone who tried to take any treasure from the city was killed by undead souls and skeletons that appeared out of nowhere! It is so scary! Only me and Little Daniel escaped that calamity.<n><t>You want me to bring you there? NO! I will never set foot on that cursed place ever again! Look for Little Daniel, he knows the way to get to the Forsaken City. Leave me with my wine...zZzz...")
	MisResultCondition(NoRecord, 501)
	MisResultCondition(HasMission, 501)
	MisResultCondition(HasItem, 3926, 1)
	MisResultCondition(HasItem, 1478, 20)
	MisResultAction(TakeItem, 3926, 1)
	MisResultAction(TakeItem, 1478, 20)
	MisResultAction(ClearMission, 501)
	MisResultAction(SetRecord, 501)
	MisResultAction(AddExp, 10000, 10000)
	--MisResultAction(AddMoney,270,270)

	InitTrigger()
	TriggerCondition( 1, IsItem, 3926 )	
	TriggerAction( 1, AddNextFlag, 501, 10, 1 )
	RegCurTrigger( 5011 )
	InitTrigger()
	TriggerCondition( 1, IsItem, 1478 )	
	TriggerAction( 1, AddNextFlag, 501, 20, 20 )
	RegCurTrigger( 5012 )

-----------------------------------醉生梦死
	DefineMission( 502, "Drunken Dreams", 502 )
	
	MisBeginTalk( "<t>Oh...Drunken Dreams? It must be that drunkyard who told you about it.<n><t>It requires special brewing ingredients that consist of Stramonium Flower, Rainbow Fruit and Strange Fruit. Get me these and I will brew one for you. However, it needed to be contained in a Snowy Trumpet Shell to make it tasty. Get me Snowy Trumpet Shell too.<n><t>And also a fee of 2000G for my effort." )
	MisBeginCondition(NoMission, 502)
	MisBeginCondition(NoRecord, 502)
	MisBeginCondition(HasRecord, 500)
	MisBeginCondition(HasMission, 501)
	MisBeginAction(AddMission, 502)
	MisBeginAction(AddTrigger, 5021, TE_GETITEM, 4377, 1 )
	MisBeginAction(AddTrigger, 5022, TE_GETITEM, 3121, 5 )
	MisBeginAction(AddTrigger, 5023, TE_GETITEM, 3131, 5 )
	MisBeginAction(AddTrigger, 5024, TE_GETITEM, 4352, 20 )
	MisCancelAction(ClearMission, 502)

	MisNeed(MIS_NEED_ITEM, 4377, 1, 10, 1)
	MisNeed(MIS_NEED_ITEM, 3121, 5, 15, 5)
	MisNeed(MIS_NEED_ITEM, 3131, 5, 20, 5)
	MisNeed(MIS_NEED_ITEM, 4352, 20, 30, 20)

	MisPrize(MIS_PRIZE_ITEM, 3926, 1, 4)
	MisPrizeSelAll()
		
	MisHelpTalk("Brewing of \"Drunken Dreams\"…All ingredients must be prepared…")
	MisResultTalk("Yes! These are the stuff. Looks like you are really determine. Take this wine that the Drunkyard wanted.")
	MisResultCondition(NoRecord, 502)
	MisResultCondition(HasMission, 502)
	MisResultCondition(HasItem, 4377, 1)
	MisResultCondition(HasItem, 3121, 5)
	MisResultCondition(HasItem, 3131, 5)
	MisResultCondition(HasItem, 4352, 20)
	MisResultCondition(HasMoney, 2000 )
	MisResultAction(TakeMoney, 2000 )
	MisResultAction(TakeItem, 4377, 1)
	MisResultAction(TakeItem, 3121, 5)
	MisResultAction(TakeItem, 3131, 5)
	MisResultAction(TakeItem, 4352, 20)
	MisResultAction(ClearMission, 502)
	MisResultAction(SetRecord, 502)
	MisResultAction(AddExp, 20000, 20000)
	--MisResultAction(AddMoney,270,270)

	InitTrigger()
	TriggerCondition( 1, IsItem, 4377 )	
	TriggerAction( 1, AddNextFlag, 502, 10, 1 )
	RegCurTrigger( 5021 )
	InitTrigger()
	TriggerCondition( 1, IsItem, 3121 )	
	TriggerAction( 1, AddNextFlag, 502, 15, 5 )
	RegCurTrigger( 5022 )
	InitTrigger()
	TriggerCondition( 1, IsItem, 3131 )	
	TriggerAction( 1, AddNextFlag, 502, 20, 5 )
	RegCurTrigger( 5023 )
	InitTrigger()
	TriggerCondition( 1, IsItem, 4352 )	
	TriggerAction( 1, AddNextFlag, 502, 20, 20 )
	RegCurTrigger( 5024 )

-----------------------------------废灵武士骸骨
	DefineMission( 503, "Skeleton of Sorrow Warrior", 503 )
	
	MisBeginTalk( "<t>Since the drunkyard send you here, I will help you. I have been there before. You will need an Ancient Generator to enter. Bring me 10 Robot Core and I will make it for you.<n><t>By the way, can you collect some bones for my research while you are there?" )
	MisBeginCondition(NoMission, 503)
	MisBeginCondition(NoRecord, 503)
	MisBeginCondition(HasRecord, 501)
	MisBeginAction(AddMission, 503)
	MisBeginAction(AddTrigger, 5031, TE_GETITEM, 3434, 10 )
	MisBeginAction(AddTrigger, 5032, TE_GETITEM, 3435, 10 )
	MisBeginAction(AddTrigger, 5033, TE_GETITEM, 3436, 10 )
	MisBeginAction(AddTrigger, 5034, TE_GETITEM, 3437, 10 )
	MisCancelAction(ClearMission, 503)

	--MisNeed(MIS_NEED_DESP, "Found 10 Sorrow Warrior Carcass in Forsaken City. Give it to Little Daniel in Argent City at (2193, 2730)")
	MisNeed(MIS_NEED_ITEM, 3434, 10, 10, 10)
	MisNeed(MIS_NEED_ITEM, 3435, 10, 20, 10)
	MisNeed(MIS_NEED_ITEM, 3436, 10, 30, 10)
	MisNeed(MIS_NEED_ITEM, 3437, 10, 40, 10)
		
	MisHelpTalk("Hmm…This is a dangerous and meaningful quest. Maybe you should consider to take it up…")
	MisResultTalk("So these are the carcass of those undead.<n><t>I can feel them calling out to me! I wonder what is this mysterious force behind this. I will need to do an indepth research.<n><t>Maybe I might discover some secret!")
	MisResultCondition(NoRecord, 503)
	MisResultCondition(HasMission, 503)
	MisResultCondition(HasItem, 3434, 10)
	MisResultCondition(HasItem, 3435, 10)
	MisResultCondition(HasItem, 3436, 10)
	MisResultCondition(HasItem, 3437, 10)
	MisResultAction(TakeItem, 3434, 10)
	MisResultAction(TakeItem, 3435, 10)
	MisResultAction(TakeItem, 3436, 10)
	MisResultAction(TakeItem, 3437, 10)
	MisResultAction(ClearMission, 503)
	MisResultAction(SetRecord, 503)
	MisResultAction(AddExp, 80000, 80000)
	--MisResultAction(AddMoney,270,270)

	InitTrigger()
	TriggerCondition( 1, IsItem, 3434 )	
	TriggerAction( 1, AddNextFlag, 503, 10, 10 )
	RegCurTrigger( 5031 )
	InitTrigger()
	TriggerCondition( 1, IsItem, 3435 )	
	TriggerAction( 1, AddNextFlag, 503, 20, 10 )
	RegCurTrigger( 5032 )
	InitTrigger()
	TriggerCondition( 1, IsItem, 3436 )	
	TriggerAction( 1, AddNextFlag, 503, 30, 10 )
	RegCurTrigger( 5033 )
	InitTrigger()
	TriggerCondition( 1, IsItem, 3437 )	
	TriggerAction( 1, AddNextFlag, 503, 40, 10 )
	RegCurTrigger( 5034 )

----------------------------------------
--                                    --
--        加勒比海盗主线任务          --
--                                    --
----------------------------------------

----------------------------------------
--                                    --
--              主线任务              --
--                                    --
----------------------------------------

-- 铁匠 >> 铁匠的担忧
	DefineMission(504,"Blacksmith's Worries",504)
	
	MisBeginTalk("<t>My beloved was kidnapped! I will go save her myself! Damn those Deathsouls! I will rip you to pieces!<n><t>Sorry, forgive me for my outburst. If you seen Elizabeth, tell her do not be afraid for I will save her.<n><t>Even if it cost me my life!")

	MisBeginCondition(NoRecord, 504)
	MisBeginCondition(NoMission, 504)

	MisBeginAction(AddMission, 504)
	MisCancelAction(SystemNotice, "This quest cannot be abandoned")

	MisHelpTalk("<t>I will go to your rescure immediately! Wait for me!")
	MisNeed(MIS_NEED_DESP, "Relay Blacksmith's message to Elizabeth")
	
	MisResultCondition(AlwaysFailure)

-- 铁匠 >> 铁匠的担忧
	DefineMission(505,"Blacksmith's Worries",504,COMPLETE_SHOW )
	
	MisBeginCondition(AlwaysFailure)

	MisResultTalk("<t>Did Mark sent you to me?<n><t>I know...I love him too...Always do...!")
	MisResultCondition(HasMission, 504)
	MisBeginCondition(NoRecord, 504)
	
	MisResultAction(AddExp, 10000, 10000)
	MisResultAction(AddMoney, 25000, 25000)
	MisResultAction(ClearMission, 504)
	MisResultAction(SetRecord, 504)


-- 铁匠 >> 伊丽莎白的定情信物
	DefineMission(506,"Elizabeth's Love Keepsake",505)

	MisBeginTalk("<t>I would like you to pass this necklace to him...Oh no! Where is my necklace?<n><t>Oh dear! I think I have dropped it on the Skeletar Pirate Ship! It is an important keepsake between me and Mark!<n><t>Can you retrieve it back for me please?")

	MisBeginCondition(HasRecord, 504)
	MisBeginCondition(NoMission, 505)
	MisBeginCondition(NoRecord, 505)

	MisBeginAction(AddMission, 505)
	MisBeginAction(AddTrigger, 5051, TE_GETITEM, 2415, 1)
	
	MisNeed(MIS_NEED_ITEM, 2415, 1, 10, 1)
	MisCancelAction(SystemNotice, "This quest cannot be abandoned")

	MisHelpTalk("<t>Have you found the necklace?")

	MisResultTalk("<t>Yes, this is the one. Thank you for getting it back for me.")

	MisResultCondition(HasMission, 505)
	MisResultCondition(HasItem, 2415, 1)
	MisResultCondition(NoRecord,505)

	MisResultAction(AddExp, 250000, 250000)
	MisResultAction(AddMoney, 150000, 150000)
	MisResultAction(ClearMission, 505)
	MisResultAction(TakeItem, 2415,1)
	MisResultAction(SetRecord, 505)

	InitTrigger()
	TriggerCondition(1,IsItem, 2415)
	TriggerAction(1, AddNextFlag, 505, 10, 1)
	RegCurTrigger(5051)


-- 铁匠 >> 定情项链
	DefineMission(507,"Necklace of Love",506)
	
	MisBeginTalk("<t>It is done. I have written my message within this necklace<n><t>Can you help me pass this necklace to Mark? May the Gods protect you!")

	MisBeginCondition(HasRecord, 505)
	MisBeginCondition(NoRecord, 506)
	MisBeginCondition(NoMission, 506)
	MisBeginBagNeed(1)

	MisBeginAction(AddMission, 506)
	MisBeginAction(GiveItem, 2415,1,4)

	MisHelpTalk("<t>May the Goddess bless you")
	MisNeed(MIS_NEED_DESP, "Help Elizabeth pass the Necklace of Love to Blacksmith Mark")

	MisCancelAction(SystemNotice, "This quest cannot be abandoned")

	MisResultCondition(AlwaysFailure)

-- 铁匠 >> 定情项链
	DefineMission(508,"Necklace of Love",506, COMPLETE_SHOW)

	MisBeginCondition(AlwaysFailure)

	MisResultTalk("<t>You found Elizabeth? Let me go save her now,<n><t>Wait, where is our necklace? Let me check")
	MisResultCondition(HasMission, 506)
	MisResultCondition(NoRecord,506)
	MisResultCondition(HasItem, 2415, 1)

	MisResultAction(AddExp, 10000, 10000)
	MisResultAction(AddMoney, 25000, 25000)

	MisResultAction(TakeItem, 2415, 1)
	MisResultAction(ClearMission, 506)
	MisResultAction(SetRecord, 506)

-- 铁匠 >> 铁匠的约定
	DefineMission(509,"Blacksmith's Promise",507)
	
	MisBeginTalk("<t>To save my goddess, we will need a very unique weapon. Are you able to help me with that?<n><t>This weapon only drops from Deathsoul Officer which I believe you are able to deal with easily.")

	MisBeginCondition(HasRecord, 506)
	MisBeginCondition(NoRecord, 507)
	MisBeginCondition(NoMission, 507)

	MisBeginAction(AddMission, 507)
	MisBeginAction(AddTrigger, 5071, TE_GETITEM, 2384, 1)

	MisNeed(MIS_NEED_ITEM, 2384, 1, 10, 1)

	MisCancelAction(SystemNotice, "This quest cannot be abandoned")
	MisHelpTalk("<t>...It will be ready soon. Hmm? You haven't found the unique weapon?")

	MisResultTalk("<t>This should be the weapon that Elizabeth is talking about. Its really special from the way I look at it.")

	MisResultCondition(HasMission, 507)
	MisResultCondition(HasItem, 2384, 1)
	MisResultCondition(NoRecord, 507)

	MisResultAction(TakeItem, 2384, 1)
	MisResultAction(AddExp, 200000, 200000)
	MisResultAction(AddMoney, 100000, 100000)

	MisResultAction(ClearMission, 507)
	MisResultAction(SetRecord, 507)

	InitTrigger()
	TriggerCondition(1, IsItem, 2384)
	TriggerAction(1, AddNextFlag, 507, 10, 1)
	RegCurTrigger(5071)

-- 铁匠 >> 特殊的武器
	DefineMission(573,"Unique Weapon",508)
	
	MisBeginTalk("<t>This weapon seems to lack something, the feeling is not there. It feels strange to wield.<n><t>Sigh...Can you bring to Jack Arrow and let him take a look.")
	
	MisBeginBagNeed(1)
	MisBeginCondition(HasRecord, 507)
	MisBeginCondition(NoRecord, 508)
	MisBeginCondition(NoMission, 508)
	MisBeginBagNeed(1)

	MisBeginAction(AddMission, 508)
	MisBeginAction(GiveItem, 2384, 1,4)

	MisCancelAction(SystemNotice, "This quest cannot be abandoned")

	MisHelpTalk("<t>What did Jack say? You have not go over?")
	MisNeed(MIS_NEED_DESP, "Bring the unique weapon from the Blacksmith to Jack Arrow")

	MisResultCondition(AlwaysFailure)


⌨️ 快捷键说明

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