Jump to content
  • 0

Help with random option npc


Question

Posted
if(.@id == -1) {
			mes "You are not holding anything in your hand.";
			close;
		} else if(!.@allowed){
			mes "Your item can't be enchanted.";
			close;
		} else if(getequiprandomoption(EQI_HAND_R,0,ROA_ID == 0)){
			mes "Your weapon dont have enchantment!";
			close;
		} else if(getequiprandomoption(EQI_HAND_R,0,ROA_ID)){
			goto DISENCHANT;
			close;
		}


		DISENCHANT:
		mes "Do you want to disenchant your " + getitemname(.@id) + "?";
		next;
		if(select("Yes, proceed.") == 1){
			mes "[Enchanter]";
			mes "Disenchanting Weapon";
			progressbar "#00FF00",1;
			next;
			.@eqi = EQI_HAND_R;
			.@equip_id = getequipid(.@eqi);
			.@refine = getequiprefinerycnt(.@eqi);
			for (.@i = 0; .@i < 4; .@i++)
				.@card[.@i] = getequipcardid(.@eqi, .@i);
			delequip .@eqi;
			getitem2 .@equip_id, 1, 1,.@refine,0,.@card[0],.@card[1],.@card[2],.@card[3];
			mes "[Enchanter]";
			mes "Done removing enchantment";
			close;
		}
			close;
	}

the script works fine except for this line

} else if(getequiprandomoption(EQI_HAND_R,0,ROA_ID == 0)){ mes "Your weapon dont have enchantment!"; close;

idk what to do to make the npc check the item if it dont have any enchantment then it will say that message. Thanks in advance guys

1 answer to this question

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.

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