LuaSetDivideType(5)
LuaSetRealTime()
set those lines into your .lua text that's it
Printable View
function QNO_TEST_QUEST() -- you should match this with your filename!
QUESTID = LuaGetQuestID("QNO_TEST_QUEST") -- IMPORTANT: must match with the name in your database
LuaSetStartCodition(2, QSC_QUEST, QSC_LEVEL, 1, 1)
QM_CONVERSATION = 1
LuaSetStartMethod(QM_CONVERSATION, 1, "NPC_CH_SMITH")
LuaInsertMissionOrCompleteNpc("NPC_CH_SMITH")
LuaQuestInsertNpc(1, "NPC_CH_SMITH")
LuaSetAchievementLimit(1)
LuaSetMissionDataSize(QUESTID, 1)
LuaSetMissionData_EX(QUESTID, 0, MISSION_TYPE_KILL_MONSTER, "SN_CON_QNO_TEST_QUEST", 1, "MOB_CH_MANGNYANG", 0, 20, 0, 1)
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(1, 7200, 0, 0, 1, "ITEM_MALL_GLOBAL_CHATTING", 10)
LuaSetAchievedSkillPont(0)
end
I have a question how i can set on that .lua script Unlimited times to be maked. I want to make the Quest Unlimited times if its possible i will grateful for any help.
Edit : Nvm I already find the way. Thats too easy :D
Anyone figured out why the quest doesn't appear at the NPC ?
Tried to edit multiple values, re-added it under other ID and it's still not working.
Also, i do not get any error in Game Server but i can't see the quest loading ...
PS: The quest ID is 1046 ( 4 digits ), can't edit the ID collumn because identity is set to true.
Any ideas ?
Because you ain't recompiling the scripts. Take your attention to the "Quest", "Event" folder and the following files at your server directional "Script/VIETNAM":
define.sct, Event.sct, EventList.sct, Quest.sct and QuestList.sct.
You are definitly not refreshing those files, when you are pointing that your Gameserver won't list your newly created quest.
@blapanda - Thank you, figured it out.
The test quest worked, did everything step-by-step.
But, when i made my own, the game server fails to load all the @SN_QNO_TRADE_HUNTER_A_%%%.lua quests plus, something strange happens ...
It reads my new quest @SN_QNO_TEST_QUEST_02 as @SN_QNO_TEST_QUEST ( the first one i added ) althrough i removed any refference to it in the database + updated the files from Script with the packed new ones.
Also, i have tried to use both the vSro and vSro new files, since the vSro new files doesn't have those trade hunter quests, yea, switched back to the vSro files and it's still the same.
I made a .rar archive with the Quest file, DB and Client files ( lines in some cases ) that i have modified/added. Also, in some files there is just the line with [ID] but, ofc, when i added it to the client/db i replaced the [ID] with the database ID. In this case the ID was 1047.
If anyone has a min to take a look over the files and tell me what i'm doing wrong i will appreciate it, thank you for your time :P
Attachment 148302
the name of quest file is wrong
you make file name @SN_QNO_TEST_QUEST_02.lua
and make quest name in script @SN_QNO_TEST_02
you must make file name same quest name in script
after that before make patch
you must make new line in questlist with script file name an quest name .
i hope you can make it
Forgot the line, it looks like this:
LuaInsertQuest(TYPE_ID, "SN_QNO_TEST_QUEST_02.lua", "QNO_TEST_QUEST_02")
I will try it again now and leave a reply with the progress.
Thank you for your response.
Edit[1]: It seems like working, i did a small mistake in the code so i will edit it, compile and test it to see what's wrong.
The NPC doesn't have the quest but it may be because of my mistake, hmmh i'll see :D.
But, it's kind of good because the game server loads the quest.
Edit[2]: Ok, so the NPC loads the quest but it's a mess. I can see the quest name 'Test Quest 2' but, i can only see the the first quest message and the accept button, the rest is just ... a mess. It should be a gather quest set to get 25 HP Potion Lv. 3 but there is no text that says HP Potion x/25, or any other text displayed. And in the right, where you have the quest progress there is just an [OK] without any text or anything else.
For the moment i will need to look over it and try to understand how to it works and how it connects to every file and parameter.
I will come back with questions when i will try it again from 0.
If you have any tips for me i would really appreciate it :closedeyes:
Thank you for your support and time :thumbup1:
does anyone know how to make a collecting quest ?
Here you have an example of gathering ( collecting quest ):
In order to get a template for each type of quest just look over the quests in the "Quest" folder.Code:function QNO_SD_RE_025()
QUESTID = LuaGetQuestID("QNO_SD_RE_025")
LuaSetStartCodition(2, QSC_QUEST, QSC_LEVEL, 107, 107)
QM_CONVERSATION = 1
LuaSetStartMethod(QM_CONVERSATION, 1, "NPC_SD_M_AREA_SPECIAL")
LuaInsertMissionOrCompleteNpc("NPC_SD_M_AREA_SPECIAL")
LuaQuestInsertNpc(1, "NPC_SD_M_AREA_SPECIAL")
LuaInsertDependancyQuests(1, "QNO_SD_RE_024")
LuaSetAchievementLimit(1)
LuaSetMissionDataSize(QUESTID, 2)
LuaSetCollectionItemMissionData(QUESTID, 0, MISSION_TYPE_GATHER_ITEM_FROM_MONSTER, "SN_CON_QNO_SD_RE_025_1", 1, "NPC_SD_M_AREA_SPECIAL", 1, 50, "ITEM_QNO_SD_RE_025_1", "MOB_SD_COELACANTH", 100)
LuaSetCollectionItemMissionData(QUESTID, 1, MISSION_TYPE_GATHER_ITEM_FROM_MONSTER, "SN_CON_QNO_SD_RE_025_2", 1, "NPC_SD_M_AREA_SPECIAL", 1, 50, "ITEM_QNO_SD_RE_025_2", "MOB_SD_ACHNISH", 100)
InsertQuestMenuStringList("NPC_SD_M_AREA_SPECIAL", 7, "BASIC_MENUSTRING_GREETING", "SN_NPC_SD_M_AREA_SPECIAL_QS", "BASIC_MENUSTRING_REQUEST_ACCEPT_QUEST", "SN_TALK_QNO_SD_RE_025_01", "BASIC_MENUSTRING_AT_ACCEPT", "SN_TALK_QNO_SD_RE_025_02", "BASIC_MENUSTRING_AT_DENY", "SN_TALK_QNO_SD_RE_025_03", "BASIC_MENUSTRING_NOT_ACHIEVED", "SN_TALK_QNO_SD_RE_025_04", "BASIC_MENUSTRING_ACHIEVED", "SN_TALK_QNO_SD_RE_025_05", "BASIC_MENUSTRING_ACHIEVED_NOW", "SN_TALK_QNO_SD_RE_025_06")
LuaSetMissionCompleteNum(0)
PAY_ITEM_METHOD_EXACT = 1
LuaSetAchievedItem(0, 11485137, 0, 4987, 0, 0)
LuaSetAchievedSkillPont(1800)
end
So i managed to make a quest work as it should but something still bugs me ...
The part of .lua quest file related to text string looks like this:
textquest_queststring.txt part looks like thisCode:InsertQuestMenuStringList("NPC_CH_SMITH", 8, "BASIC_MENUSTRING_GREETING", "SN_NPC_CH_SMITH_QS", "BASIC_MENUSTRING_REQUEST_ACCEPT_QUEST", "SN_TALK_QNO_DAILY_TEST_1_01", "BASIC_MENUSTRING_AT_ACCEPT", "SN_TALK_QNO_DAILY_TEST_1_02", "BASIC_MENUSTRING_AT_DENY", "SN_TALK_QNO_DAILY_TEST_1_03", "BASIC_MENUSTRING_NOT_ACHIEVED", "SN_TALK_QNO_DAILY_TEST_1_04", "BASIC_MENUSTRING_ACHIEVED", "SN_TALK_QNO_DAILY_TEST_1_05", "BASIC_MENUSTRING_ACHIEVED_NOW", "SN_TALK_QNO_DAILY_TEST_1_06", "BASIC_MENUSTRING_COUNT_LIMIT", "SN_TALK_QNO_DAILY_TEST_1_07")
So, everything else works as it should but this part of the Quest text string, the message that should be in the quest description, etc, etc. it doesn't show up.Code:1 SN_TALK_QNO_DAILY_TEST_1_01 0 0 0 0 0 0 Basic accept quest. 0 0 0 0 0 0 0
1 SN_TALK_QNO_DAILY_TEST_1_02 0 0 0 0 0 0 At accept quest. 0 0 0 0 0 0 0
1 SN_TALK_QNO_DAILY_TEST_1_03 0 0 0 0 0 0 At deny quest. 0 0 0 0 0 0 0
1 SN_TALK_QNO_DAILY_TEST_1_04 0 0 0 0 0 0 Not achieved. 0 0 0 0 0 0 0
1 SN_TALK_QNO_DAILY_TEST_1_05 0 0 0 0 0 0 Achieved finished quest. 0 0 0 0 0 0 0
1 SN_TALK_QNO_DAILY_TEST_1_06 0 0 0 0 0 0 Achieved now quest. 0 0 0 0 0 0 0
1 SN_TALK_QNO_DAILY_TEST_1_07 0 0 0 0 0 0 Count limit quest. 0 0 0 0 0 0 0
The accept, deny, ok, cancel buttons appear, there are no 0's also there are no errors.
When you press Q, the quest shows us perfectly, the count works, the title and so on.
Anyone got any idea how can i make this part of text string work ? Or, what i'm doing wrong ? O.o
any one can make an example for quest 1 time per day
only .lua script .
function QNO_FW_BA2_008()
QUESTID = LuaGetQuestID("QNO_FW_BA2_008")
LuaSetStartCodition(2, QSC_QUEST, QSC_LEVEL, 100, 100)
QM_CONVERSATION = 1
LuaSetStartMethod(QM_CONVERSATION, 1, "NPC_QUEST3")
LuaInsertMissionOrCompleteNpc("NPC_QUEST3")
LuaQuestInsertNpc(1, "NPC_QUEST3")
LuaSetAchievementLimit(1)
LuaSetDivideType(5)
LuaSetRealTime()
LuaSetMissionDataSize(QUESTID, 1)
LuaSetMissionData_EX(QUESTID, 0, MISSION_TYPE_KILL_MONSTER, "SN_CON_QNO_FW_BA2_008_1", 4, "MOB_ARABIA_GIANT_DEMON", "MOB_ARABIA_GIANT_DEMON", "MOB_ARABIA_THIEF_BOSS", "MOB_ARABIA_THIEF_BOSS", 0, 1, 0, 1)
InsertQuestMenuStringList("NPC_QUEST3", 8, "BASIC_MENUSTRING_GREETING", "SN_NPC_KT_SOLDIER_WE2_QS", "BASIC_MENUSTRING_REQUEST_ACCEPT_QUEST", "SN_TALK_QNO_FW_BA2_008_01", "BASIC_MENUSTRING_AT_ACCEPT", "SN_TALK_QNO_FW_BA2_008_02", "BASIC_MENUSTRING_AT_DENY", "SN_TALK_QNO_FW_BA2_008_03", "BASIC_MENUSTRING_NOT_ACHIEVED", "SN_TALK_QNO_FW_BA2_008_04", "BASIC_MENUSTRING_ACHIEVED", "SN_TALK_QNO_FW_BA2_008_06", "BASIC_MENUSTRING_ACHIEVED_NOW", "SN_TALK_QNO_FW_BA2_008_07", "BASIC_MENUSTRING_COUNT_LIMIT", "SN_TALK_QNO_FW_BA2_008_05")
LuaSetMissionCompleteNum(0)
end
thank you .- i test it and working perfect