Hoş Geldin, Ziyaretçi!

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

dsgn kguard
ROLLET remastered
vsupload kguardedgeakademi
cleopatra legacy

vSRO Çözüldü Quest script ile

cikho12

Vsro Editör
.
Katılım
1 May 2019
Mesajlar
196
Alınan Beğeni
199
Ödül Puanları
43
Konum
istanbul
Arkadaşlar Quest script açtığım zaman içi şifreli gibi gözüküyor bunu ben okunucak vaziyette ney ile açabilirim bir program varmıdır ?

1603053193026.png
1603053214641.png
 

xXxGhostSpitiXxX

Vsro Developer Pk2 Editor
Elite
.
Katılım
21 Mar 2019
Mesajlar
586
Çözümler
1
Alınan Beğeni
3,412
Ödül Puanları
93
Konum
en tu cora bb
Arkadaşlar Quest script açtığım zaman içi şifreli gibi gözüküyor bunu ben okunucak vaziyette ney ile açabilirim bir program varmıdır ?

Ekli dosyayı görüntüle 9799
Ekli dosyayı görüntüle 9800




Well, first of all: Sorry for my english, but english isn't my mother-tongue and I just know crappy school english, so I hope you can atleast understand me. I'm sorry about that already
wink.gif


So, I want to share my latest work with you, because I finally figured out how to decompile & re-compile the .sct files wich are located in the "Script" directory of your server. I have also included a basic guide for adding a simple new quest.


.sct files? What's that?
The .sct files are basically just compiled lua script files, but since didn't work for me I have made my own custom decompiler. I have included the completely decompiled lua scripts files, so you don't have to decompile them anymore.


What can I do with those files?
Well, as I already said you can easily add your own custom quests to silkroad.
Here is an example of a basic quest I have made:


What do I need for this?
You will need a working server/client & a bit time.
You will also need (you probably have this already):


and


Download:
(I have also attached it)


I have included decompiled scripts for the server files of vsro v188, vsro v193 and black rogue.

And here is the basic guide:

NOTE:
I'm not going to explain everything, because this would be too much for me
tongue.gif
and as I said already it's only a very basic guide. Just follow me and you'll figure it out by yourself.
I'm using old vsro files (1.188), you are probably using other server files (new vsro, black rogue). This shouldn't be a problem!
You should extract the .rar archive in one folder
wink.gif


In this guide I'll create a very simple quest. You have to kill 20 mangyangs in order to get 7200 exp & 10 global chattings. The quest is available at level 1.

1st step - lua scripts
Ok, first of all you'll have to create the lua script file for your new quest. To do that you create a new lua file in the "Quest" directory. I call it "@SN_QNO_TEST_QUEST.lua", but you can call it however you want I think. (I don't know if the "@" is really necessary but I'll be using it anyway)
Now open the file with any text editor (I'm using notepad++) and enter the following code:
Code:
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'm not going to explain the whole lua code, just a few tips:
- LuaGetQuestID("QNO_TEST_QUEST") must match with the quest name in your database!
- LuaSetStartCodition(2, QSC_QUEST, QSC_LEVEL, 1, 1) describes that the quest with the questId "1" & char level "1" is required to start the
quest
- LuaSetAchievedItem(1, 7200, 0, 0, 1, "ITEM_MALL_GLOBAL_CHATTING", 10) selfexplaining, if you finish the quest you'll get 7200 exp & 10 global chattings

Just look around in other quest files and it'll become clear.

Now save the file and open "QuestList.lua"
Add a new line to the end of the file with the following code:
Code:
LuaInsertQuest(TYPE_ID, "SN_QNO_TEST_QUEST.lua", "QNO_TEST_QUEST")


The second & third parameter should of course match the filename & the function name of your quest!

Now, if you are done with that, execute make_questlist.bat and make_quest.bat. This should create two new files, QuestList.sct and Quest.sct. Copy them to YOURSERVER\Script\VIETNAM or YOURSERVER\Script\THAILAND if you are using black rogue files. (make sure you made a backup of the old files)

2nd step - database
Insert the following lines to the shard database:

_RefQuest
Code:
1 816 QNO_TEST_QUEST 0 <??>???? ?? SN_QNO_TEST_QUEST SN_PAY_QNO_TEST_QUEST xxx SN_PAYCON_QNO_TEST_QUEST SN_NN_QNO_TEST_QUEST SN_NC_QNO_TEST_QUEST
QNO_TEST_QUEST should match your quest name!

_RefQuestReward
Code:
1 QUESTID* QNO_TEST_QUEST 1 1 1 0 0 0 0 0 7200 0 0 0 xxx 0 0 0 0 0 xxx 0 xxx 0 xxx
*ID column of _RefQuest table

_RefQuestRewardItems (only if item reward, in my case the reward will be 10 global chattings)
Code:
1 QUESTID* QNO_TEST_QUEST 0 ITEM_MALL_GLOBAL_CHATTING xxx 0 10 xxx 0 xxx 0 xxx
*ID column of _RefQuest table
NOTE: If you want to reward multiple items then you'll also have to add multiple lines to the table. (of course, you'll have to modify the lua script too)


Ok, now you are done with the database! If you now start your gameserver you'll hopefully see a new quest initialization!


If you cannot see that, or it shows quest initialize[0][questname], then you have obviously did something wrong, hehe.

3rd step - client
You have completely added a new quest now! Wait... but only server sided, you'll have to add the quest in the client too. I'm going to show you how to do that.
Anyways, just follow me, I'm not going to explain everything.

You have to insert a couple of lines. So let's start with the file:
(by the way all files are located at media\server_dep\silkroad\textdata)

questdata.txt
Code:
1 QUESTID* QNO_TEST_QUEST 0 <??>???? ?? SN_QNO_TEST_QUEST SN_PAY_QNO_TEST_QUEST xxx SN_PAYCON_QNO_TEST_QUEST SN_NN_QNO_TEST_QUEST SN_NC_TEST_QUEST
*ID column of _RefQuest table
Here too, match QNO_TEST_QUEST with your quest name!

questcontentsdata.txt
Code:
QNO_TEST_QUEST 0 0 xxx 1 SN_CON_QNO_TEST_QUEST xxx xxx xxx xxx xxx xxx xxx 0 xxx xxx 0
Nothing to say here
tongue.gif


refqusetreward.txt
Code:
QUESTID* QNO_TEST_QUEST 1 1 1 0 0 0 0 0 0 7200 0 0 0 xxx 0 0 0 0 xxx 0 xxx 0 xxx
*ID column of _RefQuest table
Well, basically it's the same as _RefQuestReward table in your database.

refquestrewarditems.txt
Code:
QUESTID* QNO_TEST_QUEST 0 ITEM_MALL_GLOBAL_CHATTING xxx xxx 0 10 0 xxx 0 xxx
*ID column of _RefQuest table
It's the same as _RefQuestRewardItems in your database.
Remember, multiple item rewards = multiple lines!
See the number "10"? This is the amount of global chattings
tongue.gif


Now continue with textdata files...

textquest_otherstring.txt
Code:
1 SN_PAYCON_QNO_TEST_QUEST 0 0 0 0 0 0 <sml2><strong><font color="255,226,74,0">
◈ Mission</font></strong><br>Hunt 20 Mangyangs<br><br><strong><font color="255,226,74,0">
◈ Reward</font></strong><br>Experience 7200 / 10 Global Chattings<br><br><strong><font color="255,226,74,0">
◈ Form</font></strong><br>Available Once<br><br><strong><font color="255,226,74,0">
◈ NPC</font></strong><br>Chulsan the blacksmith of Jangan<br><br><strong><font color="255,226,74,0">
◈ Monster</font></strong><br>Mangyang<br><br><font color="255,44,15,1"><strong>
◈ Scenario</strong><br>Bla some quest description goes here</font></sml2> 0 0 0 0 0
1 SN_NN_QNO_TEST_QUEST 0 0 0 0 0 0 Chulsan, blacksmith of Jangan 0 0 0 0 0 0
1 SN_NC_QNO_TEST_QUEST 0 0 0 0 0 0 Available Once 0 0 0 0 0 0
Here you can write whatever you want. Describe your quest!

textquest_queststring.txt
Code:
1 SN_TALK_QNO_TEST_QUEST_01 0 0 0 0 0 0 Kill 15 mangyangs lols. 0 0 0 0 0 0 0
1 SN_TALK_QNO_TEST_QUEST_02 0 0 0 0 0 0 Good. I knew that you would agree to do this. I'll reward you more than enough, of course. 0 0 0 0 0 0 0
1 SN_TALK_QNO_TEST_QUEST_03 0 0 0 0 0 0 Hmm. I've misjudged you. 0 0 0 0 0 0 0
1 SN_TALK_QNO_TEST_QUEST_04 0 0 0 0 0 0 Please kill a few more mangyangs please. 0 0 0 0 0 0 0
1 SN_TALK_QNO_TEST_QUEST_05 0 0 0 0 0 0 I want to reward you but your inventory is full. Please dispose of some unneccessary items first. 0 0 0 0 0 0 0
1 SN_TALK_QNO_TEST_QUEST_06 0 0 0 0 0 0 Thank you. Now I can sleep well. This is your reward. Take this. 0 0 0 0 0 0 0
1 SN_TALK_QNO_TEST_QUEST_07 0 0 0 0 0 0 The hunting of Mangyangs is completed. Go and report to Chulsan. 0 0 0 0 0 0 0
These are the different tabs in the NPC, write whatever you want.

textquest_speech&name.txt
Code:
1 SN_QNO_TEST_QUEST 0 0 0 0 0 0 Test quest 0 0 0 0 0 0 0
1 SN_PAY_QNO_TEST_QUEST 0 0 0 0 0 0 Test quest 0 0 0 0 0 0 0
1 SN_CON_QNO_TEST_QUEST 0 0 0 0 0 0 Hunt 20 Mangyang (%d) 0 0 0 0 0 0 0
Your quest name and the task.


Done!
So, that's it. As I already told you it's a very basic guide, but I think it's not that hard to add a new quest. Just play around and you'll figure it out.

Did I miss something? Tell me!
Also if you have serious problems with adding a new quest, then ask me too
tongue.gif
 

Ekli dosyalar

  • Silkroad_Scripts.rar
    1 MB · Görüntüleme: 78
AdBlock Detected

Anlıyoruz, reklamlar can sıkıcı!

Elbette, reklam engelleme yazılımı reklamları engellemede harika bir iş çıkarır, ancak aynı zamanda web sitemizin faydalı özelliklerini de engeller. En iyi site deneyimi için lütfen AdBlocker'ınızı devre dışı bırakın.

AdBlock'u Devre Dışı Bıraktım.