Jump to content

Source Modifications

Source Mods & Code Snippets located here.

135 files

  1. Free

    ALL monster drop item with Random Option

    ALL equipment drop by monster has chance of getting Random-Option.
    Like MU online every item you found have some (random) option .. now in rathena.
    /////////////
    News update
    28/04/2107
    due to #2065 one of the requirement was merged in to rathena master so
    we no longer need any source modification for those who using latest release.
    /////////////////
    UPDATE
    V.1.0 - 3 random option in each item.
    V.1.1 - has chance of getting 0-3 option in stead of fixed 3option.
    V.1.2 - drop chance is lower according to option quantity. Now 3option is rare (not yet applied to weapon).
             - Fixed error message.
             
    pre-re user still getting error message refer to Invalid monster ID.
    but random-drop-system work fine with this error.
    get in touch with next update.
    /////////
    Requirement (for athena before  bf2461f  28/04/2107)
    Initial release item random option for monster drop #2065 ////////////////
    Installation
    replace the following files.
    db/re(pre-re)/item_randomopt_group.txt
    db/re(pre-re)/mob_drop.txt

    make sure your   /db/re(pre-re)/item_randomopt_db.txt is 201 lines (200 sloc)  16.7 KB.
    add following 6 line at the end of /db/const.txt

    RDMOPTG_WEP    1
    RDMOPTG_EQARM    2
    RDMOPTG_EQSH    3
    RDMOPTG_EQGAR    4
    RDMOPTG_EQFOOT    5
    RDMOPTG_EQACC    6
     
    //////////////////
    Option Description (DEFAULT)
    ///////////
    Drop rate (DEFAULT)
    same rate as you can see in db/re/item_db.txt
    customize your droprate by editing db/re(pre-re)/mob_drop.txt
    /////////
     
    Feel free to PM me
     

    3237 downloads

    Updated

  2. Free

    Protection System ( @security ) #Free

    This system is already activated in the source of the brAthena.
    It was created by Orce, and with my friend's help, we converted to rA, and it's working perfectly with the last revision
    Language: PT-BR, EN-US
    Ps. Sorry my english 

    985 downloads

    Updated

  3. 5.00 USD

    Hop Jump

    Hop Jump [ GLO_SAUT ] 
    Can be used with the skill id 5000 or the atcommand @hop <skill level>

    2 purchases   8 downloads

    Submitted

  4. Free

    Guild Activity Logging

    About This File
    Tested and working with: c212b2ed053d60855ce584a0368d98cff94c5059
    This source edit is intended for my experiments. Feel free to have fun with it but I wouldn't be held accountable for damages that it may create for your server.
    No support will be given other than the specified rAthena version above.
    Purpose
    To improve the Guild Activity Logging of rAthena. 
    It works for the following Guild Logging activities:
    1. Guild Creation
    2. Guild Breakage
    3. Guild Member Addition
    4. Guild Member Removal/Leave
    5. Guild Alliance Formation
    6. Guild Alliance Breakage
    7. Guild Antagonist Formation
    8. Guild Antagonist Breakage
    9. Guild Castle Occupancy
    10. Guild Castle Abandonment
    Usage
    1. Tracking guild activities of a character
    SELECT origin, target, `activity`, COUNT(`activity`) as "Times Done" FROM interlog WHERE origin = "this" or target = "this" GROUP BY `activity`   2. Tracking a guild's WoE Castle occupancy rate SELECT castle_id, COUNT(`activity`) as "Times Done" FROM interlog WHERE `origin` = "ThisGuild" and `activity` like "%Occupied%" GROUP BY castle_id  

    107 downloads

    Updated

  5. Free

    @command pack

    ¦¦¦¦¦¦ ¦¦¦¦¦¦ ¦¦¦¦¦¦ ¦¦¦¦¦¦¦¦ ¦¦ ¦¦ ¦¦ ¦¦¦¦¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦¦ ¦¦ ¦¦ ¦¦¦ ¦¦ ¦¦¦¦¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦¦¦¦ ¦¦ ¦¦¦ ¦¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦¦¦¦ ¦¦¦¦¦¦ ¦¦ ¦¦ ¦¦ ¦¦ ¦¦¦¦¦¦¦ @command pack. (@runlabel, @allchat, @emo, @allemo, @alleffect) //////////////////////////////////////////////////////////////////////////////////////////////// [src/map/atcommand.c] is the only file needed to be editted. Set your account group permissions as desired. You're assumed to know how to implement these. However, if you have further questions, feel free to contact me. //////////////////////////////////////////////////////////////////////////////////////////////// ACMD_DEF(runlabel), //rootKid ACMD_DEF(allchat), //rootKid ACMD_DEF(emo), //rootKid ACMD_DEF(allemo), //rootKid ACMD_DEF(alleffect), //rootKid /*========================================== * @runlabel by [rootKid] * Makes invoker run an 'On' label from within an npc * @runlabel Healer#OnMinute44 *------------------------------------------*/ ACMD_FUNC(runlabel) { char label_output[256],npcname[100],label[100]; nullpo_retr(-1, sd); if (!message || !*message) { sprintf(atcmd_output, "Usage: @runlabel <npc name>, <label>"); clif_displaymessage(fd, atcmd_output); return -1; } if (sscanf(message, "%23[^,], %99[^\n]", npcname, label) < 2) { clif_displaymessage(fd, "Please, enter the correct info (usage: @runlabel <npc name>, <label>)."); return -1; } if (npc_name2id(npcname) != NULL) { sprintf(label_output, "%s::%s", npcname, label); npc_event( sd, label_output, 0 ); clif_displaymessage(fd, "Label was triggered."); return 0; } else { clif_displaymessage(fd, "NPC doesn't exist."); return -1; } } /*========================================== * @allchat by [rootKid] * Makes all players, except the invoker, send out a desired message * eg. @allchat blahblah *------------------------------------------*/ ACMD_FUNC(allchat) { struct map_session_data* iter_sd; struct s_mapiterator* iter; char tempmes[200]; iter = mapit_getallusers(); nullpo_retr(-1, sd); memset(tempmes, '\0', sizeof(tempmes)); memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%199[^\n]", tempmes) < 0) { clif_displaymessage(fd, "Please, enter a message (usage: @me <message>)."); return -1; } for (iter_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); iter_sd = (TBL_PC*)mapit_next(iter)) if (iter_sd != sd){ //Triggers on all players except the one who initiates it. sprintf(atcmd_output, "%s : %s", iter_sd->status.name, tempmes); // *%s %s* clif_disp_overhead(&iter_sd->bl, atcmd_output); } mapit_free(iter); return 0; } /*========================================== * @emo by [rootKid] * Makes invoker send out an emote * @emo 3 *------------------------------------------*/ ACMD_FUNC(emo) { if (!message || !*message) { clif_displaymessage(fd, "Usage: @emo 1-81"); return -1; } clif_emotion(&sd->bl, atoi(message)); return 0; } /*========================================== * @allemo by [rootKid] * Makes all players, except the invoker, send out a desired emote * eg. @allemo 1 *------------------------------------------*/ ACMD_FUNC(allemo) { struct map_session_data* iter_sd; struct s_mapiterator* iter; iter = mapit_getallusers(); if (!message || !*message) { clif_displaymessage(fd, "Usage: @emo 1-81"); return -1; } for (iter_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); iter_sd = (TBL_PC*)mapit_next(iter)) if (iter_sd != sd){ //Triggers on all players except the one who initiates it. clif_emotion(&iter_sd->bl, atoi(message)); } mapit_free(iter); return 0; } /*========================================== * @alleffect by [rootKid] * Makes all players, except the invoker, send out a desired special effect * eg. @alleffect 89 *------------------------------------------*/ ACMD_FUNC(alleffect) { struct map_session_data* iter_sd; struct s_mapiterator* iter; int type = 0, flag = 0; iter = mapit_getallusers(); nullpo_retr(-1, sd); if (!message || !*message || sscanf(message, "%d", &type) < 1) { clif_displaymessage(fd, "Please, enter an effect number (usage: @effect <effect number>)."); return -1; } for (iter_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); iter_sd = (TBL_PC*)mapit_next(iter)) if (iter_sd != sd){ //Triggers on all players except the one who initiates it. clif_specialeffect(&iter_sd->bl, type, (send_target)flag); } mapit_free(iter); return 0; }  

    281 downloads

    Updated

  6. Free

    Item "allowed" restriction

    With this mapflag you say where a certain item is allowed
    Example:
    seting:
    prontera mapflag customevent 1
    and
    500,1
    item id 500 just can be used in prontera.
    More info here.
    http://rathena.org/board/topic/97437-item-event-mapflag/
    Compatible with: 20ff69e

    134 downloads

    Updated

  7. Free

    Bg consume

    Recode of Brian's Item consumption mapflag.
    It allows to use BG consumables only in Battleground under bg_consume mapflag.
    More information here:
    http://rathena.org/board/topic/97556-bg-consume-items-tlema-comes-to-rathena/
    Compatible with: 20ff69e

    392 downloads

    Updated

  8. Free

    BG Eamod

    Hi,
    I'm not the autor, I just made the code compatible with rathena. All the credits go to the guy that developed Eamod, whoever Zephyrus is.
    I found this (original file): https://code.google.com/p/eamod-retail/source/browse/trunk/eAmod-A/Diffs/battleground/eAthena.patch
    And I was informed that the same file can be dowloaded from: http://eamod.wordpress.com/
    The BG NPCs are in: https://code.google.com/p/eamod-retail/source/browse/#svn%2Ftrunk%2FeAmod-A%2FDiffs%2Fbattleground%2Fnpc%2Fbattleground
    Compare with rathena NPCs and modify acoording you need.
    I Just made it compatible and compilable, please inform any bug you find.
    Have fun.
    Note: compatible with 20ff69e

    1144 downloads

    Updated

  9. Free

    cell_pvp

    Hi,
    With this you can set a cell as a pvp zone, therefore a zone in a map that is pvp and the rest it is not.
    I'm not the outor. I just think that this is cool So I made compatible with the last version of the emulator.
    More informatino here: http://rathena.org/board/topic/97799-cell-nopvp-cell-pvp/
    and here: http://hercules.ws/board/topic/4589-pk-area/?p=29693
    You need the folowing "npcs":
    - script CELLPVP -1,{OnInit: setcell "morocc",143,113,157,103,cell_pvp,1; end; }- script deathmatch_core -1,{ callfunc("pvp_scstart"); end;}function script pvp_scstart { sc_start SC_INC_AGI,120000,5; sc_start SC_BLESSING,120000,5; sc_start SC_MAGNIFICAT,120000,3;}

    457 downloads

    Submitted

  10. Free

    (HANSIP) Skill Spam Protection

    Info & History

    Info:
    HANSIP Protection is a src modification to make sure NDG,speed hack, WPE Users still follow the rules.

    History:
    This is a simple code, which we have made since long to minimize the NDG User.
    The first way to solve NDG, we add a cooldown for skills that dosn't has a fixed cooldown (Sonic Blow, Cross Impact, etc).

    But the player doesn't allowed to do double cast.
    Finaly we made this code that minimize the NDG users, but still keep the original feature that is double cast for some skills (Sonic Blow, Cross Impact, etc).



    Implementation & Feature

    Implementation:
    Download the file Apply manual "rA - Hansip Protection.diff" to your src. Paste "battle_conf.txt" to conf/import/ Don't forget to recompile your server. All done

    Features:
    The user still able to use double SB / CI / etc. You may switch on and off. Very simple Skill Packet Spam detector

    .

    Note:

    2013 client already detect modified file (after act delay).
    so i've tested this using WPE.
    i got the number from comparing with and without *cheat.



    Supported Skills:Bash Sonic Blow Arrow Vulcan Double Strave Bowling Bash Ninja Kouenka Ninja Hyousensou Jupitel Thunder Cross Impact Dragon Breath Fire & Water

    Change Log:
    1.1
    -Add archer double strave skill

    1.2
    -Add support for some skills

    1.3
    -Change name from NDG to Hansip
    -Add skill packet spam detector & punishment
    -Support PRE-RE

    1717 downloads

    Updated

  11. Free

    [Atcommand] displaydrop

    Introduction

    On a server where I play someone suggested to add the command "displaydrop" to enable people to see something rare or valuable was dropped by a monster because autoloot is only available until a certain level.
    I had some free time on my hands so I decided to implement something like that.


    Features

    You can limit the command like autoloot (e.g. @displaydrop 10 will only show items with a chance equal to or below 10%) Two different ways of server side configuration are available:Show real drop (<Monster> dropped <Item> (<Amount>.) Show only an unspecific message that a monster dropped something (<Monster> dropped something with a chance equal to or below <Chance>%.)





    Bugs, feedback, etc.
    If you have found a bug or want to give feedback about my modification you can either send me a private message or post in the related thread.

    218 downloads

    Submitted

  12. Free

    Fixed Cast and Delay Adjustment Mapflag

    This mapflag modification allows you to set a mapflag to reduce fixed cast time and delay by a percentage placed after the mapflag. I made this for a server I ran for awhile and used it specifically to reduce cast time and delay on standard (Non PvP or GvG) maps. It gives the game a quicker pace, without forcing you to modify a set config that changes the whole server. It's great for events, PvP, PvM... just about anything you can think of since you can modify this to your heart's content between maps.

    Example:prontera mapflag pvmcast 50 // Any player who goes to map 'prontera' has a 50% reduction in fixed cast time and delay
    This modification is dynamic, so you should be able to go between any map and have the correct reduction applied when necessary. Please test before releasing in a production server as I have ported it with a few different features in the latest GIT compared to what I use to have it set as.
    Also note the modification only adjusts fixed cast delay, it does not change variable cast time. This means it will only work in RENEWAL as well. Also, feel free to modify and re-release if you add some extra functionality to it.

    159 downloads

    Submitted

  13. Free

    Script command: Dynprompt

    Works like prompt(), but lets you specify return values by adding a pipe symbol.
    Examples:
    dynprompt("Menu Entry");
    Return Value: 1
    @menu: 1
    @menustr$: Menu Entry
    @menunum: 1
    dynprompt("^EE0000Menu Entry^000000|Test");
    Return Value: 1
    @menu: 1
    @menustr$: Test
    @menunum: 1
    dynprompt("Shazam|5 Shazam");
    Return Value: 5
    @menu: 1
    @menustr$: 5 Shazam
    @menunum: 5
    Script example:
    // Dynprompt usage - Advanced example// Probably the best way to use thisfunction script dynprompt_sample3 { // The real power of dynprompt is that you can specify the return value for each menu element. // The return value is a atoi of the string following the pipe | - the full string can be accessed through @menustr$ // The atoi val can also be accessed through @menunum // If you want to use both number & string, the number has to come first else atoi won't work // Use the pipe character | to denote the return value - best to work with numbers, but strings work as well set .@menu$[0], "^009900Hello!^000000|1Hello"; set .@menu$[1], "^0000EEInfo~^000000|2Info"; set .@menu$[2], "^222222Test.^000000|3Test"; // This time we'll just add a element based on a condition if(.@somecondition) set .@menu$[3], "^EE0000- Admin -^000000|4Admin"; set .@menu$[4], "^990099G'bye^000000|5Bye"; // Lets implode & switch/case switch(dynprompt(implode(.@menu$, ":"))) { case 1: mes "Oh, Hello to you too!"; break; case 2: mes "You want info? How about the time?"; mes gettimestr("%Y-%m/%d %H:%M:%S",21); mes "Also, you selected option #" + @menu; // @menu still works break; case 3: mes "Debug info:"; mes "@menu is " + @menu; mes "@menustr$ is " + @menustr$; mes "@menunum is " + @menunum; break; case 4: mes "Wow, a admin!"; break; case 5: mes "Bye bye~"; break; case 255: // Cancel button mes "Hey, don't ignore me!!"; break; } close;}
    I havn't tested it yet in production, but so far I havn't been able to encounter any issues with it.
    Also, I do all my eAthena devving on a windows box so I can't guarantee that it'll work with linux.
    Performance of dynprompt is going to be naturally worse than prompt, select or menu, but it might perform equally well in a dynamic setting if you take into consideration the array looping usually required - but I have not yet done any benchmarking or anything, so don't take my word for it. ( and to be honest, being able to create super clean code using switch / case is worth a tiny performance hit for me )
    I hope it will make your scripting less painful - it sure has for me!

    33 downloads

    Submitted

  14. Free

    Script Command: getrandmob()

    Another quick package up of a small command I've had lying around for a long time. Grabs a random monster from one of the branch databases. Useful for hunter quests, disguise events, and anything else you can think of. Uses database stored in memory, so it's faster and more efficient than running SQL queries and doesn't require you to use SQL dbs for items and mobs.
    /*==========================================
    * Fetches a random mob_id
    * getrandmob(num,type);
    *
    * type: Where to fetch from:
    * 0: dead branch list
    * 1: poring list
    * 2: bloody branch list
    * num: Mob level to check against (0 = all)
    *------------------------------------------*/
    To add, simply place the files into the src/custom folder. If you already use those files, add the new code into your existing populated files and do a clean make.

    168 downloads

    Updated

  15. Free

    No @command while talking NPC

    This mod is inspired by HERE and disable_items
    I made this mod to prevent using @command while talking to NPC.
    The default is prevent @command while talking to NPC
    to allow @command while talking to npc.

    enablecommand; // To allow @command while talking to NPC
    This is first version, Bug is normal.
    My suggestion
    -add setting in conf file

    286 downloads

    Submitted

  16. Free

    Race AntiSkill

    ======== Compatible ==========
    Compatible With rAthena, other emulator just PM me
    I made this code in purpose to event
    ======== How To Use ==========
    example:
    1002,PORING,Poring,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,0x83,..;
    change to
    1002,PORING,Poring,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,13,21,0x83,...;
    And your poring will immune again Skill (offensives).
    Note:
    3 = Race Plant
    13 = Race Anti Skill
    ======== Suggestion ==========
    Suggestions are welcome.

    251 downloads

    Updated

  17. Free

    @storeit - Store all Non-Equipped Items

    This is a simple command I've had laying around for a long time, so I figured I'd package it up and send it out. Like the title states, this is like @storeall, except it will ignore equipped items. Meant for the adventurer on the go who needs a quick inventory cleanup when farming. To add it, simple place the files in the src/custom folder If you already use these files, then just copy in the code from these ones into your already populated files. Then do a clean make.

    634 downloads

    Updated

  18. Free

    @AutoBuyAmmo

    Preview:

    -----------------------------------------------------
    After You use @autobuyammo to active this system,
    you will auto-buy some ammo when it is going run out.

    258 downloads

    Updated

  19. Free

    trunk_17511_inflation.patch

    This mod implement floating items price ingame.
    Tested/Compatible with rAthena SVN r17511.
    Idea Credited To: http://rathena.org/board/topic/86695-done-inflation-in-npc-shop/

    126 downloads

    Submitted

  20. Free

    Forcibly Strip

    Info : http://goo.gl/RXACXL
    Preview :

    ----------------------------------------------------------------------
    Transform request (hercules --> rA) by Adam

    420 downloads

    Submitted

  21. Free

    Reflect "Reflection damage"

    preview : http://bit.ly/169dTxy
    -
    When you attack someone and he give you damage cause reflection,
    you will also give him a reflection damage if you're wearing some equip which will do this

    213 downloads

    Submitted

  22. Free

    [rAthena] & [eAthena] nopub.patch

    This mod hides the chat boards ingame.
    Tested/Compatible with rAthena SVN r17324 and eAthena SVN.
    Idea Credited To: http://rathena.org/board/topic/80276-novendingboards-novenders/


    152 downloads

    Submitted

  23. Free

    [rAthena] & [eAthena] cell_noskill.patch

    This mod won't allow you to cast any skills on the selected cells.
    This mod helps alot if you have pvp maps like UFC Arena and other PvP Colosseum.
    Tested/Compatible with rAthena SVN r17325 and eAthena SVN.
    Sample Script:
    - script Function#noskill -1,{OnWhisperGlobal:OnInit: setcell "prontera",147,174,164,162,cell_noskill,1; end;}

    365 downloads

    Submitted

  24. Free

    @afk with AFK Hat

    Using @afk with AFK Hat. (Notice Board)
    I just modified it and put the AFK Hat effect.
    Changelog:
    v1.0 - Initial Release - Need to open a chat room to use @afk command and it is disabled to use in prontera
    v1.1 - No need to create a chat room to use @afk command as suggested by Mysterious (disabled to use in prontera)
    v1.2 (eA and rA) - Added a config in misc.conf. afk_timeout: 0 (0 is default) Tested with the latest rathena - Revision 17156
    v1.3 (rA ONLY) - Working with latest revision 17306 - Now you can't use @afk when you are dead.

    2969 downloads

    Updated

  25. Free

    @autopots

    Preview :
    http://bit.ly/XzIQJj

    When HP/SP lower than you set, it will auto use that item.
    Command :
    PS :
    Test and create on rA 17132

    1422 downloads

    Updated


×
×
  • Create New...