[1302030,[1302064,1402039]],// Maple Soul Singer -> Maple Glory Sword / Maple Soul Rohen
[1332025,[1332056,1332055]],// Maple Wagner -> Maple Asura Dagger / Maple Dark Mate
[1382012,[1382039,1372034]],// Maple Lama Staff -> Maple Wisdom Staff / Maple Shine Wand
[1412011,[1312032,1412027]],// Maple Dragon Axe -> Maple Steel Axe / Maple Demon Axe
[1422014,[1422029]],// Maple Doom Singer -> Maple Belzet
[1432012,[1432040]],// Maple Impaler -> Maple Soul Spear
[1442024,[1442051]],// Maple Scorpio -> Maple Karstan
[1452022,[1452045]],// Maple Soul Searcher -> Maple Kandiva Bow
[1462019,[1462040]],// Maple Crossbow -> Maple Nishada
[1472032,[1472055]],// Maple Kandayo -> Maple Skanda
[1482021,[1482022]],// Maple Storm Finger -> Maple Golden Claw
[1492021,[1492022]]// Maple Storm Pistol -> Maple Cannon Shooter
];
var reqs =[
[4001126,200],// Maple Leaf
[4033440,50],// Basic White Essence Stones
[4033439,25],// Basic Pink Essence Stones
[4033433,25]// Basic Red Essence Stones
];
var selEq;
function start(){
cm.sendNext("Lucky you, #h #! You’ve arrived just in time for an incoming stock of new Maple weapons made by the Resistance. They are quite a mighty upgrade from the old weapons provided by Claudine, would you care to take a look? #v1402039#, #v1302064#, #v1332056#, #v1332055#, #v1382039#, #v1372034#, #v1312032#, #v1412027#, #v1422029#, #v1432040#, #v1442051#, #v1452045#, #v1462040#, #v1472055#, #v1482022#, #v1492022#.");
}
function action(mode, type, selection){
if(mode ==0&& status ==2){
cm.sendOk("Well it's while stocks last anyway. Come back when you are ready.");
cm.dispose();
return;
}elseif(mode <1){
cm.dispose();
return;
}
status++;
if(status ==0){
var text ="We will issue one of these weapons out to you for a price!\r\n";
text +="\r\nThe requirements are:";
text +="\r\nThe level 43 Maple weapon you want to upgrade.";
text +="\r\n\t#v4001126# 200 Maple Leaves from monsters all over Commerci.";
text +="\r\n\t#v4033440# 50 Basic White Essence Stones from mining in Ardentmill.";
text +="\r\n\t#v4033439# 25 Basic Pink Essence Stones from mining in Ardentmill.";
text +="\r\n\t#v4033433# 25 Basic Red Essence Stones from mining in Ardentmill.";
if(haveEq()){
cm.sendNext(text);
}else{
cm.sendOk(text);
cm.dispose();
}
}elseif(status ==1){
var selText ="Which equip would you like to upgrade? (The equip chosen will be the top one in your inventory).\r\n";
for(var i =0; i < eqs.length; i++){
if(cm.haveItem(eqs[i][0])){
selText +="\r\n#L"+ i +"##i"+ eqs[i][0]+"##z"+ eqs[i][0]+"#";
}
}
cm.sendSimple(selText);
}elseif(status ==2){
selEq = selection;
var selText ="With a #i"+ eqs[selEq][0]+"#, you can get ";
if(eqs[selEq][1].length==1){
selText +="a #i"+ eqls[selEq][1][0]+"#";
}else{
selText +="either a #i"+ eqls[selEq][1][0]+"# or a #i"+ eqls[selEq][1][0]+"#.";
}
if(haveReq(selEq)){
selText +="\r\n\r\nWould you like to exchange a #i"+ eqs[selEq][0]+"#?";
cm.sendYesNo(selText);
}else{
cm.sendOk(selText);
cm.dispose();
}
}elseif(status ==3){
if(haveReq(selEq)){
if(cm.canHold(1302007)){
takeReq(selEq);
cm.gainItem(eqs[selEq][0],1,true);
}else{
cm.sendOk("Do you even have space to receive the weapon? Come back when you're ready!");