Jump to content

Search the Community

Showing results for tags 'Guide'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Bulletin Centre
    • Community News
    • Repository News
    • Ragnarok News
  • Hercules Development Centre
    • Development Discussion
    • Suggestions
    • Development Centre Archives
  • Support & Releases
    • General Server Support
    • Database
    • Scripting
    • Source
    • Plugin
    • Client-Side
    • Graphic Enhancements
    • Other Support & Releases
  • Hercules Community
    • General Discussion
    • Projects
    • Employment
    • Server Advertisement
    • Arts & Writings
    • Off Topic
  • 3CeAM Centre
    • News and Development
    • Community
  • International Communities
    • Filipino Community
    • Portuguese Community
    • Spanish Community
    • Other Communities

Categories

  • Client Resources
  • Graphic Resources
    • Sprites & Palettes
    • Maps & Textures
    • Other Graphics
  • Server Resources
    • Server Managers / Editors Releases
    • Script Releases
    • Source Modifications
    • Plugins
    • Pre-Compiled Server
  • Web Resources

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Discord


Skype


IRC Nickname


Website URL


Location:


Interests


Github

Found 13 results

  1. Hello Hercules Community, Here's a Guide to Add a New Custom Status Icons(the one displayed on the right) What you Need? Knowledge of Editing and Compiling Server(and ofcourse custom icons) 1) Server Side Edits: open src/map/status.h Find SC_MAX Add Before SC_MYCUSTOMBUTTON, Find SI_MAX, Add Before SI_MYCUSTOMBUTTON = ID_OF_BUTTON, (ID of Button can be any, but I suggest to have them > 2000, so not to avoid any updates with kRO(which is at 900) now) P.S: Remember that ID_OF_BUTTON, we gonna need them later. src/map/status.c Find status->IconChangeTable[SC_DECORATION_OF_MUSIC] = SI_DECORATION_OF_MUSIC; Add Below status->IconChangeTable[SC_MYCUSTOMBUTTON] = SI_MYCUSTOMBUTTON; Recompile 2) ClientSide Edits Get a CleanCopy of statusicon folder (https://github.com/ROClientSide/Translation/tree/master/Data/luafiles514/lua%20files/stateicon) Open efstids.lub Find: __newindex = function()error("unknown state") Before it add, EFST_MYCUSTOMBUTTON = ID_OF_BUTTON, P.S: ID_OF_BUTTON should match the one on source(status.h) Open stateiconinfo.lub Find StateIconList[EFST_IDs.EFST_JUMPINGCLAN] = { Add Before StateIconList[EFST_IDs.EFST_MYCUSTOMBUTTON] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { { "My Custom Button Heading", COLOR_TITLE_BUFF }, {"%s", COLOR_TIME}, --do not edit this, this shows time remaining { "Description 1" }, { "Description 2" }, { "Description 3" } }} Open stateiconimginfo.lua Find [PRIORITY_GOLD] = { OR [PRIORITY_RED] = { OR [PRIORITY_BLUE] = { OR [PRIORITY_GREEN] = { OR [PRIORITY_WHITE] = { (Depending on what background your Custom Button is) Add below [EFST_IDs.EFST_MYCUSTOMBUTTON] = "MYCUSTOMBUTTONFILE.TGA", P.S: Your Button File must be in .TGA form only. .tga file must go to data/texture/effect/ Folder And Its DONE!!! NOTE: Replace MYCUSTOMBUTTON with your own Icon/Effect Name
  2. As of Release v2018.03.13, the method to generate mapcache for Hercules has changed. A lot of people. myself included, were confused as to how it works. In this thread, I will do my best to explain the new way to generate your cache. This guide is intended to help people using the old system, not to aid new people (i.e. never generated mapcache before), so if you are new, some of it may seem like alien talk. Old (your source predates [is older than] Feb 18, 2018) In the old system, there were two ways to generate mapcache You could run the mapcache executable in Hercules root folder. Or use a program such as WeeMapCache to edit in your required mapcache. These two methods would generate or alter your required mapcache located in db/[pre-re or re]/map_cache.dat. However, they are no longer supported. New (your source is using Release v2018.03.13 or newer) The new system involves the use of the new 'mapcache' plugin to generate files. Some quick points: db/[pre-re or re]/map_cache.dat has been dropped (no longer supported). In its place are individual .mcache files for every map located in maps/[pre-re or re]/ Mapcache executable has been removed. Replaced with the mapcache plugin (src/plugins/mapcache.c). How to generate the mapcache? Same as before, check conf/map/maps.conf and db/map_index.txt have all the maps you want to cache. Your maps need to exist somewhere in your repository! There are two ways for the plugin to find them: a. Place all your maps, including resnametable.txt, inside the data folder of your Hercules repo. I.e. Hercules/data/prontera.gat/gnd/gnd/rsw (note: I forget if all three files are needed). b. OR Configure your conf/grf-files.txt to tell it where to find your GRF(s) which contains your maps. Build the mapcache plugin. On linux, this can be done by running the following command: make plugin.mapcache If using MSVC, compile as you would any other plugin. Execute plugin. This can be done using the following command: ./map-server --load-plugin mapcache [param] In windows, just remove the './' and run the commands in your command prompt. The params: The first thing you should do is run ./map-server --load-plugin mapcache --help A list of usable parameters will appear. Here are the ones you need to know for mapcache: [Info]: --convert-old-mapcache Converts an old db/pre-re/map_cache.dat file to the new format. [Mapcache] [Info]: --rebuild-mapcache Rebuilds the entire mapcache folder (maps/pre-re/), using db/map_index.txt as index. [Mapcache] [Info]: --map <name> Rebuilds an individual map's cache into maps/pre-re/ (usage: --map <map_name_without_extension>). [Mapcache] [Info]: --fix-md5 Updates the checksum for the files in maps/pre-re/, using db/map_index.txt as index (see PR #1981). [Mapcache] ./map-server --load-plugin mapcache --convert-old-mapcache Rebuild all the .mcache files using your old db/[pre-re or re]map_cache.dat file. NOTE: You should only run this command when you have an old map_cache.dat file you need to convert. ./map-server --load-plugin mapcache --rebuild-mapcache Rebuild all the .mcache files using your map files specified in step 2 of generation. NOTE: You should only run this command in special circumstances. This erases ALL the existing mapcache and rebuilds it with whatever files you provide it. If you don't have the required files, the build will fail and you will be left with missing mapcache files, meaning you won't be able to access those particular maps. ./map-server --load-plugin mapcache --map <name> Rebuild the .mcache file for the map name you specify. E.g. if you replace <name> with prontera, the maps/[pre-re or re]/prontera.mcache file will be rebuilt. NOTE: This is the best command to run, as it only caches a single map at a time. ./map-server --load-plugin mapcache --fix-md5 I don't know what checksum is for. The End Feel free to ask for help here. I'll try to answer questions re: mapcache if possible. And if you think anything needs correcting or added, let me know. Hope this helps!
  3. Any guides out there for using Hercules mapcache? The doc is no help to me.
  4. Download: Full installer (http://www.nickyzai.com/?p=kro) 2014 Themon client, I used 2014-03-05b (https://github.com/ThemonChan/2014-Ragexe-Client) Nemo Patcher (https://github.com/MStr3am/NEMO.git) Basic Complete Renewal Data English Folder (http://herc.ws/board/topic/901-basic-complete-renewal-data-english-folder) Ragnarok Online ClientSide Translation (https://github.com/ROClientSide/Translation) GRF Builder (http://www.grfbuilder.com) Open Setup (http://nn.nachtwolke.com/dev/opensetup) PATCH After you download the full installer run the rsu-* patchers as admin. rsu-kro-rag-lite.exe rsu-kro-renewal-lite.exe DIFF Take 2014-03-05bRagexe.exe and open it in Nemo. Click "Select Recommended" at the bottom Custom Window Title Read Data Folder First Skip License Screen Use Ragnarok Icon Take a look at all the options and enable at your own risk. MERGE Take the Ragnarok Online ClientSide Translation's data folder, and merge + overwrite the v4 Basic Complete Renewal Data English's data folder. After you combine the two data folders copy the System and AI folders over. Why do I have to merge two different data folders? clientinfo.xml Create a clientinfo.xml file: <?xml version="1.0"encoding="euc-kr" ?><clientinfo><servicetype>korea</servicetype><servertype>primary</servertype><connection><display>RO</display> <balloon>RO</balloon> <desc>RO</desc> <address>127.0.0.1</address> <port>6900</port> <version>45</version> <langtype>0</langtype> <registrationweb></registrationweb> <aid> <admin></admin> <yellow></yellow></aid> </connection></clientinfo> Place the clientinfo.xml file in your data folder. GRF Open GRF Builder. Click New. Enter a .grf filename. Click Merge dir. Select your data folder. After your .grf is created add the filename to your DATA.INI. DATA.INI Create a DATA.INI file: [Data]1={translations + clientinfo.xml}.grf2=rdata.grf3=data.grf SETUP Don't forget to add opensetup to your RO folder. Also make sure you copied over the System and AI folders from the v4 Basic Complete Renewal Data download. DONE Run your patched exe and enjoy! Try re-opening the file if it gives you an error the first time you execute it. I'm sorry there are no images. Having trouble? Try downloading the ready made 2013-08-07aRagexe Full Client.rar from (https://www.mediafire.com/folder/hg3wqu9a1cc7w/ready%20made) Completely lost? Download a completely setup RO folder designed to work with localhost (https://docs.google.com/uc?id=0B9iUnTTFhVamRTNONGd3UHNpSUE&export=download) TLDR; Some newcomer figured out how to get a client working and wrote a guide.
  5. Hello community, I want to share BASIC guide for setting up Client date 2013+ (custom items, jobs, weapons, etc, go away) This is a compact list that you can follow to setup your client, let's start: [1]. Download latest kRO Installer from : [*]https://www.nickyzai.com/?p=kro [*]http://herc.ws/board/topic/10666-release-2012-04-10-ragexere-full-client/ [*]Torrent : https://kickass.to/ragnarok-online-06-06-2014-kro-client-folder-t9211110.html I will update when I found the other links. [2]. Choose which client date you want use, list clients date (Ragexe) that available in Hercules: [*]2014 : 2014-01-15, 2014-02-05, 2014-03-05, 2014-04-02, 2014-04-16, 2014-10-16, 2014-10-22 [*]2013 : 2013-03-20, 2013-05-14, 2013-05-22, 2013-05-29, 2013-06-05, 2013-06-12, 2013-06-18, 2013-06-26, 2013-07-03, 2013-08-07, 2013-08-14, 2013-12-18, 2013-12-23, 2013-12-30 The recomended and stable clients are bolded [3]. Download UNPACKED Ragexe from : [*]2013 : http://k3dt.eu/Ragexe/unpacked/ [*]2014 : https://github.com/ThemonChan/2014-Ragexe-Client [*]Fixed 2014 April client, Link by @Lilystar : https://mega.co.nz/#!alM3kRyC!9z7xDPmFU3J9UFg4hXjNcv9XnLZxG5AL87iNksjpSiM [4]. Use NEMO patcher to diff your client [*]http://herc.ws/board/topic/2905-nemo-client-patcher/ , Use the git link, not the zip file. [*]Extract your client then open NEMO.exe [*]Browse and select your client. [*]Click "Load Client" button [*]Click "Select Recomended" button (Its checked all basic diffs) [*]Checked "Load Custom lua file instead of iteminfo.lub" Patch, and fill it with "System/iteminfo.lua" [*]Then click "APPLY SELECTED" button. (Default result will like this : yyyy-mm-ddbRagexe_patched.exe) [*]Move your patched.exe to your Ragnarok folder. [5]. Now you got the patched exe, next is to edit your Hercules so it accept your client date [*]go to srccommon and open "mmo.h" [*]scroll down to #define PACKETVER [*]then changed "#define PACKETVER yyyymmdd" to your client date (eg: #define PACKETVER 20140416) [*]Add "//" before "#define ENABLE_PACKETVER_RE" , because we use Ragexe [*]Save then compile your hercules. (choose "release", not "debug") Compiling guide: http://herc.ws/wiki/Compiling Setting up server guide: http://herc.ws/board/topic/968-guide-how-to-setup-hercules/ [6]. Now everything is ready to play, but you don't want to play with korean/unknown letter right? [*]Ok, now go to http://herc.ws/board/topic/398-client-translation-project/ [*]Download it, after that, copy the "data" folder to other folder (case sensitive). [*]Add your clientinfo.xml inside it (in folder data), then make a GRF from this. (Use GRF editor http://herc.ws/board/files/file/138-grf-editor/) [*]Save and name it "english.grf". [*]Move it to your Ragnarok folder. [*]Open your DATA.ini, if you don't have it, open your patched.exe, that should create one. [*]Add this line "1=english.grf" below "[Data]", without quote. so it will be like this : [*][Data]1=english.grf2=data.grf [*]Copy all files inside "SystemFont" folder of client translation, then paste it to Ragnarok "SystemFont" [*]Lastly copy "itemInfo.lua" and "Towninfo.lub" from client translation project to your ragnarok "system" folder [*]That's it! run Hercules's "run-server.bat" and open your patched.exe and play. [7]. Updating your KRO To make sure your KRO fully up to date, download RO patcher by Ai4rei , http://nn.nachtwolke.com/dev/rsu/ Put rsu-kro-rag-lite.exe to your ragnarok folder, run it until the patch is complete , then close it. P.S : Experimental client like 2014-10-22bRagexe and 2015-05-13aRagexe are NOT RECOMENDED to be used as client for your server. many broken feature inside them (like missing packets or unimplemented feature) as Developer still working on it (with no exact date), use it at your own risk =============================================== =================== F . A . Q =================== =============================================== All credits goes to Community
  6. Hi to all here @ Hercules, To Mods, Admin please remove or move my topic if i've posted in wrong section or this topic is not correct. I'm new at Hercules and I dreamed to be a DEV too just you guys here. I've been trying to make a private server but the guide on how to setup is already outdated, I've been reading the topic posted by @patskie http://herc.ws/board/topic/968-guide-how-to-setup-hercules/?hl=guides and it's posted since June 2013. I know that there's already a guide but the application that he used in his topic already old, is there anyone here can post an updated version like what @paskie posted, it would be a great help for us beginners and want to be a future DEV too. BTW, my application that I'm using now are: Visual Studio 2013 WAMP server 3.0.0 MySQL Workbench 6.3 Notepad++ 6.9 Thank you in advance and more power Hercules.
  7. Hello, Can anybody guide me how to remove this [New Server] tag
  8. Hello, our server use harmony for protection. We can block all third programs like RCX but there is a problem... for some reason we are not able to succesfully block RoMedic(autopots).... is there any solution. I would really appreciate if someone could give me a brief guide on how to setup harmony correctly ^-^ Sincerely, Once-Ro GM Team
  9. Hi guys can someone share a basic guide on how to build server side and client side ? it would be of great help
  10. Good day All, First, thanks for checking out this topic. it means a lot to me. Anyways.. I've been planning to put up my own server and I think now is the right time to acquire knowledge in building it. To begin with I followed this guide of Sir @Patskie http://herc.ws/board/topic/968-guide-how-to-setup-hercules/ it seems everything is okay.. then I got this problem.. everything is Highlighted in RED for convenience purpose. I guess I mess up in Patskie's instruction #20. -> Visual Studio 2010 C++ compilation is shown also below. PROBLEM: - ( login-server.exe, map-server.exe, char-server.exe was not found. Make sure, that you have compiled . . . ) Hope you can help me please. Thank you so much!
  11. The "Battleground" and the "Navigation" buttons are somehow useless for our clients, so i'm going to show you how to remove them from the client, keep in mind that this Technic is a little hackish as it consist in changing the HEX value, misleading the image information for those buttons. Needed: [*]HxD ( Or some other HEX editor ) [*]Your patched client ( Tested on 08.07a ) Search and replace the following Hex values to hide the buttons: Navigation: Search: [cbox]5C 62 74 6E 5F 4E 61 76 69 67 61 74 69 6F 6E[/cbox] Replace [cbox]5F 62 74 6E 5F 4E 61 76 69 67 61 74 69 6F 6E[/cbox] Battleground: Search: [cbox]5C 62 74 6E 5F 62 61 74 74 6C 65 5F 66 69 65 6C 64[/cbox] Replace [cbox]5F 62 74 6E 5F 62 61 74 74 6C 65 5F 66 69 65 6C 64[/cbox] Replacing the first 5C for a 5F is what i'm doing. What it does? It changes the image path, so the client do not reach and load the buttons. It goes well with the skin that I've released, where i hided the navigation from the menu for a better fit. raPzLight Skin Renewal 1.0 Category: Other Graphics Last Updated Jul 14 2014 02:57 AM That's it yall. ​
  12. Now Before we delve into the details, lets consider a few things - this is meant for newbies. If you have made patches before skip ahead. Introduction to patching When we say we patch a client what it means is we change few bytes with a different set of bytes. (essentially we change a few opcodes or assembly instructions for e.g. a JNE to JMP so that the client behaves differently) Now these codes will be different for each client date and/or their location will change. So how do we make it generic? For this you need a sort of flow-chart to follow to get to the locations where modification needs to be made and for getting the replace logic. If you know how the original bytes were found , try to make note of the procedure you followed and you can usually make a patch following same logic. For e.g. like find a string -> find where its pushed -> 8 bytes later there is a JNE -> change to JMP Another step that helps out is finding a common pattern in a set of clients around where your modification is to be done. For e.g. Lets say i find '75 C0 E8 09 22 04 00 68 44 65 97 00' in 20130612 and '75 C0 E8 10 23 04 00 68 54 44 98 00' in 20130626 common pattern => '75 C0 E8 ?? ?? ?? 00 68 ?? ?? ?? 00' where ?? can be anything so you can use this common pattern instead of the individual ones. Not sure whether I made it clearer or confused you with that Intro. To summarize - making a patch is a combination of finding byte patterns, finding referenced addresses, changing instructions, finding vacant spaces and adding new codes, updating calls etc. If you know assembly language then it should be easy for you. If you don't know already try to read up on it at-least a little before going forward Now then back to topic Patches in NEMO The patches for NEMO are written in QtScript which follows ECMAScript format guidelines same as ... Javascript Therefore almost all of the functions & behaviors offered by Javascript you will find is also there in QtScript (well except for the actual web development part ) So I am not going to concentrate on the language itself. But rather I would be focussing on What all aspects are there specific to NEMO. NEMO Patch Instructions For NEMO to recognize a patch it needs to be registered. This is done in _patchlist.qs file in the patches folder. FORMAT for registering patch : registerPatch(patch id, functionName, patch Name, category, group id, author, description, recommended [true/false] ); patch id - a unique number used for referring to the patch internally in NEMO. functionName - the name of the function which will be called when a patch is enabled in NEMO. This function will contain your logic for making modifications into the client. patch Name - Name of the patch (displayed in the table) category - Category of the patch (like UI , Data, etc. displayed in the table) group id - id of the registered group to which this patch will belong. (details below) author - Patch Maker's Name (displayed in the table) description - Description of what the patch does (displayed in the table) recommended - boolean value showing whether this belongs to the recommended list of patches. Each Patch will belong to a Patch Group (if its not supposed to be part of any specific group use group id 0). All Patch Groups must be registered before they are used (except for 0 which is the Generic Patch Group registered by default) FORMAT for registering group : registerGroup(group id, group Name, mutualexclude [true/false]); group id - a unique number used internally in NEMO as well as when registering a patch. group Name - Name of the group (displayed in the table for all member Patches) mutualexclude - boolean value determining whether member patches are mutually exclusive i.e. Only 1 can be selected at a time or not. Once a patch is registered you need to make the function (name specified while registering). You can make it in any .qs file and save it in patches folder. It will be read automatically. Now to facilitate writing patches there are some ready-made variables & functions available to you. Now to facilitate writing patches there are some ready-made variables & functions available to you. 1) Reserved Keywords (well in a sense) i) Section Types - The following four can be used for referring to a section instead of using the section name itself as an alternative. CODE = 0, DATA = 1, IMPORT = 2, DIFF = 3 ii) User Input Types - These are the available input types in NEMO that you need to specify while getting an input value from user with the getUserInput() Function. Based on the types a different prompt appears for the user to select the value. You will understand more once you see function later on. XTYPE_NONE = 0, XTYPE_BYTE = 1, XTYPE_WORD = 2, XTYPE_DWORD = 3, XTYPE_STRING = 4, XTYPE_COLOR = 5, XTYPE_HEXSTRING = 6, XTYPE_FONT = 7, XTYPE_FILE = 8 iii) Pattern Types - You can specify a string in two forms : PTYPE_STRING => 0) Regular C Style string with Null termination - i.e. anything after '0' or "x00" will be ignored. E.g. "Ragnarok" PTYPE_HEX => 1) Hex String with spacing - You specify each byte with a space prefixed before it. E.g. " 68 90 00 95 00" As you might have guessed already if you have a null byte in your hex string always use PTYPE_HEX. iv) Address Types - Currently it is only used in findString() function to specify the type of value you want returned RAW = 0, RVA = 1 i.e. RAW/real address or Relative Virtual Address 2) Global Variables APP_PATH = path where NEMO is run from. CLIENT_FILE = path of the currently loaded client exe. Whenever your client exe gets loaded the object gets updated to refer to the loaded client. To access the bytes inside the exe we make use of the various methods of this object (Client Access functions detailed below). 3) Client Access Functions 3.1) - Fetching data i) exe.fetchByte(offset) - Extract 1 Byte and return it as a signed number. ii) exe.fetchWord(offset) - Extract 2 Bytes and return it as a signed number (little endian) iii)exe.fetchDWord(offset) - Extract 4 Bytes and return it as a signed number (little endian) iv) exe.fetchQWord(offset) - Extract 8 Bytes and return it as a signed number (little endian) v) exe.fetch(offset, num) - Extract <num> Bytes and return it as a string ( PTYPE_STRING ). vi) exe.fetchHex(offset, num) - Extract <num> Bytes and return it as a hex string ( PTYPE_HEX ). Do note that the returned hex string will already have space prefixed. 3.2) - Searching for data i) exe.find(pattern, type, useWildCard = false, wildCard = "xAB", start = -1, finish = -1) This is the core searching function available in NEMO. All the others are just extended versions of this function. This function searches for the <pattern> you provide in the client between the <start> and <finish> offsets. You need to specify the pattern <type> (PTYPE_STRING or PTYPE_HEX) for the client to use it accordingly. if start is -1 then it will automatically shift to beginning of the file i.e. 0, similarly if finish is kept at -1 it automatically shifts to the end of the file. Sometimes you wish to search for a pattern like " 68 ?? ?? ?? 00 74 ?? 83" where ?? actually means you dont care what is there in those areas. So how to search in those scenarios? First replace the ?? with a byte you dont have in your original pattern. For e.g. " 68 AA AA AA 00 74 AA 83" and call exe.find() with useWildCard as true and wildCard as "xAA" like shown below. var offset = exe.find(" 68 AA AA AA 00 74 AA 83", PTYPE_HEX, true, "xAA") - i didnt set the start and finish since i want the full client searched. If a match is not found then this function returns -1. ii) exe.findAll(pattern, type, useWildCard = false, wildCard = "xAB", start = -1, finish = -1) Same functionality as exe.find except that exe.find() stops at the first matched location but this one returns array of all matched locations. If no matches are found returned array is empty. iii)exe.findCode( pattern, type = PTYPE_HEX, useWildCard = false, wildCard = "xAB") - Extended version of exe.find() function with searching limited to CODE section iv) exe.findCodes(pattern, type = PTYPE_HEX, useWildCard = false, wildCard = "xAB") Extended version of exe.findAll() function with searching limited to CODE section v) exe.findString(pattern, rtype = RVA, prefixZero = true) - Extended version of find function with searching limited to DATA section. pattern can only be a PTYPE_STRING. rtype argument here refers to what type of address should be returned when found (RAW or RVA). If you want to search for isolated strings (i.e. NULL on both sides) set prefixZero to true vi) exe.findFunction(pattern, type = PTYPE_STRING, isString = true) - Extended version of find function for getting the address of an imported function. You can either specify the function's original name or the address of the function name in IMPORT section. vii)exe.findZeros(zsize) - Extended version of find function used for locating empty space in DIFF section for inserting new code. The function always looks for zsize+2 null bytes to make sure each inserted code is seperated by atleast 1 null byte. 3.3) - Modifying data i) exe.replace(offset, code, type = PTYPE_STRING) The core function used for replacing bytes in the client file. code is the pattern which will replace the original - don't forget to mention the pattern type. There is no return value for replace functions. You can also provide the variable name you used in exe.getUserInput() function earlier as the code (NEMO will pick up the value inside). ii) exe.replaceWord(offset, code) - Extended version of exe.replace(). Here code is expected to be a 16 bit signed number. iii)exe.replaceDWord(offset, code) - Extended version of exe.replace(). Here code is expected to be a 32 bit signed number. iv) exe.insert(offset, allocSize, code, type = PTYPE_STRING) - Extended version of exe.replace() used for Inserting code into Null areas. offset should be the value you got from exe.findZeros(allocSize). 3.4) - User Interaction i) exe.getUserInput(varname, valtype, title, prompt, value, min=0, max=2147483647) - Prompts the user for a value. Based on the valtype you get different windows for value entry and the value selected by the user is also returned by the function. varname used should be unique across patches and can be used in replace & insert functions to refer to the user entered value. title is the text displayed on the input window title bar prompt is the text displayed as prompt next to the input box. in case there is no input box. for e.g. like in XTYPE_COLOR , the prompt is suffixed to the title bar itself. value is the initial value to use for the input. If the variable was set previously or reloaded from a profile/from a previous applied patch, this value is ignored. 3.5) Section information All the four functions mentioned below gets 1 information of a section specified by key. key can be either the section name or section type (mentioned at top) i) exe.getROffset(key) - Real Offset ii) exe.getRSize(key) - Real Size iii)exe.getVOffset(key) - Virtual Offset iv) exe.getVSize(key) - Virtual Size 3.6) Miscellaneous i) exe.getClientDate() - Need i say more? ii) exe.isThemida() - return true if its a 2013 unpacked client. iii)exe.Raw2Rva(rawaddr) - Converts a RAW/real address to Relative Virtual Address. iv) exe.Rva2Raw(rvaaddr) - inverse of above. In case you are still wondering: RAW address is the physical offset of a code (bytes) from beginning of the client which you see in a Hex Editor such as HxD. Relative Virtual Address or RVA is the address you see for the same code when you open the client in a debugger such as Ollydbg. RVA is relative to a value called imagebase hence the name Relative Virtual Address. RVA - imagebase = VA. 4) Utility Functions There are a few utility functions written in QtScript (you will find them in the core folder) to facilitate some commonly done routines. i) "string".replaceAt(i, newstring) - by default strings have a replace command but no command to replace at a specific offset this one does that. For e.g. "abracadabra".replaceAt(4,"k") will return "abrakadabra" ii) "string".repeat(i) - returns new string with the "string" repeated i times e.g. "na".repeat(4) will return "nananana" .... ... batman? iii)"hexstring".hexlength() - returns the number of bytes in the hex string (PTYPE_HEX). For e.g. " 90 49 54".hexlength() returns 3 iv) "string".toHex() - converts string to hex string (from PTYPE_STRING to PTYPE_HEX) e.g. "AM".toHex() returns " v) "string".toHexUC() - converts string to hex string (similar to above but extra null byte padding is provided - like ASCII in Unicode) vi) "hexstring".toAscii() - reverse of iv) vii) (Number).packToHex(size) - packs a number to its little endian hex string with the size number of bytes used up size can be maximum 4. the number or expression needs to be in a bracket or a variable. e.g. (123456).packToHex(4) => " 40 E2 01 00" viii) getInputFile(f, varname, title, prompt, fpath) - repeatedly loops until a valid file is specified as input or the form is cancelled => patch should be disabled. 5) TextFile class Since I found no suitable types in QtScript for accessing files. I have added a new class called TextFile for accessing textfiles.To use the class first we need to make an object of the class (yes i mean in the patch file itself) var fp = new TextFile(); Methods i) fp.open(<absolute file path>, <mode>) - once fp is assigned we need to use the open method to use it to access a file. mode can be "r" or "w" ii) fp.readline() - currently only reading full line is available, since i needed full lines at a time. iii)fp.write(data) - writes the specified data onto file. iv) fp.writeline(data) - same as above but also adds a carriage return + form feed (goes to new line) v) fp.eof() - true when end of the file has been reached. vi) fp.close() - closes the file opened by fp.open() You can check the TranslateClient.qs file in patches folder for an example of its use. --------------------------------------------------------------------------------------------------------------------------------------------------------- Hmm what else .... so now that you have gone through this guide, hopefully you can better understand what is written in the patches already there. and maybe bring in your own ideas? Let me know if any part of this guide didn't make sense, needs elaborations, clarifications etc. FYI: I know it doesn't look pretty right now. But this was done in a hurry since I will be gone for a week . I will clean things up later on.
  13. Working around in MySQL console for database ragnarok. This tutorial is mainly to support the release of pre-compiled Hercules for Win32 by me, OnNplay. Never-the-less it also closer to linux command line instead of using phpMyAdmin, HeidiSQL, Navicat, MySQL Workbench and other MySQL GUI client program. Hopefully, you will getting more confident to use PuTTY when you subscribe service such as VPS or dedicated server. Lets do our first mysql database "ragnarok" and also our first mysql user "ragnarok". To state the command I used quote character "command here;". Please ignore it when you type or select and copy. 1. Download, install WAMP Server and start it. On desktop taskbar near the clock, click WAMPSERVER - server Online > MySQL > MySQL console . 2. Now active MySQL console window is open asking you to "Enter password:". By default WAMP Server logging into MySQL console as "root" and no password. So just press Enter. Now you in the MySQL service enviroment. You should see "Welcome" followed by some texts ending with line "mysql>". 3. You need to change your user "root" password. Type "use mysql;" and you should see "Database changed". Command "UPDATE user SET password=PASSWORD('newpassword') WHERE user='root';". Type "update user set password=password('w4mps3rv3r') where user='root';" and press Enter. The "newpassword" is at your own wish. After pressing Enter, you should see "Query OK," followed by some texts ending with line "mysql>". 4. For the change to take effect on MySQL service, you need to type "flush privileges;" and press Enter. 5. Now you should test the new root's password. Type "quit;" and press Enter. MySQL console window will close. Do step no.1. Enter your new root's password and press Enter. After the line of "mysql>" appear, MySQL service enviroment is ready to execute mysql's commands. When you type a wrong or incomplete command, console will response with "->". What you need to do is just type ";" and press Enter. 6. Now you going to create a database to be used by Hercules emulator. By default Hercules will connecting to IP "127.0.0.1" port "3306" on database "ragnarok". Command "CREATE DATABASE database-name;". For deleting database, command "DROP DATABASE database-name;". Type "use mysql;" and press Enter. Next type "create database ragnarok;" and press Enter. Check the existence of your database, type "use mysql; show databases;" and press Enter. 7. Now you going to create one mysql user for Hercules to use. Do not let Hercules to use user "root". By default Hercules used mysql user "ragnarok" and it's password also "ragnarok". Command "CREATE USER 'user-name'@'host-name/IP' IDENTIFIED BY 'password';".For deleting user, command "DROP USER user-name;". Now type "create user 'ragnarok'@'localhost' identified by 'ragnarok';" and press Enter. Next you should do step no.4. To check the existence of user "ragnarok", type "use mysql; select user from mysql.user;" and press Enter. 8. You already create database "ragnarok" and user "ragnarok" in MySQL service. MySQL user can't simply access database without permission. Now you as a user "root" need to allow user "ragnarok" to access database "ragnarok". Command "GRANT ALL PRIVILEGES ON database-name.table-name TO 'user-name'@'host-name/IP';".For removing user to acces any database, command "REVOKE ALL PRIVILEGES ON *.* FROM 'user-name'@'host-name/IP';". Now type "grant all privileges on ragnarok.* to 'ragnarok'@'localhost';" and press Enter. Next you should do step no.4. 9. You should test the user "ragnarok". Type "quit;" and press Enter. MySQL console window will close. Now open folder where WAMP Server is installed and find where is file "mysql.exe" is located. During the making of this tutorial "mysql.exe" appear as "mysql" is located in "C:wampbinmysqlmysql5.6.12bin". Do not select any file inside the folder, if any one of the files is selected clear the select by clicking area after column "Size". Point arrow inside the folder, hold down the Shift key and at the same time do a right-click. Click "Open command window here". Type "mysql -uragnarok -p" and press Enter. You should see "Enter password:". Now type "ragnarok" and press Enter. 10. Here you going to prepare a text file for later use. Find and open folder "sql-files" which come with Hercules package. All the required files are with an extension ".sql" and can be read using Notepad++. Don't waste your time now to read it. Those files are containing default tables for database preparation. To get the full path of each file is by hold down the Shift key and do a right-click on the file, click "Copy as path". Next paste it in Notepad or Notepad++. Alternatively you also able to select all files and "Copy as path" too. The full path will come with quote character " " at beginning and ending. Delete it. Before file full path, add "source " with one space after it. Prepare file full path line by line so it easy for you to select and copy. Maybe you named the text file as "hercules-source-sql.txt". Before "C:UsersOnnplayDesktopHerculestrunksql-filesmob_skill_db.sql""C:UsersOnnplayDesktopHerculestrunksql-filesmob_skill_db_re.sql""C:UsersOnnplayDesktopHerculestrunksql-filesmob_skill_db2.sql""C:UsersOnnplayDesktopHerculestrunksql-filesitem_db.sql""C:UsersOnnplayDesktopHerculestrunksql-filesitem_db_re.sql""C:UsersOnnplayDesktopHerculestrunksql-filesitem_db2.sql""C:UsersOnnplayDesktopHerculestrunksql-filesitem_db2_re.sql""C:UsersOnnplayDesktopHerculestrunksql-fileslogs.sql""C:UsersOnnplayDesktopHerculestrunksql-filesmain.sql""C:UsersOnnplayDesktopHerculestrunksql-filesmob_db.sql""C:UsersOnnplayDesktopHerculestrunksql-filesmob_db_re.sql""C:UsersOnnplayDesktopHerculestrunksql-filesmob_db2.sql" After source C:UsersOnnplayDesktopHerculestrunksql-filesmob_skill_db.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesmob_skill_db_re.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesmob_skill_db2.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesitem_db.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesitem_db_re.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesitem_db2.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesitem_db2_re.sqlsource C:UsersOnnplayDesktopHerculestrunksql-fileslogs.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesmain.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesmob_db.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesmob_db_re.sqlsource C:UsersOnnplayDesktopHerculestrunksql-filesmob_db2.sql 11. Now you going to fill up database "ragnarok" with default tables. Back to step no.9 and file "hercules-source-sql.txt" opened for select and copy. Type "use ragnarok;" and press Enter. You should see "Database changed". Next inside the console, copy and paste "source C:UsersOnnplayDesktopHerculestrunksql-filesitem_db.sql" and press Enter. You should see many "Query OK," running till "mysql>" appear again. Repeat with other full path of your sql files. After filling up database "ragnarok", you may check how many tables are created. Type "show tables;" and press Enter. Total row is a total table in database. During the making of this tutorial, Hercules is at Revision 12214 supplied with 12 sql files producing total of 52 tables. 12. If you follow correctly this tutorial, Hercules emulator can run smoothly by now. Type "quit;" and press Enter to close the MySQL console.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.