Jump to content
Angelix

Create a Quest

Recommended Posts

On 2/4/2017 at 7:14 AM, blazi10 said:

Got this error with Daily Quest

http://screenshot.sh/m1QsTif8T73Kv

 

can you help me?'

its my function NpcState:


function NpcState( character, npcid, id )
   PRINT( "NpcState:character, npcid, NpcMissionList", character, npcid, id )
	if NpcInfoList[id] == nil or NpcInfoList[id].missionlist == nil then
		PRINT( "unable to obtain NPC script notice!ID = ",  id )
		LG( "npc_error", "unable to obtain NPC script notice!ID = ",  id )
		return LUA_FALSE
	end

   return MissionState( character, npcid, NpcInfoList[id].missionlist )
end

 

 

Sorry for taking a long time, but I got around onto looking for a fix for daily and weekly quests and it should now be fixed.

 

Guide has been updated to provide a fix for an error that was preventing from adding daily or weekly quests.

 

The weekly quest fix is now using a workaround for calculating the current week number. The function utilized is from http://lua-users.org/wiki/WeekNumberInYear, although I made some small modifications to it so it can be used properly without providing a lot of user input. Thanks to @Blanquitoh for helping in this small issue by providing the link!

  • Like 2

Share this post


Link to post
Share on other sites

@Angelix I just want to thank you for the very helpful guide. Between referencing your guide, and working with known quests, I was able to play with some variables and conditions to get where I wanted to. I had an idea though when I was working in a Story quest, and remembered that there are monsters that drop items when you are in a quest, essentially quest items, and with that thought, I wondered if you had explored this and had any insight? The quest I'm referring to is "Food for the Navy". It requires 3 items, but you'll notice that two of the items show up in blue text, and only drop when you have the quest. There are more quests that have this same thing, but I couldn't find the tie between the quest, and the iteminfo and how it decided when a character was on the appropriate mission!

 

 

 

Share this post


Link to post
Share on other sites
3 hours ago, Studweiser21 said:

@Angelix I just want to thank you for the very helpful guide. Between referencing your guide, and working with known quests, I was able to play with some variables and conditions to get where I wanted to. I had an idea though when I was working in a Story quest, and remembered that there are monsters that drop items when you are in a quest, essentially quest items, and with that thought, I wondered if you had explored this and had any insight? The quest I'm referring to is "Food for the Navy". It requires 3 items, but you'll notice that two of the items show up in blue text, and only drop when you have the quest. There are more quests that have this same thing, but I couldn't find the tie between the quest, and the iteminfo and how it decided when a character was on the appropriate mission!

 

 

 

It's not decided on ItemInfo.txt, it's decided on CharacterInfo.txt, it has a special column for quest drops and their rates.

 

Share this post


Link to post
Share on other sites

I know that the items are there separate from normal drops, but what links these two together? It seems to me that there has to be something on the CharacterInfo that tells the game, "only players with this mission can get these drops", but I couldn't find the link. 

 

 

Share this post


Link to post
Share on other sites
8 hours ago, ibrahimelmourchidi said:

nice Guid good job 

 

i have aquestion  i hope some one can help me 

 

my question is how to make a quest to give the players IGS crystals as a Prize

You can't by default. You have to modify your GameServer and/or use LuaSQL to update your database and also register a new function onto mission functions.

  • Like 1

Share this post


Link to post
Share on other sites

This guide is nice, at first I had a bit confusion with the Adding then subtract 1. Otherwise all is well thanks for the guide.


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
12 minutes ago, ZidSliverr said:

At the end the code that is generated, where it has to be pasted or in what files to make it functional in NPC X?

 

	DefineMission( XXXX, "Quest Name", #### )

DefineMission = the Quest script

To make an NPC have that quest you can add the function it's calling which is XXXX

AddNpcMission (XXXX) 

This will allow the NPC to have the quest available, you can also add parameters such as lvl requirement etc.

 

  • Thanks 1

Nissan-GT-R.gif

Share this post


Link to post
Share on other sites

QUEST MONSTER KILL:

 

1. The name of the search shows "Unknown search name".
2. When you kill the monster "Sleepy Nail" it is not added to the counter "0/5"
3. I receive the following errors on the screen

-TriggerProc: incorrect function notification or trigger does not have any action notice! ID = 54465

-CCharMission :: Killware: the mission management function [TriggerProcc] could not return!

 

DefineMission( 12000, "Atrapando Caracoles", 12001 )
	
	MisBeginTalk( "<t>Ahooy Pirata!, Esos moluscos an sobrepoblado las bordes de Argent City nesesitamos reducir su numero, aunque el  Cocinero quiere sus capazones! en fin tu solo matalos!" )
	MisBeginCondition(NoMission, 12001)
	MisBeginAction(AddMission, 12001)
	MisBeginAction(AddTrigger, 120011, TE_KILL, 71, 5 )
	MisCancelAction(ClearMission, 12001)
	
	MisNeed(MIS_NEED_KILL, 71, 5, 10, 5)
	
	MisResultTalk( "<t>Menos mal que pudiste con eso sabandija, ahora te dare tu recompenza, ... no tendras algo de Ron?")
	MisHelpTalk( "<t>Estan en las puertas, te digo un secreto? El Gran rey Almeja(Great King Clam) anda cerca Grrrrrrr!.")
	MisResultCondition(HasMission, 12001)
	MisResultCondition(HasFlag, 12001, 14 )
    MisResultAction(TakeItem, 262, 1 )
	MisResultAction(AddExp, 1000, 1000 )
	MisResultAction(AddMoney, 100000, 100000 )
	MisResultAction(ClearMission, 12001 )	
	
	InitTrigger()
	TriggerCondition(1, IsMonster, 71)	
	TriggerAction(1, AddNextFlag, 12001, 10, 5)
	RegCurTrigger(120011)

123.png.095bd10146684355dcab2cd9ab11883a.png

Share this post


Link to post
Share on other sites
On 7/3/2018 at 8:44 PM, ZidSliverr said:

QUEST MONSTER KILL:

 

1. The name of the search shows "Unknown search name".
2. When you kill the monster "Sleepy Nail" it is not added to the counter "0/5"
3. I receive the following errors on the screen

-TriggerProc: incorrect function notification or trigger does not have any action notice! ID = 54465

-CCharMission :: Killware: the mission management function [TriggerProcc] could not return!

 


DefineMission( 12000, "Atrapando Caracoles", 12001 )
	
	MisBeginTalk( "<t>Ahooy Pirata!, Esos moluscos an sobrepoblado las bordes de Argent City nesesitamos reducir su numero, aunque el  Cocinero quiere sus capazones! en fin tu solo matalos!" )
	MisBeginCondition(NoMission, 12001)
	MisBeginAction(AddMission, 12001)
	MisBeginAction(AddTrigger, 120011, TE_KILL, 71, 5 )
	MisCancelAction(ClearMission, 12001)
	
	MisNeed(MIS_NEED_KILL, 71, 5, 10, 5)
	
	MisResultTalk( "<t>Menos mal que pudiste con eso sabandija, ahora te dare tu recompenza, ... no tendras algo de Ron?")
	MisHelpTalk( "<t>Estan en las puertas, te digo un secreto? El Gran rey Almeja(Great King Clam) anda cerca Grrrrrrr!.")
	MisResultCondition(HasMission, 12001)
	MisResultCondition(HasFlag, 12001, 14 )
    MisResultAction(TakeItem, 262, 1 )
	MisResultAction(AddExp, 1000, 1000 )
	MisResultAction(AddMoney, 100000, 100000 )
	MisResultAction(ClearMission, 12001 )	
	
	InitTrigger()
	TriggerCondition(1, IsMonster, 71)	
	TriggerAction(1, AddNextFlag, 12001, 10, 5)
	RegCurTrigger(120011)

123.png.095bd10146684355dcab2cd9ab11883a.png

I'm barely going active again, I don't know if you fixed your issue by now, but I believe your issue has to do with the quest ID being too high.

Creo que tu problema es porque el ID de tu mision es muy alta, intenta poner una diferente pero mas baja, menos de 6 mil.

Share this post


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

@Angelix Hello there <3 

How can I create a Daily quest just like the Winter one ? 

Read the guide, “Custom Quest Part IX” mentions how to do it as a daily quest. 

  • Like 1

Share this post


Link to post
Share on other sites
18 hours ago, Angelix said:

Read the guide, “Custom Quest Part IX” mentions how to do it as a daily quest. 

Great, thank you @Angelix ! I never made a quest but question is, do i have to edit "Day-week-year" stuff or this is how they work? 

 


proxy-image (2).jpg

Share this post


Link to post
Share on other sites
3 hours ago, BugsBunny said:

Great, thank you @Angelix ! I never made a quest but question is, do i have to edit "Day-week-year" stuff or this is how they work? 

 

Would you mind reading the guide?

 

Quote
  • MISSION_TYPE: This can only be two choices (they have to be typed as followed, even with quotation marks):
    • "Daily": Quest only repeatable once a day.
    • "Weekly": Quest only repeatable once a week.

 

  • Haha 1

Share this post


Link to post
Share on other sites

I was reading your guide, very good friend. is there any way for an npc to summon a monster? Obviously meeting certain conditions, I am interested in making an npc of this type.

Share this post


Link to post
Share on other sites
On 3/27/2022 at 10:02 PM, kyleflow said:

Why wont the quest appear inside the NPC i chosed. Can anyone clarify what other setting do I need to do for it to appear ?

Are you sure that all the conditions for starting the quest are met (MisBeginCondition)? Also make sure you put the correct quest ID in the NPC script.


Share this post


Link to post
Share on other sites
6 hours ago, V3ct0r said:

Are you sure that all the conditions for starting the quest are met (MisBeginCondition)? Also make sure you put the correct quest ID in the NPC script.

I did able to do it and make the quest appear in the said npc but somehow when i kill a mobs for the quest, an error appeared and i did read in this post said that the id is too big and need to be smaller. I did change that but somehow it still fail to work. So i'm stuck.

Share this post


Link to post
Share on other sites

anyone help me,
i am having trouble with finishing a quest that i make

it was a simple gather 99 wood quest

i get the error

Quote

"ActionProc:Set story record label failed!"

i followed the format here and also looking at the default quest scripts

it also doesn't remove the quest from the character's quest log

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.


×
×
  • Create New...