Jump to content

Zell

Members
  • Posts

    411
  • Joined

  • Last visited

  • Days Won

    28

Files posted by Zell

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

    81 downloads

    Updated

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

    144 downloads

    Updated

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

    33 downloads

    Submitted

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

    74 downloads

    Submitted

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


     

     

     

    132 downloads

    Updated

  6. Free

    DuplicateCreate and DuplicateRemove command

    Apply the patch manually
    These commands allow you to create duplicates at run time.

    duplicatecreate("sourcename", "targetnameshown", "targetnamehidden", "targetmap", targetx, targety, targetdir{, targetspriteid{, targetxs, targetys}});
    duplicateremove("npcname");

    235 downloads

    Updated

  7. Free

    Fake Icon Stats

    This commands allow you to add fake icon stats. Right now the command does not clean the effect automatically after the time, cause who order this command want to be like this, so you can add sleep and remove the icon.

    Sample Script:
     
    prontera,150,150,5    Script    FakeIcon    90,{
        mes "[Fake Icon Stats]";
        mes "Hey.";
        switch(select("Receive Fake Icon 1 with 5 seconds (display only)","Receive Icon 2 for 10 seconds (display only)","Disable Icon 1 and 2"))
        {
            case 1:
                fakeIcon(getcharid(0),1,5000,1);
                break;
                
            case 2:
                fakeIcon(getcharid(0),2,10000,1);
                break;
                
            case 3:
                fakeIcon(getcharid(0),1,0,0);
                fakeIcon(getcharid(0),2,0,0);
                break;
        }
        close;
    }

    4489 downloads

    Submitted

  8. Free

    [SCRIPT COMMAND] Fake Player

    This modification allows you to create fake players without further using mob_avail for such behavior.

    Usage:
    .@monsterGID = fakeplayer( map, x, y, name, job_id, sex, hair_style, hair_color, weapon, shield, head_top, head_mid, head_bottom, option, cloth_color );

    1548 downloads

    Updated

  9. Free

    Item_db.txt Translator Sync with iteminfo

    Hello everyone. Many ask me how I translate my item_db with my iteminfo, so today I came to teach how to do it.

    1 - Download the program that I made available.
    2 - Replace iteminfo.lua inside content with your iteminfo.lub or lua content.
    3 - Run the program.
    4 - A file named item.txt was generated.
    5 - Copy the contents of this file and now into ServerDatabaseEditor, click on Tools after loading your database and copy all contents of item.txt and after that click on Run.
    6 - Okay, you just translated your item_db into the language of your iteminfo!
    Special thanks to Tokei for making the most difficult, which was the SDE

    1113 downloads

    Submitted

  10. Free

    Simple DailyZell

    Hello everyone. I came this time to bring an old daily reward system that I did. Most of the daily reward systems are so complicated for no reason.
    The system draws every day (or each reload) an item from the list of rewards, which can be vip, cash or an item. Items that have already been drawn will only be drawn once the entire list has been drawn.
     
    //SQL  and insert sample

    CREATE TABLE IF NOT EXISTS `daily_account` (   `aid` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `daily` (   `id` int(2) NOT NULL,   `type` int(3) NOT NULL,   `value` int(10) NOT NULL,   `take` int(2) NOT NULL,   PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `daily` (`id`, `tipo`, `valor`, `take`) VALUES (1, 2, 1, 0), (2, 673, 1, 0), (3, 673, 3, 0), //ID: Daily ID //TYPE: 1 = Cash //      2 = Vip //      500+ = Item ID //VALUE: type 1 = Cash value //       type 2 = Vip Day //       type 3 = Item Quantity
     

    295 downloads

    Updated

  11. Free

    Railgun Garment

    Hello everyone, first sorry for english, I am Braziliam, so...Anyway.
    At one point I needed this tool, as it had no functional or practice, I decided to create with my low knowledge in Delphi.
    The name is "Railgun Garment" cause I love Misaka and because its a fast way to make Garments.
    Thanks to Madtoyz for guide here, where I see the names class to make the tool: http://rathena.org/board/topic/72734-guidecustom-wings-at-robe-place/?p=148019#entry148019

    How to use the tool?
    Simple, put the sprite and act of a file on the folder "Input", the name must be "sprite.spr" and "sprite.act".
    After this, wait all the progressbar and your files will be in Output/male and output/Female.
    Accept suggestions if I go do some updating.

    I maked for acceletare my server, but I not share with rathena?

    Accept suggestions if I go do some updating.

    456 downloads

    Updated

  12. Free

    Eyes - 9 Colors

    Pack with 9 colors of eyes.
    Colors:
    Azul = Blue
    Azul Escuro = Blue
    Rosa = Pink
    Laranja = Orange
    Roxo = Purple
    Cinza = Gray
    Vermelho = Red
    Verdes = Green
    Amarelo = Yellow

    491 downloads

    Submitted

×
×
  • Create New...