creeps123 Posted June 4, 2012 Posted June 4, 2012 Hello Rathena, I just want to request a Refiner NPC that can refine items 100% success rate only 1 refine. not +10 only +1 and before a player can have his item refined by 100% successful +1 refine the npc requires the player to have a refine ticket. this ticket shouldn't be used as 1 ticket = +10 1 ticket = +1 sure refine. and pls can you also take care of the ticket? i don't have a clue what ticket to use. thanks a lot!! Quote
1 Emistry Posted June 4, 2012 Posted June 4, 2012 Check my Refine Function Script Release > Script Collection > Emistry Script > Refine Function Quote
0 thunginamue Posted November 6, 2019 Posted November 6, 2019 (edited) @Emistry sir ur refine system still refine max refine items, can you help me with this sir? and it does not check bitmask properly if i want to just refine weapon with my first npc it still refines armor.. and in my server side i cant use && i need to use + or || is it okay? Edited November 6, 2019 by thunginamue Quote
-1 NakedWolf Posted March 24, 2017 Posted March 24, 2017 (edited) Npc refines even with out item How to fix it? It says close is not use properly Thank you quiz_02.gat,235,345,6 script Refiner 437,{ OnUsed: set .Mode,0; // Refine mode [ 0 = Refine +1 Each time / 1 = Refine to Max Limit ] set .EquipCheck,1; // Check Equips is refineable or not. [ 0 = Disable / 1 = Enable ] set .MaxRefine,10; // Max Refine Limit set .TicketID,7608; // Ticket ID switch(select( ( getequiprefinerycnt(1) >= .MaxRefine || getequipisequiped(1) == 0 )?"":"Headgear [ ^4EEE94"+getequipname(1)+"^000000 ]", ( getequiprefinerycnt(2) >= .MaxRefine || getequipisequiped(2) == 0 )?"":"Armor [ ^4EEE94"+getequipname(2)+"^000000 ]", ( getequiprefinerycnt(3) >= .MaxRefine || getequipisequiped(3) == 0 )?"":"Left Hand [ ^4EEE94"+getequipname(3)+"^000000 ]", ( getequiprefinerycnt(4) >= .MaxRefine || getequipisequiped(4) == 0 )?"":"Right Hand [ ^4EEE94"+getequipname(4)+"^000000 ]", ( getequiprefinerycnt(5) >= .MaxRefine || getequipisequiped(5) == 0 )?"":"Garment [ ^4EEE94"+getequipname(5)+"^000000 ]", ( getequiprefinerycnt(6) >= .MaxRefine || getequipisequiped(6) == 0 )?"":"Shoes [ ^4EEE94"+getequipname(6)+"^000000 ]", ( getequiprefinerycnt(9) >= .MaxRefine || getequipisequiped(9) == 0 )?"":"Middle Headgear [ ^4EEE94"+getequipname(9)+"^000000 ]", ( getequiprefinerycnt(10) >= .MaxRefine || getequipisequiped(10) == 0 )?"":"Lower Headgear [ ^4EEE94"+getequipname(10)+"^000000 ]", "^FF0000Close^000000")) { Case 1: if ( .Mode == 0 ) { callsub RefineSystem,1; } if ( .Mode == 1 ) { callsub MaxRefineSystem,1; } Case 2: if ( .Mode == 0 ) { callsub RefineSystem,2; } if ( .Mode == 1 ) { callsub MaxRefineSystem,2; } Case 3: if ( .Mode == 0 ) { callsub RefineSystem,3; } if ( .Mode == 1 ) { callsub MaxRefineSystem,3; } Case 4: if ( .Mode == 0 ) { callsub RefineSystem,4; } if ( .Mode == 1 ) { callsub MaxRefineSystem,4; } Case 5: if ( .Mode == 0 ) { callsub RefineSystem,5; } if ( .Mode == 1 ) { callsub MaxRefineSystem,5; } Case 6: if ( .Mode == 0 ) { callsub RefineSystem,6; } if ( .Mode == 1 ) { callsub MaxRefineSystem,6; } Case 7: if ( .Mode == 0 ) { callsub RefineSystem,9; } if ( .Mode == 1 ) { callsub MaxRefineSystem,9; } Case 8: if ( .Mode == 0 ) { callsub RefineSystem,10; } if ( .Mode == 1 ) { callsub MaxRefineSystem,10; } Case 9: close; } RefineSystem: if ( .EquipCheck == 1 && getequipisenableref(getarg(0)) == 0 ){ mes "I cant refine this items. Because it is unrefinable."; close; } successrefitem (getarg(0)); delitem .TicketID,0; close; MaxRefineSystem: if ( .EquipCheck == 1 && getequipisenableref(getarg(0)) == 0 ){ mes "I cant refine this items. Because it is unrefinable."; close; } for ( set .@i,getequiprefinerycnt(getarg(0)); getequiprefinerycnt(getarg(0)) < .MaxRefine; set .@i,getequiprefinerycnt(getarg(0)) ){ successrefitem (getarg(0)); } message strcharinfo(0),"The Equipments has been refined, Ticket will also be removed from your inventory."; delitem .TicketID,0; close; } Edited March 25, 2017 by NakedWolf Quote
creeps123 Posted June 4, 2012 Author Posted June 4, 2012 Check my Refine Function Script Release > Script Collection > Emistry Script > Refine Function Ok sir Emistry. Thanks in advance erm, function script RefineFunc { for( set .@i,1; .@i <= 10; set .@i,.@i + 1 ) set .@Menu$,.@Menu$ + (( getarg(2) & pow( 2,(.@i-1 ) ) && getequiprefinerycnt( .@i ) >= getarg(3) && getequiprefinerycnt( .@i ) < getarg(4) && getequipisequiped( .@i) )?"^FF0000+"+getequiprefinerycnt( .@i )+" ^0000FF"+getequipname( .@i )+" "+( getitemslots( getequipid( .@i ) )?"["+getitemslots( getequipid( .@i ) )+"]":"" )+"^000000":"" )+":"; set .@Refine,select( .@Menu$ ); mes "Required ^FF0000"+getarg(1)+" x "+getitemname( getarg(0) )+"^000000"; if( getarg(5) == 1 && !getequipisenableref( .@Refine ) ) mes "I cant refine this items. Because it is ^FF0000Un-Refineable^000000."; else{ if( select( "^FF0000Refine^000000:Cancel" ) == 2 ) close; if( countitem( getarg(0) ) < getarg(1) ) close; delitem getarg(0),getarg(1); if( rand(100) < getarg(7) ){ if( getarg(6) ) while( getequiprefinerycnt( .@Refine ) < getarg(4) ) successrefitem ( .@Refine ); else successrefitem ( .@Refine ); mes "You have refined : "; mes "^FF0000+"+getequiprefinerycnt( .@Refine )+" ^0000FF"+getequipname( .@Refine )+"^000000"; }else{ failedrefitem ( .@Refine ); mes "Sorry, Failed in Refine and Equipment...Destroyed."; } } close; } actually i dont get this at all sorry about that sir emistry. i just don't know how to edit this thing.. Quote
Emistry Posted June 4, 2012 Posted June 4, 2012 perhap you can spend you time reading on this ? http://rathena.org/board/topic/53320-%E3%80%90-emistry-%C2%A9-2012-%E3%80%91e-scripts-collection/page__st__40__p__71628#entry71628 //--- Bitmasks ---- // 1 - Top Headgear // 2 - Armor // 4 - Left Hand // 8 - Right Hand // 16 - Garment // 32 - Shoes // 64 - Left Accessory // 128 - Right Accessory // 256 - Middle Headgear // 512 - Lower Headgear // .....callfunc( "RefineFunc",<itemID>,<Amount>,<BitMasks>,<MinRefine>,<MaxRefine>,<CheckEquip>,<RefineMode>,<Percent> ); // 1. itemID -> Item that will be used during Refine. // 2. Amount -> Amount of Required Items. // 3. BitMask -> Refer to above bitmask table. // 4. MinRefine -> Required Min Refine to use. // 5. MaxRefine -> What is the Max Refine. [ Can Bypass Default Server Max Refine ] // 6. CheckEquip -> Check Equipments is Refineable or not. [ 0 = Disable / 1 = Enable ] // 7. RefineMode -> +1 / Max Refine. [ 0 = +1 Refine / 1 = Max Refine ] // 8. Percent -> Rate of Success to refine current Equipment. // Notes : You can Customize it according to whatever way you want. // Different NPCs / Items with Different Settings. // It will consume the items that you defined to Refine the Equipments according to your Settings. //----------- If used this as Item Script ----------- // Example : Red Potion with 100% Refine Rate // 501,Red_Potion,Red Potion,11,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc( "RefineFunc",501,1,63,0,10,1,0,100 ); },{},{} // Change Item Type to 11 and Amount Required to 1 ( Advised ) //----------- If used this as NPC Script ------------ // Example : 90% Success Rate Refiner. // prontera,155,181,5 script Refiner 757,{ // callfunc( "RefineFunc",501,1,63,0,10,1,0,90 ); // } Quote
creeps123 Posted June 4, 2012 Author Posted June 4, 2012 (edited) sorry i really don't get it on how you will add the scripts together. im so sorry i cannot understand how it works even though i read them. i did the examples but when i try opening the npc. there it goes. no selection of what to refine. can you just pls make it more understandable to newbie like me. thanks in advance. and if it isn't a bother can you please post the final script? if you ever have time to make one. but if not. its ok. EDIT: tried using your script which i found in google. quiz_02.gat,235,345,6 script Refiner 437,{ OnUsed: set .Mode,0; // Refine mode [ 0 = Refine +1 Each time / 1 = Refine to Max Limit ] set .EquipCheck,1; // Check Equips is refineable or not. [ 0 = Disable / 1 = Enable ] set .MaxRefine,10; // Max Refine Limit set .TicketID,7608; // Ticket ID switch(select( ( getequiprefinerycnt(1) >= .MaxRefine || getequipisequiped(1) == 0 )?"":"Headgear [ ^4EEE94"+getequipname(1)+"^000000 ]", ( getequiprefinerycnt(2) >= .MaxRefine || getequipisequiped(2) == 0 )?"":"Armor [ ^4EEE94"+getequipname(2)+"^000000 ]", ( getequiprefinerycnt(3) >= .MaxRefine || getequipisequiped(3) == 0 )?"":"Left Hand [ ^4EEE94"+getequipname(3)+"^000000 ]", ( getequiprefinerycnt(4) >= .MaxRefine || getequipisequiped(4) == 0 )?"":"Right Hand [ ^4EEE94"+getequipname(4)+"^000000 ]", ( getequiprefinerycnt(5) >= .MaxRefine || getequipisequiped(5) == 0 )?"":"Garment [ ^4EEE94"+getequipname(5)+"^000000 ]", ( getequiprefinerycnt(6) >= .MaxRefine || getequipisequiped(6) == 0 )?"":"Shoes [ ^4EEE94"+getequipname(6)+"^000000 ]", ( getequiprefinerycnt(9) >= .MaxRefine || getequipisequiped(9) == 0 )?"":"Middle Headgear [ ^4EEE94"+getequipname(9)+"^000000 ]", ( getequiprefinerycnt(10) >= .MaxRefine || getequipisequiped(10) == 0 )?"":"Lower Headgear [ ^4EEE94"+getequipname(10)+"^000000 ]", "^FF0000Close^000000")) { Case 1: if ( .Mode == 0 ) { callsub RefineSystem,1; } if ( .Mode == 1 ) { callsub MaxRefineSystem,1; } Case 2: if ( .Mode == 0 ) { callsub RefineSystem,2; } if ( .Mode == 1 ) { callsub MaxRefineSystem,2; } Case 3: if ( .Mode == 0 ) { callsub RefineSystem,3; } if ( .Mode == 1 ) { callsub MaxRefineSystem,3; } Case 4: if ( .Mode == 0 ) { callsub RefineSystem,4; } if ( .Mode == 1 ) { callsub MaxRefineSystem,4; } Case 5: if ( .Mode == 0 ) { callsub RefineSystem,5; } if ( .Mode == 1 ) { callsub MaxRefineSystem,5; } Case 6: if ( .Mode == 0 ) { callsub RefineSystem,6; } if ( .Mode == 1 ) { callsub MaxRefineSystem,6; } Case 7: if ( .Mode == 0 ) { callsub RefineSystem,9; } if ( .Mode == 1 ) { callsub MaxRefineSystem,9; } Case 8: if ( .Mode == 0 ) { callsub RefineSystem,10; } if ( .Mode == 1 ) { callsub MaxRefineSystem,10; } Case 9: close; } RefineSystem: if ( .EquipCheck == 1 && getequipisenableref(getarg(0)) == 0 ){ mes "I cant refine this items. Because it is unrefinable."; close; } successrefitem (getarg(0)); delitem .TicketID,0; close; MaxRefineSystem: if ( .EquipCheck == 1 && getequipisenableref(getarg(0)) == 0 ){ mes "I cant refine this items. Because it is unrefinable."; close; } for ( set .@i,getequiprefinerycnt(getarg(0)); getequiprefinerycnt(getarg(0)) < .MaxRefine; set .@i,getequiprefinerycnt(getarg(0)) ){ successrefitem (getarg(0)); } message strcharinfo(0),"The Equipments has been refined, Ticket will also be removed from your inventory."; delitem .TicketID,0; close; } how to edit this so the npc will check if the player have the Refine ticket for example the ticket that will be used is itemID:7068(PremiumTicket) if they dont have it, they can't refine. but if they have 1 pc they can refine an item with +1 please help me.. thanks a lot! EDIT: ok i get it now. ineed to edit it from item_db. but my problem now is how to get the npc don't work if they dont have the Refine Ticket. when i refine. it deletes the item but even if the item rans out. it will stll do the work and refine the item even wthout the ticket. EDIT: i think i got it. Thanks for this lol Edited June 4, 2012 by creeps123 Quote
Question
creeps123
Hello Rathena,
I just want to request a Refiner NPC that can refine items
100% success rate only 1 refine. not +10 only +1
and before a player can have his item refined by 100% successful +1 refine
the npc requires the player to have a refine ticket.
this ticket shouldn't be used as 1 ticket = +10
1 ticket = +1 sure refine.
and pls can you also take care of the ticket? i don't have a clue what ticket to use.
thanks a lot!!
6 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.