Greetings! i got this script added some edit myself Bulk input was working but the output is only applied once for example input 100 Bulk and the process only do once instead of 100 either sucess or failed and also how to show to the npc to display what current brew level the player is and the current exp needed to unlock the next brewLvl and lastly how to change the brewchance i know where it located but i dont know how to read exactly the formula or what is coded right here.
//======Name========================================
// Potion Brewer NPC
//======Version=====================================
// 1.0
//======Author(s)===================================
// Sandbox
//======Comments====================================
// In loving memory of AstralRO
//==================================================
//Change coordinates
prontera,144,180,3 script Brewho 46,{
mes "[^0000FF Brewho ^000000]";
mes "Hello, I can teach you how to brew! Teach you, teach you how to brew ^000088Astral Beer^000000"; //Change to what kind of potion do you want to brew
menu "Teach me please!",-;
next;
mes "[^0000FF Brewho ^000000]";
mes "Okay, you'll be needing these..";
mes "^000088";
mes "Empty Bottle"; //Change to what requirements you want to use
mes "Alcohol";
mes "Yggdrasil Berry^000000";
mes "Also, a talent fee of 100,000z!";
menu "I've got them master brewer!",-;
next;
input .@quantity;
next;
if(countitem(713) < .@quantity || countitem(970) < .@quantity || countitem(607) < .@quantity || Zeny < 100000) goto Lnenough; //Must match the requirements above.
mes "[^0000FF Brewho ^000000]";
mes "Let's see the results!";
//Uncomment to enable casting effect
progressbar "ffff00",1;
delitem 713,.@quantity;
delitem 970,.@quantity;
delitem 607,.@quantity;
set Zeny,Zeny-100000;
if(BrewLvl == 0) { set @brewchance,rand(1,5); //10% chance to brew on Lvl 0
if(@brewchance == 3) {
misceffect 305;
set BrewExp,BrewExp+1;
getnameditem 607,strcharinfo(0); //Change Item ID, Must match the potion to be made!
goto Lsuccess;
}
else {
misceffect 306;
goto Lfail;
}
}
else if(BrewLvl == 1) { set @brewchance,rand(1,4); //25% chance to brew on Lvl 1
if(@brewchance == 3) {
misceffect 305;
set BrewExp,BrewExp+1;
getnameditem 607,strcharinfo(0); //Change Item ID, Must match the potion to be made!
goto Lsuccess;
}
else {
misceffect 306;
goto Lfail;
}
}
else if(BrewLvl == 2) { set @brewchance,rand(1,3); //33.33% chance to brew on Lvl 2
if(@brewchance == 3) {
misceffect 305;
set BrewExp,BrewExp+1;
getnameditem 607,strcharinfo(0); //Change Item ID, Must match the potion to be made!
goto Lsuccess;
}
else {
misceffect 306;
goto Lfail;
}
}
else if(BrewLvl == 3) { set @brewchance,rand(1,2); //50% chance to brew on Lvl 3
if(@brewchance == 2) {
misceffect 305;
//if(BrewExp < 10000)
set BrewExp,BrewExp+1;
getnameditem 607,strcharinfo(0); //Change Item ID, Must match the potion to be made!
goto Lsuccess;
}
else {
misceffect 306;
goto Lfail;
}
}
Lsuccess:
next;
mes "[^0000FF Brewho ^000000]";
mes "Congratulations! You've succeeded!";
if(BrewExp < 10000) dispbottom "You've gained 1 Brewing Exp.";
if(BrewExp == 1000) { set BrewLvl,1;
dispbottom "Congratulations! Your Brewing Mastery is now Level 1!";
announce strcharinfo(0)+"'s Brewing Mastery reached Level 1!",bc_all,0x00FFFF;
}
else if(BrewExp == 5000) { set BrewLvl,2;
dispbottom "Congratulations! Your Brewing Mastery is now Level 2!";
announce strcharinfo(0)+"'s Brewing Mastery reached Level 2!",bc_all,0x00FFFF;
}
else if(BrewExp == 10000) { set BrewLvl,3;
dispbottom "Congratulations! Your Brewing Mastery is now Level 3!";
announce strcharinfo(0)+"'s Brewing Mastery reached Max Level!",bc_all,0x00FFFF;
}
close;
Lfail:
next;
mes "[^0000FF Brewho ^000000]";
mes "Oh.. You've failed.. Brew with me again next time!";
close;
Lnenough:
mes "[^0000FF Brewho ^000000]";
mes "Are you trying to brew me out!?";
close;
}
Question
kalabasa
Greetings! i got this script added some edit myself Bulk input was working but the output is only applied once for example input 100 Bulk and the process only do once instead of 100 either sucess or failed and also how to show to the npc to display what current brew level the player is and the current exp needed to unlock the next brewLvl and lastly how to change the brewchance i know where it located but i dont know how to read exactly the formula or what is coded right here.
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.