// TMW2 scripts. // Authors: // Jesusalva // Description: // Mercenary Trainer 033-1,180,100,0 script Mercenary Trainer NPC_REDY_MALE_SWORD,{ mesn; mesq l("Hello, I am a sword to hire, a Mercenary Trainer and Chief."); next; mesn; mesq l("Do you want to hire a mercenary? Or perhaps get a card so you can invoke them later? I can even make them stronger if you wish."); mesc l("With a discrete motion, you notice they also sell scrolls."); next; goto L_Main; L_Main: select l("Hire a mercenary"), l("Buy a mercenary card"), l("Evolve mercenaries"), l("Bye."); mes ""; switch (@menu) { // Hire Card case 1: menuint l("[%d GP] [Lv 1~25] Hire for one hour", 1000), 1, l("[%d GP] [Lv 26~40] Hire for one hour", 3000), 2, l("[%d GP] [Lv 41~60] Hire for one hour", 7500), 3, l("[%d GP] [Lv 61~79] Hire for one hour", 15000), 4, l("[%d GP] [Lv 80~100] Hire for one hour", 25000), 5, l("I've changed my mind"), 0; switch (@menuret) { case 1: .@gp=1000; if (Zeny < .@gp) { mesc l("You cannot pay."), 1; next; } else { .@mid=merc_randid(0, 0, 0, 0, 1000); mercenary_create(.@mid, 3600000); POL_PlayerMoney(.@gp); } break; case 2: .@gp=3000; if (Zeny < .@gp) { mesc l("You cannot pay."), 1; next; } else { .@mid=merc_randid(0, 0, 0, 1000, 0); mercenary_create(.@mid, 3600000); POL_PlayerMoney(.@gp); } break; case 3: .@gp=7500; if (Zeny < .@gp) { mesc l("You cannot pay."), 1; next; } else { mercenary_create merc_randid(0, 0, 1000, 0, 0), 3600000; POL_PlayerMoney(.@gp); } break; case 4: .@gp=15000; if (Zeny < .@gp) { mesc l("You cannot pay."), 1; next; } else { mercenary_create merc_randid(0, 1000, 0, 0, 0), 3600000; POL_PlayerMoney(.@gp); } break; case 5: .@gp=25000; if (Zeny < .@gp) { mesc l("You cannot pay."), 1; next; } else { mercenary_create merc_randid(1000, 0, 0, 0, 0), 3600000; POL_PlayerMoney(.@gp); } break; default: break; } break; // Buy Card case 2: npcshopattach(.name$); openshop; closedialog; close; break; // Evolve Card case 3: mesn; mesq l("Give me %s cards of the same type, and I'll give you one card of a higher rarity. There is no cost, but the card is random.", b(l("three"))); next; mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; .@card = requestitem(); if (.@card <= 1) break; if (countitem(.@card) < 3) { mesc l("You need at least %d cards of same kind.", 3), 1; break; } .@st = merc_getstar(.@card); if (.@st < 1 || .@st >= 5) { mesc l("This cannot be evolved."), 1; break; } delitem .@card, 3; merc_boxset( (.@st == 4 ? 1000 : 0), (.@st == 3 ? 1000 : 0), (.@st == 2 ? 1000 : 0), (.@st == 1 ? 1000 : 0), 0); mesn; mesq l("Here you go! Wasn't this a sweet deal?"); break; // Leave default: closeclientdialog; goodbye; close; break; } goto L_Main; OnInit: tradertype(NST_ZENY); sellitem MercBoxEE, 25000; sellitem MercBoxDD, 15000; sellitem MercBoxCC, 7500; sellitem MercBoxBB, 3750; sellitem MercBoxAA, 1250; sellitem ScrollSMaggot, 1000; sellitem ScrollSCave, 1500; sellitem ScrollSWolvern, 2000; sellitem ScrollSYeti, 2500; sellitem ScrollSTerranite, 3000; sellitem ScrollSDragon, 3500; sellitem SacredImmortalityPotion, 25000; sellitem ScrollMagnusHealA, 500; sellitem ScrollMagnusHealB,1000; sellitem ScrollMagnusHealC,2000; sellitem ScrollBattlePlansA, 400; sellitem ScrollBattlePlansB,1000; //sellitem ScrollBattlePlansC,1500; sellitem ScrollDefenseBlessA, 400; sellitem ScrollDefenseBlessB,1000; //sellitem ScrollDefenseBlessC,1500; sellitem ScrollCriticalFortuneA, 400; sellitem ScrollCriticalFortuneB,1000; //sellitem ScrollCriticalFortuneC,1500; .distance=5; .sex=G_MALE; end; // Pay your taxes! OnBuyItem: debugmes("Purchase confirmed"); PurchaseTaxes("Nival"); end; OnSellItem: debugmes("Sale confirmed"); PurchaseTaxes("Nival"); end; }