Jump to content

Source Modifications

Source Mods & Code Snippets located here.

135 files

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  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

    guildgetitem2 & guildgetitembound2

    This command sends items to the guild storage without the need of server restart.
    Example:
    prontera,100,100,5 script guildgetitem2 100,{ //guildgetitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; switch ( guildgetitem2(1218, 1, 1, 1, 10, 4305, 0, 0, 0) ) { case 1: dispbottom "Item added to your guild storage."; end; case 0: dispbottom "Unknown Error."; break; case -1: dispbottom "Cannot open both storages."; break; case -2: dispbottom "Player doesn't have a guild."; break; case -3: dispbottom "Player doesn't have a guild storage."; break; case -4: dispbottom "Guild storage being used by someone else."; break; case -5: dispbottom "Guild storage is full."; break; } end; }   Works much like getitem2 and it uses the attached players guildstorage.

    358 downloads

    Updated


×
×
  • Create New...