Junior Spellweaver
- Joined
- Oct 31, 2013
- Messages
- 122
- Reaction score
- 46
I searched on forum to see if this was answered before, I found 2 threads that ask for help on how to do it:
http://forum.ragezone.com/f400/help-please-889682/#post7317425
http://forum.ragezone.com/f400/drop-item-reward-quest-883589/
none of them got an accuracy answer and because those threads are from 2012 and @xonote request me for help on this in a PM, I decided to make a new thread instead of revive one of those threads.
the request is as follow:
Hii.. Eliana,
...... I want to edit main quest reward but, I dont know where and what I suppose to do. Can you help me?
Thank you before,
So if we talk about Quest, we have TUTORIAL,MAIN, and SCROLL quests.
Changing rewards for Scroll ones is as simple as editing/adding on the Pay tab of the HTScrollQuestSystem.xml. If you are adding new lines on the Pay tab, then you have to put the iNo of the Pay you created in the iPay column of the QuestMain tab in the step where you want the reward to be given.
Changing TUTORIAL,MAIN quest rewards unfortunately is not that simple, because the rewards for those quest are hard coded in the ZoneSrv.exe, meaning that you do not have a xml file to edit, you must edit the ZoneSrv.exe, so in this tuto I will explain how I found in the ZoneSrv.exe the lines that needs to be change. As I always say: my offsets probably are not the same as yours, so dont change yours if they do not contains same opcode than mine, if the opcode is not the same, then just find your own offset same way I will show I did to find mines. Of course I will not example changing all the quest rewards because they are a lot, I will just example 1 of them.
Things you need to know before doing the search:
1- which is the NPC ID who gives the reward
2- the reward(s) ID and the amount
Lets explain some basic things for understanding ASM opcodes
- when a method require parameters/arguments ASM opcodes will look this way:
PUSH some
CALL method address
so if there is only 1 PUSH before the CALL means that method only have 1 argument/parameter
in high level code that is same as:
public void methodName(object arg1)
{
code here of what this method do......
}
if there are more PUSH then means that the method have more args, for example with 2 PUSH the method will be like this:
public void methodName(object arg1,object arg2)
{
code here of what this method do......
}
So, when server gives the rewards for a quest, it needs :
if the reward is an item:
arg1= the user connection ID
arg2= the item ID
arg3= the amount of that item that will be given
(then we need at least 3 PUSH before the CALL)
if it is money (ruphias):
arg1= the user connection ID
arg2= the amount of rups.
(then we need at least 2 PUSH before the CALL)
if it is pranas (exp)
arg1= the amount of pranas
So lets put in action the search with the quest #32 = Test of Destruction
what I know about the quest:
1- I need to talk with Monk Iddungddashu in Jina, ID for Monk Iddungddashu=1128 in Hex=468
2- Monk Iddungddashu will give me the item Test Proof, ID=8070, Hex= 1F86, amount 1.
3- and on the step 5, server will remove the items 8063,8064,8065 (1F7F,1F80,1F81) and will give me a Broken Sword, ID=8066, Hex=1F82, amount 1.
Because the method on the server controls the quest with a switch on the NPC ID and then another switch on the quest step, my first try on the search will be with "Case 468 of switch" and repeat the search to see if there is more than 1 offset that contains that text, after ensure that there is only 1 offset with that search, then I will go down on the code to find the offset for the next switch, and because I know that the reward is on the step 5 I will look on the code to find some like "Case 5 of switch ADDRESS", moving down on the code from that point I will search for PUSH 1F82 and that will give you the offset of the reward. For those who didn't read my post: http://forum.ragezone.com/f786/advance-edit-accounts-leaving-game-1122349/#post8734531 read it so you will know what i do to dump a module to a txt file to simplify the search, in that post is a video where I dump htlauncher, in this case you need to dump ZoneSrv.exe not HTLauncher.exe, so open Ollydbg, then File/Open and search for your ZoneSrv.exe, after is opened be sure to change View to the Module ZONESRV2, then make the dump.
I always say that changing things on the .exe files w/o knowing if the change may cause problems, is not a good practice, in this case (quests) changing a reward for another one, may cause a problem if there is another quest that require that Item. for example in this specific quest, the Broken Sword is required in another quest, so if you decide to change a reward for another one be sure to replace it too on the offset that removes it from your inventory.
For those that, prefer a visual way to learn things instead of reading, I will record a video showing the search I explained here.
In advance sorry for my English audio, my native language is Spanish so dont be rude with me on that :blush:
http://forum.ragezone.com/f400/help-please-889682/#post7317425
http://forum.ragezone.com/f400/drop-item-reward-quest-883589/
none of them got an accuracy answer and because those threads are from 2012 and @xonote request me for help on this in a PM, I decided to make a new thread instead of revive one of those threads.
the request is as follow:
Hii.. Eliana,
...... I want to edit main quest reward but, I dont know where and what I suppose to do. Can you help me?
Thank you before,
So if we talk about Quest, we have TUTORIAL,MAIN, and SCROLL quests.
Changing rewards for Scroll ones is as simple as editing/adding on the Pay tab of the HTScrollQuestSystem.xml. If you are adding new lines on the Pay tab, then you have to put the iNo of the Pay you created in the iPay column of the QuestMain tab in the step where you want the reward to be given.
Changing TUTORIAL,MAIN quest rewards unfortunately is not that simple, because the rewards for those quest are hard coded in the ZoneSrv.exe, meaning that you do not have a xml file to edit, you must edit the ZoneSrv.exe, so in this tuto I will explain how I found in the ZoneSrv.exe the lines that needs to be change. As I always say: my offsets probably are not the same as yours, so dont change yours if they do not contains same opcode than mine, if the opcode is not the same, then just find your own offset same way I will show I did to find mines. Of course I will not example changing all the quest rewards because they are a lot, I will just example 1 of them.
Things you need to know before doing the search:
1- which is the NPC ID who gives the reward
2- the reward(s) ID and the amount
Lets explain some basic things for understanding ASM opcodes
- when a method require parameters/arguments ASM opcodes will look this way:
PUSH some
CALL method address
so if there is only 1 PUSH before the CALL means that method only have 1 argument/parameter
in high level code that is same as:
public void methodName(object arg1)
{
code here of what this method do......
}
if there are more PUSH then means that the method have more args, for example with 2 PUSH the method will be like this:
public void methodName(object arg1,object arg2)
{
code here of what this method do......
}
So, when server gives the rewards for a quest, it needs :
if the reward is an item:
arg1= the user connection ID
arg2= the item ID
arg3= the amount of that item that will be given
(then we need at least 3 PUSH before the CALL)
if it is money (ruphias):
arg1= the user connection ID
arg2= the amount of rups.
(then we need at least 2 PUSH before the CALL)
if it is pranas (exp)
arg1= the amount of pranas
So lets put in action the search with the quest #32 = Test of Destruction
what I know about the quest:
1- I need to talk with Monk Iddungddashu in Jina, ID for Monk Iddungddashu=1128 in Hex=468
2- Monk Iddungddashu will give me the item Test Proof, ID=8070, Hex= 1F86, amount 1.
3- and on the step 5, server will remove the items 8063,8064,8065 (1F7F,1F80,1F81) and will give me a Broken Sword, ID=8066, Hex=1F82, amount 1.
Because the method on the server controls the quest with a switch on the NPC ID and then another switch on the quest step, my first try on the search will be with "Case 468 of switch" and repeat the search to see if there is more than 1 offset that contains that text, after ensure that there is only 1 offset with that search, then I will go down on the code to find the offset for the next switch, and because I know that the reward is on the step 5 I will look on the code to find some like "Case 5 of switch ADDRESS", moving down on the code from that point I will search for PUSH 1F82 and that will give you the offset of the reward. For those who didn't read my post: http://forum.ragezone.com/f786/advance-edit-accounts-leaving-game-1122349/#post8734531 read it so you will know what i do to dump a module to a txt file to simplify the search, in that post is a video where I dump htlauncher, in this case you need to dump ZoneSrv.exe not HTLauncher.exe, so open Ollydbg, then File/Open and search for your ZoneSrv.exe, after is opened be sure to change View to the Module ZONESRV2, then make the dump.
I always say that changing things on the .exe files w/o knowing if the change may cause problems, is not a good practice, in this case (quests) changing a reward for another one, may cause a problem if there is another quest that require that Item. for example in this specific quest, the Broken Sword is required in another quest, so if you decide to change a reward for another one be sure to replace it too on the offset that removes it from your inventory.
For those that, prefer a visual way to learn things instead of reading, I will record a video showing the search I explained here.
In advance sorry for my English audio, my native language is Spanish so dont be rude with me on that :blush:
Last edited: