Jump to content
Sephus

Item Option System Demo NPC

Recommended Posts

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~! :)

Share this post


Link to post
Share on other sites

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);

Share this post


Link to post
Share on other sites

setequipoption(.@equip_index, .@option_slot, .option_constants[.@option_variable - 1], .@value);

 

is correct, Hercules has been updated.

Share this post


Link to post
Share on other sites

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!

 

Share this post


Link to post
Share on other sites
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 :innocent:

 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.. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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