Jump to content

bWolfie

Members
  • Content Count

    848
  • Joined

  • Last visited

  • Days Won

    34

Reputation Activity

  1. Upvote
    bWolfie got a reaction from astralprojection in How to convert pet_db2.txt   
    Locate to tools folder where it's located and run
    ./petdbconverter.py pre-re ../ ../db/pet_db2.txt > pet_db2.conf
    should generate conf file in the tools folder
    change pre-re to re if renewal
  2. Upvote
    bWolfie reacted to Beret in Effect State refactoring   
    Currently all eathena based emulators work the effect state incorrectly. In hercules uses two enumerations one for effects other for icons.
    This is totally wrong, in the official there is only an enumeration for the state of effects that are those of skills such as blessing. This enumeration is the same present in the lua files.
    With this proposed change SI_ enumeration must be removed and the client itself will recognize and apply the icon according to the effect state ID.
    the enumeration of effects states currently contains effects that should be used in another enumeration, they are.
    SC_STONE = 0, SC_COMMON_MIN = 0, // begin SC_FREEZE, SC_STUN, SC_SLEEP, SC_POISON, SC_CURSE, SC_SILENCE, SC_CONFUSION, SC_BLIND, SC_BLOODING, SC_DPOISON, //10 SC_FEAR, SC_COLD, SC_BURNING, SC_DEEP_SLEEP, SC_COMMON_MAX = 14, // end In aegis, these effects are worked on in another type of enumeration, because they do not have icons, see below the enumeration of aegis.
    typedef enum <unnamed-tag> { BODY_STONECURSE = 0x1, BODY_FREEZING = 0x2, BODY_STUN = 0x3, BODY_SLEEP = 0x4, BODY_UNDEAD = 0x5, HEALTH_POISON = 0x6, HEALTH_CURSE = 0x7, HEALTH_SILENCE = 0x8, HEALTH_CONFUSION = 0x9, HEALTH_BLIND = 0xa, HEALTH_HEAVYPOISON = 0xb, HEALTH_BLOODING = 0xc, EFFECT_ENDURE = 0xd, EFFECT_HASTE = 0xe, EFFECT_HASTEATTACK = 0xf, EFFECT_SLOW_POTION = 0x10, EFFECT_HASTE_POTION = 0x11, EFFECT_SANTA = 0x12, EFFECT_ANGELUS = 0x13, EFFECT_PUSHCART = 0x14, EFFECT_CONCENTRATE = 0x15, EFFECT_HIDE = 0x16, EFFECT_WEDDING = 0x17, EFFECT_PLUSATTACKPOWER = 0x18, EFFECT_PLUSMAGICPOWER = 0x19, EFFECT_CLAIRVOYANCE = 0x1a, EFFECT_HASTE_HORSE = 0x1b, EFFECT_SUMMER = 0x1c, HEALTH_FEAR = 0x1d, BODY_BURNNING = 0x1e, BODY_IMPRISON = 0x1f, HANDICAPSTATE_DEEPSLEEP = 0x20, HANDICAPSTATE_FROSTMISTY = 0x21, HANDICAPSTATE_COLD = 0x22, HANDICAPSTATE_NORECOVER = 0x23, EFFECT_HASTEATTACK_CASH = 0x24, HANDICAPSTATE_ICEEXPLO = 0x25, HANDICAPSTATE_ILLUSION = 0x26, EFFECT_HANBOK = 0x27, STATE_ENUM_END_MARK = 0x28, } <unnamed-tag>; So my suggestion is the separation of these effects and removal of the enumeration of the icons, since the enumeration of the effects must be the same present in the efstids.lua file, this makes the icon already recognized only using an enumeration and not two as we do today
  3. Upvote
    bWolfie reacted to Adel in Adel's Sprite Showcase   
    Improved Sakura Effect

  4. Upvote
    bWolfie reacted to AnnieRuru in Advance SQL commands   
    5. How to do IF-ELSE in SQL query ?
    Question : I have a PVP ladder script that runs on Points system. Each kill plus 1 point and each death minus 1 point.
    The problem is, this query will make the points go into negative value if the player is being kill repeatedly
    query_sql "UPDATE `pvp_points` SET `points` = `points` - 1 WHERE `char_id` = "+ getcharid(0); How do I make the points stop at 0 if the player is already at 0 points ?
     
    Answer :
    query_sql "UPDATE `pvp_points` SET `points` = IF(`points` = 0, 0, `points` - 1) WHERE `char_id` = "+ getcharid(0); query_sql "UPDATE `pvp_points` SET `points` = (CASE WHEN `points` = 0 THEN 0 ELSE `points` - 1 END) WHERE `char_id` = "+ getcharid(0);  
    Explanations:
    similar to hercules script language,
    if (<condition>) <execute true condition>; else <execute false condition>; in SQL language
    IF(<condition>, <execute true condition>, <execute false condition>) CASE WHEN <condition> THEN <execute true condition> ELSE <execute false condition> END  
    Reference : https://www.w3schools.com/sql/func_mysql_if.asp
    https://stackoverflow.com/questions/63447/how-do-i-perform-an-if-then-in-an-sql-select
    5a. How to update multiple rows on different conditions in a single query
    This query will update multiple rows on different condition
    UPDATE `pvpladder` SET `points` = CASE WHEN `char_id` = 150000 THEN `points` +1 WHEN `char_id` = 150001 THEN `points` -1 END WHERE `char_id` IN (150000,150001); Reference : https://stackoverflow.com/questions/20255138/sql-update-multiple-records-in-one-query
  5. Upvote
    bWolfie reacted to AnnieRuru in Advance SQL commands   
    3. Choose a table type, MyISAM or InnoDB ?
    https://stackoverflow.com/questions/20148/myisam-versus-innodb
    Before MySQL 5.5,
    MyISAM is mostly use for read-heavy + table locking storage engine = such as pvp ladder ( always select ... order by kill desc )
    InnoDB is mostly use for write-heavy + row locking storage engine = such as quest script ( select ... from char_id ... only 1 row is retrieve )
    After MySQL 5.6, (currently is 8.0)
    just stick to InnoDB
    there is only 1 reason MyISAM is better than InnoDB
    - MyISAM use smaller disk usage than InnoDB
    let's take a look at our MyISAM to InnoDB converter
    https://github.com/HerculesWS/Hercules/blob/stable/sql-files/tools/convert_engine_innodb.sql
    This converter is useful if you are using MySQL 5.6 or above
    There are 4 tables that are commented out
    the reason is simple, these 4 tables only read once and forgotten when server is live
    since MyISAM is good at reading (SELECT) + smaller disk usage, its no use to convert these 4 tables into InnoDB
    3a How to index a table properly
    http://mysql.rjweb.org/doc.php/index_cookbook_mysql
    http://www.dbta.com/Columns/DBA-Corner/Top-10-Steps-to-Building-Useful-Database-Indexes-100498.aspx
    a simple thumb of rule, anything that is SELECT .... WHERE `field` = .....
    that `field` has to be index
    let's take a look at this PVP Ladder script that use Kill/Death ratio
    CREATE TABLE `pvpladder` ( `char_id` INT(11), `name` VARCHAR(23), `kills` INT(11), `death` INT(11), PRIMARY KEY (`char_id`), KEY (`kills`, `death`) ) ENGINE = InnoDB; prontera,155,186,6 script PVP Ladder 1_F_MARIA,{ .@nb = query_sql( "SELECT `name`, `kills`/(`death`+1) FROM `pvpladder` WHERE `kills` > 0 ORDER BY `kills`/(`death`+1) DESC LIMIT 10", .@name$, .@ratio$ ); if ( !.@nb ) { mes "no entry"; close; } mes "Current Ranking :"; for ( .@i = 0; .@i < .@nb; ++.@i ) mes "No."+(.@i +1)+" ["+ .@name$[.@i] +"] "+ .@ratio$[.@i] +" kill"; close; OnPCKillEvent: if ( killedrid == getcharid(3) ) { // killing self should only increase death count. EG: Grand-cross query_sql "INSERT INTO `pvpladder` VALUES ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) )+"', 0,1 ) ON DUPLICATE KEY UPDATE `death` = `death` +1"; end; } query_sql "INSERT INTO `pvpladder` VALUES ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) )+"', 1,0 ) ON DUPLICATE KEY UPDATE `kills` = `kills` +1"; attachrid killedrid; query_sql "INSERT INTO `pvpladder` VALUES ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) )+"', 0,1 ) ON DUPLICATE KEY UPDATE `death` = `death` +1"; end; } This kind of query -> ORDER BY kills/death, needs to index them together like this
    KEY (`kills`, `death`) 3b. Why you shouldn't use `char_reg_num_db` table
    blame Euphy for spreading this technique
    There are 2 reasons why you shouldn't even touch all these variable tables
    Reason no.1 This table is sorely meant for server usage
    Once these data is loaded, it is process internally, and only save character data according to this configuration
    Reason no.2 The `value` field is not index !
    This line has ORDER BY `value`, try recheck our main.sql file
    CREATE TABLE IF NOT EXISTS `acc_reg_num_db` ( `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', `value` INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; SQL will search through every single line in the `value` field if that column isn't index
    Of course you can ... do ALTER table to add KEY to the `value` field
    but this table has already optimized in that way for server usage
    the more field you index into the table, the more disk usage space it use
    Conclusion : If you want to make a custom script, then make a custom table. Leave these table alone !
  6. Upvote
    bWolfie got a reaction from Sav4Ge in [Warning] pc_bonus2: unknown type 2061 16 15!   
    bonus2(bAddRace, RC_DemiPlayer, 20);
    works fine for me
  7. Upvote
    bWolfie got a reaction from Sav4Ge in [Warning] pc_bonus2: unknown type 2061 16 15!   
    2061 = SP_RACE_TOLERANCE
    check you are using right db as this bonus only work in renewal if i recall
  8. Upvote
    bWolfie reacted to Ai4rei in What skills should I learn in order to understand Client development?   
    Depending on how much you want DIY on the client, the learning curve can be steep.
    Imho the primary skills are knowing how the client works from the player perspective (i.e. the whole functionality available, without modifying it) and knowing the subject you want to include/exclude. Thus, if you want to deal with bots, you should also know how bots work and be able to setup and use one.
    Further down, you have to deal with C++, machine code generated from C++ (assembler), disassembling, debugging and Win32 API. If you stumble upon graphics stuff, GDI and DirectX 7 are also topics of interest. If you deal with network code and packets, some background knowledge of TCP is also helpful.
    Note, that some things are better to be done server-side rather than client-side for two reasons:
    Players can undo your client-side changes, but not server-side. Server-side is easier to edit, since you have all the source, whereas in the client you have only the gory machine code.
  9. Upvote
    bWolfie reacted to AnnieRuru in :hide:   
    anyone miss meh?
  10. Upvote
    bWolfie reacted to 4144 in Nemo patcher   
    Add patch "Disable Cheat Defender Game Guard" for disabled cheat defender. This game guard from version 2018-03-15 used in zero clients and probably will be used in kro main.
    Also included replacment for cheat defender dll CDClient.dll
    After this patch client not do any packets encryption and can connect to hercules.
     
  11. Upvote
    bWolfie got a reaction from Virtue in Question:Alchemist Creation   
    Yes. The file is db/produce_db.txt. Just search 'AM_PHARMACY' and you will find the area you need.
    However, it is not enough to give ranking points. That would require source editing.
    To make your custom item give ranking points, first open src/map/itemdb.h and add a constant for your custom Item ID.

    enum item_itemid {     ITEMID_MYCUSTOMITEM            = 29001, }
    Then open src/map/skill.c and need to include your constant to not 'continue'.
    Find:
    if (rnd()%10000 < make_per || qty == 1) { //Success tmp_item.amount++; if(nameid < ITEMID_RED_SLIM_POTION || nameid > ITEMID_WHITE_SLIM_POTION) continue; Below it, change so it like this:
    if (rnd()%10000 < make_per || qty == 1) { //Success tmp_item.amount++; if((nameid < ITEMID_RED_SLIM_POTION || nameid > ITEMID_WHITE_SLIM_POTION) && nameid != ITEMID_MYCUSTOMITEM) continue;  
  12. Upvote
    bWolfie got a reaction from astralprojection in How to filter getinventorylist   
    How about this? It should store every non-bound item in a new array .@ID[]
    getinventorylist(); for (.@i = 0; .@i < @inventorylist_count; .@i++) { /* Filter only items that is not bound */ if (!@inventorylist_bound[.@i]){ .@itemname$ = callfunc( "getitemname2", @inventorylist_id[.@i], @inventorylist_identify[.@i], @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i], @inventorylist_bound[.@i]); .@menu$ += sprintf("%s %s:", @itemname2_info$, .@itemname$); .@ID[.@j] = @inventorylist_id[.@i]; .@j++; } } .@menu$ += "Cancel"; .@s = select(.@menu$) -1; if (.@s == .@j) close; /* Now display ItemID of selected inventory */ mesf("You have selected %d", .@ID[.@s]); // this did not return correct info because it reads [.@s] index from getinventorylist but not the filtered menu.  
  13. Upvote
    bWolfie reacted to Adel in ★Showcase★ Armellia Village   
    Armellia village was my first map that I've created using Brow Edit.
    It was also the biggest map I have created so far. Watch the video in HD for better quality. Enjoy  
     
     
    Screenshots
     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  14. Upvote
    bWolfie got a reaction from kukayasko in Falcon Assault Arrow Elelemet   
    Open skill_db.conf.
    Find Name: "SN_FALCONASSAULT"
    Below 'AttackType: "Misc"' add

        Element: "Ele_Weapon"
  15. Upvote
    bWolfie reacted to Aeromesi in Returning back   
    Hello everyone. I've returned and I'll be getting back into RO. I don't want to talk about why I left but I'm here and sorry for the random disappearance. Nice to see the new design on Hercules, finally the new ipb!
  16. Upvote
    bWolfie reacted to Adel in Adel's Sprite Showcase   
    Valentines Sprites
     
                
            

        
                
  17. Upvote
    bWolfie reacted to smiths12 in Tantalus   
    View File Tantalus
    Hello everyone, i show you the monster ''Tantalus'' it's a Haunted Tree from Trickster Online, u can use at instances, quests, etc.
    IMPORTANT: it has sound effects for walking, attacking and dying. please put the data folder in your ragnarok.

    -Don't steal credits, give credits to me, that I cost my effort to do them.
    -Do Not edit my work without my permission, It includes recolors.
     
     
    Submitter smiths12 Submitted 02/13/18 Category Sprites & Palettes  
  18. Upvote
    bWolfie reacted to Igniz in Nemo patcher   
    Great work, Any PayPal account to buy you a coffe?
    I'm really interested in 64K Hairstyles and maybe we can cheer you up with some donations
  19. Upvote
    bWolfie got a reaction from Rebel in R>Plugin Hooks Guide   
    Requesting someone to make a guide on plugins. It's really confusing trying to make pre-hooks work just for a small part of the function you want to change. It's annoying for everyone having to ask over and over again why my plugin is not working the way it is intended.
    Example, I made a pre-hook, but it ends up ignoring everything that follows this part of the function. Instead of asking somebody the reason behind this, it's good if we can learn ourselves. With the documents and resources available, trial and error is my only option.
    Existing plugin examples is NOT great because there are not examples which cover every aspect of source.
    Will have to go back to editing source if this continues to be a pain -_-
    If I can quote AnnieRuru..,
     
  20. Upvote
    bWolfie got a reaction from caspe in Nemo patcher   
    2014-10-22b
    2015-05-13a
    2015-10-29a
  21. Upvote
    bWolfie reacted to Functor in Nemo patcher   
    @4144
    Script for patch "Enable Multiple GRFs - Embedded" has bug.
    Script tries to find code in "Step 2b" by using first pattern without limit.
    As a result - patch at wrong place. Game doesn't start. I added limit. You can add fix to the fork. Thanks.
    https://mega.nz/#!NUsTyLJD!YGk8Q_reiLChu5CNUJwwGAZyZgU4hbNuh25E94gkU0E
  22. Upvote
    bWolfie reacted to 4144 in Nemo patcher   
    @Functor i adding patches and fixes from secrets fork too. your changes already here.
    If you want direct contribution, probably better create merge requests in gitlab
     
  23. Upvote
    bWolfie reacted to jowy in Just Another CP   
    Hi,
    I just started develop another ragnarok cp because I found fluxcp doesnt suit my need and doesnt easy to extend.
    You can see the looks on screenshot below
    It is still far from done yet. I will try to make extendable by utilizing module pattern (installable via composer)
    and the good news is I will be releasing as opensource so everyone can contribute you can follow development progress on github
    Any feedback, idea or contribution are welcome!
  24. Upvote
    bWolfie reacted to 4144 in Nemo patcher   
    This topic about Nemo fork https://gitlab.com/4144/Nemo
    Most changes present in ChangeLog
    Patches reports service: http://nemo.herc.ws
     
    For test Ragnarok zero clients need:
     
    this nemo fork and enable at least patches from https://gitlab.com/4144/Nemo/blob/master/profiles/zero_minimal.log this or similar clientinfo.xml https://gitlab.com/4144/Nemo/blob/master/configs/zero/clientinfo.xml  
    From 2018-11-14 in all clients must be enabled patch Remove hard coded address/port
    For clients newer than 2018-03-09:
    Need manually copy cdclient.dll from Nemo/input or enable patch "Copy patched Cheat Defender Game Guard"
     
    Clients exe downloads: http://nemo.herc.ws/downloads/
    Full client downloads: http://nemo.herc.ws/downloads/#downloadable-full-clients
     
    Discord: https://discord.com/invite/ByEQHDf
     
     
  25. Upvote
    bWolfie reacted to Tio Akima in ADD new Signboard - chat/shop/icon/etc   
    Hi, I'm TioAkima.
    Small tutorial to help add the new fucking SIGNBOARDs that are available to new clients.
    If I'm not mistaken, it's for client's 2016+
    For those who do not know, I'm talking about these new chat/shop on the NPC:


     
    They are cool and leave the server with a nice face. <3
    it is quite simple.
    Go in your data folder, and in your LUA files (luafiles514)
    search for file signboardlist.lub
    data\luafiles514\lua files\signboardlist.lub Now let's understand how this file works to add a SIGNBOARD (cute little window with icon) like this:


    The structure of the file is as follows:
    {" prontera", 150, 193, 5, IT_BMP, "유저인터페이스\\information\\over_kafra.bmp", " KAFRA Tools ","#0x00FFFFFF"}    {
            "prontera", = map name
            150, = x
            193, = y
            5, = height you want the window (can be zero if you want)
            IT_SIGNBOARD, = window type
           "유저인터페이스\\information\\over_kafra.bmp",  = here is the directory where your icon is
            "KAFRA Tools", = chat  name
            "#0x00FFFFFF" = letter color
        },
    Just add another line following this format. Remembering that the last window does not have the comma in the end ... It is good to pay attention to this.
    Now to add icons in this other way>


    The format is very similar, but it has some minimal difference ... And it's also in the same file.
    It's pretty much the same thing, but one or the other function argument changes.
    The structure is this:
    {"prontera", 150, 193, 1, IT_BMP, "유저인터페이스\\information\\over_kafra.bmp"},    {
            "prontera", = map name
            150, = x
            193, = y
            1, = height you want the icon (can be zero if you want)
            IT_BMP, = Only place the icon (without the window)
           "유저인터페이스\\information\\over_kafra.bmp"  = here is the directory where your icon is
        },
    READY!
    Note that for this, you do not put the name of the chat nor the color of the letter! (you do not have these two arguments, okay?) ..
    That's it .. I hope it helps anyone who wants to put these windows.

    att,
    Tio akima
×
×
  • Create New...

Important Information

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