Jump to content

herenow

Members
  • Posts

    36
  • Joined

  • Last visited

Posts posted by herenow

  1. Grf-extractor

     

    This is a command line tool GRF extractor, written in Javascript, using roBrowser's standard grf libraries.

     

    You will need to have Node.js installed to run this tool. Once installed, you can easily install it with the npm (node package manager).

     

    Once npm is installed, run this command on your shell/terminal.

    $ npm install -g grf-extractor #Install
    $ grf-extractor -h # Usage guide
    $ grf-extrator -g data.grf # Extract the entire grf to the current folder

    Npm: https://www.npmjs.org/package/grf-extractor

    Githttps://github.com/herenow/grf-extractor

     

    Not sure how its performance compares to the standard grf C libraries, would be nice if someone compared it :)

     

    There are still some stuff todo, and please report any bugs or performance issues.

    • Upvote 1
  2. Well, i will be brief.

    I use the hexed 2011-06-22, every option is saving normally.

    But the alt + h options are not. That option to disable private messages pop-up. I dont really know in wich lua file it saves itself, but i never saw it creating a custom lua file in the data folder.

    Does anybody know anything about this? And how to fix it.

    Thanks.

  3. 1.1 - Fixed incompabibility with the new group system of rathena (still works with the old gm_level)

    Hi Tribbiani sound like a nice little mod but you ain't fully compatible with rAthena. Seem like you still using old gmlevel systeme instead group_id.

    "if(item_data->atcmd_block && sd->gmlevel < item_data->atcmd_block_minlvl)"

    map_session_data doesn't have gmlevel attribute see : http://rathena.org/d...sion__data.html

    Quick fix would be :

    "if(item_data->atcmd_block && pc_get_group_level(sd) < item_data->atcmd_block_minlvl)"

    Thanks! Fixed it, i guess.

    this would be nice if you could also set what items can be allowed for certain gmlevels / groups

    example, for an event GM she/he could only @item the items that allowed for their group.

    Yeah your already can, when you add a item to the db file to need to input item_id, min_group_level_to_bypass

  4. File Name: Block items from @item

    File Submitter: Tribbiani

    File Submitted: 31 Jul 2012

    File Category: Source Modifications

    Content Author: Tribb

    A mod to prevent some items from being get on @item, good for full pvp servers.

    You can add the item, and the min gm level to bypass

    Instructions:

    1 - Add the item_block_atcmd.txt to the db/ folder

    2 - Apply the diffs.

    How to use:

    Just add line by line each item to be blocked.

    Item_Id, Min_gmlv_to_bypass

    Click here to download this file

    • Upvote 1
  5. Yeah, i always liked thor patcher.. And with this mod it would become much better, lots of ppl dont use thor cause of the some antivirus problems.

    It would also be easier to update the patcher, I guess we would only need to update the data streams and images correct? You would also separete the images from the patcher correct?

  6. Hello..

    I am creating a capture the flag module for my pvp.. anyways..

    I once saw on youtube a server that they're capture the flag when u got the flag u got a giant flag sprite in your head, blue or red.

    The video:

    [media=]

    [/media]

    It has a download link, but its broken.

    Does anyone know where can i find this flags?

    And another request, could anyone please suggest me CF maps?

    Thanks..

  7. Well, i just discovered about the instance commands so i decided to create a "duplicate_map()" function based on that.

    Im not a real pro SRC / C developer so im not sure if i did everything right, so here i am asking for the elite core developers of rathena to give my code a check.

    The map-server crashes, after 1~2min i have duplicated 1000~1500 maps and filled in all map indexes spots. Not sure if that is the pattern of the crash.

    Here is the code summary:

    #define MAX_DUPLICATES_MAP 999 //real max_duplicates_map = 999, client crash if instance map ultrapasses dddd@map
    int map_duplicates[MAX_MAP_PER_SERVER][MAX_DUPLICATES_MAP];
    
    BUILDIN_FUNC(duplicate_map) {
    int m, im, dm, i;
    size_t num_cell, size;
    const char *name;
    
    name = script_getstr(st,2);
    m = map_mapname2mapid(name);
    
    if(m < 0) //map not found, cant duplicate
    	return 0;
    
    ARR_FIND( 0, MAX_DUPLICATES_MAP, dm, !map_duplicates[m][dm] );
    if( dm >= MAX_DUPLICATES_MAP ) { //reached max duplicates
    	ShowError("duplicate_map: mapid[%d] has reached its limit of duplicates.\n", m);
    	script_pushconststr(st, "");
    	return 0;
    }
    
    ARR_FIND( 0, map_num, i, !map[i].name[0] ); // Searching for a Free Map
    if( i < map_num ) im = i; // Unused map found (old instance)
    else if( map_num - 1 >= MAX_MAP_PER_SERVER ) { //No more free maps
    	ShowError("duplicate_map: no more free space to create maps on this server.\n");
    	script_pushconststr(st, "");
    	return 0;
    }
    else im = map_num++; // Using next map index
    
    memcpy( &map[im], &map[m], sizeof(struct map_data) ); // Copy source map
    snprintf(map[im].name, MAP_NAME_LENGTH, "%.3d%s", dm, name); // Generate Name for Instance Map
    map[im].index = mapindex_addmap(-1, map[im].name); // Add map index
    
    if(!map[im].index) {
    	map[im].name[0] = '\0';
    	ShowError("duplicate_map: no more free map indexes.\n");
    	script_pushconststr(st, "");
    	return 0;
    }
    
    // Reallocate cells
    num_cell = map[im].xs * map[im].ys;
    CREATE( map[im].cell, struct mapcell, num_cell );
    memcpy( map[im].cell, map[m].cell, num_cell * sizeof(struct mapcell) );
    
    size = map[im].bxs * map[im].bys * sizeof(struct block_list*);
    map[im].block = (struct block_list**)aCalloc(size, 1);
    map[im].block_mob = (struct block_list**)aCalloc(size, 1);
    
    memset(map[im].npc, 0x00, sizeof(map[i].npc));
    map[im].npc_num = 0;
    
    memset(map[im].moblist, 0x00, sizeof(map[im].moblist));
    map[im].mob_delete_timer = INVALID_TIMER;
    
    map[im].m = im;
    map[im].duplicate_id = dm;
    map[im].duplicate_src_map = m;
    
    map_addmap2db(&map[im]);
    
    //set map duplicated
    map_duplicates[m][dm] = 1;
    
    script_pushconststr(st, map[im].name);
    
    return 0;
    }
    
    int warp2savepoint(struct map_session_data* sd, va_list args)
    {
    int m = va_arg(args,int);
    if( !sd || sd->bl.m != m )
    	return 0;
    
    pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_OUTSIGHT);
    return 1;
    }
    
    BUILDIN_FUNC(delete_map) {
    int m;
    const char *name;
    
    name = script_getstr(st,2);
    m = map_mapname2mapid(name);
    
    if(m < 0) //map not found, cant delete
    	return 0;
    
    if(map[m].duplicate_src_map) { //is a duplicated map
    	map_duplicates[map[m].duplicate_src_map][map[m].duplicate_id] = 0;
    }
    
    map_foreachpc(warp2savepoint, m);
    map_foreachinmap(cleanup_sub, m, BL_ALL);
    
    if(map[m].mob_delete_timer != INVALID_TIMER)
    	delete_timer(map[m].mob_delete_timer, map_removemobs_timer);
    
    mapindex_removemap(map[m].index);
    
    // Free memory
    aFree(map[m].cell);
    aFree(map[m].block);
    aFree(map[m].block_mob);
    
    map_removemapdb(&map[m]);
    memset(&map[m], 0x00, sizeof(map[0]));
    
    script_pushint(st, 1);
    
    return 0;
    }
    
    BUILDIN_FUNC(map_exists) {
    if( map_mapname2mapid(script_getstr(st,2)) > 0 )
    	script_pushint(st, 1);
    return 0;
    }
    

    Thanks for the attention.

    @edit

    I think i got it.. Its cause i need to leave some free indexes for MAX_MAPINDEX, i had set MAX_MAP_PER_SERVER and MAX_MAPINDEX to the same value.

    Am i correct?

    @edit 23:59

    -updated the code. havent had a crash since.

  8. i think the "xtreme R.O evolution" logo in the middle of that inicial BG killed the website..

    there are some really nice features but the design doesnt all match ><. what i mean is, there are 2 different design styles in the website, it starts with a white cartonish style, and then the content is inside a dark cool css style based design.

    and is the content all loaded in the first website load? or are the other pages loaded with ajax later on? you should consider using ajax with anchor navigation, for better seo and so ppl can send links of pages.

  9. One more error...

    Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5

    Record online:

    kinda rusty here.. anyways..

    use this... it was varname not str ><.

    <?php
    mysql_connect('ip', 'user', 'password');
    mysql_select_db('ragnarok_database');
    $res = mysql_query('SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `varname` = \'$RecordOnline\' LIMIT 1');
    $res = mysql_fetch_row($res);
    
    echo 'Record online:'. $res[0];
    ?>
    

  10. Ops.. Try this code.

    <?php
    mysql_connect('ip', 'user', 'password');
    mysql_select_db('ragnarok_database');
    $res = mysql_query('SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `str` = \'$onlinerecord\' LIMIT 1');
    $res = mysql_fetch_row($res);
    
    echo 'Record online:'. $res;
    ?>
    

  11. OnPcLoginEvent:
    if(getusers(1) > $onlinerecord) {
       set $onlinerecord,getusers(1);
    }
    

    <?php
    mysql_connect('ip', 'user', 'password');
    mysql_select_db('ragnarok_database');
    $res = mysql_query("SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `str` = '$onlinerecord' LIMIT 1");
    $res= mysql_fetch_row($res);
    
    echo 'Record online:'. $res;
    ?>
    

    The rest is up to you.

  12. function		returnFormatTime		{
    	set .@remain_time,getarg(0);
    	if(.@remain_time > 0) {
    			set .@time[0],.@remain_time / 86400;
    			set .@remain_time,.@remain_time % 86400;
    			set .@time[1],.@remain_time / 3600;
    			set .@remain_time,.@remain_time % 3600;
    			set .@time[2],.@remain_time / 60;
    			set .@remain_time,.@remain_time % 60;
    			set .@time[3],.@remain_time;
    	}
    	return (.@time[0] ? .@time[0]+"day(s) " : "")+(.@time[1] ? .@time[1]+"hour(s) " : "")+(.@time[2] ? .@time[2]+"minute(s) " : "")+(.@time[3] ? .@time[3]+"second(s) " : "");
    }
    
    

    This function needs to be added inside the npc..

    what i mean is.. you need to add this function inside the script.

    example:

    prontera,150,150,4<Tab>script<Tab>name<tab>849,{
    
    function		returnFormatTime		{
    	set .@remain_time,getarg(0);
    	if(.@remain_time > 0) {
    			set .@time[0],.@remain_time / 86400;
    			set .@remain_time,.@remain_time % 86400;
    			set .@time[1],.@remain_time / 3600;
    			set .@remain_time,.@remain_time % 3600;
    			set .@time[2],.@remain_time / 60;
    			set .@remain_time,.@remain_time % 60;
    			set .@time[3],.@remain_time;
    	}
    	return (.@time[0] ? .@time[0]+"day(s) " : "")+(.@time[1] ? .@time[1]+"hour(s) " : "")+(.@time[2] ? .@time[2]+"minute(s) " : "")+(.@time[3] ? .@time[3]+"second(s) " : "");
    }
    
    OnPcLoginEvent:
    set @logged_in,gettimetick(3);
    if(loggedtime) {
    dispbottom "Logged in time: "+returnFormatTime(loggedtime);
    }
    
    OnPcLogoutEvent:
    if(@logged_in) {
           set loggedtime, loggedtime + ( gettimetick(3) - @logged_in );
    }
    
    
    
    }
    

  13. Did you add the tabs to the function?

    function<tab>returnFormatTime<tab>{
    
    

    @edit

    Also add this.. I mean replace.

    OnPcLogoutEvent:
    if(@logged_in) {
       set loggedtime, loggedtime + ( gettimetick(3) - @logged_in );
    }
    

  14. This o.O ?

    dispbottom "Logged in at: "+gettimestr("%Y-%m/%d &H:%M:%S", 21);
    

    @edit

    lol, nvm now i understood what you want..

    function	returnFormatTime	{
    set .@remain_time,getarg(0);
    if(.@remain_time > 0) {
    	set .@time[0],.@remain_time / 86400;
    	set .@remain_time,.@remain_time % 86400;
    	set .@time[1],.@remain_time / 3600;
    	set .@remain_time,.@remain_time % 3600;
    	set .@time[2],.@remain_time / 60;
    	set .@remain_time,.@remain_time % 60;
    	set .@time[3],.@remain_time;
    }
    return (.@time[0] ? .@time[0]+"day(s) " : "")+(.@time[1] ? .@time[1]+"hour(s) " : "")+(.@time[2] ? .@time[2]+"minute(s) " : "")+(.@time[3] ? .@time[3]+"second(s) " : "");
    }
    
    OnPcLoginEvent:
    set @logged_in,gettimetick(3);
    if(loggedtime) {
    dispbottom "Logged in time: "+returnFormatTime(loggedtime);
    }
    
    OnPcLogoutEvent:
    set loggedtime, loggedtime + ( gettimetick(3) - @logged_in );
    
    

    Try this.

  15. Nope.

    But there must have some source edition with some diferent color message. Cause i dont really think you can change the colors of the board alerts, the hexed controls they're colors i think. So you would have to send a diferent type o board message.

    @edit

    o.O you are male? great plastic surgery

×
×
  • Create New...