Sephus 203 Posted April 10, 2017 So with the release of Item Options System I had created a demo NPC with a small number of options to test the system out or be used as a full fledged NPC. Configuration /** * General Configuration */ /* Chance of the enhancement process to fail. (0 - 99 in percent) */ .chance_of_failure = 10; /* Delete the item on failure? (true/false) */ .delete_on_failure = true; /* Required amount of zeny for a try. */ .zeny_requirement = 100; /* Minimum amount of the bonus value. * For negative effects or certain bonuses that require negative values * Maximum possible value is -INT16_MAX) */ .minimum_bonus_amount = -100; // usually used with delay bonus options, although not provided in the script. /* Maximum amount of the bonus value. * Maximum possible value is INT16_MAX */ .maximum_bonus_amount = 100; /* Disable selection of bonus value (true/false) */ .enable_random_bonus = false; /* Item Option Descriptions */ setarray(.options$[0], "Max HP", "Max SP", "STR", "AGI", "VIT", "INT", "DEX", "LUK"); /* Item Option Constants */ setarray(.option_constants[0], VAR_MAXHPAMOUNT, VAR_MAXSPAMOUNT, VAR_STRAMOUNT, VAR_AGIAMOUNT, VAR_VITAMOUNT, VAR_INTAMOUNT, VAR_DEXAMOUNT, VAR_LUKAMOUNT); end; File v1.0 item_options.txt Let me know what you think! Enjoy~! 1 3 Radian, dnote98, tedexx and 1 other reacted to this Quote Share this post Link to post Share on other sites
tedexx 7 Posted April 11, 2017 The method call for setequipoption has his variables inverted. setequipoption(.@equip_index, .@option_slot, .option_constants[.@option_variable - 1], .@value); should be setequipoption(.@equip_index, .option_constants[.@option_variable - 1], .@option_slot, .@value); Quote Share this post Link to post Share on other sites
Sephus 203 Posted April 11, 2017 setequipoption(.@equip_index, .@option_slot, .option_constants[.@option_variable - 1], .@value); is correct, Hercules has been updated. 1 tedexx reacted to this Quote Share this post Link to post Share on other sites
Shiro 27 Posted July 24, 2017 Hello. Can I request a modification for this NPC? I'm new at hercules and I'm having a hard time. Weapon Only Maximum Bonus = 5 Random item option for every try. Only 1 option allowed. Random Stat (e.g. Str/dex/agi/etc...) meaning you can't choose what option it will give you. giving you a random stat with a random value Thanks! Quote Share this post Link to post Share on other sites
Rebel 23 Posted October 6, 2018 On 10/2/2018 at 11:24 AM, Quazi said: hi @Smoke is it possible to request an additional configuration in your demo script like this.. just an idea to improve the Item Option System Demo NPC.. Purpose of Max Item Option Limit is to avoid getting packet errors by editing the mmo.c and 4144 also said that the client is set to only exact 5 Options.. i hope you can give it a try when you have some extra time.. thank you in advance Configuration Max Item Option Limit ( can be set to 1, 2, 3, 4, or 5) .Max_Item_Option_Limit = 3; Requirements and Required amount for a try.( Can be set to either Zeny or cashpoints or PvPPoints or ItemID) .zeny_requirement = 100; ( Can be set to 0 ) .cashpoints_requirement = 1000; ( Can be set to 0 ) .pvppoints_requirement = 100; ( Can be set to 0 ) .Item_requirement = 503; ( this is set 503 as Red Potion ) Everything I think is already in the script Smoke provided. Look for this.. for (.@i = 1; .@i <= MAX_ITEM_OPTIONS; ++.@i) { Change the MAX_ITEM_OPTIONS to .Max_Item_Option_Limit Also in Requirements and Required amount (zeny or points or item) it can be done already in script.. Quote Share this post Link to post Share on other sites