/*------------------
*
* Title: Howard (Coin Forger)
*
* Author: Streusel
*
* Created: August 11, 2011
*
* Note:
* Replace prontera with yanatsu, to avoid errors when using "run"
*
------------------*/
prontera,86,124,4 script Howard#melt 813,{
mes "[Howard]";
mes "Goodday Son, What can I do for you?";
next;
mes ""+strcharinfo(0)+"";
mes "I got these Ore's here, and I was wondering if you could help me with them.";
next;
mes "[Howard]";
mes "That shouldn't be a problem, just give me the items you want to be melted together and I'll see what I can do.";
next;
mes "[Howard]";
mes "I can melt ^CCCCCCSilver^000000, ^CC9999Gold^000000 and ^AAAAAAPlatinum^000000 Ores together into their corresponding origins.";
mes "^CCCCCC20 Silver Ores^000000 will get you 1 Silver Bar, ^CC999920 Gold Ores^000000 will give you 1 Gold Bar and ^AAAAAA20 Platinum Ores^000000 will give you 1 Platinum Bar.";
next;
mes "[Howard]";
mes "You currently have: ^CCCCCC"+countitem(31001)+" Silver Ore's^000000, ^CC9999"+countitem(31002)+" Gold Ore's^000000 and ^AAAAAA"+countitem(31003)+" Platinum Ore's^000000.";
next;
if(countitem(31001) >= 20)
{
mes "[Howard]";
mes "Would you like to go on to melt these or stop here?";
switch(select("Melt them now!","I like them the way they are."))
{
case 1:
next;
mes "[Howard]";
mes "So you have ^CCCCCC"+countitem(31001)+" Silver Ore's^000000, ^CC9999"+countitem(31002)+" Gold Ore's^000000 and ^AAAAAA"+countitem(31003)+" Platinum Ore's^000000.";
mes "Which would you like to melt?";
switch(select("Silver","Gold","Platinum"))
{
case 1: callsub S_Melt1,31001,31004;
case 2: callsub S_Melt2,31002,31005;
case 3: callsub S_Melt3,31003,31006;
}
case 2:
next;
mes "[Howard]";
mes "That's alright, I wasn't trying to push you into anything.";
mes "Come back when you'd like to melt them into Bars.";
close;
}
}
if(countitem(31002) >= 20 )
{
mes "[Howard]";
mes "Would you like to go on to melt these or stop here?";
switch(select("Melt them now!","I like them the way they are."))
{
case 1:
next;
mes "[Howard]";
mes "So you have ^CCCCCC"+countitem(31001)+" Silver Ore's^000000, ^CC9999"+countitem(31002)+" Gold Ore's^000000 and ^AAAAAA"+countitem(31003)+" Platinum Ore's^000000.";
mes "Which would you like to melt?";
switch(select("Silver","Gold","Platinum"))
{
case 1: callsub S_Melt1,31001,31004;
case 2: callsub S_Melt2,31002,31005;
case 3: callsub S_Melt3,31003,31006;
}
case 2:
next;
mes "[Howard]";
mes "That's alright, I wasn't trying to push you into anything.";
mes "Come back when you'd like to melt them into Bars.";
close;
}
}
if(countitem(31003) >= 20 )
{
mes "[Howard]";
mes "Would you like to go on to melt these or stop here?";
switch(select("Melt them now!","I like them the way they are."))
{
case 1:
next;
mes "[Howard]";
mes "So you have ^CCCCCC"+countitem(31001)+" Silver Ore's^000000, ^CC9999"+countitem(31002)+" Gold Ore's^000000 and ^AAAAAA"+countitem(31003)+" Platinum Ore's^000000.";
mes "Which would you like to melt?";
switch(select("Silver","Gold","Platinum"))
{
case 1: callsub S_Melt1,31001,31004;
case 2: callsub S_Melt2,31002,31005;
case 3: callsub S_Melt3,31003,31006;
}
case 2:
next;
mes "[Howard]";
mes "That's alright, I wasn't trying to push you into anything.";
mes "Come back when you'd like to melt them into Bars.";
close;
}
}
if(countitem(31001) && countitem(31002) && countitem(31002) < 20)
{
mes "[Howard]";
mes "Sorry but you don't have any or enough items to Melt.";
close;
}
S_Melt1:
if(countitem(getarg(0)) < 20)
{
mes "[Howard]";
mes "You don't have the items..";
close;
}
else
{
next;
set .@x,countitem(getarg(0))/20;
mes "[Howard]";
mes "I can create,";
mes "^CCCCCC"+.@x+" Silver Bars.^000000";
mes "With the amount you're currently carrying.";
mes "Each attempt will cost 500z.";
mes "And there is a 20% chance in it failing.";
mes "Do you wish to continue?";
switch(select("Yes","No"))
{
case 1:
specialeffect2 EF_MAPPILLAR;
emotion 6;
if (Zeny < 500) {
mes "[Apprentice Craftsman]";
mes "Sorry, but you don't have enough zeny.";
close;
}
set zeny,zeny-500;
progressbar "ffff00",3;
set .@result,rand(1,10);
if(.@result == 2)
{
specialeffect2 EF_REFINEFAIL;
delitem 31001,20;
next;
mes "[Howard]";
mes "I'm sorry but there were just too many impurities in the Ores, I failed to create a bar.";
close;
}
if(.@result == 6)
{
specialeffect2 EF_REFINEFAIL;
delitem 31001,20;
next;
mes "[Howard]";
mes "I'm sorry but there were just too many impurities in the Ores, I failed to create a bar.";
close;
}
else
{
specialeffect2 EF_REFINEOK;
delitem 31001,20;
getitem 31004,1;
next;
mes "[Howard]";
mes "A wonderful piece of work.";
mes "Come back to me when you have more.";
close;
}
case 2:
next;
mes "[Howard]";
mes "Alright, come back to me when you feel like it.";
close;
}
S_Melt2:
if(countitem(getarg(0)) < 20)
{
mes "[Howard]";
mes "You don't have the items..";
close;
}
else
{
next;
set .@x,countitem(getarg(0))/20;
mes "[Howard]";
mes "I can create,";
mes "^CC9999"+.@x+" Gold Bars.^000000";
mes "With the amount you're currently carrying.";
mes "Each attempt will cost 500z.";
mes "And there is a 20% chance in it failing.";
mes "Do you wish to continue?";
switch(select("Yes","No"))
{
case 1:
specialeffect2 EF_MAPPILLAR;
emotion 6;
if (Zeny < 500)
{
mes "[Apprentice Craftsman]";
mes "Sorry, but you don't have enough zeny.";
close;
}
set zeny,zeny-500;
progressbar "ffff00",3;
set .@result,rand(1,10);
if(.@result == 1)
{
specialeffect2 EF_REFINEFAIL;
delitem 31002,20;
next;
mes "[Howard]";
mes "I'm sorry but there were just too many impurities in the Ores, I failed to create a bar.";
close;
}
if(.@result == 5)
{
specialeffect2 EF_REFINEFAIL;
delitem 31002,20;
next;
mes "[Howard]";
mes "I'm sorry but there were just too many impurities in the Ores, I failed to create a bar.";
close;
}
else
{
specialeffect2 EF_REFINEOK;
delitem 31002,20;
getitem 31005,1;
next;
mes "[Howard]";
mes "A wonderful piece of work.";
mes "Come back to me when you have more.";
close;
}
case 2:
next;
mes "[Howard]";
mes "Alright, come back to me when you feel like it.";
close;
}
S_Melt3:
if(countitem(getarg(0)) < 20)
{
mes "[Howard]";
mes "You don't have the items..";
close;
}
else
{
next;
set .@x,countitem(getarg(0))/20;
mes "[Howard]";
mes "I can create,";
mes "^AAAAAA"+.@x+" Platinum Bars.^000000";
mes "With the amount you're currently carrying.";
mes "Each attempt will cost 500z.";
mes "And there is a 10% chance in it failing.";
mes "Do you wish to continue?";
switch(select("Yes","No"))
{
case 1:
specialeffect2 EF_MAPPILLAR;
emotion 6;
if (Zeny < 500)
{
mes "[Apprentice Craftsman]";
mes "Sorry, but you don't have enough zeny.";
close;
}
set zeny,zeny-500;
progressbar "ffff00",3;
set .@result,rand(1,10);
if(.@result == 2)
{
specialeffect2 EF_REFINEFAIL;
delitem 31003,20;
next;
mes "[Howard]";
mes "I'm sorry but there were just too many impurities in the Ores, I failed to create a bar.";
close;
}
else
{
specialeffect2 EF_REFINEOK;
delitem 31003,20;
getitem 31006,1;
next;
mes "[Howard]";
mes "A wonderful piece of work.";
mes "Come back to me when you have more.";
close;
}
case 2:
next;
mes "[Howard]";
mes "Alright, come back to me when you feel like it.";
close;
}
}
}
}
}