ooGubAoo Posted July 10, 2023 Posted July 10, 2023 (edited) I need NPC Refine like this. And must have same item to refine. If Knife[3] Can't refine with Knife[4] Ex. I must have 2 Knife to +1Knife. And must have +1 Knife 2ea to +2Knife. . . . And Must have +9Knife 2ea to +10Knife And Can refine to +20 Edited July 10, 2023 by ooGubAoo Quote
1 Winterfox Posted July 14, 2023 Posted July 14, 2023 (edited) prontera,156,179,6 script Suhnbi#custom 85,{ disable_items; mes "[Suhnbi]"; mes "I am the Armsmith."; mes "I can refine all kinds of weapons,"; mes "armor and equipment, so let me"; mes "know what you want to refine."; next; setarray(.@indices[0], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW); for(.@i = 0; .@i < 10; .@i++) { if (getequipisequiped(.@indices[.@i])) { .@menu$[.@i] = F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]"; .@equipped = 1; } } if (.@equipped == 0) { mes "[Suhnbi]"; mes "I don't think I can refine any items you have..."; close; } .@equip = .@indices[select(implode(.@menu$, ":")) - 1]; if (!getequipisequiped(.@equip)) end; if (!getequipisenableref(.@equip)) { mes "[Suhnbi]"; mes "Go find another Blacksmith. You can't refine this thing."; close; } if (getequiprefinerycnt(.@equip) >= 20) { mes "[Suhnbi]"; mes "Hmm... someone perfected this already. I don't think I can work on it further."; close; } .@refineitemid = getequipid(.@equip); .@refinerycnt = getequiprefinerycnt(.@equip); .@price = getequiprefinecost(.@equip, REFINE_COST_NORMAL, REFINE_ZENY_COST); .@itemtype = getiteminfo(.@refineitemid, ITEMINFO_TYPE); .@equipLvl = (.@itemtype == IT_WEAPON) ? getequipweaponlv(.@equip) : getequiparmorlv(.@equip); mes "[Suhnbi]"; if (.@itemtype == IT_WEAPON) mes "You want to refine a level " + .@equipLvl + " weapon?"; mes "To refine that, you'll need to have " + .itemCostAmount + " ^ff9999" + ((.@refinerycnt > 0) ? "+" + .@refinerycnt + " " : "") + getitemname(.@refineitemid) + "^000000 and " + callfunc("F_InsertComma", .@price) + " zeny."; mes "Would you like to continue?"; next; if(select("Yes:No") == 2) { mes "[Suhnbi]"; mes "I can't help it even if you're not happy about it..."; close; } .@idx = 0; getinventorylist(getcharid(0)); for(.@i = 0; .@i < @inventorylist_count; .@i++) { if(@inventorylist_id[.@i] == .@refineitemid && @inventorylist_refine[.@i] == .@refinerycnt && @inventorylist_equip[.@i] == 0) { .@itemReqIdxs[.@idx] = @inventorylist_idx[.@i]; .@idx++; } if(.@idx == .itemCostAmount) break; } if (getarraysize(.@itemReqIdxs) < .itemCostAmount || Zeny < .@price) { mes "[Suhnbi]"; mes "Are these all you have?"; mes "I'm very sorry, but I can't do anything without all the materials. Besides, I deserve some payments for my work, don't I?"; close; } Zeny -= .@price; for(.@i = 0; .@i < getarraysize(.@itemReqIdxs); .@i++) delitemidx(.@itemReqIdxs[.@i], 1); if (callfunc("F_IsEquipIDHack", .@equip, .@refineitemid) || callfunc("F_IsEquipRefineHack", .@equip, .@refinerycnt) || callfunc("F_IsEquipCardHack", .@equip, getequipcardid(.@equip, 0), getequipcardid(.@equip, 1), getequipcardid(.@equip, 2), getequipcardid(.@equip, 3))) { mes "[Suhnbi]"; emotion(ET_FRET); mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } mes "[Suhnbi]"; mes "Clang! Clang! Clang!"; successrefitem(.@equip); next; emotion(ET_BEST); mes "[Suhnbi]"; mes "There you go! It's done."; mes "It's been a while since I've made such a fine " + ((.@itemtype == IT_WEAPON) ? "weapon" : "armor") + ". You must be happy because it has become stronger!"; close; OnInit: .itemCostAmount = 2; } Edited July 14, 2023 by Winterfox 1 1 Quote
0 Winterfox Posted July 13, 2023 Posted July 13, 2023 prontera,156,179,6 script Suhnbi#custom 85,{ disable_items; mes "[Suhnbi]"; mes "I am the Armsmith."; mes "I can refine all kinds of weapons,"; mes "armor and equipment, so let me"; mes "know what you want to refine."; next; setarray(.@indices[0], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW); for(.@i = 0; .@i < 10; .@i++) { if (getequipisequiped(.@indices[.@i])) { .@menu$[.@i] = F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]"; .@equipped = 1; } } if (.@equipped == 0) { mes "[Suhnbi]"; mes "I don't think I can refine any items you have..."; close; } .@equip = .@indices[select(implode(.@menu$, ":")) - 1]; if (!getequipisequiped(.@equip)) end; if (!getequipisenableref(.@equip)) { mes "[Suhnbi]"; mes "Go find another Blacksmith. You can't refine this thing."; close; } if (getequiprefinerycnt(.@equip) >= 20) { mes "[Suhnbi]"; mes "Hmm... someone perfected this already. I don't think I can work on it further."; close; } .@refineitemid = getequipid(.@equip); .@refinerycnt = getequiprefinerycnt(.@equip); .@price = getequiprefinecost(.@equip, REFINE_COST_NORMAL, REFINE_ZENY_COST); .@itemtype = getiteminfo(.@refineitemid, ITEMINFO_TYPE); .@equipLvl = (.@itemtype == IT_WEAPON) ? getequipweaponlv(.@equip) : getequiparmorlv(.@equip); mes "[Suhnbi]"; if (.@itemtype == IT_WEAPON) mes "You want to refine a level " + .@equipLvl + " weapon?"; mes "To refine that, you'll need to have two ^ff9999" + ((.@refinerycnt > 0) ? "+" + .@refinerycnt + " " : "") + getitemname(.@refineitemid) + "^000000 and " + callfunc("F_InsertComma", .@price) + " zeny."; mes "Would you like to continue?"; next; if(select("Yes:No") == 2) { mes "[Suhnbi]"; mes "I can't help it even if you're not happy about it..."; close; } if (getequippercentrefinery(.@equip) < 100) { if (.@itemtype == IT_WEAPON) { mes "[Suhnbi]"; mes "Wow!!"; mes "This weapon probably"; mes "looks like it's been refined..."; mes "many times..."; mes "It may break if"; mes "you refine it again."; next; mes "And if it breaks,"; mes "you can't use it anymore!"; mes "All the cards in it and the properties ^ff0000will be lost^000000!"; mes "^ff0000Besides, the equipment will break!^000000"; mes "Are you sure you still want to continue?"; next; if(select("Yes:No") == 2) { mes "[Suhnbi]"; mes "Good."; mes "Because if the weapon breaks from unreasonable refining, then I get a bad mood, too."; close; } } else { mes "[Suhnbi]"; mes "Giggle. Giggle. Oh, you have guts, daring to refine this."; mes "You know it's pretty risky, don't you?"; next; mes "If your defensive equipment is broken, you'll never be able to use it again."; mes "Even your cards and your modifications will ^ff0000completely disappear^000000."; mes "Do you really wish to continue?"; next; if(select("Yes:No") == 2) { mes "[Suhnbi]"; mes "What nonsense. You waste my precious time."; mes "Get lost, punk."; close; } } } .@idx = 0; getinventorylist(getcharid(0)); for(.@i = 0; .@i < @inventorylist_count; .@i++) { if(@inventorylist_id[.@i] == .@refineitemid && @inventorylist_refine[.@i] == .@refinerycnt && @inventorylist_equip[.@i] == 0) { .@itemReqIdxs[.@idx] = @inventorylist_idx[.@i]; .@idx++; } if(.@idx == .itemCostAmount) break; } if (getarraysize(.@itemReqIdxs) < .itemCostAmount || Zeny < .@price) { mes "[Suhnbi]"; mes "Are these all you have?"; mes "I'm very sorry, but I can't do anything without all the materials. Besides, I deserve some payments for my work, don't I?"; close; } Zeny -= .@price; for(.@i = 0; .@i < getarraysize(.@itemReqIdxs); .@i++) delitemidx(.@itemReqIdxs[.@i], 1); if (callfunc("F_IsEquipIDHack", .@equip, .@refineitemid) || callfunc("F_IsEquipRefineHack", .@equip, .@refinerycnt) || callfunc("F_IsEquipCardHack", .@equip, getequipcardid(.@equip, 0), getequipcardid(.@equip, 1), getequipcardid(.@equip, 2), getequipcardid(.@equip, 3))) { mes "[Suhnbi]"; emotion(ET_FRET); mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } mes "[Suhnbi]"; mes "Clang! Clang! Clang!"; if (getequippercentrefinery(.@equip) > rand(100)) { successrefitem(.@equip); next; emotion(ET_BEST); mes "[Suhnbi]"; mes "There you go! It's done."; mes "It's been a while since I've made such a fine " + ((.@itemtype == IT_WEAPON) ? "weapon" : "armor") + ". You must be happy because it has become stronger!"; close; } failedrefitem(.@equip); next; emotion (!rand(5)) ? ET_MONEY : ET_HUK; mes "[Suhnbi]"; mes "Uuuuuuuuuummmmmph!!!"; next; mes "[Suhnbi]"; mes "..."; mes "....."; mes ".......Huhuhuhuhu~"; mes "........It was your choice and my ability, no regret."; close; OnInit: .itemCostAmount = 2; } 2 Quote
0 ooGubAoo Posted July 13, 2023 Author Posted July 13, 2023 5 hours ago, Winterfox said: prontera,156,179,6 script Suhnbi#custom 85,{ disable_items; mes "[Suhnbi]"; mes "I am the Armsmith."; mes "I can refine all kinds of weapons,"; mes "armor and equipment, so let me"; mes "know what you want to refine."; next; setarray(.@indices[0], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW); for(.@i = 0; .@i < 10; .@i++) { if (getequipisequiped(.@indices[.@i])) { .@menu$[.@i] = F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]"; .@equipped = 1; } } if (.@equipped == 0) { mes "[Suhnbi]"; mes "I don't think I can refine any items you have..."; close; } .@equip = .@indices[select(implode(.@menu$, ":")) - 1]; if (!getequipisequiped(.@equip)) end; if (!getequipisenableref(.@equip)) { mes "[Suhnbi]"; mes "Go find another Blacksmith. You can't refine this thing."; close; } if (getequiprefinerycnt(.@equip) >= 20) { mes "[Suhnbi]"; mes "Hmm... someone perfected this already. I don't think I can work on it further."; close; } .@refineitemid = getequipid(.@equip); .@refinerycnt = getequiprefinerycnt(.@equip); .@price = getequiprefinecost(.@equip, REFINE_COST_NORMAL, REFINE_ZENY_COST); .@itemtype = getiteminfo(.@refineitemid, ITEMINFO_TYPE); .@equipLvl = (.@itemtype == IT_WEAPON) ? getequipweaponlv(.@equip) : getequiparmorlv(.@equip); mes "[Suhnbi]"; if (.@itemtype == IT_WEAPON) mes "You want to refine a level " + .@equipLvl + " weapon?"; mes "To refine that, you'll need to have two ^ff9999" + ((.@refinerycnt > 0) ? "+" + .@refinerycnt + " " : "") + getitemname(.@refineitemid) + "^000000 and " + callfunc("F_InsertComma", .@price) + " zeny."; mes "Would you like to continue?"; next; if(select("Yes:No") == 2) { mes "[Suhnbi]"; mes "I can't help it even if you're not happy about it..."; close; } if (getequippercentrefinery(.@equip) < 100) { if (.@itemtype == IT_WEAPON) { mes "[Suhnbi]"; mes "Wow!!"; mes "This weapon probably"; mes "looks like it's been refined..."; mes "many times..."; mes "It may break if"; mes "you refine it again."; next; mes "And if it breaks,"; mes "you can't use it anymore!"; mes "All the cards in it and the properties ^ff0000will be lost^000000!"; mes "^ff0000Besides, the equipment will break!^000000"; mes "Are you sure you still want to continue?"; next; if(select("Yes:No") == 2) { mes "[Suhnbi]"; mes "Good."; mes "Because if the weapon breaks from unreasonable refining, then I get a bad mood, too."; close; } } else { mes "[Suhnbi]"; mes "Giggle. Giggle. Oh, you have guts, daring to refine this."; mes "You know it's pretty risky, don't you?"; next; mes "If your defensive equipment is broken, you'll never be able to use it again."; mes "Even your cards and your modifications will ^ff0000completely disappear^000000."; mes "Do you really wish to continue?"; next; if(select("Yes:No") == 2) { mes "[Suhnbi]"; mes "What nonsense. You waste my precious time."; mes "Get lost, punk."; close; } } } .@idx = 0; getinventorylist(getcharid(0)); for(.@i = 0; .@i < @inventorylist_count; .@i++) { if(@inventorylist_id[.@i] == .@refineitemid && @inventorylist_refine[.@i] == .@refinerycnt && @inventorylist_equip[.@i] == 0) { .@itemReqIdxs[.@idx] = @inventorylist_idx[.@i]; .@idx++; } if(.@idx == .itemCostAmount) break; } if (getarraysize(.@itemReqIdxs) < .itemCostAmount || Zeny < .@price) { mes "[Suhnbi]"; mes "Are these all you have?"; mes "I'm very sorry, but I can't do anything without all the materials. Besides, I deserve some payments for my work, don't I?"; close; } Zeny -= .@price; for(.@i = 0; .@i < getarraysize(.@itemReqIdxs); .@i++) delitemidx(.@itemReqIdxs[.@i], 1); if (callfunc("F_IsEquipIDHack", .@equip, .@refineitemid) || callfunc("F_IsEquipRefineHack", .@equip, .@refinerycnt) || callfunc("F_IsEquipCardHack", .@equip, getequipcardid(.@equip, 0), getequipcardid(.@equip, 1), getequipcardid(.@equip, 2), getequipcardid(.@equip, 3))) { mes "[Suhnbi]"; emotion(ET_FRET); mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } mes "[Suhnbi]"; mes "Clang! Clang! Clang!"; if (getequippercentrefinery(.@equip) > rand(100)) { successrefitem(.@equip); next; emotion(ET_BEST); mes "[Suhnbi]"; mes "There you go! It's done."; mes "It's been a while since I've made such a fine " + ((.@itemtype == IT_WEAPON) ? "weapon" : "armor") + ". You must be happy because it has become stronger!"; close; } failedrefitem(.@equip); next; emotion (!rand(5)) ? ET_MONEY : ET_HUK; mes "[Suhnbi]"; mes "Uuuuuuuuuummmmmph!!!"; next; mes "[Suhnbi]"; mes "..."; mes "....."; mes ".......Huhuhuhuhu~"; mes "........It was your choice and my ability, no regret."; close; OnInit: .itemCostAmount = 2; } Thank you it work. But i need to refine succes 100% every level. How to change Percent to refine. Thank you very much. Quote
0 ooGubAoo Posted July 14, 2023 Author Posted July 14, 2023 39 minutes ago, Winterfox said: prontera,156,179,6 script Suhnbi#custom 85,{ disable_items; mes "[Suhnbi]"; mes "I am the Armsmith."; mes "I can refine all kinds of weapons,"; mes "armor and equipment, so let me"; mes "know what you want to refine."; next; setarray(.@indices[0], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW); for(.@i = 0; .@i < 10; .@i++) { if (getequipisequiped(.@indices[.@i])) { .@menu$[.@i] = F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]"; .@equipped = 1; } } if (.@equipped == 0) { mes "[Suhnbi]"; mes "I don't think I can refine any items you have..."; close; } .@equip = .@indices[select(implode(.@menu$, ":")) - 1]; if (!getequipisequiped(.@equip)) end; if (!getequipisenableref(.@equip)) { mes "[Suhnbi]"; mes "Go find another Blacksmith. You can't refine this thing."; close; } if (getequiprefinerycnt(.@equip) >= 20) { mes "[Suhnbi]"; mes "Hmm... someone perfected this already. I don't think I can work on it further."; close; } .@refineitemid = getequipid(.@equip); .@refinerycnt = getequiprefinerycnt(.@equip); .@price = getequiprefinecost(.@equip, REFINE_COST_NORMAL, REFINE_ZENY_COST); .@itemtype = getiteminfo(.@refineitemid, ITEMINFO_TYPE); .@equipLvl = (.@itemtype == IT_WEAPON) ? getequipweaponlv(.@equip) : getequiparmorlv(.@equip); mes "[Suhnbi]"; if (.@itemtype == IT_WEAPON) mes "You want to refine a level " + .@equipLvl + " weapon?"; mes "To refine that, you'll need to have " + .itemCostAmount + " ^ff9999" + ((.@refinerycnt > 0) ? "+" + .@refinerycnt + " " : "") + getitemname(.@refineitemid) + "^000000 and " + callfunc("F_InsertComma", .@price) + " zeny."; mes "Would you like to continue?"; next; if(select("Yes:No") == 2) { mes "[Suhnbi]"; mes "I can't help it even if you're not happy about it..."; close; } .@idx = 0; getinventorylist(getcharid(0)); for(.@i = 0; .@i < @inventorylist_count; .@i++) { if(@inventorylist_id[.@i] == .@refineitemid && @inventorylist_refine[.@i] == .@refinerycnt && @inventorylist_equip[.@i] == 0) { .@itemReqIdxs[.@idx] = @inventorylist_idx[.@i]; .@idx++; } if(.@idx == .itemCostAmount) break; } if (getarraysize(.@itemReqIdxs) < .itemCostAmount || Zeny < .@price) { mes "[Suhnbi]"; mes "Are these all you have?"; mes "I'm very sorry, but I can't do anything without all the materials. Besides, I deserve some payments for my work, don't I?"; close; } Zeny -= .@price; for(.@i = 0; .@i < getarraysize(.@itemReqIdxs); .@i++) delitemidx(.@itemReqIdxs[.@i], 1); if (callfunc("F_IsEquipIDHack", .@equip, .@refineitemid) || callfunc("F_IsEquipRefineHack", .@equip, .@refinerycnt) || callfunc("F_IsEquipCardHack", .@equip, getequipcardid(.@equip, 0), getequipcardid(.@equip, 1), getequipcardid(.@equip, 2), getequipcardid(.@equip, 3))) { mes "[Suhnbi]"; emotion(ET_FRET); mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } mes "[Suhnbi]"; mes "Clang! Clang! Clang!"; successrefitem(.@equip); next; emotion(ET_BEST); mes "[Suhnbi]"; mes "There you go! It's done."; mes "It's been a while since I've made such a fine " + ((.@itemtype == IT_WEAPON) ? "weapon" : "armor") + ". You must be happy because it has become stronger!"; close; OnInit: .itemCostAmount = 2; } Thank you very much. I Love you very very much. How to Press vote or like on you? Quote
0 Winterfox Posted July 14, 2023 Posted July 14, 2023 The circle with the arrow in it at the right bottom of the post you want to like. 1 Quote
0 ooGubAoo Posted July 14, 2023 Author Posted July 14, 2023 28 minutes ago, Winterfox said: The circle with the arrow in it at the right bottom of the post you want to like. OK. I can vote now. Thank you. Quote
0 hendra814 Posted August 16, 2023 Posted August 16, 2023 On 7/14/2023 at 6:35 AM, ooGubAoo said: Thank you it work. But i need to refine succes 100% every level. How to change Percent to refine. Thank you very much. try change this part if (getequippercentrefinery(.@equip) > rand(100)) { into if (getequippercentrefinery(.@equip) > 0) { Quote
Question
ooGubAoo
I need NPC Refine like this. And must have same item to refine.
If Knife[3] Can't refine with Knife[4]
Ex.
I must have 2 Knife to +1Knife.
And must have +1 Knife 2ea to +2Knife.
.
.
.
And Must have +9Knife 2ea to +10Knife
And Can refine to +20
Edited by ooGubAoo7 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.