Easycore Posted April 25, 2017 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 220 Reputation: 255 Joined: 04/08/13 Last Seen: August 24, 2023 Share Posted April 25, 2017 [Guide] Adding custom Random Options Introduction: In this guide I will introduce you how to implement custom Random Options. I will use as an example the bonus "bAddEff". -------------------------------------------------------------------- - Server-Side - First of all we will add our custom option to item_randomopt_db (db\import\item_randomopt_db.txt) When opening this file will appear: // Items Random Option Database // // Structure of Database: // ID,{ Bonus Script } So we add this: RDMOPT_WEAPON_FREEZE,{ bonus2 bAddEff,Eff_Freeze,getrandomoptinfo(ROA_VALUE)*100; } In this case getrandomoptinfo(ROA_VALUE) is multiplied by 100, because 100 means 1% in bAddEff. Also, we need to add the constant, opening db\const.txt. Find: "//RDMOPT_ATTR_TOLERACE_ALL 193" And add below: RDMOPT_WEAPON_FREEZE 194 Server side is finished~ -------------------------------------------------------------------- - Client-Side - For display our custom options we must adding to enumvar.lub and addrandomoptionnametable.lub, located in (luafiles514\lua files\datainfo\) Editing enumvar.lub: Find: ATTR_TOLERACE_ALL = { 193, 10 }, And add: WEAPON_FREEZE = {194, 0}, *The first number must be same that added in const.txt* Editing addrandomoptionnametable.lub: Find: [EnumVAR.MDAMAGE_SIZE_LARGE_USER[1]] = "Magical resistance Large size monster +%d%%", And add: [EnumVAR.WEAPON_FREEZE[1]] = "Freeze an enemy when attacking +%d%%", %d% is equal to ROA_VALUE. -------------------------------------------------------------------- After completing all of the above your Random Option is ready to use. Remember that there is documentation of how to add random options to items and a sample npc. If you have doubts, write on the comments. 4 1 Quote Link to comment Share on other sites More sharing options...
Archetype Saber Posted January 3, 2018 Group: Members Topic Count: 90 Topics Per Day: 0.02 Content Count: 361 Reputation: 18 Joined: 01/09/13 Last Seen: July 27 Share Posted January 3, 2018 thanks now it makes sense! thank you! can you make a sample item script using random options? Quote Link to comment Share on other sites More sharing options...
Azarth Posted August 3, 2018 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 26 Reputation: 0 Joined: 05/28/14 Last Seen: June 8, 2019 Share Posted August 3, 2018 Hi, can anyone tell me what i did wrong? cons = RDMOPT_CLASS_CHANGE 206 item_randomopt_db = RDMOPT_CLASS_CHANGE,{ bonus bClassChange,getrandomoptinfo(ROA_VALUE)*100; } error i got: [Warning]: Skipping line '6', invalid constant definition [Error]: sv_readdb: Could not process contents of line 24 of "db/import/const.txt". [Error]: itemdb_read_randomopt: Invalid Random Option ID 'RDMOPT_CLASS_CHANGE' in line 6 of "db/import/item_randomopt_db.txt", skipping. [Error]: itemdb_read_randomopt_group: Invalid random group id 'RDMOPT_CLASS_CHANGE' in column 3! [Error]: itemdb_read_randomopt_group: Invalid random group id 'RDMOPT_CLASS_CHANGE' in column 3! [Error]: itemdb_read_randomopt_group: Invalid random group id 'RDMOPT_CLASS_CHANGE' in column 3! Quote Link to comment Share on other sites More sharing options...
masterzeus Posted October 18, 2021 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 58 Reputation: 1 Joined: 08/18/13 Last Seen: Yesterday at 02:42 PM Share Posted October 18, 2021 for rAthena 2021? mode pre-rene? how to confire? thanks Quote Link to comment Share on other sites More sharing options...
GSabino Posted June 13 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 2 Reputation: 0 Joined: 08/04/15 Last Seen: July 31 Share Posted June 13 (edited) Could you help me? I added the possibility of obtaining some 'heal' abilities, among others, to the enchantments. They are working correctly, but I can't get the ability to appear in the enchantment addrandomoptionnametable.lub [EnumVAR.Fire_Bolt[1]] = "Fire Bolt", enumvar.lub Fire_Bolt= { x, x }, { x, x }, I don't know what value to put in here. I thought about setting the skill level to 1 or 10 Edited June 13 by gabrielbdcxd Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.