Register for your free account! | Forgot your password?

You last visited: Today at 07:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Question about custom quest.

Discussion on Question about custom quest. within the SRO PServer Questions & Answers forum part of the SRO Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2020
Posts: 21
Received Thanks: 2
Question about custom quest.

Hello, recently I have been messing around with custom quests, testing how the system works and learning a little bit how to make them, I'm facing a problem with a simple quest that I want to create, I'm 100% sure that the answer is really simple but, for any reason I'm unable to find the solution, I have been looking at other quests, hoping to get a guide or an idea, but none of them are what I'm looking for. Basically, I just want to create a quest where you talk to the npc, get the quest, talk to them again and get the reward. So far I think that I have the idea on how to do it involving 2 npcs, but I would like to do it just with 1. If is not possible, I'll understand.

Thank you so much in advance for any tip, hint or help.

And I'm so sorry again if the solution is to dumb for me to even notice it.
Vaasneht is offline  
Old 03/19/2021, 14:11   #2
 
Judgelemental's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 1,533
Received Thanks: 835
Quote:
Originally Posted by Vaasneht View Post
Hello, recently I have been messing around with custom quests, testing how the system works and learning a little bit how to make them, I'm facing a problem with a simple quest that I want to create, I'm 100% sure that the answer is really simple but, for any reason I'm unable to find the solution, I have been looking at other quests, hoping to get a guide or an idea, but none of them are what I'm looking for. Basically, I just want to create a quest where you talk to the npc, get the quest, talk to them again and get the reward. So far I think that I have the idea on how to do it involving 2 npcs, but I would like to do it just with 1. If is not possible, I'll understand.

Thank you so much in advance for any tip, hint or help.

And I'm so sorry again if the solution is to dumb for me to even notice it.
All I can think of is find a quest that's very similar -usually the chinese beginner ones- (with 2 NPCs), clone it and change the requirements to complete the quest to the same NPC.
Judgelemental is offline  
Old 03/19/2021, 17:33   #3
 
elite*gold: 0
Join Date: Dec 2020
Posts: 21
Received Thanks: 2
Quote:
Originally Posted by Judgelemental View Post
All I can think of is find a quest that's very similar -usually the chinese beginner ones- (with 2 NPCs), clone it and change the requirements to complete the quest to the same NPC.
Thank you so much for your reply @, so this is what I have tried.

First, I create the quest with 2 NPCs, just to be sure that I understood the basics of the lua script. This is the code that I used.
PHP Code:
function QNO_TEST_QUEST()
  
QUESTID LuaGetQuestID("QNO_TEST_QUEST")
  
LuaSetStartCodition(2QSC_QUESTQSC_LEVEL11)
  
QM_CONVERSATION 1
  LuaSetStartMethod
(QM_CONVERSATION2"NPC_CH_SMITH""NPC_CH_POTION")
  
LuaQuestInsertNpc(2"NPC_CH_SMITH""NPC_CH_POTION")
  
LuaInsertMissionOrCompleteNpc("NPC_CH_POTION")
  
LuaSetAchievementLimit(0)
  
LuaSetMissionDataSize(QUESTID1)
  
LuaSetDialLogMissionData(QUESTID0MISSION_TYPE_DIALOG"SN_CON_QNO_TEST_QUEST"1"SN_TALK_QNO_CH_POTION_1_06")
  
InsertQuestMenuStringList("NPC_CH_SMITH"8"BASIC_MENUSTRING_GREETING""SN_NPC_CH_POTION_QS""BASIC_MENUSTRING_REQUEST_ACCEPT_QUEST""SN_TALK_QNO_TEST_QUEST_01""BASIC_MENUSTRING_AT_ACCEPT""SN_TALK_QNO_TEST_QUEST_02""BASIC_MENUSTRING_AT_DENY""SN_TALK_QNO_TEST_QUEST_03""BASIC_MENUSTRING_NOT_ACHIEVED""SN_TALK_QNO_TEST_QUEST_04""BASIC_MENUSTRING_INVENTORY_FULL""SN_TALK_QNO_TEST_QUEST_05""BASIC_MENUSTRING_ACHIEVED""SN_TALK_QNO_TEST_QUEST_06""BASIC_MENUSTRING_ACHIEVED_NOW""SN_TALK_QNO_TEST_QUEST_07")
  
InsertQuestMenuStringList("NPC_CH_POTION"2"BASIC_MENUSTRING_GREETING""SN_NPC_CH_POTION_QS""BASIC_MENUSTRING_ACHIEVED""SN_TALK_QNO_CH_POTION_1_06")
  
LuaSetMissionCompleteNum(0)
  
PAY_ITEM_METHOD_EXACT 1
  LuaSetAchievedItem
(00001"ITEM_MALL_GLOBAL_CHATTING"10)
  
LuaSetAchievedSkillPont(0)
end 
Everything works fine, I start the quest on the blacksmith and then I finish it on the potion merchant to get the reward. Now, as you suggested, I modified the quest to 1 NPC like this.
PHP Code:
function QNO_TEST_QUEST()
  
QUESTID LuaGetQuestID("QNO_TEST_QUEST")
  
LuaSetStartCodition(2QSC_QUESTQSC_LEVEL11)
  
QM_CONVERSATION 1
  LuaSetStartMethod
(QM_CONVERSATION1"NPC_CH_SMITH")
  
LuaQuestInsertNpc(1"NPC_CH_SMITH")
  
LuaInsertMissionOrCompleteNpc("NPC_CH_SMITH")
  
LuaSetAchievementLimit(0)
  
LuaSetMissionDataSize(QUESTID1)
  
LuaSetDialLogMissionData(QUESTID0MISSION_TYPE_DIALOG"SN_CON_QNO_TEST_QUEST"1"SN_TALK_QNO_TEST_QUEST_06")
  
InsertQuestMenuStringList("NPC_CH_SMITH"8"BASIC_MENUSTRING_GREETING""SN_NPC_CH_POTION_QS""BASIC_MENUSTRING_REQUEST_ACCEPT_QUEST""SN_TALK_QNO_TEST_QUEST_01""BASIC_MENUSTRING_AT_ACCEPT""SN_TALK_QNO_TEST_QUEST_02""BASIC_MENUSTRING_AT_DENY""SN_TALK_QNO_TEST_QUEST_03""BASIC_MENUSTRING_NOT_ACHIEVED""SN_TALK_QNO_TEST_QUEST_04""BASIC_MENUSTRING_INVENTORY_FULL""SN_TALK_QNO_TEST_QUEST_05""BASIC_MENUSTRING_ACHIEVED""SN_TALK_QNO_TEST_QUEST_06""BASIC_MENUSTRING_ACHIEVED_NOW""SN_TALK_QNO_TEST_QUEST_07")
  
LuaSetMissionCompleteNum(0)
  
PAY_ITEM_METHOD_EXACT 1
  LuaSetAchievedItem
(00001"ITEM_MALL_GLOBAL_CHATTING"10)
  
LuaSetAchievedSkillPont(0)
end 
I can get the quest form the blacksmith, but when I try to return it, the NPC use the BASIC_MENUSTRING_NOT_ACHIEVED text, it doesn't recognize the quest as completed after I took it.

Searching on the sro-r lua script quests, I fond the accessories quest, and they're using this code on their function:
PHP Code:
LuaSetAutoComplete(QUESTID1
I thought that code will finish the quest automatically, but when I insert it on my function, the quest just doesn't shows up on the NPC, no matter where I place the code, it doesn't show the quest.

I think that I need an statement, that lets the game know that after I took that quest, it should be finished. Or maybe, I have to create 2 separate quests with the same NPC, but that doesn't seems logic to me.

P.D: I'm using the test quest that is showed on the lua script release post.

I'll keep trying more stuffs, if I find anything, I'll update the post.
Vaasneht is offline  
Reply


Similar Threads Similar Threads
Compile all quest without quest's files list // Kompilieren Sie alle Quest ohne Quest
07/17/2011 - Metin2 PServer Guides & Strategies - 3 Replies
ENGLISH Hello dear community, this is a very simple guide but at the same time useful. How to compile ALL quest in the folder "quest" without the files list in the file "locale_list"? Easy! Open the file "make" and replace the content of the file with this: for f in *.quest; do ./qc $f; done Oki. Now set the 0777 permission to the file. Finally open a SSH client and sign in. Write the command: cd /game_file_folder



All times are GMT +1. The time now is 07:07.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.