Jump to content

bWolfie

Members
  • Content Count

    850
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by bWolfie


  1. Will try it out. It's a decision you have to make whether to use it or not, since once you increase storage limit, you shouldn't ever reduce it, since players won't be able to access some items until they empty space :| could prove problematic. This is not exclusive to this plugin, though, thought I'd put it out there :P. Thanks as always, Dastgir!


  2. the best thing i can think of is to take an account variable the first time they login to their first character (in a script).

    OnPCLoginEvent:
         if (#Account_Created <= 0)
              #Account_Created = gettimetick(2);
         end;
    


  3. Edit: Sorry, I had a typo in map_ip setting. :|

    I recently diffed a client using NEMO patcher (tried 2014-10-22 and 2015-05-13), however, I have encountered the issue of not being able to join the map server. I get as far as character select, then once choosing my character, the client hangs before eventually receving the error "Failed to connect to server".

    I'm not sure what the issue is. I used an old "Profile", which automatically had all the diff choices setup from my previous client which worked perfect.
    I have tried the following things:

    • Using the client on a fresh version of Hercules (stable branch, with only the necessary changes made to be able to connect).
    • Checked src/common/mmo.h has the right PACKETVER defined. (20141022)
    • ./configure --enable-packetver=20141022 then compiling.
    • Disabling packet obfuscation in both the client patch diff and client.conf setting. (tried combinations of both)
    • Turning off my firewall.
    • Using only the recommended patches.

    When logging in, this is the output I receive: (nothing further after the last one)

    [Status]: Request for connection of my_account (ip: my.ip.address).
    [Notice]: Authentication accepted (account: my_account, id: 2000000, ip: my.ip.address)
    [Status]: Connection of the account 'my_account' accepted.
    [Info]: Closed connection from 'my.ip.address'.
    [Info]: request connect - account_id:2000000/login_id1:830490619/login_id2:1666885215
    [Info]: Loading Char Data (2000000)
    [Info]: Guild loaded (1 - My Guild)
    [Info]: Char load request (150000)
    [Info]: Loaded char (150000 - Myriad):  status memo inventory cart skills friends hotkeys mercenary accdata
    [Info]: Selected char: (Account 2000000: 0 - Myriad)
    [Info]: Subnet check [my.ip.address]: WAN
    

    Still no luck. Hope somebody can help! Thanks.


  4. not possible, since commands require an sd (I think stands for special data, kind of like a player id) to attach to the command.

    if you want to edit or fetch player data, it is better to use the query_sql() script command.

    in the case of slaveclone, you would need to create a custom script command for this situation.


  5. if you want to make a classic server you should research old eathena repo. dunno where you could find one. well, it would depend on what you consider 'classic'. some skill behavior changed since then, such as Shadow Jump, Body Relocation, Back Sliding.


  6. Digital Ocean is better than Linode and vultr for LA location...tried all three in LA server, linode and vultr really sucked from my experience.

    LA, San Francisco, Silicon Valley (pretty much anywhere West Coast USA) are all good locations for Asian players if you want to also have good connection for USA players. I've had reports of anywhere from 150-220 ping for SEA based players for west coast host.


  7. Hello again!

    This time I bring the getalliance(<Guild ID>) script command. It works similar to getpartymember() and getguildmember(). I'm still in the process of testing, but it seems to work okay so far. There is a sample script in the comments section at the top of the plugin. Try it out!

    *getalliance(<Guild ID>)
    This command will find all guilds in an alliance with the specified guild and
    returns their names and guild ids into an array of temporary global variables.
    
    Upon executing this,
    
    $@guildallyname$[]        is a global temporary string array which contains all the
                              names of each allied guild.
    
    $@guildoppositionname$[]  is a global temporary string array which contains all the
                              names of each opposition guild.
    
    $@guildallygid[]          is a global temporary number array which contains the
                              guild id of each allied guild.
    
    $@guildoppositiongid[]    is a global temporary number array which contains the
                              guild id of each opposition guild.
    
    $@guildallycount          is the number of allied guilds found.
    
    $@guildoppositioncount    is the number of opposition guilds found.
    
    Note that the returned guilds come in no particular order.
    
    Be sure to use $@guildallycount/$@guildoppositioncount to go through this array, and not
    getarraysize(), because it is not cleared between runs of getalliance().
    
    For usage examples, see getpartymember().
    

    Download: https://pastebin.com/82DxKcUW


  8. Hello! The following plugin will grant your server the getguildid("<Guild Name>") script command. It is quite self-explanatory. Simply enter the Guild Name for which you need the GID. Make sure you capture it too!

    Example:

    .@GID = getguildid("My Pro Guild");
    // .@GID will now be equal to whatever the guild id of 'My Pro Guild' is.
    // example, can be used with flagemblem
    flagemblem(.@GID);
    

    Hopefully no errors and compiles first time :D ...and hopefully this will get added to source as I hadn't found a similar functionality to it yet in our existing commands. :)
    Download: https://pastebin.com/CpyT7WKm


  9. Hello!

    I made this plugin so I can bring in a pull request to my server. It compiles fine and the server starts as well. However, the plugin actually breaks the server and makes it so I can't login. I know the code is fine as I tested by adding to clif.c before making it plugin form.
    How can I fix it?

    Thank you.
     

    bool clif_send_pre(const void **buf, int *len, struct block_list **bl, enum send_target *type)
    {
        struct map_session_data *sd;
    	    if (*type != ALL_CLIENT)
            nullpo_ret(*bl);
    	    sd = BL_CAST(BL_PC, *bl);
        // Hide Area Packets from hidden players https://github.com/HerculesWS/Hercules/pull/1200
        if (sd != NULL && pc_isinvisible(sd))
        {
            if (*type == AREA || *type == BG || *type == BG_AREA)
                *type = SELF;
            else if (*type == AREA_WOS || *type == BG_WOS || *type == BG_AREA_WOS)
                hookStop();
                return true;
        }
        hookStop();
        return true;
    }
    /* run when server starts */
    HPExport void plugin_init (void)
    {
        addHookPre(clif, send, clif_send_pre);
    }
    

  10. In pc.c, find pc_isUseitem
    In this function find:

        if( !item->script ) //if it has no script, you can't really consume it!
            return 0;
    


    Add below it:

        // No work when talking to NPC
        if (sd->npc_id > 0)
            return 0;
    

    Hopefully meko don't see this. He will rage at source edits :D


  11. yup i got same thing happening to me. It happened after I updated my Hercules to latest version. Now I can't connect to my server, connection gets closed immediately. It's strange, because I used same hex and client from before.

    Will update if I figure it out.

    [Status]: Request for connection of gmporter554 (ip: my.ip.address).
    [Notice]: Authentication accepted (account: myaccount, id: 2000065, ip: my.ip.address)
    [Status]: Connection of the account 'myaccount' accepted.
    [Info]: Closed connection from 'my.ip.address'.
    


    NVM! I was specifying 127.0.0.1 in char/map-server confs instead of my public IP. :)


  12. 15 hours ago, 4144 said:

    this error mean what your function prototype is wrong.

    For pre hooks almost all parameters should be pointers to same parameters from normal function.

    For example if was "const int fd", should be "int *const fd" or "int *fd"

    was "struct map_session_data *sd" should be "struct map_session_data **sd"

    etc

    thank you for the help. i realised I can ctrl+f in HPMHooking_map.Hooks.inc to find the structure needed. Compiled well this time. :)


  13. Thanks for help 4144 so far. Seems it compiles now, just with 1 error left to resolve.

    This is what I changed code to:

    bool atcommand_exec_pre(const int fd, struct map_session_data *sd, const char *message, bool player_invoked)
    //...all in between code here
        if (info == NULL)
            {
                sprintf(output, msg_fd(fd,153), command); // "%s is Unknown Command."
                clif->message(fd, output);
                atcommand->get_suggestions(sd, command + 1, is_atcommand);
                return true;
            }
        hookStop();
        return 0;
    }
    HPExport void plugin_init (void)
    {
         addHookPre(atcommand, exec, atcommand_exec_pre);
    }
    



    Error code:

    atcommand.c: In function ‘plugin_init’:
    ../plugins/HPMHooking.h:49:53: warning: comparison of distinct pointer types lacks a cast [enabled by default]
       (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                         ^
    atcommand.c:1580:2: note: in expansion of macro ‘addHookPre’
      addHookPre(atcommand, exec, atcommand_exec_pre);
      ^
    


  14. Thanks for your response @4144. I am trying to convert all my source edits into plugin format. Still trying to learn how to use them. This one I am having trouble with.

    I want to edit just this particular area in that bool.

        if (info == NULL) { // I want to edit this 'if' clause
            if (pc_get_group_level(sd) == 0) // TODO: remove or replace with proper permission // remove this line
                return false; // remove this line
            sprintf(output, msg_fd(fd,153), command); // "%s is Unknown Command."
            clif->message(fd, output);
            atcommand->get_suggestions(sd, command + 1, is_atcommand);
            return true;
        }
    

×
×
  • Create New...

Important Information

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