Jump to content

Mhalicot

Community Contributors
  • Content Count

    1971
  • Joined

  • Last visited

  • Days Won

    37

Reputation Activity

  1. Upvote
    Mhalicot got a reaction from kerbiii in hunting mission script on hercules   
    Its on the script already
     
    in Menu
    ~ Mission Shop:
    case 5: mes "[Hunting Missions]"; mes "You have ^0055FF"+#Mission_Points+"^000000 Mission Points."; mes "Use them well!";
  2. Upvote
    Mhalicot reacted to Neo-Mind in The PatchMaker's Guide to NEMO   
    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.
  3. Upvote
    Mhalicot got a reaction from kerbiii in Izlude Town   
    sa YourRO.grf mo ba may izlude na map? mag download ka ng old izlude na mapa tapos update mo yung map_cache.dat
     
    rename mo yung map-cache.dat gawin mong map_cache_Orig.dat
     
    tapos sa Trunk/ run mo yung mapcache.exe tapos yun okay na yun..
     
     
    Try mo rin tong Release New Izlude Town
  4. Upvote
    Mhalicot got a reaction from kerbiii in Select Service Menu   
    sa palagay ko sa clientinfo.xml
    <connection> <display>nameRO</display> <-- paki check
  5. Upvote
    Mhalicot got a reaction from kerbiii in R> Costume Job Sprite   
    yeah it will change your sprite, and you can still use your original job skill, check your misc. tab.
     
    what you see that the script change your job is just an illusion.. 
  6. Upvote
    Mhalicot got a reaction from kerbiii in How to change the appearance when equip?   
    ^dont be confused of does skills, you can see your real skills at Misc. tab.
  7. Upvote
    Mhalicot got a reaction from ShankS in R> Costume Job Sprite   
    visit http://herc.ws/wiki/Custom_Items
  8. Upvote
    Mhalicot got a reaction from ShankS in R> Costume Job Sprite   
    try to use
     
    *changebase <job ID number>;
      This command will change the appearance of the invoking character to that  of a specified job class. Nothing but appearance will change.   Example: OnEquipScript: <" changebase Job_Novice; "> // Changes player to Novice sprite. OnUnequipScript: <" changebase Class; "> // Changes player back to default sprite.
  9. Upvote
    Mhalicot got a reaction from darkxxcrow in Problem running 2013 client   
    make sure your setup and 2013 client in your RO files has an administrator privilage. Right Click -> Properties -> Compatibility Tab -> Check Run this program as an administrator
  10. Upvote
    Mhalicot got a reaction from kerbiii in pre-renewal server   
    1. Hangang sa latest revision kasi naka package naman yan sa server
    2. ragexe client kase support nya yung mga 2013,
    3. for me 20130807 since yan yung pinaka stable.. sa data naman kRO syempre
    at madami ka namang makikitang 2013 client files sa client release.
  11. Upvote
    Mhalicot got a reaction from Hadeszeus in Buy items using vend mode   
    to be more specific this is the item 
    { Id: 12548 AegisName: "Buy_Market_Permit2" Name: "Black Market Bulk Buyer Shop License" Type: 2 Buy: 20 Weight: 10 Upper: 63 Script: <" buyingstore 2; ">},
  12. Upvote
    Mhalicot got a reaction from leloush in about refiners in prontera   
    try in trunknpcmerchantsrefine.txt
  13. Upvote
    Mhalicot got a reaction from kerbiii in How to disable 3rd job classes?   
    Okay Note this:
    // =================== Optional fields (item_db2 only) ================ Inherit: true/false (boolean, if true, inherit the values that weren't specified, from item_db.conf, else override it and use default values) example in item_db.conf
    { Id: 4003 AegisName: "Pupa_Card" Name: "Pupa Card" Type: 6 Buy: 20 Weight: 10 Loc: 16 Script: <" bonus bMaxHP,700; ">}, Let's try to make an item_db2 entry for a Pupa Card that gives a bonus of 1000 HP rather than just 700.
    { Id: 4003 Inherit: true Script: <" bonus bMaxHP,1000; ">}, Done. No need to rewrite the name, location, prices... those are already in the item_db!
     
    Please, Read Item DB file structure overhaul for more information about this!!
  14. Upvote
    Mhalicot got a reaction from ShankS in Costume System v1   
    ~ Originally script by Rebel, Zephyrus [rAthena]. ~ Hindi ko pag aari ang script na ito, ginawa ko lang itong tugma sa Hercules.    Kung sakaling magustuhan nyo, pindutin lamang ang  bilang pasasalamat. ~ [Original Topic] http://goo.gl/YU1Z7o ~ 100% compatible in (revision 12624) ~ Requested by karazu    
      ~ Download: http://herc.ws/board/files/file/51-costume-system/ ~ Maraming salamat sa pag suporta. Bigyan ng rate ang download kung gumana.   Note: Inilagay ko sya sa Download para makita rin ng iba kung sakaling matabunan ang topic na to.          Salamat sa pang unawa.
  15. Upvote
    Mhalicot got a reaction from kerbiii in How to disable 3rd job classes?   
    makikita po  yun sa src/config/renewal.h
     
    lagyan mo lang po ng // yung mga naka define
     
    example:
    //#define RENEWAL//#define RENEWAL_CAST//#define RENEWAL_DROP//#define RENEWAL_EXP//#define RENEWAL_LVDMG//#define RENEWAL_EDP//#define RENEWAL_ASPD ganyan lang ka simple..
  16. Upvote
    Mhalicot reacted to Dastgir in [RELEASE]Kagerou Oboro Job Change Quest[iRO Based]   
    Updated to e8d6b66a6f4bbaeb1fc166635aea76a93ddec59d
     
    KO Job Changer FULLY WORKING!! 1)Battle Test: Fixed Callsubs and monster locations(Special Thanks to Yommy) 2)Knowledge Test: Fixed Question looping(Thanks to Ssky for pointing out) 3)Main NPC's:Fixed some conditions and color codes 4)Weaponry Test:Fixed effects and some conditions. With this, KO JOB Quest is FULLY WORKING NOW!!!, Tested it myself.Thanks. 
  17. Upvote
    Mhalicot got a reaction from darkxxcrow in Costume System   
    wait, I will update my source.
     
    ~ Updated to latest revision.
     
    Kindly Rollback your modification and download the latest version 1.2
  18. Upvote
    Mhalicot got a reaction from karazu in Advance Stylist will not automatically close after clicking Confirm   
    ^
     
    Ignore this dont replace close2;  
     
    what you need to do is to add in line
    + close2;  
    or use this scrip instead
    if( .@success ){ message strcharinfo(0),"Enjoy your NEW "+.menu_name$[@style]+" !!"; @style_value = .@style_number; close2; }else{ mes "You dont have enough "+.currency_name$[@style]+" to change this "+.menu_name$[@style]+"."; mes "Cost : ^777777"+ValueConvert( .cost[@style] )+" "+.currency_name$[@style]+"^000000"; close2;
  19. Upvote
    Mhalicot got a reaction from darkxxcrow in Costume System   
    after a quick try,
     
    Still I cant reproduce your problem, see attachment.
     
    try to rollback your modification and equip only regular costume.


  20. Upvote
    Mhalicot got a reaction from N e s s in [Gabay] Paano mag Update at mag Setup ng Hercules Server.   
    Yung branch po kung makikita mo parang mga iba-ibang emulator yun.
     
    Yung Trunk po yun yung Main server ng Hercules
     
    I-update ko yung guide para malinaw sa Lahat.
     
    ay naka lagay na pala sa guide di mo lang ata nabasa 
  21. Upvote
    Mhalicot got a reaction from darkxxcrow in Costume System   
    okay your welcome,
    you can look at Client-Side Releases section for that.
  22. Upvote
    Mhalicot got a reaction from darkxxcrow in Costume System   
    ^ before that, can you try to use different client like 20130807?
     
    and what Revision of hercules you use?
     
    take note of this 100% compatible in (revision 12624)
  23. Upvote
    Mhalicot got a reaction from Apacman in Costume System   
    File Name: Costume System
    File Submitter: Mhalicot
    File Submitted: 12 Oct 2013
    File Category: Utility
     
    ~ Originally script by Rebel, Zephyrus [rAthena],
    ~ I don't own this script I'd revised it to make it compatible with Hercules.
    ~ [Original Topic] http://goo.gl/YU1Z7o
    ~ 100% compatible in (revision 137*)
    Download contains: Costume System.diff and costume.txt
     
    Click here to download this file
  24. Upvote
    Mhalicot got a reaction from heidernskk02 in WOE Controller Problem   
    ^ Update your client upto latest revision and it will be fine..
     
    or if you add modification in that script 
     
    - AgitEnd; AgitEnd2;+ agitend; agitend2; Im pretty sure you will encounter another error if you did not update that script.
     
    note this commit Changed variables, labels, functions, commands to case sensitive.
  25. Upvote
    Mhalicot got a reaction from Haru in Ohmy I think questdb limited to 60356, how to Expand it!!!   
    Hi,
     
    Kindly check this quest.h
     
    and increase your 
    #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 that is because of this commit Questlog Fix
×
×
  • Create New...

Important Information

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