Jump to content

Source Modifications

Source Mods & Code Snippets located here.

146 files

  1. More information about "[Script Command] viewcondition"

    Free

    [Script Command] viewcondition

    This mod allows you to set some conditions to a player can see or interact with a NPC.

    Command:
    viewcondition( npc_name, int_variable_name, compare_method, value_1, { value_2 } );

    Compara Methods Avaiable:
    EVC_LESS - If player variable is < value_1
    EVC_EQUALS - if player variable is == value_1
    EVC_MORE - if player variable is  > value_1
    EVC_BETWEEN - if player variable is  >= value_1 and <= value_2
    EVC_DIFFERENT - if player variable is != value_1

    You can apply more than one condition to a npc, but if one condition fail, the npc will not be seeing by the player.

    Script Sample:

     
    new_1,55,111,5 Script Lupina#1 10078,{ mes "You can see and talk with me because your @teste variable is less than one!"; next; mes "Now, I will set @teste to 2 and you will no longe see me when goes outsight me or if use @refesh!"; close2; @teste = 2; end; OnInit: viewcondition( strnpcinfo(0), "@teste", EVC_LESS, 1 ); end; }  

    158 downloads

    Updated

  2. More information about "@sann (Custom Broadcast Command)"

    Free

    @sann (Custom Broadcast Command)

    The commands is @sann (contraction of staff announced), but you can use 3 types of sintaxis (because was add in the atcommand_eathena.conf 2 alias).
    The sintaxis is:
    @sann
    @astaff
    @staff
    What's new in versión 3.1?
    And auto detect what group belongs the GM and will add their label; all this using whatever you want in the sintaxis. So, if you'll use @sann, astaff or @staff the result will be the same.
    Note: Don't remove the credits, please

    156 downloads

    Submitted

  3. More information about "MVP Card to Mail"

    Free

    MVP Card to Mail

    Will automatically send to Mail when the MVP Drops Card.
    Thanks to RDL.

    152 downloads

    Submitted

  4. More information about "Prevent hitting mobs near NPC or Warper"

    Free

    Prevent hitting mobs near NPC or Warper

    Hi, 
    It's been a while since I posted anything.. As of now, I want to release this simple src mod that prevents players from hitting MVPs near an NPC/Warper. Purpose of this is to discourage players from going near warpers while hunting MVPs.

    I'm not sure how helpful this be but I just want to do something small for a while .

    I will be lurking around the request section to see some good ideas and might be releasing them here after!

    Cheers!

    147 downloads

    Updated

  5. More information about "[Script Command] isselling - Discovery if a npc is selling a item by ID"

    Free

    [Script Command] isselling - Discovery if a npc is selling a item by ID

    This commands verify if a npc is selling, returning 1 to yes and 0 to no.
    Its very useful to black market scripts for players who knows item id and don't want to lost time searching where items are sold.
    Obs: Didn't test the sample script, but you can have a idea in how to use.
    Sample Script:
    prontera,150,150,5 Script Who's Selling 90,{ .@n$ = "[Who is Selling]"; mes .@n$; // Its nice to put a delay in this script if you use a lot of stores in one map and in your .npc$ array // I'm using 5 seconds in this sample. if((gettimetick(2) - whosell_delay) < 5) { mes "You have to wait 5 seconds to use me again."; close; } mes "Tell me the item ID you want to know what npc's is selling it!"; input .@id; // You can test this sample with 607 ID whosell_delay = gettimetick(2); for( .@i = 1; .@i < getarraysize(.npcs$); .@i++) { .@found = isselling( getcharid(0), .npcs$[.@i], .@id ); if( .@found ) { next; mes "Ha, this item is " + getitemname( .@id ) + ", right?"; next; mes .@n$; mes "Who is selling it is " + .npcs$[.@i] + "!"; close2; showevent QTYPE_EVENT,QMARK_YELLOW,getcharid(0),.npcs$[.@i]; // Show in npc a ballon to player end; } } next; mes .@n$; mes "No npc selling it :)"; end; OnInit: setarray .npcs$[1],"Store 1","Store 2"; end; } prontera,151,150,5 shop Store 1 90,607:1000 prontera,152,150,5 shop Store 2 90,610:1000  


     

     

     

    146 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

    138 downloads

    Updated

  7. More information about "(QOL) Taekwon Mission printing % every monster killed for the mission"

    Free

    (QOL) Taekwon Mission printing % every monster killed for the mission

    A small QOL some players asked me to add.
    It justs print each time a monster is killed for the taekwon mission the % completed

    136 downloads

    Updated

  8. More information about "[Skill] Coup de Grace"

    Free

    [Skill] Coup de Grace

    When you use this, it will give you 100% critical.
    Preview :
    skill_db set :

    998,0,6,4,0,0x3,-1,5,1,yes,0,0,0,magic,0, DOTA_COUPDEGRACE,Coup de Grace
    skill_require_db set :

    998,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    skill_cast_db set :

    998,0,0,0,5000,0,30000,0
    Add new skill (Clinet) :
    http://rathena.org/wiki/Adding_new_skills#XRay_support
    http://rathena.org/wiki/Adding_new_skills#Renewal.2FNon-Xray_Support

    133 downloads

    Submitted

  9. 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/

    132 downloads

    Submitted

  10. Free

    Freezemap Script Command

    Information
    This script command will apply a percent chance of freeze the players in the map (no matter what stats or equipment they have) for a duration.
    Syntax

    freezemap "<map name>",<chance>,<tick>;
    Documentation
    Mirror
    [Xantara]_scriptcmd_freezemap.patch
    Credits
    Created by @Xantara
    Requested by @ngek202

    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
    Do not mirror without my consent.

    128 downloads

    Submitted

  11. More information about "@ignorebattle"

    Free

    @ignorebattle

    When Someone use this command, all player in that map will not be attacked by mobs

    116 downloads

    Submitted

  12. Free

    @dropall Modification & @dropalltab

    Information
    The modification on @dropall allows the user to specify what item type should be dropped. It still retains the ability to drop all items at once.
    The new atcommand, @dropalltab, allows the user to drop all items in a specific inventory tab. The user may choose to drop all items in all tabs (similar to the default behavior of @dropall).
    Tested on rAthena revision 16738.
    Syntax

    @dropall {item type}

    @dropalltab {tab number}
    Documentation
    Credits
    Created by @Xantara
    Requested by @Peopleperson49

    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
    Like my work?
    Rate/vote this download
    Rep up my support topic post


    Do not mirror without my consent.

    112 downloads

    Updated

  13. More information about "Guild Activity Logging"

    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  

    111 downloads

    Updated

  14. More information about "Snatch Modification"

    Free

    Snatch Modification

    SRC Modification of skill "RG_INTIMIDATE, Snatch".
    Teleport the player near a mob with the same id or near a monster with the same race present on the current map (if none, on random location).
    That's only a patch to apply on your rathena folder.
    Don't forget to thumbs up me if you like my content~

    102 downloads

    Updated

  15. More information about "Extra Mapflags [nofalcon, noriding, nomadogear, nowug, nocart]"

    Free

    Extra Mapflags [nofalcon, noriding, nomadogear, nowug, nocart]

    They are simple mapflags but I believe they can be very useful in general.
    Note: noriding affects pecopeco, dragon, gryphon.
    prontera mapflag nofalcon prontera mapflag noriding prontera mapflag nomadogear prontera mapflag nocart prontera mapflag nowug  

    102 downloads

    Submitted

  16. More information about "MF_NORECALL (Custom Mapflag)"

    Free

    MF_NORECALL (Custom Mapflag)

    MF_NORECALL a custom mapflag that restrict players being recalled via @recall / @recallall command when in special maps.

    In response to:

    100 downloads

    Updated

  17. More information about "Inject - Allows running dynamic scripts in running time"

    Free

    Inject - Allows running dynamic scripts in running time

    This script commands allow you to "Inject" scripts inside other scripts.
    But Zell, why I want this?

    Well, you can use a script code from a SQL table! Imagine that now you can change scripts code blocks without reloading scripts direct from your database or you can even do like me where I'm building scripts from a API!

    Sample Script:

     
    prontera,150,150,5 Script Inject Test 91,{ .@test = rand(1, 100); mes "Let's test Inject"; mes "I will declare variable .@test as " + .@test + "."; mes "My npc id is " + getnpcid(0), " "; mes "[Inject Code Start]", " "; // This script text coud be loaded from a SQL table! Inject( "mes \"Running NPC is \" + getnpcid(0); " + "mes \"Value of .@test is \" + .@test; " + "next; " + ".@test = rand(200, 500); " + "mes \"Now value of .@test will be \" + .@test;" + "close2; " ); mes "[Inject Code End]", " "; mes "Inject was ok and .@test is now " + .@test; close; }  

    98 downloads

    Updated

  18. More information about "[Script Command] npcisnear"

    Free

    [Script Command] npcisnear

    This commands verify if any NPC is near the distance of a player. Can be useful for some script restrictions.
    Script Sample:
    prontera,150,150,5 Script Curious Boy 90,{ .@n$ = "[Curious Boy]"; .@distance = 5; mes .@n$; if(isnpcsnear(getcharid(0), .@distance)) mes "Sorry, I will only talk with you when no NPC is near you!"; else mes "Hi!"; close; }  

    88 downloads

    Submitted

  19. More information about "[Mapflag/QOL] NoDeath_Count"

    Free

    [Mapflag/QOL] NoDeath_Count

    A mapflag that doesn't increment death count when a player dies. Usefull to preserve super novice bonus.

    88 downloads

    Submitted

  20. More information about "Instakill Mapflag"

    Free

    Instakill Mapflag

    Tested and working with: 3e625dfdf9868690e36677701cbebe1b379a7485
    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
    Create a mapflag for instakill. As it would suggest, all damages done within the map will be amplified to max damage, thus instakilling the target.
    It works both for the following use cases:
    1. Player attacking a Monster
    2. Player attacking another Player
    3. Monster attacking a Player
    4. Monster attacking another monster
    Where "Monster" can be a normal mob or a Homunculus
    Usage
    In-game
    @mapflag instakill [0|1] Script as mapflag
    prontera<tab>mapflag<tab>instakill Script as used in setmapflag
    setmapflag .EventMap$, mf_instakill; Example
    Tag, You're Dead Script
    Source In Action
    Source file
     
    1. I will retain all the rights in all the scripts that I create
    2. Client cannot redistribute nor resell the scripts that I provide
    3. No refunds
    4. Maintenance of scripts does not include modification of the original intended behavior. If the script has been broken due to prior modification of the original behavior then it would mean a new service request
    5. Modification of the original intended behavior would mean a new service request and would go through the process mentioned above
    2. This can be redistributed anywhere in any form.
    3. This shall not be in any way be branded for sale anywhere in any form.
    4. Maintenance will not be provided. Feel free to use the support section.
    5. See #3.
    6. Ninja has the right to post all my free services to the release section and make it available for everybody to use
    7. Maintenance of scripts will be provide free of charge
    8. I will not keep any sensitive information from your server nor any credentials that you lend me
    9. I will backup all my server files before I use this.
    10. Ninja will not be liable in any way at any time.
    11. The moment I use anything from here, I accept all the terms of services stated above.
    Where the script author is Ninja (https://rathena.org/board/profile/7005-ninja/).

    86 downloads

    Updated

  21. Free

    Command MesClose

    Command used in the scripts of NPCs whose ultimate goal is to unite the two commands,Mes and Close, an example down:

    prontera,150,150,5<TAB>script<TAB>Testing Command<TAB>748,{ mes "[Testing Command]"; mesclose "Testing command MesClose"; }
    This command will open a window of speech and the Close button appears immediately.

    79 downloads

    Submitted

  22. More information about "[Script Command] getdconst & setdconst"

    Free

    [Script Command] getdconst & setdconst

    First of all, yes, I know that this break the "const" concept, but I really miss "static values" in script engine.
    Yes, I know that we can use $vars but it's a lot pretty using const logic.
    If you don't know what is a "const", open your db/const.txt file
    In the end of file, you can add something like this:
    X_VALUE%TAB%1005

    And now, you can call X_VALUE in any script and the script will know that X_VALUE is not a player script, it's a """"global"""" variable, so you can call it with or without a player attached.

    And now we came to my commands.
    getdsconst allow you to get a constant dynamically like getd.

    For sample:

    .@var = getdconst( "X" + "_" + "VALUE" );
    This would return 1005.
    And now with setdconst we can change those as well.

    setdconst( "X_VALUE", 2020 );
    Remember, when you restar t your server, this constant will be 1005 again!
     
    Here another sample script:
    prontera,150,150,5 Script CommandsTest 90,{ .@const$[0] = "SWORDCLAN"; .@const$[1] = "ARCWANDCLAN"; .@const$[2] = "GOLDENMACECLAN"; for( ; .@i < getarraysize( .@const$ ); .@i++ ) mes "Contant Value of [" + .@const$[.@i] + "] is " + getdconst( .@const$[.@i] ); next; mes "I will now, change all const values to +1"; for( .@i = 0; .@i < getarraysize( .@const$ ); .@i++ ) setdconst( .@const$[.@i], getdconst( .@const$[.@i] ) + 1 ); close; }  

    38 downloads

    Submitted

  23. 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!

    35 downloads

    Submitted

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...