just make LuaSetMissionData to MISSION_TYPE_DELIVER_ITEM and setup the items that need to complete the Quest
Printable View
just make LuaSetMissionData to MISSION_TYPE_DELIVER_ITEM and setup the items that need to complete the Quest
woooo ur the best bro let me try thx
- - - Updated - - -
ummm what about every thing is 0
how to solve it from media ?
- - - Updated - - -
the quest Doesn`t appear at the npc !!
Quote:
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_HORSE")
LuaInsertMissionOrCompleteNpc("NPC_CH_HORSE")
LuaQuestInsertNpc(1, "NPC_CH_HORSE")
LuaSetAchievementLimit(1)
LuaSetMissionDataSize(QUESTID, 1)
LuaSetMissionData_EX(QUESTID, 0, MISSION_TYPE_DELIVER_ITEM, "SN_CON_QNO_TEST_QUEST", 1, "ITEM_CH_BOW_11_SET_A_RARE", 0, 5, 0, 1)
InsertQuestMenuStringList("NPC_CH_HORSE", 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_CH_BOW_11_SET_B_RARE", 1)
LuaSetAchievedSkillPont(0)
end
Even if this thread is old, just a copy and paste of e1itep\/pers. A fully copy and paste, without his "sorry for my bad english" part ;)
At least write down the credits, buddy.
Hi guys i have old vsro files i make all gameserver run and register quest perfect, but...
i enter to game and npc no sayme nothing! no have letters :S where is the error? any people can help me please :S
Thanks alot.
how i can make quest 1 time per day..
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
@naaxt420
Your strings are fine, I think your problem is that your text editor is using the Unix Format for your EOL settings. You should keep the original sro file settings on your media's .txt files (UCS-2 Little Endian under Windows Format) in order to avoid anoying problems like the one you have.
For example, if you are using Notepad++ you can go to (View -> Show Simbol -> Show All Characters) and you can start to see some simbols at every End Of Line of your .txt
For your lines, you should see the Unix EOL format ("LF")
For the rest of the lines, you should see the Windows EOL format ("CR LF")
So you have to convert your EOL format into Windows EOL format.
On Notepad++, just go to (Edit -> EOL Conversion -> Convert to Windows Format) to fix your EOL's
And that is all, if you success fixing your EOL your strings will appear ingame.
-- Update
Take care when converting the EOL of (textuisystem.txt). Your launcher wont start if you change all the EOL of the file. When working with the (textuisystem.txt) I suggest you to edit line by line.
With some help i figured out the CRLF at the end of the lines.
It's fixed now.
Got any ideas why, at the end of the quest when i should receive the reward there are no "squares" showing my items, but, after i click to receive the items i do receive it.
It's just a blank place where there should be the squared that holds the items.
Thank you for your reply valcro.
I never had a problem like that, maybe you forgot to add the item reward in your Media or at the Lua Script?
Here you got an example of a quest that gives you a D1 Shield SUN as reward:
Quest.sct
DB -> RefQuestRewardItemCode:function QNO_TO_SHIELDBORN_1()
QUESTID = LuaGetQuestID("QNO_TO_SHIELDBORN_1")
LuaSetStartCodition(2, QSC_QUEST, QSC_LEVEL, 1, 1)
QM_CONVERSATION = 1
LuaSetStartMethod(QM_CONVERSATION, 1, "NPC_SHIELDBORN")
LuaInsertMissionOrCompleteNpc("NPC_SHIELDBORN")
LuaQuestInsertNpc(1, "NPC_SHIELDBORN")
LuaSetAchievementLimit(1)
LuaSetMissionDataSize(QUESTID, 1)
LuaSetMissionData_EX(QUESTID, 0, MISSION_TYPE_KILL_MONSTER, "SN_CON_QNO_TO_SHIELDBORN_1", 1, "MOB_CH_MANGNYANG", 0, 30, 0, 1)
InsertQuestMenuStringList("NPC_SHIELDBORN", 8, "BASIC_MENUSTRING_GREETING", "SN_NPC_CH_POTION_QS", "BASIC_MENUSTRING_REQUEST_ACCEPT_QUEST", "SN_TALK_QNO_TO_SHIELDBORN_1_01", "BASIC_MENUSTRING_AT_ACCEPT", "SN_TALK_QNO_TO_SHIELDBORN_1_02", "BASIC_MENUSTRING_AT_DENY", "SN_TALK_QNO_TO_SHIELDBORN_1_03", "BASIC_MENUSTRING_NOT_ACHIEVED", "SN_TALK_QNO_TO_SHIELDBORN_1_04", "BASIC_MENUSTRING_INVENTORY_FULL", "SN_TALK_QNO_TO_SHIELDBORN_1_05", "BASIC_MENUSTRING_ACHIEVED", "SN_TALK_QNO_TO_SHIELDBORN_1_06", "BASIC_MENUSTRING_ACHIEVED_NOW", "SN_TALK_QNO_TO_SHIELDBORN_1_07")
LuaSetMissionCompleteNum(0)
PAY_ITEM_METHOD_EXACT = 1
LuaSetAchievedItem(1, 375, 0, 0, 1, "ITEM_CH_SHIELD_01_C_RARE", 1)
LuaSetAchievedSkillPont(1500)
end
MEDIA -> refquestrewarditems.txtCode:1 1042 QNO_TO_SHIELDBORN_1 0 ITEM_CH_SHIELD_01_C_RARE xxx 0 1 xxx 0 xxx 0 xxx
Code:1042 QNO_TO_SHIELDBORN_1 0 ITEM_CH_SHIELD_01_C_RARE xxx xxx 0 1 0 xxx 0 xxx
Thank you for your reply valcro.
Now, i have another problem it seems that i cannot get the reward from this quests no matter what i do in the code.
The code, now a little bit messed up cuz i tried everything i found in the files to fix it somehow looks like this:
Everything is fine in the database / client files.PHP Code:function QNO_LV_WEAPON_CH_1()
QUESTID = LuaGetQuestID("QNO_LV_WEAPON_CH_1")
LuaSetStartCodition(1, QSC_LEVEL, 1)
QM_CONVERSATION = 1
LuaSetStartMethod(QM_CONVERSATION, 3, "NPC_LEVEL_SUPPLIES_GOODS_CH", "NPC_LEVEL_SUPPLIES_GOODS_WC", "NPC_LEVEL_SUPPLIES_GOODS_KT")
LuaQuestInsertNpc(3, "NPC_LEVEL_SUPPLIES_GOODS_CH", "NPC_LEVEL_SUPPLIES_GOODS_WC" , "NPC_LEVEL_SUPPLIES_GOODS_KT")
LuaInsertMissionCompleteNpcList(3, "NPC_LEVEL_SUPPLIES_GOODS_CH", "NPC_LEVEL_SUPPLIES_GOODS_WC", "NPC_LEVEL_SUPPLIES_GOODS_KT")
LuaSetAchievementLimit(1)
LuaSetDivideType(5)
LuaSetMissionDataSize(QUESTID, 1)
LuaSetDialLogMissionData(QUESTID, 0, MISSION_TYPE_DIALOG, "SN_CON_QNO_LV_WEAPON_CH_1_1")
InsertQuestMenuStringList("NPC_LEVEL_SUPPLIES_GOODS_CH", 3, "BASIC_MENUSTRING_ACHIEVED_NOW", "SN_TALK_QNO_LV_WEAPON_CH_1_05", "BASIC_MENUSTRING_INVENTORY_FULL", "SN_TALK_QNO_LV_WEAPON_CH_1_04", "BASIC_MENUSTRING_ACHIEVED", "SN_TALK_QNO_LV_WEAPON_CH_1_03")
InsertQuestMenuStringList("NPC_LEVEL_SUPPLIES_GOODS_WC", 3, "BASIC_MENUSTRING_ACHIEVED_NOW", "SN_TALK_QNO_LV_WEAPON_CH_1_05", "BASIC_MENUSTRING_INVENTORY_FULL", "SN_TALK_QNO_LV_WEAPON_CH_1_04", "BASIC_MENUSTRING_ACHIEVED", "SN_TALK_QNO_LV_WEAPON_CH_1_03")
InsertQuestMenuStringList("NPC_LEVEL_SUPPLIES_GOODS_KT", 3, "BASIC_MENUSTRING_ACHIEVED_NOW", "SN_TALK_QNO_LV_WEAPON_CH_1_05", "BASIC_MENUSTRING_INVENTORY_FULL", "SN_TALK_QNO_LV_WEAPON_CH_1_04", "BASIC_MENUSTRING_ACHIEVED", "SN_TALK_QNO_LV_WEAPON_CH_1_03")
LuaSetMissionCompleteNum(0)
end
The unknown error is nowhere to find.
http://i.imgur.com/G0o6hgD.jpg
This quest is added in DB to start at lvl 1 ( when u create a new char ).
Is it wrong because it's set as a Dialog quest ? Is there any other type of quest for this ... ?