Jump to content
Sign in to follow this  
GummyBear

Mission - number of killed monsters

Recommended Posts

Hello,

I tried to create a mission where you must kill a certain number of monsters

The problem is that I can complete the task after killing a one monster every kind instead of 5 as it should be properly..

 

  DefineMission ( 6070 , "Rebirth Quest" , 1401 )
	MisBeginTalk("<t>For rebirth you have to kill the great warriors who are from 5 to 18 Abaddon!")
	MisBeginCondition( NoMission, 1401)
	MisBeginCondition( NoRecord, 1401)
	
	MisBeginAction( AddMission, 1401)
	
	
	MisBeginAction( AddTrigger, 14011, TE_KILL, 974, 5)
	MisBeginAction( AddTrigger, 14012, TE_KILL, 975, 5)
	MisBeginAction( AddTrigger, 14013, TE_KILL, 976, 5)
	MisBeginAction( AddTrigger, 14014, TE_KILL, 977, 5)
	MisBeginAction( AddTrigger, 14015, TE_KILL, 988, 1)

	MisCancelAction(ClearMission, 1401)

	MisNeed(MIS_NEED_KILL, 974, 5, 10, 5)
	MisNeed(MIS_NEED_KILL, 975, 5, 20, 5)
	MisNeed(MIS_NEED_KILL, 976, 5, 30, 5)
	MisNeed(MIS_NEED_KILL, 977, 5, 40, 5)
	MisNeed(MIS_NEED_KILL, 988, 1, 50, 1)


	MisResultTalk("<t>Congratulations!")
	MisHelpTalk("<t>The monsters are from 5 to 18 Abaddon!")
	MisResultCondition( HasMission, 1401)
	MisResultCondition( NoRecord, 1401)
	MisResultCondition( HasFlag, 1401, 10)
	MisResultCondition( HasFlag, 1401, 20)
	MisResultCondition( HasFlag, 1401, 30)
	MisResultCondition( HasFlag, 1401, 40)
	MisResultCondition( HasFlag, 1401, 50)

    MisResultAction( GiveItem, 2235)
	MisResultAction( SetRecord, 1401)
	MisResultAction( ClearMission, 1401)
	
	
	MisPrize (MIS_PRIZE_ITEM, 2235, 1, 4)
    MisPrizeSelAll ()
	MisResultBagNeed(1)

	InitTrigger()
	TriggerCondition( 1, IsMonster, 974 )
	TriggerAction( 1, AddNextFlag, 1401, 10, 5 )
	RegCurTrigger( 14011 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 975 )
	TriggerAction( 1, AddNextFlag, 1401, 20, 5 )
	RegCurTrigger( 14012 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 976 )
	TriggerAction( 1, AddNextFlag, 1401, 30, 5 )
	RegCurTrigger( 14013 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 977 )
	TriggerAction( 1, AddNextFlag, 1401, 40, 5 )
	RegCurTrigger( 14014 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 988 )
	TriggerAction( 1, AddNextFlag, 1401, 50, 1 )
	RegCurTrigger( 14015 )

Thanks in advance for any help

Share this post


Link to post
Share on other sites
2 hours ago, GummyBear said:

Hello,

I tried to create a mission where you must kill a certain number of monsters

The problem is that I can complete the task after killing a one monster every kind instead of 5 as it should be properly..

 


  DefineMission ( 6070 , "Rebirth Quest" , 1401 )
	MisBeginTalk("<t>For rebirth you have to kill the great warriors who are from 5 to 18 Abaddon!")
	MisBeginCondition( NoMission, 1401)
	MisBeginCondition( NoRecord, 1401)
	
	MisBeginAction( AddMission, 1401)
	
	
	MisBeginAction( AddTrigger, 14011, TE_KILL, 974, 5)
	MisBeginAction( AddTrigger, 14012, TE_KILL, 975, 5)
	MisBeginAction( AddTrigger, 14013, TE_KILL, 976, 5)
	MisBeginAction( AddTrigger, 14014, TE_KILL, 977, 5)
	MisBeginAction( AddTrigger, 14015, TE_KILL, 988, 1)

	MisCancelAction(ClearMission, 1401)

	MisNeed(MIS_NEED_KILL, 974, 5, 10, 5)
	MisNeed(MIS_NEED_KILL, 975, 5, 20, 5)
	MisNeed(MIS_NEED_KILL, 976, 5, 30, 5)
	MisNeed(MIS_NEED_KILL, 977, 5, 40, 5)
	MisNeed(MIS_NEED_KILL, 988, 1, 50, 1)


	MisResultTalk("<t>Congratulations!")
	MisHelpTalk("<t>The monsters are from 5 to 18 Abaddon!")
	MisResultCondition( HasMission, 1401)
	MisResultCondition( NoRecord, 1401)
	MisResultCondition( HasFlag, 1401, 10)
	MisResultCondition( HasFlag, 1401, 20)
	MisResultCondition( HasFlag, 1401, 30)
	MisResultCondition( HasFlag, 1401, 40)
	MisResultCondition( HasFlag, 1401, 50)

    MisResultAction( GiveItem, 2235)
	MisResultAction( SetRecord, 1401)
	MisResultAction( ClearMission, 1401)
	
	
	MisPrize (MIS_PRIZE_ITEM, 2235, 1, 4)
    MisPrizeSelAll ()
	MisResultBagNeed(1)

	InitTrigger()
	TriggerCondition( 1, IsMonster, 974 )
	TriggerAction( 1, AddNextFlag, 1401, 10, 5 )
	RegCurTrigger( 14011 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 975 )
	TriggerAction( 1, AddNextFlag, 1401, 20, 5 )
	RegCurTrigger( 14012 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 976 )
	TriggerAction( 1, AddNextFlag, 1401, 30, 5 )
	RegCurTrigger( 14013 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 977 )
	TriggerAction( 1, AddNextFlag, 1401, 40, 5 )
	RegCurTrigger( 14014 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 988 )
	TriggerAction( 1, AddNextFlag, 1401, 50, 1 )
	RegCurTrigger( 14015 )

Thanks in advance for any help

Change this crap out.It's a messy scripts , try to use Story Quest ones (MissionScript07 or 06.lua i don't really remember)

Also try this way if no result came at the end..

Switch Quests Windows and try it then.

Share this post


Link to post
Share on other sites
44 minutes ago, TheSamurai said:

Can anyone reply a legit solution for this please? Im also having this problem. Thanks in advance

 

On 08/08/2016 at 6:28 AM, GummyBear said:

Hello,

I tried to create a mission where you must kill a certain number of monsters

The problem is that I can complete the task after killing a one monster every kind instead of 5 as it should be properly..

 


  DefineMission ( 6070 , "Rebirth Quest" , 1401 )
	MisBeginTalk("<t>For rebirth you have to kill the great warriors who are from 5 to 18 Abaddon!")
	MisBeginCondition( NoMission, 1401)
	MisBeginCondition( NoRecord, 1401)
	
	MisBeginAction( AddMission, 1401)
	
	
	MisBeginAction( AddTrigger, 14011, TE_KILL, 974, 5)
	MisBeginAction( AddTrigger, 14012, TE_KILL, 975, 5)
	MisBeginAction( AddTrigger, 14013, TE_KILL, 976, 5)
	MisBeginAction( AddTrigger, 14014, TE_KILL, 977, 5)
	MisBeginAction( AddTrigger, 14015, TE_KILL, 988, 1)

	MisCancelAction(ClearMission, 1401)

	MisNeed(MIS_NEED_KILL, 974, 5, 10, 5)
	MisNeed(MIS_NEED_KILL, 975, 5, 20, 5)
	MisNeed(MIS_NEED_KILL, 976, 5, 30, 5)
	MisNeed(MIS_NEED_KILL, 977, 5, 40, 5)
	MisNeed(MIS_NEED_KILL, 988, 1, 50, 1)


	MisResultTalk("<t>Congratulations!")
	MisHelpTalk("<t>The monsters are from 5 to 18 Abaddon!")
	MisResultCondition( HasMission, 1401)
	MisResultCondition( NoRecord, 1401)
	MisResultCondition( HasFlag, 1401, 10)
	MisResultCondition( HasFlag, 1401, 20)
	MisResultCondition( HasFlag, 1401, 30)
	MisResultCondition( HasFlag, 1401, 40)
	MisResultCondition( HasFlag, 1401, 50)

    MisResultAction( GiveItem, 2235)
	MisResultAction( SetRecord, 1401)
	MisResultAction( ClearMission, 1401)
	
	
	MisPrize (MIS_PRIZE_ITEM, 2235, 1, 4)
    MisPrizeSelAll ()
	MisResultBagNeed(1)

	InitTrigger()
	TriggerCondition( 1, IsMonster, 974 )
	TriggerAction( 1, AddNextFlag, 1401, 10, 5 )
	RegCurTrigger( 14011 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 975 )
	TriggerAction( 1, AddNextFlag, 1401, 20, 5 )
	RegCurTrigger( 14012 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 976 )
	TriggerAction( 1, AddNextFlag, 1401, 30, 5 )
	RegCurTrigger( 14013 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 977 )
	TriggerAction( 1, AddNextFlag, 1401, 40, 5 )
	RegCurTrigger( 14014 )
	InitTrigger()
	TriggerCondition( 1, IsMonster, 988 )
	TriggerAction( 1, AddNextFlag, 1401, 50, 1 )
	RegCurTrigger( 14015 )

Thanks in advance for any help

 

 

I know that Quests/Missions in ToP coding in general is buggy AF.

Better to rewrite your quest on another template, such as finding the quest closest to yours that requires you to slay enemies, and then change the monster ID and name, etc.

You can then try to make your own, but the thing is that if the trigger or addflag is wrong, it may mess up the whole quest. That's why it's buggy

 

Even I don't know that much about how to do quests cuz i was frustrated and stopped making them after failing a lot :D

It is possible, however, if you learn the flag. I think the maximum flag is 254 or something also. 

I don't know much so I can't fully help. 

 

SHAKO


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites

Change this:

	MisResultCondition( HasFlag, 1401, 10)
	MisResultCondition( HasFlag, 1401, 20)
	MisResultCondition( HasFlag, 1401, 30)
	MisResultCondition( HasFlag, 1401, 40)
	MisResultCondition( HasFlag, 1401, 50)

To this:

	MisResultCondition( HasFlag, 1401, 14)
	MisResultCondition( HasFlag, 1401, 24)
	MisResultCondition( HasFlag, 1401, 34)
	MisResultCondition( HasFlag, 1401, 44)
	MisResultCondition( HasFlag, 1401, 50)

Give me a heads up if it doesn't work.

  • Like 2

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