AinsLord Posted March 17, 2023 Group: Members Topic Count: 261 Topics Per Day: 0.08 Content Count: 758 Reputation: 20 Joined: 11/21/15 Last Seen: April 6 Share Posted March 17, 2023 is there like an NPC that creates multiple dyestuffs and counteragent as long as the player have the required materials thanks in advance Quote Link to comment Share on other sites More sharing options...
0 WhiteEagle Posted March 18, 2023 Group: Members Topic Count: 79 Topics Per Day: 0.02 Content Count: 480 Reputation: 67 Joined: 08/28/12 Last Seen: 25 minutes ago Share Posted March 18, 2023 Just make a bartender shop. Quote Link to comment Share on other sites More sharing options...
0 AinsLord Posted March 19, 2023 Group: Members Topic Count: 261 Topics Per Day: 0.08 Content Count: 758 Reputation: 20 Joined: 11/21/15 Last Seen: April 6 Author Share Posted March 19, 2023 23 hours ago, WhiteEagle said: Just make a bartender shop. thats a renewal feature i can do it in pre-re however cost much time thanks for suggesting anyway Quote Link to comment Share on other sites More sharing options...
0 WhiteEagle Posted March 19, 2023 Group: Members Topic Count: 79 Topics Per Day: 0.02 Content Count: 480 Reputation: 67 Joined: 08/28/12 Last Seen: 25 minutes ago Share Posted March 19, 2023 8 hours ago, AinsLord said: thats a renewal feature i can do it in pre-re however cost much time WTF? Where does this cost much time? Just add a new shop and finish. If you don't use the barter files in npc/custom just add - Path: npc/pre-re/merchants/barters.yml Mode: Prerenewal to the barters.yml 1 Quote Link to comment Share on other sites More sharing options...
0 Racaae Posted March 25, 2023 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 212 Reputation: 94 Joined: 06/02/12 Last Seen: 11 hours ago Share Posted March 25, 2023 NPC: Spoiler morocc_in,147,96,3 script Java Dullihan#bulk 1_M_MERCHANT,{ .@use_bartershop = false; if ((MaxWeight-Weight) < 200 || checkweight(1201,1) == 0) { mes "- Wait a moment! -"; mes "- Currently you're carrying -"; mes "- too many items with you. -"; mes "- Please come back later -"; mes "- after you put some items into kafra storage. -"; close; } mes "[Dye Maker Java Dullihan]"; mes "Wow..."; mes "Such a nice day. Days like this are perfect to make dyes."; next; switch(select("Talk:Make Dyestuffs:Cancel")) { case 1: mes "[Dye Maker Java Dullihan]"; mes "Erm, I don't really have much to say to you. But, if you would like me to tell you about my life, I can do that. It's a little long and boring, but would you like to listen?"; next; if (select("Listen:Don't Listen") == 1) { mes "[Dye Maker Java Dullihan]"; mes "As long as I can remember, my father has been making dyes. He used to spend countless hours making dyes of different colors. Even when my mother passed away, he never stopped."; next; mes "[Dye Maker Java Dullihan]"; mes "At one point in my life, I became rebellious and ran away from home. I didn't want to be stuck to the family business and wanted to try other things."; next; mes "[Dye Maker Java Dullihan]"; mes "Anyways..."; mes "I eventually wound up back home to carry on the family tradition, making dyes for 15 years already. I guess it was really in my blood."; next; mes "[Dye Maker Java Dullihan]"; mes "Something I realized these days is that now I can understand my father. Why my father devoted everything to making dyes..."; next; mes "[Dye Maker Java Dullihan]"; mes "In the middle of all that tedious and hard work, he probably felt the magic of those colors passing on so many dreams for other people."; next; mes "[Dye Maker Java Dullihan]"; mes "It was probably for those dreams that he tried so hard to make dyes for his customers..."; next; mes "[Dye Maker Java Dullihan]"; mes "Heh... How do I know this? Well, that's the way I feel right now. Since a couple years ago, I've been able to hear what the colors were saying..."; next; mes "[Dye Maker Java Dullian]"; mes "Just watch. Someday, I'm going to succeed in making the color my father wanted to, but never got the chance to make."; close; } mes "[Dye Maker Java Dullihan]"; mes "Ahahahaha..."; mes "Well, I guess no one would want to listen to a measly dyemaker's story anyway. Hahaha...."; close; case 2: mes "[Dye Maker Java Dullihan]"; mes "Great! If you want it, I'll make it for you. I promise I'll make you the color you want. But what color dye would you like to make? The fee is different depending on the color."; next; mes "[Dye Maker Java Dullihan]"; mes "Why, do you ask? Just remember that there are colors that are easy to make, and those that require more effort and work. Please don't think the fee is too expensive."; next; mes "[Dye Maker Java Dullihan]"; mes "The color of the dye is special, made with all my heart and soul."; mes "Oh! I learned how to make some solutions, if you're interested."; if (.@use_bartershop) { close2; callshop "Dyestuff_Counteragent_Mixture", 1; end; } next; switch(select("^FF0000Scarlet Dyestuffs:^8B8000Lemon Dyestuffs:^0047ABCobaltblue Dyestuffs:^023020Darkgreen Dyestuffs:^FFA500Orange Dyestuffs:^8F00FFViolet Dyestuffs^000000:White Dyestuffs:Black Dyestuffs:Counteragent:Mixture")) { case 1: callsub S_MakeDye,1; break; case 2: callsub S_MakeDye,2; break; case 3: callsub S_MakeDye,3; break; case 4: callsub S_MakeDye,4; break; case 5: callsub S_MakeDye,5; break; case 6: callsub S_MakeDye,6; break; case 7: callsub S_MakeDye,7; break; case 8: callsub S_MakeDye,8; break; case 9: callsub S_MakeDye,9; break; case 10: callsub S_MakeDye,10; break; } case 3: mes "[Dye Maker Java Dullihan]"; mes "I'm not bragging or anything. But I have the skills to make dyestuff. If you ever need dyestuff, please come to me. I'll make them for you at a reasonable price."; close; } S_MakeDye: mes "[Dye Maker Java Dullihan]"; switch(getarg(0)) { case 1: mes "Mmm... I need 30 Red Herbs, 1 Counteragent, and 1 Empty Bottle to make Red Dyestuffs. The fee is only 3000 zeny to make it."; setarray .@item[0], 507, 973, 713; setarray .@count[0], 30, 1, 1; set .@cost,3000; set .@dyestuff,975; break; case 2: mes "Mmm... I need 30 Yellow Herbs, 1 Couneragent, and 1 Empty Bottle to make Lemon Dyestuffs. The fee is only 3000 zeny to make it."; setarray .@item[0], 508, 973, 713; setarray .@count[0], 30, 1, 1; set .@cost,3000; set .@dyestuff,976; break; case 3: mes "Mmm... I need 20 Blue Herbs, 1 Counteragent, and 1 Empty Bottle to make Cobaltblue Dyestuff. It's hard to use the Blue Herb, so the fee is going to be 3500 zeny."; setarray .@item[0], 510, 973, 713; setarray .@count[0], 20, 1, 1; set .@cost,3500; set .@dyestuff,978; break; case 4: mes "Mmm... I need 5 Blue Herbs, 20 Green Herbs, 20 Yellow Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle to make Darkgreen Dyestuffs. Don't get all of the materials confused. The fee is only 5000 zeny."; setarray .@item[0], 510, 511, 508, 974, 973, 713; setarray .@count[0], 5, 20, 20, 1, 1, 1; set .@cost,5000; set .@dyestuff,979; break; case 5: mes "Mmm... I need 20 Red Herbs, 20 Yellow Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle to make Orange Dyestuff. The fee is going to be 5000 zeny."; setarray .@item[0], 507, 508, 974, 973, 713; setarray .@count[0], 20, 20, 1, 1, 1; set .@cost,5000; set .@dyestuff,980; break; case 6: mes "Mmm... I need 10 Blue Herbs, 30 Red Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle to make Violet Dyestuffs. The fee will be 5000 zeny."; setarray .@item[0], 510, 507, 974, 973, 713; setarray .@count[0], 10, 30, 1, 1, 1; set .@cost,5000; set .@dyestuff,981; break; case 7: mes "Mmm... I need 30 White Herbs, 1 Counteragent, and 1 Empty bottle to make White Dyestuffs. The fee will be 3000 zeny."; setarray .@item[0], 509, 973, 713; setarray .@count[0], 30, 1, 1; set .@cost,3000; set .@dyestuff,982; break; case 8: mes "Mmm... I need 30 of each Red, Yellow, and Green Herb, 5 Blue Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle."; mes "The process takes longer and more effort than the others, so it is going to be 7000 zeny."; setarray .@item[0], 507, 508, 511, 510, 974, 973, 713; setarray .@count[0], 30, 30, 30, 5, 1, 1, 1; set .@cost,7000; set .@dyestuff,983; break; case 9: mes "Counteragent? I can make that too."; mes "I need Alcohol, Detrimindexta and an Empty Bottle to put it it all in. Just these three items and 3000 zeny."; setarray .@item[0], 970, 971, 713; setarray .@count[0], 1, 1, 1; set .@cost,3000; set .@dyestuff,973; break; case 10: mes "Mixture? I can make that too."; mes "I need Alcohol, Karvodailnirol and an Empty Bottle to put it it all in. Just these three items and 3000 zeny."; setarray .@item[0], 970, 972, 713; setarray .@count[0], 1, 1, 1; set .@cost,3000; set .@dyestuff,974; break; } next; set .@size, getarraysize(.@item); // check requirements for( .@i = 0 ; .@i < .@size ; .@i++ ) { if( countitem(.@item[.@i]) < .@count[.@i] ) break; .@checkmax[.@i] = countitem(.@item[.@i]) / .@count[.@i]; } .@max = .@checkmax[0]; for( .@ii = 1 ; .@ii < .@size ; .@ii++ ) if (.@checkmax[.@ii] < .@max) .@max = .@checkmax[.@ii]; .@checkmaxzeny = Zeny / .@cost; if (.@checkmaxzeny < .@max) .@max = .@checkmaxzeny; if( .@i < .@size || Zeny < .@cost ) goto Not_Enough; mes "[Dye Maker Java Dullihan]"; mes "How many [<ITEM>" + getitemname(.@dyestuff) + "<INFO>" + .@dyestuff + "</INFO></ITEM>]"; mes "do you want to make? You have enough materials to make ^0000FF" + .@max + " bottle" + (.@max==1?"":"s") + "^000000."; next; switch(select("Make 1", "Enter amount", "As many as possible", "I changed my mind.")) { case 1: .@amount = 1; break; case 2: input @Amount; if ( @Amount < 1 ) { mes "[Dye Maker Java Dullihan]"; mes "Did you change your mind?"; close; } else if ( @Amount > .@max ) { mes "[Dye Maker Java Dullihan]"; mes "As I said... You can make a maximum of " + .@max + "x " + getitemname(.@dyestuff) + "."; mes "Will you accept this amount?"; next; if (select("That will do.", "Cancel") == 2) { mes "[Dye Maker Java Dullihan]"; mes F_Bye; close; } .@amount = .@max; } else .@amount = @Amount; break; case 3: .@amount = .@max; break; case 4: mes "[Dye Maker Java Dullihan]"; mes "Eeeehhhh!! What's this?"; mes "You change your mind now!? So disappointing..."; close; } // check requirements again for( set .@i,0 ; .@i < .@size ; set .@i,.@i+1 ) { if( countitem(.@item[.@i]) < .@count[.@i]*.@amount ) break; } if( .@i < .@size || Zeny < .@cost*.@amount ) goto Not_Enough; // delete items for (set .@i, 0; .@i < .@size ; set .@i, .@i+1) delitem .@item[.@i], .@count[.@i]*.@amount; Zeny -= .@cost*.@amount; // get dyestuff getitem .@dyestuff, .@amount; specialeffect 305; mes "[Dye Maker Java Dullihan]"; mes "Hmm... It came out pretty well."; mes "Stop by whenever you need more dyes."; close; Not_Enough: mes "[Dye Maker Java Dullihan]"; mes "Hmmm. Not enough..."; mes "I don't think I'll be able to make the color you want with those materials. Why don't you go get some more materials...?"; close; OnInit: setunittitle(getnpcid(0), "< Dyestuffs Maker >"); end; } barter,yml (bartershop only supports 5 item requirements max, some dyestuffs requires more than that). Spoiler - Name: Dyestuff_Counteragent_Mixture Items: - Index: 0 Item: Scarlet_Dyestuffs Zeny: 3000 RequiredItems: - Index: 0 Item: Red_Herb Amount: 30 - Index: 1 Item: Counteragent Amount: 1 - Index: 2 Item: Empty_Bottle Amount: 1 - Index: 1 Item: Lemon_Dyestuffs Zeny: 3000 RequiredItems: - Index: 0 Item: Yellow_Herb Amount: 30 - Index: 1 Item: Counteragent Amount: 1 - Index: 2 Item: Empty_Bottle Amount: 1 - Index: 2 Item: Cobaltblue_Dyestuffs Zeny: 3500 RequiredItems: - Index: 0 Item: Blue_Herb Amount: 20 - Index: 1 Item: Counteragent Amount: 1 - Index: 2 Item: Empty_Bottle Amount: 1 - Index: 3 Item: Darkgreen_Dyestuffs Zeny: 5000 RequiredItems: - Index: 0 Item: Blue_Herb Amount: 5 - Index: 1 Item: Green_Herb Amount: 20 - Index: 2 Item: Yellow_Herb Amount: 20 - Index: 3 Item: Mixture Amount: 1 - Index: 4 Item: Counteragent Amount: 1 # - Index: 5 # Item: Empty_Bottle # Amount: 1 - Index: 4 Item: Orange_Dyestuffs Zeny: 5000 RequiredItems: - Index: 0 Item: Red_Herb Amount: 20 - Index: 1 Item: Yellow_Herb Amount: 20 - Index: 2 Item: Mixture Amount: 1 - Index: 3 Item: Counteragent Amount: 1 - Index: 4 Item: Empty_Bottle Amount: 1 - Index: 5 Item: Violet_Dyestuffs Zeny: 5000 RequiredItems: - Index: 0 Item: Blue_Herb Amount: 10 - Index: 1 Item: Red_Herb Amount: 30 - Index: 2 Item: Mixture Amount: 1 - Index: 3 Item: Counteragent Amount: 1 - Index: 4 Item: Empty_Bottle Amount: 1 - Index: 6 Item: White_Dyestuffs Zeny: 3000 RequiredItems: - Index: 0 Item: White_Herb Amount: 30 - Index: 1 Item: Counteragent Amount: 1 - Index: 2 Item: Empty_Bottle Amount: 1 - Index: 7 Item: Black_Dyestuffs Zeny: 7000 RequiredItems: - Index: 0 Item: Red_Herb Amount: 30 - Index: 1 Item: Yellow_Herb Amount: 30 - Index: 2 Item: Green_Herb Amount: 30 - Index: 3 Item: Blue_Herb Amount: 5 - Index: 4 Item: Mixture Amount: 1 # - Index: 5 # Item: Counteragent # Amount: 1 # - Index: 6 # Item: Empty_Bottle # Amount: 1 - Index: 8 Item: Counteragent Zeny: 3000 RequiredItems: - Index: 0 Item: Alchol Amount: 1 - Index: 1 Item: Detrimindexta Amount: 1 - Index: 2 Item: Empty_Bottle Amount: 1 - Index: 9 Item: Mixture Zeny: 3000 RequiredItems: - Index: 0 Item: Alchol Amount: 1 - Index: 1 Item: Karvodailnirol Amount: 1 - Index: 2 Item: Empty_Bottle Amount: 1 Quote Link to comment Share on other sites More sharing options...
Question
AinsLord
is there like an NPC that creates multiple dyestuffs and counteragent as long as the player have the required materials
thanks in advance
Link to comment
Share on other sites
4 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.