Jump to content

evilpuncker

Community Contributors
  • Content Count

    2178
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by evilpuncker


  1. I used to not like it, but now I have my mind open and every update is welcome, we need to adapt to changes, that is how our brain evolves ;P (I apply this to almost every software/game now, unless it is bugged)


  2.  

    Added 'sellitem2'

    It is similar to sellitem, but you can define cards and refines in it.

    Syntax:

    sellitem2 <Item_ID>,identify,refine,attribute,card1,card2,card3,card4{,price};
    

     

    nice one :D what about Annie's plugin? :P


  3.  

    Just to make sure, to make it support the following?

    mes "Lorem ipsum dolor sit amet,\r"
        "consectetur adipiscing elit."
    ↓↓↓
    mes "Lorem ipsum dolor sit amet, consectetur adipiscing elit."

     

    better wait for @Haru input, by the way since you pointed it out, the early code you provided can work now I guess, can you re-paste it and I'll try to make it work again (I don't really remember how I managed to do so lol)


  4.  

    Here you go, see if it works alright (did only basic testing). Requires PHP-CLI:

    php collapsemes.php /path/to/npc/folder
    Old files are backed up as *.bak, files that need no change are not touched. You might want to use this in a separate working copy in case it screws up.

     

     

    collapsemes.php:

    #!/usr/bin/php<?php// =================================================================// Collapse consecutive *mes into one, v1.0.1// (c) 2015 Ai4rei/AN//// This work is licensed under a// Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License// ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )// =================================================================// Down-level (PHP 4)if(!function_exists('file_put_contents')){    function file_put_contents($sFileName,$sData)    {        if(($hFile = fopen($sFileName,'wb'))!==false)        {            return fwrite($hFile,$sData) && fclose($hFile);        }        return false;    }}// Down-level Endfunction ProcessFile($sFile){    $bSuccess = false;    echo "File: {$sFile}... load";    if(($sData =@file_get_contents($sFile))!==false)    {        echo ' conv';        // mes ( ( var | string ) [,+] )* string; mes "        $sPattern = '/((?<![a-z0-9_])mess+((??:(??:[$.]?@?|#{1,2}|')(?:[a-zA-Z0-9_]+)$?)|(??<!)"(?:.(?!(?<!)"))*.?"))s*[,+]s*)*(??<!)"(?:.(?!(?<!)"))*.?))"s*;s*mess+")/sS';        if(preg_match($sPattern,$sData))        {            do            {                $sData = preg_replace($sPattern,'mes $2n',$sData);            }            while(preg_match($sPattern,$sData));            echo ' save';            if(rename($sFile,substr($sFile,0,-3).'bak') && file_put_contents($sFile,$sData))            {                echo " successn";                $bSuccess = true;            }            else            {                echo " failuren";            }        }        else        {            echo " skipn";            $bSuccess = true;        }    }    else    {        echo " failuren";    }    return $bSuccess;}function ProcessPath($sPath){    $bSuccess = true;    echo "Enter: {$sPath}n";    if(($hDir =@opendir($sPath))!==false)    {        while(($sFile = readdir($hDir))!==false)        {            if(substr($sFile,0,1)=='.')            {// unix world: skip self- and parent-references and so-called hidden files                continue;            }            $sFullPath = $sPath.'/'.$sFile;            if(is_dir($sFullPath))            {                if(!ProcessPath($sFullPath))                {                    $bSuccess = false;                    break;                }            }            elseif(is_file($sFullPath) && substr(strtolower($sFile),-4)==='.txt')            {                if(!ProcessFile($sFullPath))                {                    $bSuccess = false;                    break;                }            }        }        closedir($hDir);    }    else    {        echo "Failed to read directory: {$sPath}n";    }    echo "Leave: {$sPath}n";    return $bSuccess;}function Main($nArgc,$aArgv){    if($nArgc<2)    {        echo "Usage: php collapsemes.php <script path>n";        return true;    }    return ProcessPath($aArgv[1]);}if(isset($_SERVER['argc']) && isset($_SERVER['argv'])){    return Main($_SERVER['argc'],$_SERVER['argv']) ? 0 : 1;}die("This script must be run on command line.n");?>
    80x15.png

    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

     

     

    Edit:

     

    v1.0.1: Removed a flag, added regexp overview.

     

    hello :P any chance to have it updated in order to work with current system (that has been merged today), well, no hurries tho, but I guess they are not providing a conversion too for all npcs since there are only samples 


  5.  

     

     

     

    Yeah, your right. i always check their commits however its been 2 weeks no more commits.

    Probably (no offense) i'm afraid this will be the next eAthena. :swt3:

    Nah , Hercules won't die, it's just coincidence that all of us(including me) got some hectic schedule during this period of time.

    While I won't spoil anything, but you can expect some nice updates by mid of next month

     

    I wanted to see H.E.R.C the hype for so long time, is it dead?

    Unfortunately, yes, Ind left Hercules along with all his projects...

     

    could you guys at least tell us what was that about? I'm pretty sure that lot of people got curious :P


  6.  

    Yeah, your right. i always check their commits however its been 2 weeks no more commits.

    Probably (no offense) i'm afraid this will be the next eAthena. :swt3:

    Nah , Hercules won't die, it's just coincidence that all of us(including me) got some hectic schedule during this period of time.

    While I won't spoil anything, but you can expect some nice updates by mid of next month

     

    I wanted to see H.E.R.C the hype for so long time, is it dead?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.