Jump to content

Virtue

Members
  • Posts

    354
  • Joined

  • Days Won

    6

Posts posted by Virtue

  1. On 2/11/2023 at 1:41 AM, Tero said:

    Being doing some behind the scenes stuff lately, most of which is hard to show off.

     

    For starters, I've been fiddling with autocast.  I've mentioned before that I always felt Professor felt mediocre and part of this is because autocast kind of sucks.  Whenever you trigger an autocast, it cancels your attack and you just pose, similar to casting the spell normally.  For Professor, this makes autocast kind of pointless since you can just cast the spell normally and attack with free cast and you get a similar effect, except you call the spell at the maximum level.  I've always felt that they way it should work is that you should keep attacking and the spell should just go off, so autocast is just like bonus DPS on top of your regular attacking.

     

    This is actually extremely hard to change, because the posing actually takes place client-side, and it does not respect any of the fields sent in the packet like amotion.  There is a flag that is sent to skill_attack that can suppress the casting animation, but it doesn't work for multi-hit or NPC skills (ie, almost every spell that can be autocast) and it has its own share of problems.

     

    My first change to try to change this was to shift the "src" of the attack to the target.  For mobs, this works perfectly, because mobs don't have casting animations.  We can now auto-attack and throw bolts without stopping!

    Modding23.png.5ebc0991d4ee6871cc1e936c006b7ed3.png

     

    The problem is PVP.  If you use this approach for PVP, the person being hit by the bolts does the casting animation instead!  This is obviously not what we want.  There isn't a great solution to this.  What I've done is to change the damage type to splash when used against a player (this is also how the animation flag works).  However, this has several issues.  When casting a multi-hit spell, it only hits once (for bolts, all the bolts come down at once).  It also deals the damage instantly, rather than after the animation.  This is not ideal, but I don't think there's any other way without changing the client.

     

    Notice the 501 damage from the bolts already happened a bit ago even though they haven't hit yet.

    Modding24.png.ae3e24cbb4e8c49c1754d4a60303ab5f.png

     

    Speaking of, I've been working on PVP.  I wrote a pretty simple script to add some PVP arenas, which I've added to this post if anyone wants it.  It does require you to set the mapflags on these maps (pvp_n_1-5, pvp_n_2-5, and pvp_n_3-5), all of them need to have the nightmare flag removed and the nopenalty flag added, and the first arena needs noparty, and the last needs noexp and noloot.

     

    The first two arenas are pretty straightforward, the first is FFA and the second is Team-Based.  The third arena is fun though, as it also spawns some enemies!  It can get pretty chaotic, but you might be able to use the Monsters to your advantage.  You can also just use this area to test out your builds without any risk, since you don't lose exp if you die here (though you don't get exp or drops either).

    Modding25.png.446a6cde777cd261d60b9eab62aaf612.png

     

    Finally, I also added a pity system for cards.  Whenever a card fails to drop from a monster, the rate very slightly increases until the card drops, at which time it resets.  This increase is server-wide and it doesn't persist if the server is shut down, but I think it makes card hunting feel a lot better.  It doesn't make a huge amount of difference most of the time, but it makes it very unlikely to go super dry on getting a card.  The chance of taking like 4x the expected amount of kills to get a card is now effectively nonexistent.

     

    Programming-wise this is actually pretty simple.  I might maybe eventually make a topic about it if people want it.

    pvp.txt 6.9 kB · 9 downloads

    Interesting. How did you make the pity system

  2. 14 minutes ago, hendra814 said:

    may i know how to enable it?

    https://github.com/rathena/rathena/blob/bb8c4a03c8d3d9559637ab537babdd0733ecc041/doc/script_commands.txt#L8376

    *item_enchant(<client side LUA index>{,<char ID>});
    
    Opens the enchant UI for the attached character or the player given by the <char ID> parameter.
    If the player exceeds 70% weight the client will not open the enchant UI and will trigger an
    error message instead.
    
    This command requires packet version 2021-11-03 or newer.

    It's a script command. You'd also have to make sure the all the necessary info/items are updated on your lua files.

    https://github.com/llchrisll/ROenglishRE/blob/master/Renewal/data/luafiles514/lua files/Enchant/EnchantList.lub

    • MVP 1
  3. 1 hour ago, hendra814 said:

    hi, i'm tried using like this, but the hat effect not showed.

     

    you're on the right track. instead of doing it on a login script, do it on the item script directly eg:

      - Id: 9999999
        AegisName: Your_Item_Name
        Name: Your Item Name
        Type: Armor
        Buy: 10
        Weight: 10000
        Defense: 10000
        Locations:
          Costume_Head_Low: true
        ArmorLevel: 1
        Refineable: true
        Script: |
          if(BaseLevel < 200){
          hateffect HAT_EF_arcane_aura_A,true;
          }
          if(BaseLevel < 150){
          hateffect HAT_EF_arcane_aura_B,true;
          }
        UnEquipScript: |
          hateffect HAT_EF_arcane_aura_A,false;
          hateffect HAT_EF_arcane_aura_B,false;

    something along the one above.

  4. Definitely. You can use the one below:

    *readparam(<parameter number>{,"<character name>"})
    *readparam(<parameter number>{,<char_id>})
    
    This function will return the specified stat of the invoking character, or, if a
    character name or character id is specified, of that player. The stat can either
    be a number or parameter name, defined in 'src/map/script_constants.hpp'.
    
    Some example parameters:
    
    StatusPoint, BaseLevel, SkillPoint, Class, Upper, Zeny, Sex, Weight, MaxWeight,
    JobLevel, BaseExp, JobExp, NextBaseExp, NextJobExp, Hp, MaxHp, Sp, MaxSp,
    BaseJob, Karma, Manner, bVit, bDex, bAgi, bStr, bInt, bLuk, Ap, MaxAp
    
    All of these also behave as variables, but don't expect to be able to just 'set'
    them - some will not work for various internal reasons.
    
    Example 1:
    
        // Returns how many status points you haven't spent yet.
        mes "Unused status points: " + readparam(9);
    
    Using this particular information as a function call is not required. Typing this
    will return the same result:
    
        mes "Unused status points: " + StatusPoint;
    
    Example 2:
    
    You can also use this command to get stat values.
    
        if (readparam(bVit) > 77)
            mes "Only people with over 77 Vit are reading this!";

    https://github.com/rathena/rathena/blob/b56f11207c3cb5337dca07bb910ba85316c84939/doc/script_commands.txt#L2445

  5. You can create one based on the default one on rAthena -> https://github.com/rathena/rathena/blob/master/npc/merchants/enchan_arm.txt

    Or Chris's enchant costume -> https://github.com/llchrisll/rAthena-Scripts/blob/master/requests/costume_enchant.txt

    Or if you want it to be a bit more expansive you can also check and base it from the ones on the re enhancement scripts. there are a lot of them.

    You just need to specify the costumes that you'd allow to be enchant, or if you want all costumes to be allowed on enchant you can put in a check like 

    *getequipid({<equipment slot>,<char_id>})
    
    This function returns the item ID of the item slot that calls the script
    on the invoking character or the specified equipment slot. If nothing is
    equipped there, it returns -1.

     

  6. On 8/21/2017 at 7:01 AM, nitrous said:

    It can be done through source edits/additions.

    You would need to create a new timer function and make it trigger 5 minutes before the spawn of the monster. That function will send the announcement that the monster will spawn.

    In mob_setdelayspawn, you will have to check if the mob is an MvP, then call add_timer with the current tick of the server + spawn time - 5 minutes.

    Sorry for necroing this post, I was trying too see if anyone was able to make or implement something like this. ( setting an announcement a few minutes before a mob spawns )

  7.  

    Spoiler

    Hello rA,

    I was trying to include map name in rare drop announce and was able to manage to do it but it causes the issue below:

    Spoiler

    image.png.85f3ab88225d6698dfdeadbe900a3aba.png

    The mapserver crashes after clicking retry, and ignore does let the server continue.

    Here's what I did:

    //A Rare Drop Global Announce by Lupus
                if( mvp_sd && md->db->dropitem[i].rate <= battle_config.rare_drop_announce ) {
                    char message[128];
                    sprintf (message, msg_txt(NULL,541), mvp_sd->status.name, md->name, mapindex_id2name(mvp_sd->bl.m), it->ename.c_str(), (float)drop_rate/100);
                    //MSG: "'%s' won %s's %s (chance: %0.02f%%)"
                    intif_broadcast(message,strlen(message)+1,BC_DEFAULT);
                }

    I was also looking to chance the color but I've tried replacing BC_DEFAULT to 0xFFFFFF just to check, but nothing happens. 

     

     

    found the issue. now the color part is the only thing left.

  8. Here's an updated video of how things are supposed to work. Normal Anti-bot and Manual Anti-bot(GM Triggered) script 

    To-Do:

    Polish Card images remove small magenta colors on the bottom (got mixed up when I was resizing the cardbmps)

    Add a few more modules to the script.

     

    PS: Normal Antibot is configured to trigger every mob kill on the video for testing purposes.

  9. Yeah, that is true. Both openkore and zumbot might've already evolved to go about this, I did see something about it while doing the thing. I'm still trying to as part of me learning about bindatcmd and other possible ways of using it ? I've also managed to add images and other puzzles, just not yet done in creating all the bmp required for the process I've thought of.

    Thanks for the feedback ?

  10. This antibot script is still WIP. The whole script is based on the one released here: 

    This can be an alternative to using the macro functions (/macro_detector). Especially helpful for those client version without it. This could also help for transparency on a server, this shows GM activity and bot reports are being taken care of.

    I just made it as a manual option as part of me learning more about the bindatcmd script command. at the time of recording, I haven't used the bindatcmd variables. so you'd see me using it by #command. Also, instead of using statuses like sc_start SC_FREEZE. I used the one below:

    Spoiler

     

    *setpcblock <type>,<state>{,<account ID>};
    *getpcblock {<account ID>};
    
    'setpcblock' command prevents/allows the player from doing the given <type> of action according
    to the <state> during the player session (note: @reloadscript removes all <type> except PCBLOCK_IMMUNE).
    The <type> values are bit-masks, multiples of <type> can be added to change the player action.
    
    The action is blocked when the <state> is true, while false allows the action again.
    
    'getpcblock' command return the bit-mask value of the currently
    enabled block flags.

    using this renders the character unable to attack, use skills, use @commands, talk to npc etc..

    Sample Video Preview:

    BotKiller1SQL.txt

  11. If you're referring to the image below, you might want to check the barter shop. This works with clients 2019-01-16RagexeRE or later

    83983680-dcf28280-a906-11ea-8ebc-ec8af1dfec2c.png

    83983685-e24fcd00-a906-11ea-8d9b-43ddbea6a53b.png

    This can be turned on or off at features.conf

    // Barter Shop System (Note 1)
    // Requires: 2019-01-16RagexeRE or later
    feature.barter: off

     

×
×
  • Create New...