rexxar31 Posted April 8, 2012 Group: Members Topic Count: 62 Topics Per Day: 0.01 Content Count: 137 Reputation: 0 Joined: 04/07/12 Last Seen: May 17, 2012 Share Posted April 8, 2012 (edited) i am using http://pastebin.com/raw.php?i=g8W9yhSs as my refiner npc. how can i do if i want 10 red pots to refine equips even the equip has been upgraded unless it is +10? Edited April 8, 2012 by rexxar31 Quote Link to comment Share on other sites More sharing options...
Joseph Posted April 9, 2012 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 341 Reputation: 43 Joined: 01/10/12 Last Seen: June 29, 2020 Share Posted April 9, 2012 callfunc( "RefineFunc",<itemID>,<BitMasks>,<MaxRefine>,<CheckEquip>,<RefineMode>,<ItemAmount> ) function script RefineFunc { for( set .@i,1; .@i <= 10; set .@i,.@i + 1 ) set .@Menu$,.@Menu$ + (( getarg(1) & pow( 2,(.@i-1 ) ) && getequiprefinerycnt( .@i ) < getarg(2) && getequipisequiped( .@i) )?"^FF0000+"+getequiprefinerycnt( .@i )+" ^0000FF"+getequipname( .@i )+" "+( getitemslots( getequipid( .@i ) )?"["+getitemslots( getequipid( .@i ) )+"]":"" )+"^000000":"" )+":"; select( .@Menu$ ); if( countitem( getarg(0) ) < getarg(5) ) mes "You didnt have ^FF0000"+getarg(5)+" x "+getitemname( getarg(0) )+"^000000 to refine."; else if( getarg(3) == 1 && !getequipisenableref( @menu ) ) mes "I cant refine this items. Because it is ^FF0000Un-Refineable^000000."; else{ if( getarg(4) ) while( getequiprefinerycnt( @menu ) < getarg(2) ) successrefitem ( @menu ); else successrefitem ( @menu ); delitem getarg(0),getarg(5); mes "You have gained : "; mes "^FF0000+"+getequiprefinerycnt( @menu )+" ^0000FF"+getequipname( @menu )+"^000000"; } close; } Quote Link to comment Share on other sites More sharing options...
Rikimaru Posted April 9, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 658 Reputation: 57 Joined: 11/20/11 Last Seen: July 1, 2017 Share Posted April 9, 2012 You could try my Refiner/Derefiner/Repairman : // //=====// /==/ /==/ /==/ // // // /==/ /==/ /=/ /==/ // //=====// /==/ /=/ /==============/ /========/ /==//===/ /==/ /==/ // //=////// /==/ /==//=/ /==/ /==/==/==/==/==/ / / / /==/ /==/ /==/ // // == /==/ /==//=/ /==/ /==/ /==/ /==/ ======/ / /==/ /==/ /==/ // // == /==/ /==/ /=/ /==/ /==/ /==/ /==/ / /===/ / /==/ /==/ /==/ // // == /==/ /==/ /=/ /==/ /==/ /==/ /==/ / /===/ / /==/ /==/=====/==/ // // == /==/ /==/ /=/ /==/ /==/ /==/ /==/ /========/ /==/ /==///////==/ // ================ rAthena Script ================================================== //= Refiner and Repairman made by Rikimaru on rathena.org==// //=========================================================// //======== Description ====================================// //== Easy made Refiner with Repairman for new rAthena =====// //== Users. Please do not remove theese Credits ===========// //== Refines the complete Equipment to +10 and repairs ====// //== All broken items in the Players inventory ============// //================= Version : =============================// //============= V. 1.0 Bug Fixes by Rikimaru ==============// //=========== Credits End =================================// //===================== Script of Smith/Repairman =========// payon,163,214,3 script Smith 63,{ mes "[smith]"; mes "Hi,I can Refine your"; mes "Equipment to +100"; mes "or Repair your"; mes "Equipment.Also I'm able"; mes "to Derefine your Equipment."; mes "What do you want from me?"; next; switch(select("I want a Repair:I want a Refine:I want a Derefine:Nothing")) { case 1: mes "[smith]"; mes "Okay I'm going to repair"; mes "your Equipment."; next; while (getbrokenid(1)) { repair(1); set .@i, .@i +1; } if (.@i) dispbottom .@i + " items repaired."; mes "[smith]"; mes "Congrats!Enjoy!"; close; end; case 2: mes "[smith]"; mes "Okay I'm going"; mes "to refine your Equipment"; mes "to +10,Thx for using my Service!"; next; for(set @part,1;@part<101;set @part,@part+1) if(getequipisequiped(@part)) while(getequiprefinerycnt(@part) < 10) successrefitem @part; mes "[smith]"; mes "Congrats Enjoy it!"; close; end; case 3: mes "[ Smith ]"; mes "Okay I'm going to Derifne your Equipment now. You need 10.000 Zeny for that."; next; setarray .@a[1],256,16,32,2,4,64,8,128,512,1; select(getequipname(1),getequipname(2),getequipname(3),getequipname(4),getequipname(5),getequipname(6),getequipname(7),getequipname(8),getequipname(9),getequipname(10)); if ( !getequipisequiped(@menu) ) { mes "[ Smith ]"; mes "There's nothing equipped there..."; close; } if ( zeny < 10000 ) { mes "[ Smith ]"; mes "You don't have enough zeny"; close; } if ( getequiprefinerycnt(@menu) > 10 || getequiprefinerycnt(@menu) == 0 ) { mes "[ Smith ]"; mes "This item cannot be de-refined."; close; } atcommand "@refine "+ .@a[@menu] +" -1"; set zeny,zeny - 10000; mes "[ Smith ]"; mes "Your item has de-refined successfully"; close; case 4: mes "[ Smith ]"; mes "Okay,come back when you need me."; close; } } Quote Link to comment Share on other sites More sharing options...
rexxar31 Posted April 10, 2012 Group: Members Topic Count: 62 Topics Per Day: 0.01 Content Count: 137 Reputation: 0 Joined: 04/07/12 Last Seen: May 17, 2012 Author Share Posted April 10, 2012 callfunc( "RefineFunc",<itemID>,<BitMasks>,<MaxRefine>,<CheckEquip>,<RefineMode>,<ItemAmount> ) function script RefineFunc { for( set .@i,1; .@i <= 10; set .@i,.@i + 1 ) set .@Menu$,.@Menu$ + (( getarg(1) & pow( 2,(.@i-1 ) ) && getequiprefinerycnt( .@i ) < getarg(2) && getequipisequiped( .@i) )?"^FF0000+"+getequiprefinerycnt( .@i )+" ^0000FF"+getequipname( .@i )+" "+( getitemslots( getequipid( .@i ) )?"["+getitemslots( getequipid( .@i ) )+"]":"" )+"^000000":"" )+":"; select( .@Menu$ ); if( countitem( getarg(0) ) < getarg(5) ) mes "You didnt have ^FF0000"+getarg(5)+" x "+getitemname( getarg(0) )+"^000000 to refine."; else if( getarg(3) == 1 && !getequipisenableref( @menu ) ) mes "I cant refine this items. Because it is ^FF0000Un-Refineable^000000."; else{ if( getarg(4) ) while( getequiprefinerycnt( @menu ) < getarg(2) ) successrefitem ( @menu ); else successrefitem ( @menu ); delitem getarg(0),getarg(5); mes "You have gained : "; mes "^FF0000+"+getequiprefinerycnt( @menu )+" ^0000FF"+getequipname( @menu )+"^000000"; } close; } error when upgrading sleipnir. "script:getarg: index (idx=5) out of range (nargs=5) and no default value found You could try my Refiner/Derefiner/Repairman : // //=====// /==/ /==/ /==/ // // // /==/ /==/ /=/ /==/ // //=====// /==/ /=/ /==============/ /========/ /==//===/ /==/ /==/ // //=////// /==/ /==//=/ /==/ /==/==/==/==/==/ / / / /==/ /==/ /==/ // // == /==/ /==//=/ /==/ /==/ /==/ /==/ ======/ / /==/ /==/ /==/ // // == /==/ /==/ /=/ /==/ /==/ /==/ /==/ / /===/ / /==/ /==/ /==/ // // == /==/ /==/ /=/ /==/ /==/ /==/ /==/ / /===/ / /==/ /==/=====/==/ // // == /==/ /==/ /=/ /==/ /==/ /==/ /==/ /========/ /==/ /==///////==/ // ================ rAthena Script ================================================== //= Refiner and Repairman made by Rikimaru on rathena.org==// //=========================================================// //======== Description ====================================// //== Easy made Refiner with Repairman for new rAthena =====// //== Users. Please do not remove theese Credits ===========// //== Refines the complete Equipment to +10 and repairs ====// //== All broken items in the Players inventory ============// //================= Version : =============================// //============= V. 1.0 Bug Fixes by Rikimaru ==============// //=========== Credits End =================================// //===================== Script of Smith/Repairman =========// payon,163,214,3 script Smith 63,{ mes "[smith]"; mes "Hi,I can Refine your"; mes "Equipment to +100"; mes "or Repair your"; mes "Equipment.Also I'm able"; mes "to Derefine your Equipment."; mes "What do you want from me?"; next; switch(select("I want a Repair:I want a Refine:I want a Derefine:Nothing")) { case 1: mes "[smith]"; mes "Okay I'm going to repair"; mes "your Equipment."; next; while (getbrokenid(1)) { repair(1); set .@i, .@i +1; } if (.@i) dispbottom .@i + " items repaired."; mes "[smith]"; mes "Congrats!Enjoy!"; close; end; case 2: mes "[smith]"; mes "Okay I'm going"; mes "to refine your Equipment"; mes "to +10,Thx for using my Service!"; next; for(set @part,1;@part<101;set @part,@part+1) if(getequipisequiped(@part)) while(getequiprefinerycnt(@part) < 10) successrefitem @part; mes "[smith]"; mes "Congrats Enjoy it!"; close; end; case 3: mes "[ Smith ]"; mes "Okay I'm going to Derifne your Equipment now. You need 10.000 Zeny for that."; next; setarray .@a[1],256,16,32,2,4,64,8,128,512,1; select(getequipname(1),getequipname(2),getequipname(3),getequipname(4),getequipname(5),getequipname(6),getequipname(7),getequipname(8),getequipname(9),getequipname(10)); if ( !getequipisequiped(@menu) ) { mes "[ Smith ]"; mes "There's nothing equipped there..."; close; } if ( zeny < 10000 ) { mes "[ Smith ]"; mes "You don't have enough zeny"; close; } if ( getequiprefinerycnt(@menu) > 10 || getequiprefinerycnt(@menu) == 0 ) { mes "[ Smith ]"; mes "This item cannot be de-refined."; close; } atcommand "@refine "+ .@a[@menu] +" -1"; set zeny,zeny - 10000; mes "[ Smith ]"; mes "Your item has de-refined successfully"; close; case 4: mes "[ Smith ]"; mes "Okay,come back when you need me."; close; } } can refine sleipnir. Quote Link to comment Share on other sites More sharing options...
Question
rexxar31
i am using http://pastebin.com/raw.php?i=g8W9yhSs as my refiner npc. how can i do if i want 10 red pots to refine equips even the equip has been upgraded unless it is +10?
Edited by rexxar31Link to comment
Share on other sites
3 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.