Jump to content
  • 0
Virtue

Item Options

Question

  Reveal hidden contents

Looking for scripts for this, Item options for all equipments / costumes slots. no sample script located. I found two of them but it's outdated. will try and modify my thread after work.

Demo NPC from Utility

One from Scripting support

 

TLDR: I tried using the one from the DEMO NPC from the utility section and tried to modify the menu to just show costumes side but I get this.

script:

	setarray(.@costume$[1], EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW, EQI_COSTUME_GARMENT);
	.@menu$ = "";
	for (.@i = 1; .@i < getarraysize(.@costume$); ++.@i)
		.@menu$ += ((getequipisequiped(.@i)) ? getequipname(.@i) : .@costume$[.@i] + "-[Not equipped]") + ":";
	// Select the part.
	.@equip_index = select(.@menu$);

roTC1Me.png

Edited by Virtue

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
	// Build the Menu.
	setarray .@costume, EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW, EQI_COSTUME_GARMENT;
	.@menu$ = "";
	for (.@i = 0; .@i < getarraysize(.@costume); ++.@i)
		.@menu$ += ((getequipisequiped(.@costume[.@i])) ? getequipname(.@costume[.@i]) : "" + .@costume[.@i] + "-[Not equipped]") + ":";
	// Select the part.
	.@equip_index = .@costume[ select(.@menu$) -1 ];

 

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

Isn't the parameter on getequipisequiped and getequipname wrong? .@i will be 1, 2, ... which are EQI_HEAD_TOP (1), EQI_ARMOR (2) and not costume slots.

Share this post


Link to post
Share on other sites
  • 0

I also don't understand what your question is
you claimed the script doesn't work, but I just tested it working fine .... of course only for the non-costume equipment

	// Build the Menu.
	setarray(.@position$[1], "Head", "Body", "Left Hand", "Right Hand", "Robe", "Shoes", "Accessory 1", "Accessory 2", "Head 2", "Head 3");
	.@menu$ = "";
	for (.@i = 1; .@i <= 10; ++.@i)
		.@menu$ += ((getequipisequiped(.@i)) ? getequipname(.@i) : .@position$[.@i] + "-[Not equipped]") + ":";
	// Select the part.
	.@equip_index = select(.@menu$);

if you want to extend to costume area, this part has to modify

Share this post


Link to post
Share on other sites
  • 0
  On 4/13/2019 at 5:43 PM, AnnieRuru said:

I also don't understand what your question is
you claimed the script doesn't work, but I just tested it working fine .... of course only for the non-costume equipment

	// Build the Menu.
	setarray(.@position$[1], "Head", "Body", "Left Hand", "Right Hand", "Robe", "Shoes", "Accessory 1", "Accessory 2", "Head 2", "Head 3");
	.@menu$ = "";
	for (.@i = 1; .@i <= 10; ++.@i)
		.@menu$ += ((getequipisequiped(.@i)) ? getequipname(.@i) : .@position$[.@i] + "-[Not equipped]") + ":";
	// Select the part.
	.@equip_index = select(.@menu$);

if you want to extend to costume area, this part has to modify

Yes it works for the normal equipments, but how do I make it so just for the costumes?

Share this post


Link to post
Share on other sites
  • 0

What about this?

	setarray(.@costume[1], EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW, EQI_COSTUME_GARMENT);
	.@menu$ = "";
	for (.@i = 1; .@i < getarraysize(.@costume$); ++.@i)
		.@menu$ += ((getequipisequiped(.@i)) ? getequipname(.@costume[.@i]) : "" + .@costume[.@i] + "-[Not equipped]") + ":";
	// Select the part.
	.@equip_index = select(.@menu$);

 

Share this post


Link to post
Share on other sites
  • 0
  On 4/13/2019 at 9:08 PM, KirieZ said:

What about this?

	setarray(.@costume[1], EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW, EQI_COSTUME_GARMENT);
	.@menu$ = "";
	for (.@i = 1; .@i < getarraysize(.@costume$); ++.@i)
		.@menu$ += ((getequipisequiped(.@i)) ? getequipname(.@costume[.@i]) : "" + .@costume[.@i] + "-[Not equipped]") + ":";
	// Select the part.
	.@equip_index = select(.@menu$);

 

doesn't work as intended. 

Share this post


Link to post
Share on other sites
  • 0
  On 4/14/2019 at 2:57 AM, AnnieRuru said:
	// Build the Menu.
	setarray .@costume, EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW, EQI_COSTUME_GARMENT;
	.@menu$ = "";
	for (.@i = 0; .@i < getarraysize(.@costume); ++.@i)
		.@menu$ += ((getequipisequiped(.@costume[.@i])) ? getequipname(.@costume[.@i]) : "" + .@costume[.@i] + "-[Not equipped]") + ":";
	// Select the part.
	.@equip_index = .@costume[ select(.@menu$) -1 ];

 

Thanks @AnnieRuru will check on this after work and errands :)

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
Answer this question...

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


×
×
  • Create New...

Important Information

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