IsabelaFernandez Posted November 23, 2023 Group: Members Topic Count: 146 Topics Per Day: 0.06 Content Count: 355 Reputation: 8 Joined: 04/16/18 Last Seen: October 21, 2024 Share Posted November 23, 2023 I would like some solution to resolve this situation, I have already tried using Refineable: false in db but there was no way. here is the script https://pastebin.com/wNqMZjDM Quote Link to comment Share on other sites More sharing options...
0 Nyaniverse Posted November 23, 2023 Group: Members Topic Count: 13 Topics Per Day: 0.02 Content Count: 51 Reputation: 34 Joined: 09/09/23 Last Seen: Yesterday at 07:31 PM Share Posted November 23, 2023 17 minutes ago, IsabelaFernandez said: I would like some solution to resolve this situation, I have already tried using Refineable: false in db but there was no way. here is the script https://pastebin.com/wNqMZjDM Here, have a try prontera,164,168,4 script Dwarf 600,{ .@item = 7420; .@quan = 0; .@freeRef = 7; .@paidRef = 10; setarray .@blacklist, 501,502,503,504,505; //add banned item here switch(select("Refino Gratis", "Refino Pago")){ case 1: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R; for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],.@items[.@i]) != -1){ message strcharinfo(0),"Invalid item"; end; } if(getequiprefinerycnt(.@items[.@i]) < .@freeRef){ specialeffect2 154; successrefitem .@items[.@i],.@freeRef - getequiprefinerycnt(.@items[.@i]); } } end; case 2: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R; if (countitem(.@item) < .@quan){ mes "Voce nao tem os items necessarios: " + .@quan + "x "+ getitemname(.@item); close; } for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],.@items[.@i]) != -1){ message strcharinfo(0),"Invalid item"; end; } // prevent the item consuption if(getequiprefinerycnt(.@items[.@i]) != .@paidRef) .@flag = 1; if(getequiprefinerycnt(.@items[.@i]) < .@paidRef){ specialeffect2 154; successrefitem .@items[.@i],.@paidRef - getequiprefinerycnt(.@items[.@i]); } } if (.@flag == 1) delitem 7420,10; end; } OnInit: waitingroom "Refinador Mestre",0; } Quote Link to comment Share on other sites More sharing options...
0 IsabelaFernandez Posted November 23, 2023 Group: Members Topic Count: 146 Topics Per Day: 0.06 Content Count: 355 Reputation: 8 Joined: 04/16/18 Last Seen: October 21, 2024 Author Share Posted November 23, 2023 3 minutes ago, Nyaniverse said: Here, have a try prontera,164,168,4 script Dwarf 600,{ .@item = 7420; .@quan = 0; .@freeRef = 7; .@paidRef = 10; setarray .@blacklist, 501,502,503,504,505; //add banned item here switch(select("Refino Gratis", "Refino Pago")){ case 1: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R; for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],.@items[.@i]) != -1){ message strcharinfo(0),"Invalid item"; end; } if(getequiprefinerycnt(.@items[.@i]) < .@freeRef){ specialeffect2 154; successrefitem .@items[.@i],.@freeRef - getequiprefinerycnt(.@items[.@i]); } } end; case 2: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R; if (countitem(.@item) < .@quan){ mes "Voce nao tem os items necessarios: " + .@quan + "x "+ getitemname(.@item); close; } for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],.@items[.@i]) != -1){ message strcharinfo(0),"Invalid item"; end; } // prevent the item consuption if(getequiprefinerycnt(.@items[.@i]) != .@paidRef) .@flag = 1; if(getequiprefinerycnt(.@items[.@i]) < .@paidRef){ specialeffect2 154; successrefitem .@items[.@i],.@paidRef - getequiprefinerycnt(.@items[.@i]); } } if (.@flag == 1) delitem 7420,10; end; } OnInit: waitingroom "Refinador Mestre",0; } unfortunately the NPC didn't even show up, I'm using the host so I didn't see the error. But I will see what the error line is and tell you. thank you for your attention! I'll send you the error message shortly Quote Link to comment Share on other sites More sharing options...
0 IsabelaFernandez Posted November 23, 2023 Group: Members Topic Count: 146 Topics Per Day: 0.06 Content Count: 355 Reputation: 8 Joined: 04/16/18 Last Seen: October 21, 2024 Author Share Posted November 23, 2023 1 hour ago, Nyaniverse said: Here, have a try prontera,164,168,4 script Dwarf 600,{ .@item = 7420; .@quan = 0; .@freeRef = 7; .@paidRef = 10; setarray .@blacklist, 501,502,503,504,505; //add banned item here switch(select("Refino Gratis", "Refino Pago")){ case 1: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R; for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],.@items[.@i]) != -1){ message strcharinfo(0),"Invalid item"; end; } if(getequiprefinerycnt(.@items[.@i]) < .@freeRef){ specialeffect2 154; successrefitem .@items[.@i],.@freeRef - getequiprefinerycnt(.@items[.@i]); } } end; case 2: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R; if (countitem(.@item) < .@quan){ mes "Voce nao tem os items necessarios: " + .@quan + "x "+ getitemname(.@item); close; } for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],.@items[.@i]) != -1){ message strcharinfo(0),"Invalid item"; end; } // prevent the item consuption if(getequiprefinerycnt(.@items[.@i]) != .@paidRef) .@flag = 1; if(getequiprefinerycnt(.@items[.@i]) < .@paidRef){ specialeffect2 154; successrefitem .@items[.@i],.@paidRef - getequiprefinerycnt(.@items[.@i]); } } if (.@flag == 1) delitem 7420,10; end; } OnInit: waitingroom "Refinador Mestre",0; } the script is working but the block list is not working unfortunately Quote Link to comment Share on other sites More sharing options...
0 Nyaniverse Posted November 23, 2023 Group: Members Topic Count: 13 Topics Per Day: 0.02 Content Count: 51 Reputation: 34 Joined: 09/09/23 Last Seen: Yesterday at 07:31 PM Share Posted November 23, 2023 2 minutes ago, IsabelaFernandez said: the script is working but the block list is not working unfortunately Ah yes, sorry it was my mistake, please edit this line if(inarray(.@blacklist[0],.@items[.@i]) != -1){ to this if(inarray(.@blacklist[0],getequipid(.@items[.@i])) != -1){ 1 Quote Link to comment Share on other sites More sharing options...
0 IsabelaFernandez Posted November 24, 2023 Group: Members Topic Count: 146 Topics Per Day: 0.06 Content Count: 355 Reputation: 8 Joined: 04/16/18 Last Seen: October 21, 2024 Author Share Posted November 24, 2023 30 minutes ago, Nyaniverse said: Ah yes, sorry it was my mistake, please edit this line if(inarray(.@blacklist[0],.@items[.@i]) != -1){ to this if(inarray(.@blacklist[0],getequipid(.@items[.@i])) != -1){ worked perfectly! However, I noticed that if the block list item ID is there the NPC refines the shoes "ID 64 @refine", is there any way to block any refinement until the blocked list item is not equipped? thank you my friend Quote Link to comment Share on other sites More sharing options...
0 Nyaniverse Posted November 24, 2023 Group: Members Topic Count: 13 Topics Per Day: 0.02 Content Count: 51 Reputation: 34 Joined: 09/09/23 Last Seen: Yesterday at 07:31 PM Share Posted November 24, 2023 (edited) 13 hours ago, IsabelaFernandez said: worked perfectly! However, I noticed that if the block list item ID is there the NPC refines the shoes "ID 64 @refine", is there any way to block any refinement until the blocked list item is not equipped? thank you my friend Here you go. prontera,164,168,4 script Dwarf 600,{ .@item = 7420; .@quan = 0; .@freeRef = 7; .@paidRef = 10; setarray .@blacklist, 501,502,503,504,505; //add banned item here switch(select("Refino Gratis", "Refino Pago")){ case 1: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R;] for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],getequipid(.@items[.@i])) != -1){ message strcharinfo(0),"Invalid item"; end; } } for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(getequiprefinerycnt(.@items[.@i]) < .@freeRef){ specialeffect2 154; successrefitem .@items[.@i],.@freeRef - getequiprefinerycnt(.@items[.@i]); } } end; case 2: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R; if (countitem(.@item) < .@quan){ mes "Voce nao tem os items necessarios: " + .@quan + "x "+ getitemname(.@item); close; } for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],getequipid(.@items[.@i])) != -1){ message strcharinfo(0),"Invalid item"; end; } } for(.@i = 0; .@i < getarraysize(.@items); .@i++){ // prevent the item consuption if(getequiprefinerycnt(.@items[.@i]) != .@paidRef) .@flag = 1; if(getequiprefinerycnt(.@items[.@i]) < .@paidRef){ specialeffect2 154; successrefitem .@items[.@i],.@paidRef - getequiprefinerycnt(.@items[.@i]); } } if (.@flag == 1) delitem 7420,10; end; } OnInit: waitingroom "Refinador Mestre",0; } Edited November 24, 2023 by Nyaniverse missing getequipid 1 Quote Link to comment Share on other sites More sharing options...
0 Winterfox Posted November 24, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 245 Reputation: 93 Joined: 06/30/18 Last Seen: November 27, 2024 Share Posted November 24, 2023 11 hours ago, Nyaniverse said: Here you go. prontera,164,168,4 script Dwarf 600,{ .@item = 7420; .@quan = 0; .@freeRef = 7; .@paidRef = 10; setarray .@blacklist, 501,502,503,504,505; //add banned item here switch(select("Refino Gratis", "Refino Pago")){ case 1: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R;] for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],.@items[.@i]) != -1){ message strcharinfo(0),"Invalid item"; end; } } for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(getequiprefinerycnt(.@items[.@i]) < .@freeRef){ specialeffect2 154; successrefitem .@items[.@i],.@freeRef - getequiprefinerycnt(.@items[.@i]); } } end; case 2: setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R; if (countitem(.@item) < .@quan){ mes "Voce nao tem os items necessarios: " + .@quan + "x "+ getitemname(.@item); close; } for(.@i = 0; .@i < getarraysize(.@items); .@i++){ if(inarray(.@blacklist[0],.@items[.@i]) != -1){ message strcharinfo(0),"Invalid item"; end; } } for(.@i = 0; .@i < getarraysize(.@items); .@i++){ // prevent the item consuption if(getequiprefinerycnt(.@items[.@i]) != .@paidRef) .@flag = 1; if(getequiprefinerycnt(.@items[.@i]) < .@paidRef){ specialeffect2 154; successrefitem .@items[.@i],.@paidRef - getequiprefinerycnt(.@items[.@i]); } } if (.@flag == 1) delitem 7420,10; end; } OnInit: waitingroom "Refinador Mestre",0; } You forgot the getequipid in your inarray comparisons. Quote Link to comment Share on other sites More sharing options...
0 Nyaniverse Posted November 24, 2023 Group: Members Topic Count: 13 Topics Per Day: 0.02 Content Count: 51 Reputation: 34 Joined: 09/09/23 Last Seen: Yesterday at 07:31 PM Share Posted November 24, 2023 1 hour ago, Winterfox said: You forgot the getequipid in your inarray comparisons. You're right, I apparently copied the one I sent previously. Edited it to have the getequipid check. Quote Link to comment Share on other sites More sharing options...
0 IsabelaFernandez Posted November 24, 2023 Group: Members Topic Count: 146 Topics Per Day: 0.06 Content Count: 355 Reputation: 8 Joined: 04/16/18 Last Seen: October 21, 2024 Author Share Posted November 24, 2023 (edited) resolved, thank you very much! It worked exactly as I wanted! @Nyaniverse Edited November 24, 2023 by IsabelaFernandez Quote Link to comment Share on other sites More sharing options...
Question
IsabelaFernandez
I would like some solution to resolve this situation, I have already tried using Refineable: false
in db but there was no way.
here is the script
https://pastebin.com/wNqMZjDM
Link to comment
Share on other sites
9 answers 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.