Ruhn Posted September 3, 2021 Share Posted September 3, 2021 if([email protected] == -1) { mes "You are not holding anything in your hand."; close; } else if([email protected]){ 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([email protected]) + "?"; next; if(select("Yes, proceed.") == 1){ mes "[Enchanter]"; mes "Disenchanting Weapon"; progressbar "#00FF00",1; next; [email protected] = EQI_HAND_R; [email protected]_id = getequipid([email protected]); [email protected] = getequiprefinerycnt([email protected]); for ([email protected] = 0; [email protected] < 4; [email protected]++) [email protected][[email protected]] = getequipcardid([email protected], [email protected]); delequip [email protected]; getitem2 [email protected]_id, 1, 1,[email protected],0,[email protected][0],[email protected][1],[email protected][2],[email protected][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 Quote Link to comment Share on other sites More sharing options...
0 LearningRO Posted September 3, 2021 Share Posted September 3, 2021 try this else if(getequiprandomoption(EQI_HAND_R,0,ROA_ID)){ Quote Link to comment Share on other sites More sharing options...
if([email protected] == -1) { mes "You are not holding anything in your hand."; close; } else if([email protected]){ 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([email protected]) + "?"; next; if(select("Yes, proceed.") == 1){ mes "[Enchanter]"; mes "Disenchanting Weapon"; progressbar "#00FF00",1; next; [email protected] = EQI_HAND_R; [email protected]_id = getequipid([email protected]); [email protected] = getequiprefinerycnt([email protected]); for ([email protected] = 0; [email protected] < 4; [email protected]++) [email protected][[email protected]] = getequipcardid([email protected], [email protected]); delequip [email protected]; getitem2 [email protected]_id, 1, 1,[email protected],0,[email protected][0],[email protected][1],[email protected][2],[email protected][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