Jump to content
  • 0

Help with random option npc


Ruhn

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  44
  • Reputation:   1
  • Joined:  04/15/20
  • Last Seen:  

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

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

try this

 

else if(getequiprandomoption(EQI_HAND_R,0,ROA_ID)){
Link to comment
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.   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.

×
×
  • Create New...