IsabelaFernandez Posted November 7, 2019 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 7, 2019 Hello everyone, I would like to add options to this script. Currently it is only used to craft a single item, I would like to add others. prontera,155,181,5 script Sample 757,{ for( .@i = 0; .@i < .item_id_size; .@i++ ){ mes .item_amount[.@i]+" x "+getitemname( .item_id[.@i] ); if( countitem( .item_id[.@i] ) < .item_amount[.@i] ) .@failed = 1; } if( !.@failed ){ mes "Please wait..."; progressbar "FFFFFF",10; for( .@i = 0; .@i < .item_id_size; .@i++ ) delitem .item_id[.@i],.item_amount[.@i]; if( rand( 100 ) < .craft_rate ){ mes "Gained 1 items."; getnameditem( .craft_gain,strcharinfo(0) ); }else{ mes "Failed"; } } close; OnInit: // craft settings .craft_rate = 50; setarray .item_id,607,608; setarray .item_amount,1,2; .item_id_size = getarraysize( .item_id ); // item gain .craft_gain = 5518; end; } In this part I would like to add the option to choose between ID 5518 (current) and below the item ID 5374 as the desired item to create. Quote Link to comment Share on other sites More sharing options...
1 Mael Posted November 10, 2019 Group: Forum Moderator Topic Count: 25 Topics Per Day: 0.01 Content Count: 837 Reputation: 321 Joined: 02/11/19 Last Seen: Sunday at 01:54 PM Share Posted November 10, 2019 7 hours ago, IsabelaFernandez said: thanks for your time and the script you created (well done by the way), this NPC is a good base of what i was needing but i wanted to implement the craft system (.craft_rate = x;), is it possible to make this junction in this script? prontera,150,150,4 script Quest NPC 1_M_MERCHANT,{ mes "[Quest NPC]"; mes "I have an awesome item list here, you want to take a simple quest?."; next; menu "Nope i dont want!",-, "Yes show me the list.",M_DO; mes "[Quest NPC]"; mes "Ok bye.."; emotion ET_HAH; close; M_DO: mes "[Quest NPC]"; mes "You can select one from the following..."; next; menu "ITEM1",A_ITEM1,"ITEM2",A_ITEM2,"ITEM3",A_ITEM3,"ITEM4",A_ITEM4,"ITEM5",A_ITEM5,"ITEM6",A_ITEM6; // -------------------------------------------------------- A_ITEM1: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM2: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM3: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM4: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM5: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM6: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } M_END: mes "[Quest NPC]"; mes "See you..."; emotion ET_SLEEPY; close; } } } } } } } 1 1 1 Quote Link to comment Share on other sites More sharing options...
0 LOOLP - OFF Posted November 8, 2019 Group: Members Topic Count: 12 Topics Per Day: 0.01 Content Count: 233 Reputation: 51 Joined: 12/20/18 Last Seen: March 10, 2021 Share Posted November 8, 2019 Quote switch(select("Option Item 1:Option Item 2:Option Item 3")){ Case 1: mes "Process item 1"; close; Case 2: mes "Process item 2"; close; Case 3: mes "Process item 3"; close; } 1 Quote Link to comment Share on other sites More sharing options...
0 IsabelaFernandez Posted November 8, 2019 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 8, 2019 6 hours ago, Disabled LOOLP said: opened some options, but how do I associate the option with the desired ID? Example: Option 1 = ID 5518 option 2 = ID 5374 thanks for helping Quote Link to comment Share on other sites More sharing options...
0 Moooooon-Aisha Posted November 9, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 116 Reputation: 19 Joined: 09/08/17 Last Seen: April 13, 2023 Share Posted November 9, 2019 On 11/8/2019 at 2:44 AM, IsabelaFernandez said: Hello everyone, I would like to add options to this script. Currently it is only used to craft a single item, I would like to add others. prontera,155,181,5 script Sample 757,{ for( .@i = 0; .@i < .item_id_size; .@i++ ){ mes .item_amount[.@i]+" x "+getitemname( .item_id[.@i] ); if( countitem( .item_id[.@i] ) < .item_amount[.@i] ) .@failed = 1; } if( !.@failed ){ mes "Please wait..."; progressbar "FFFFFF",10; for( .@i = 0; .@i < .item_id_size; .@i++ ) delitem .item_id[.@i],.item_amount[.@i]; if( rand( 100 ) < .craft_rate ){ mes "Gained 1 items."; getnameditem( .craft_gain,strcharinfo(0) ); }else{ mes "Failed"; } } close; OnInit: // craft settings .craft_rate = 50; setarray .item_id,607,608; setarray .item_amount,1,2; .item_id_size = getarraysize( .item_id ); // item gain .craft_gain = 5518; end; } In this part I would like to add the option to choose between ID 5518 (current) and below the item ID 5374 as the desired item to create. Just use Euphy quest script, and add a chance to fail. 1 Quote Link to comment Share on other sites More sharing options...
0 IsabelaFernandez Posted November 9, 2019 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 9, 2019 (edited) 2 hours ago, Disabled LOOLP said: @IsabelaFernandez When I help, I only feel motivated to help again, when I get a reputat in the form of thanks. I always appreciate the knowledge sharing, but thanks anyway! 11 minutes ago, OppaiDragon said: Just use Euphy quest script, and add a chance to fail. I will research and give feedback on your suggestion, thanks Edited November 9, 2019 by IsabelaFernandez Quote Link to comment Share on other sites More sharing options...
0 Mael Posted November 9, 2019 Group: Forum Moderator Topic Count: 25 Topics Per Day: 0.01 Content Count: 837 Reputation: 321 Joined: 02/11/19 Last Seen: Sunday at 01:54 PM Share Posted November 9, 2019 (edited) @IsabelaFernandez You can use this, I think it has what you need. prontera,150,150,4 script Quest NPC 1_M_MERCHANT,{ mes "[Quest NPC]"; mes "I have an awesome item list here, you want to take a simple quest?."; next; menu "Nope i dont want!",-, "Yes show me the list.",M_DO; mes "[Quest NPC]"; mes "Ok bye.."; emotion ET_HAH; close; M_DO: mes "[Quest NPC]"; mes "You can select one from the following..."; next; menu "ITEM1",A_ITEM1,"ITEM2",A_ITEM2,"ITEM3",A_ITEM3,"ITEM4",A_ITEM4,"ITEM5",A_ITEM5,"ITEM6",A_ITEM6; A_ITEM1: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM2: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM3: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM4: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM5: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM6: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } M_END: mes "[Quest NPC]"; mes "See you..."; emotion ET_SLEEPY; close; } Edited November 10, 2019 by Gdevien better a code box 2 Quote Link to comment Share on other sites More sharing options...
0 IsabelaFernandez Posted November 9, 2019 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 9, 2019 2 hours ago, Gdevien said: @IsabelaFernandez You can use this, I think it has what you need. sample.cs 3.88 kB · 2 downloads thanks for your time and the script you created (well done by the way), this NPC is a good base of what i was needing but i wanted to implement the craft system (.craft_rate = x;), is it possible to make this junction in this script? Quote Link to comment Share on other sites More sharing options...
0 IsabelaFernandez Posted November 10, 2019 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 10, 2019 20 hours ago, Gdevien said: @IsabelaFernandez You can use this, I think it has what you need. prontera,150,150,4 script Quest NPC 1_M_MERCHANT,{ mes "[Quest NPC]"; mes "I have an awesome item list here, you want to take a simple quest?."; next; menu "Nope i dont want!",-, "Yes show me the list.",M_DO; mes "[Quest NPC]"; mes "Ok bye.."; emotion ET_HAH; close; M_DO: mes "[Quest NPC]"; mes "You can select one from the following..."; next; menu "ITEM1",A_ITEM1,"ITEM2",A_ITEM2,"ITEM3",A_ITEM3,"ITEM4",A_ITEM4,"ITEM5",A_ITEM5,"ITEM6",A_ITEM6; A_ITEM1: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM2: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM3: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM4: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM5: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } A_ITEM6: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; mes "Here you go!"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",3; getitem 999,1; // Item ID Number close; } M_END: mes "[Quest NPC]"; mes "See you..."; emotion ET_SLEEPY; close; } Is working, but it has a 100% chance of success, I would like to put a success rate like 40% ~ 50% success to create or fail Thank you my friend! Quote Link to comment Share on other sites More sharing options...
0 Mael Posted November 10, 2019 Group: Forum Moderator Topic Count: 25 Topics Per Day: 0.01 Content Count: 837 Reputation: 321 Joined: 02/11/19 Last Seen: Sunday at 01:54 PM Share Posted November 10, 2019 1 minute ago, IsabelaFernandez said: Is working, but it has a 100% chance of success, I would like to put a success rate like 40% ~ 50% success to create or fail Thank you my friend! I do not know what you're talking about i think you're not following the modified script. if you want to choose a rate% just modify this: if ( rand(100) < 50 ) { // 50% chance to get the item 2 Quote Link to comment Share on other sites More sharing options...
0 Mabuhay Posted November 10, 2019 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Share Posted November 10, 2019 (edited) @IsabelaFernandez Euphy's original quest shop. I modified it for you and added success rates. quest_shop_modified.txt I added SuccessRate option if you want to disable or enable the system easily. // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. set .SuccessRate,1; // Enable Success Rates? ( 1: yes / 0: no) Edit : Fixed not reading the success rate Edited November 10, 2019 by Mabuhay 1 Quote Link to comment Share on other sites More sharing options...
0 IsabelaFernandez Posted November 10, 2019 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 10, 2019 17 hours ago, Gdevien said: prontera,150,150,4 script Quest NPC 1_M_MERCHANT,{ mes "[Quest NPC]"; mes "I have an awesome item list here, you want to take a simple quest?."; next; menu "Nope i dont want!",-, "Yes show me the list.",M_DO; mes "[Quest NPC]"; mes "Ok bye.."; emotion ET_HAH; close; M_DO: mes "[Quest NPC]"; mes "You can select one from the following..."; next; menu "ITEM1",A_ITEM1,"ITEM2",A_ITEM2,"ITEM3",A_ITEM3,"ITEM4",A_ITEM4,"ITEM5",A_ITEM5,"ITEM6",A_ITEM6; // -------------------------------------------------------- A_ITEM1: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM2: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM3: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM4: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM5: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } // -------------------------------------------------------- A_ITEM6: mes "[Quest NPC]"; mes "You want this gear?"; mes "You need this items before you have mine."; mes "Poring Coins [300 ea]"; mes "Mithril Coins [500 ea]"; mes "Ghostring Card [1 ea]"; next; if(select("Get It:Cancel")==2) goto M_END; if(countitem(7539) < 300 || countitem(674) < 500 || countitem(4047) < 1) { mes "[Quest NPC]"; mes "Not enough coins"; close; } else { mes "[Quest NPC]"; delitem 7539,300; delitem 674,500; delitem 4047,1; progressbar "FFFFFF",2; if ( rand(100) < 50 ) { // 50% chance to get the item specialeffect2 610; mes "Success !"; getitem 999,1; // Item ID Number close; } else { specialeffect2 611; mes "Failed"; close; } M_END: mes "[Quest NPC]"; mes "See you..."; emotion ET_SLEEPY; close; } } } } } } } 6 hours ago, Mabuhay said: @IsabelaFernandez Euphy's original quest shop. I modified it for you and added success rates. quest_shop_modified.txt 9.88 kB · 1 download I added SuccessRate option if you want to disable or enable the system easily. // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. set .SuccessRate,1; // Enable Success Rates? ( 1: yes / 0: no) Edit : Fixed not reading the success rate both are exactly as I wanted, I don't have enough words, just thank you very much both of you Quote Link to comment Share on other sites More sharing options...
Question
IsabelaFernandez
Hello everyone, I would like to add options to this script. Currently it is only used to craft a single item, I would like to add others.
In this part I would like to add the option to choose between ID 5518 (current) and below the item ID 5374 as the desired item to create.
Link to comment
Share on other sites
11 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.