Jump to content
  • 0

How to trigger this setarray?


Question

Posted

Hello good day ,, can i trigger this?

setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
	for(.@i = 1; .@i<getarraysize(.@indices); ++.@i) {

		if(getequipisequiped(.@indices[.@i])) {

			.@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
			.@equipped = 1;

		}
		.@menu$ = .@menu$ + ":";

	}

how can i trigger EQI_HEAD_TOP or EQI_SHOES

if(getequipisequiped(.@indices[EQI_HEAD_TOP])) {
    mes "Yup this is the headgear";
    close;
}

if(getequipisequiped(.@indices[EQI_SHOES])) {
    mes "Yup this is the Footgear";
    close;
}

so when i picked any headgear it will go to their respective ifs
 

3 answers to this question

Recommended Posts

  • 0
Posted
setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR;

i tried but failed

 setarray .@indices[1], ""+EQI_HEAD_TOP+"::OnHead", ""+EQI_ARMOR+"::OnArmor";

so it when a headgear is picked it will go on the OnHead Label.. if Armor is picked it will go OnArmor Label

  • 0
Posted
3 hours ago, celeron0134 said:

setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR;

i tried but failed

 setarray .@indices[1], ""+EQI_HEAD_TOP+"::OnHead", ""+EQI_ARMOR+"::OnArmor";

so it when a headgear is picked it will go on the OnHead Label.. if Armor is picked it will go OnArmor Label

Are you trying to call a function on a player picking loots and will automatically equipped?

  • Upvote 1
  • 0
Posted
5 hours ago, Radian said:

Are you trying to call a function on a player picking loots and will automatically equipped?

thx for the reply.. but no.. im trying to make a script for enchantment

anyways i did figure it out.. using cases.. thanks a lot tho for giving attention to my question

 

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...