Jump to content

Alerin

Banned
  • Posts

    40
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by Alerin

  1. @VegaS™

    		if (!stricmp(command, "WIDTH")) {
    			if(atoi(value) < 800)
    				m_Config.width = 800;
    			else
    				m_Config.width = atoi(value);
    		}
    		else if (!stricmp(command, "HEIGHT")) {
    			if (atoi(value) < 600)
    				m_Config.height = 600;
    			else
    				m_Config.height = atoi(value);
    		}

    This is a lock so that the client cannot run at a resolution lower than 800x600. (Lots of people run m2bob in 10x10 so it takes me resources)

     

    Function void CPythonSystem::SetDefaultConfig() is responsible for creating the first config when starting the game for the first time. I believe that here should be set according to our preferences.

  2. Fix for changing default settings during the first run of the game and blocking settings lower than 800x600.

    Spoiler
    #Search:
    		if (!stricmp(command, "WIDTH"))
    			m_Config.width = atoi(value);
    		else if (!stricmp(command, "HEIGHT"))
    			m_Config.height = atoi(value);
    		
    #Substitute:
    		if (!stricmp(command, "WIDTH")) {
    			if(atoi(value) < 800)
    				m_Config.width = 800;
    			else
    				m_Config.width = atoi(value);
    		}
    		else if (!stricmp(command, "HEIGHT")) {
    			if (atoi(value) < 600)
    				m_Config.height = 600;
    			else
    				m_Config.height = atoi(value);
    		}
    		
    #Search:
    void CPythonSystem::SetDefaultConfig()
    
    #My default settings:
    void CPythonSystem::SetDefaultConfig()
    {
    	m_Config = {};
    
    	m_Config.width = 1280;
    	m_Config.height = 720;
    	m_Config.bpp = 32;
    	m_Config.frequency = 60;
    
    	m_Config.bWindowed = true;
    
    	m_Config.is_software_cursor = false;
    	m_Config.is_object_culling = true;
    	m_Config.iDistance = 3;
    
    	m_Config.gamma = 3;
    	m_Config.music_volume = 0.0f;
    	m_Config.voice_volume = 0;
    
    	m_Config.bDecompressDDS = false;
    	m_Config.bSoftwareTiling = 0;
    	m_Config.iShadowLevel = 3;
    	m_Config.bViewChat = true;
    	m_Config.bAlwaysShowName = DEFAULT_VALUE_ALWAYS_SHOW_NAME;
    	m_Config.bShowDamage = true;
    	m_Config.bShowSalesText = true;
    	m_Config.bHideEmojiInfo = false;
    }

     

    • Love 1
  3. My client weighs a little, he is working on its optimization. I thought you could change tga and dds to png. It was a bad idea. The result of my tests


    Test PC .png decompression: 351 MB
    Test PC .png comression lz4: 336 MB
    Test PC .png comression lmza2: 321 MB
    Test PC .tga and .dds decompression: 305 MB
    Test PC .tga and .dds comression lz4: 240 MB
    Test PC .tga and .dds comression lmza2: 155 MB

     

    Folder Pack
    decompression: 2400 MB

    lz4: 1700 MB

    lmza2: 1190 MB

     

    What compression do you use and what do you do to make the client weigh less?

     

    I am currently working on a tool that will test the server base and use mobs, textures, armor, weapons and models that appear on the server. According to my calculations, it saves about 70% of the data. The client from 2007 weighed 700 MB, I think that with good compression and cleaning you can achieve up to 400 MB.

    • Love 1
  4. item_attr are bonuses that can be earned in the game. There are more bonuses in the source code, the ID is important.

    TValueName c_aApplyTypeNames[] =
    {
        { "STR",      APPLY_STR     },
        { "DEX",      APPLY_DEX     },
        { "CON",      APPLY_CON     },
        { "INT",      APPLY_INT     },
        { "MAX_HP",       APPLY_MAX_HP      },
        { "MAX_SP",       APPLY_MAX_SP      },
        { "MAX_STAMINA",   APPLY_MAX_STAMINA  },
        { "POISON_REDUCE", APPLY_POISON_REDUCE    },
        { "EXP_DOUBLE_BONUS", APPLY_EXP_DOUBLE_BONUS },
        { "GOLD_DOUBLE_BONUS", APPLY_GOLD_DOUBLE_BONUS },
        { "ITEM_DROP_BONUS", APPLY_ITEM_DROP_BONUS },
        { "HP_REGEN",  APPLY_HP_REGEN    },
        { "SP_REGEN",  APPLY_SP_REGEN    },
        { "ATTACK_SPEED",  APPLY_ATT_SPEED       },
        { "MOVE_SPEED",    APPLY_MOV_SPEED       },
        { "CAST_SPEED",    APPLY_CAST_SPEED   },
        { "ATT_BONUS", APPLY_ATT_GRADE_BONUS  },
        { "DEF_BONUS", APPLY_DEF_GRADE_BONUS  },
        { "MAGIC_ATT_GRADE",APPLY_MAGIC_ATT_GRADE  },
        { "MAGIC_DEF_GRADE",APPLY_MAGIC_DEF_GRADE  },
        { "SKILL",    APPLY_SKILL       },
        { "ATTBONUS_ANIMAL",APPLY_ATTBONUS_ANIMAL  },
        { "ATTBONUS_UNDEAD",APPLY_ATTBONUS_UNDEAD  },
        { "ATTBONUS_DEVIL", APPLY_ATTBONUS_DEVIL   },
        { "ATTBONUS_HUMAN", APPLY_ATTBONUS_HUMAN   },
        { "ADD_BOW_DISTANCE",APPLY_BOW_DISTANCE    },
        { "DODGE",    APPLY_DODGE       },
        { "BLOCK",    APPLY_BLOCK       },
        { "RESIST_SWORD",  APPLY_RESIST_SWORD },
        { "RESIST_TWOHAND",    APPLY_RESIST_TWOHAND   },
        { "RESIST_DAGGER", APPLY_RESIST_DAGGER    },
        { "RESIST_BELL",   APPLY_RESIST_BELL  },
        { "RESIST_FAN",    APPLY_RESIST_FAN   },
        { "RESIST_BOW",    APPLY_RESIST_BOW   },
        { "RESIST_FIRE",   APPLY_RESIST_FIRE  },
        { "RESIST_ELEC",   APPLY_RESIST_ELEC  },
        { "RESIST_MAGIC",  APPLY_RESIST_MAGIC },
        { "RESIST_WIND",   APPLY_RESIST_WIND  },
       { "REFLECT_MELEE", APPLY_REFLECT_MELEE },
       { "REFLECT_CURSE", APPLY_REFLECT_CURSE },
        { "RESIST_ICE",       APPLY_RESIST_ICE   },
        { "RESIST_EARTH",  APPLY_RESIST_EARTH },
        { "RESIST_DARK",   APPLY_RESIST_DARK  },
        { "RESIST_CRITICAL",   APPLY_ANTI_CRITICAL_PCT    },
        { "RESIST_PENETRATE",  APPLY_ANTI_PENETRATE_PCT   },
        { "POISON",       APPLY_POISON_PCT   },
        { "SLOW",     APPLY_SLOW_PCT    },
        { "STUN",     APPLY_STUN_PCT    },
        { "STEAL_HP",  APPLY_STEAL_HP    },
        { "STEAL_SP",  APPLY_STEAL_SP    },
        { "MANA_BURN_PCT", APPLY_MANA_BURN_PCT    },
        { "CRITICAL",  APPLY_CRITICAL_PCT },
        { "PENETRATE", APPLY_PENETRATE_PCT    },
        { "KILL_SP_RECOVER",APPLY_KILL_SP_RECOVER  },
        { "KILL_HP_RECOVER",APPLY_KILL_HP_RECOVER  },
        { "PENETRATE_PCT", APPLY_PENETRATE_PCT    },
        { "CRITICAL_PCT",  APPLY_CRITICAL_PCT },
        { "POISON_PCT",    APPLY_POISON_PCT   },
        { "STUN_PCT",  APPLY_STUN_PCT    },
        { "ATT_BONUS_TO_WARRIOR",  APPLY_ATTBONUS_WARRIOR  },
        { "ATT_BONUS_TO_ASSASSIN", APPLY_ATTBONUS_ASSASSIN },
        { "ATT_BONUS_TO_SURA", APPLY_ATTBONUS_SURA        },
        { "ATT_BONUS_TO_SHAMAN",   APPLY_ATTBONUS_SHAMAN   },
        { "ATT_BONUS_TO_MONSTER",  APPLY_ATTBONUS_MONSTER  },
        { "ATT_BONUS_TO_MOB",  APPLY_ATTBONUS_MONSTER  },
        { "MALL_ATTBONUS", APPLY_MALL_ATTBONUS    },
        { "MALL_EXPBONUS", APPLY_MALL_EXPBONUS    },
        { "MALL_DEFBONUS", APPLY_MALL_DEFBONUS    },
        { "MALL_ITEMBONUS",    APPLY_MALL_ITEMBONUS   },
        { "MALL_GOLDBONUS", APPLY_MALL_GOLDBONUS   },
        { "MAX_HP_PCT",    APPLY_MAX_HP_PCT   },
        { "MAX_SP_PCT",    APPLY_MAX_SP_PCT   },
        { "SKILL_DAMAGE_BONUS",    APPLY_SKILL_DAMAGE_BONUS   },
        { "NORMAL_HIT_DAMAGE_BONUS",APPLY_NORMAL_HIT_DAMAGE_BONUS  },
        { "SKILL_DEFEND_BONUS",    APPLY_SKILL_DEFEND_BONUS   },
        { "NORMAL_HIT_DEFEND_BONUS",APPLY_NORMAL_HIT_DEFEND_BONUS  },
        { "PCBANG_EXP_BONUS", APPLY_PC_BANG_EXP_BONUS  },
        { "PCBANG_DROP_BONUS", APPLY_PC_BANG_DROP_BONUS    },
    
        { "RESIST_WARRIOR",    APPLY_RESIST_WARRIOR},
        { "RESIST_ASSASSIN",   APPLY_RESIST_ASSASSIN},
        { "RESIST_SURA",      APPLY_RESIST_SURA},
        { "RESIST_SHAMAN", APPLY_RESIST_SHAMAN},
        // by mhh game/affect.h 정의되어있음. INFINITE_AFFECT_DURATION = 0x1FFFFFFF
        { "INFINITE_AFFECT_DURATION", 0x1FFFFFFF   },
       { "ENERGY", APPLY_ENERGY },       // 기력
       { "COSTUME_ATTR_BONUS", APPLY_COSTUME_ATTR_BONUS },       // 기력
       { "MAGIC_ATTBONUS_PER",    APPLY_MAGIC_ATTBONUS_PER   },
        { "MELEE_MAGIC_ATTBONUS_PER",  APPLY_MELEE_MAGIC_ATTBONUS_PER },
    
    #ifdef ENABLE_WOLFMAN_CHARACTER -> NIE MA
       { "BLEEDING_REDUCE",APPLY_BLEEDING_REDUCE },
       { "BLEEDING_PCT",APPLY_BLEEDING_PCT },
       { "ATT_BONUS_TO_WOLFMAN",APPLY_ATTBONUS_WOLFMAN },
       { "RESIST_WOLFMAN",APPLY_RESIST_WOLFMAN },
       { "RESIST_CLAW",APPLY_RESIST_CLAW },
    #endif
    
    #ifdef ENABLE_ACCE_COSTUME_SYSTEM
       { "ACCEDRAIN_RATE",APPLY_ACCEDRAIN_RATE },
    #endif
    #ifdef ENABLE_MAGIC_REDUCTION_SYSTEM
       { "RESIST_MAGIC_REDUCTION",APPLY_RESIST_MAGIC_REDUCTION },
    #endif
    
        { NULL,       0        }

     

  5. This is the hidden content, please

    Metin2 Download

     

    System for drawing items for points

     

    1.png?raw=true

     

    The look is exemplary, if you want prettier and more functional, write to me.

    https://github.com/Alerinos/M2-System-Carousel

     

    For the system to work, you need to connect to your base (class, function, etc.). They are marked as TODO

     

    Setting:

    $c->price = 100;  // Number of points needed for the draw
    $c->items([       // List of items to be won. [ID, Promil] (percentage * 10)
        [100100, 500],
        [100200, 500],
        [100000, 500],
        [100300, 200],
        [100400, 200],
        [100500, 100],
        [30270, 100],
        [50255, 100],
        [50256, 100],
        [50257, 100],
        [50258, 100],
        [50259, 100],
    ]);



    Instruction

    Quote

     

    The class has no database connection, you must use your (PDO, MySQLi etc.)
    1.) Find the reward() function, paste your SQL into the database where it will receive the prize. The $item variable is the item ID.
    2.) Check the status of your points in the getPoints() function
    3.) In the subtractPoints() function you must subtract points from your account.

    4.) Create a folder called item and place there pictures of your items in png.

     

    $this->account - User account ID
    $this->price - Price for using the draw

     

     

     

    Do you need a quest, system or www? Write to me, I can create everything. (Full STACK, Web (PHP, JS, SQL, HTML, CSS), Server (C ++, Python, Lua))

    Discord Alerin#5559

    • Metin2 Dev 2
    • Love 1
  6. Hi, I'm thinking about releasing very good quality cms open source code. What do you think about it What functions do you expect? What payments do you use?
    A very object-based system, ORM, template system and API for plugins.
    I also want to release a version that everyone can copy, develop and earn.
    An example of a page I created: https://atonis.pl/

    My github: https://github.com/Alerinos

    • Love 7
  7. M2 Download Center

    This is the hidden content, please
    ( Internal )

    This is the hidden content, please
    ( GitHub )

    System to turn on/off/restart the server together with online status and time

    This is the free version, I also have a premium with colors, the ability to control each channel separately and browse syserr/syslog.

     

    spacer.png

     

     

    Do you need a quest, system or www? Write to me, I can create everything. (Full STACK, Web (PHP, JS, SQL, HTML, CSS), Server (C ++, Python, Lua))

    Discord Alerin#5559

     

     

    • Metin2 Dev 16
    • Eyes 1
    • Dislove 2
    • Angry 2
    • Not Good 1
    • Confused 1
    • Good 13
    • Love 3
    • Love 21
  8. 3 hours ago, Karbust said:

    And is it compatible with PHP?

     

    On MySQL8 the PASSWORD function is already deprecated. Why add a new lib when you can have SHA256 or SHA512 with salt (both hashes available on MySQL

    and cryptopp, which is already necessary)?

     

    password_hash https://www.php.net/manual/en/function.password-hash.php

    example: 

    password_hash('test', PASSWORD_ARGON2I)

     

    to log in you need to do selecto on mysql with the email name. Download the password and compare with the function
    example
    SELECT `password` FROM `account` WHERE `login` = test

    https://www.php.net/manual/en/function.password-verify.php

    if(password_verify($_POST['password'], $row['password']){
    return true;
    }else{
    return false;
    }

     

    @TOPIC

    Nice idea, I was thinking recently whether to publish a similar solution.

     

      

    3 hours ago, hachiwari said:

    Nice! 

    btw. did you check or test the performance between old and new encryption?

    The performance is poorer, the longer the hash counts, the harder it is to break it. Imagine a computer that does 1 million md5 per sec and 1k argon2 per sec. Even if the calculation of it is longer, it does not affect the performance of the game. The user will not feel the difference when logging in 0.01sec for 0.1 sec

    • Metin2 Dev 1
    • Love 1
  9. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Mission on marble polymorphism.
    Just approach the NPC, choose a mob and kill the required number of pieces. Marble will automatically go to EQ

     

    Github:

    https://github.com/Alerinos/M2-Quest-Poly
    [1] = {101, 100},
    [2] = {502, 100},
    [3] = {2001, 100},
    [4] = {636, 150}
    [id mission, 1,2,3 etc...] = {mob_id, count_kill},

    Do you need a quest? Write to me, I can create everything. (Full STACK, Web (PHP, JS, SQL, HTML, CSS), Server (C ++, Python, Lua))

    Discord Alerin#5559

    • Metin2 Dev 5
    • Good 4
    • Love 3
  10. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Receive items the first time you log in to the server.
    Contains the lua function in C ++ and the quest.
    This function allows you to receive the item and put it on. If you want to use it elsewhere, remember to check if the user has the equipment on.

     

    I do quests at a good price. I invite you :)

     

    Quote

    This is the hidden content, please


    Settings

    local item = {
      ['all'] = {  -- Items for everyone
        {ITEM_ID, COUNT}, -- count OR "EQ" If I give EQ, the item will be put on the character
      },
      [1] = {       -- Warrior
        {ITEM_ID, ITEM_ID},   -- Put on
        {ITEM_ID, ITEM_ID}    -- Equipment
      },
      [2] = {       -- Ninja
        {ITEM_ID, ITEM_ID},   -- Put on
        {ITEM_ID, ITEM_ID}    -- Equipment
      },
      [3] = {       -- Sura
        {ITEM_ID, ITEM_ID},   -- Put on
        {ITEM_ID, ITEM_ID}    -- Equipment
      },
      [4] = {       -- Shaman
        {ITEM_ID, ITEM_ID},   -- Put on
        {ITEM_ID, ITEM_ID}    -- Equipment
      }
    }


    Also you can add

    ds.give_qualification()     -- Alchemy
    horse.set_level(1)          -- Horse level
    pc.set_skill_level(122, 2)  -- Gives 2 combos
    pc.set_skill_level(131, 10) -- Summon a horse
    horse.ride()


    Notification

    chat("Have a nice game!")
    • Metin2 Dev 75
    • kekw 1
    • Eyes 1
    • Dislove 3
    • Think 1
    • Confused 1
    • Good 22
    • Love 2
    • Love 48
  11. M2 Download Center

    This is the hidden content, please
    ( Internal )

    I think someone will be useful, the list of bonuses in two languages as one file. (If anyone wants, I can automatically translate in his language)

     

    https://github.com/Alerinos/M2-WWW-Bonus

    Example:

    use M2\Bonus;
    
    $bonus = new Bonus(Bonus::APPLY_ATT_SPEED); // bonus name or ID
    $bonus->lang = 'en';
    echo $bonus->translation;
    echo $bonus->name;
    echo $bonus->id;

    I can create scripts / systems in PHP on request.

    • Metin2 Dev 3
    • Love 3
  12. Thank you for opinion. You can do it nicely in an array, but I made editing the version for the less experienced easier. I also try to avoid unnecessary loops. Lua is the fastest scripting language but implementation in metin is scary.

  13. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hi, my first publication in this forum. Quest with daily limit and level interval for drop cor draconis in alchemi. I think it will be useful to someone. I also write commissioned quests :)

    https://github.com/Alerinos/M2-Quest-Alchemy

    Quest is compatible with Marty files.

    • Metin2 Dev 19
    • Confused 1
    • Good 4
    • Love 2
    • Love 8
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.