Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script Mercenary -1,{
- function rent_mercenary;
- OnBowmanMerc: rent_mercenary( 0 ); close;
- OnSpearmanMerc: rent_mercenary( 1 ); close;
- OnSwordmanMerc: rent_mercenary( 2 ); close;
- function rent_mercenary {
- .@type = getarg(0);
- if( .@type == 0 ) .@name$ = "Archer";
- else if( .@type == 1 ) .@name$ = "Spearman";
- else .@name$ = "Swordman";
- .@faith = mercenary_get_faith( .@type );
- mes "[Mercenary Manager]";
- mes "Welcome to the";
- mes .@name$+" Mercenary Guild.";
- mes "What can I do for you?";
- next;
- .@option = select("Hire Mercenary:Mercenary Info:Nothing:10th Grade Mercenaries");
- mes "[Mercenary Manager]";
- switch( .@option ){
- Case 1:
- mes "You want to hire a";
- mes .@name$+" Mercenary?";
- mes "Which Grade were you";
- mes "interested in hiring?";
- next;
- .@menu$ = "";
- for( .@i = 1; .@i < 10; .@i++ )
- .@menu$ = .@menu$ + ( ( .@i == 1 )?"1st":( .@i == 2 )?"2nd":( .@i == 3 )?"3rd": .@i+"th" ) +" Grade "+.@name$+" Mercenary" +":";
- .@Grade = select( .@menu$ );
- .@BaseLevel = ( 5 + ( .@Grade * 10 ) );
- if( .@BaseLevel > 90 ) .@BaseLevel = 90;
- .@ZenyCost = ( 7 * .@Grade );
- if( .@Grade == 7 ) .@FaithCost = 50;
- else if( .@Grade == 8 ) .@FaithCost = 100;
- else if( .@Grade == 9 ) .@FaithCost = 300;
- else .@FaithCost = 0;
- mes "[Mercenary Manager]";
- mes "So you want to hire a "+( ( .@Grade == 1 )?"1st":( .@Grade == 2 )?"2nd":( .@Grade == 3 )?"3rd":.@Grade+"th" );
- mes "Grade "+.@name$+" Mercenary?";
- mes "You need to have attained";
- mes "Base Level " + .@BaseLevel + " or higher, and";
- mes "must pay the " + .@ZenyCost + ",000 zeny fee.";
- next;
- .@option = select("Yes:No");
- mes "[Mercenary Manager]";
- if( .@option == 2 ){
- mes "Oh, really? Well, now";
- mes "might not be a good time";
- mes "for you to consider hiring";
- mes "a Mercenary, but please feel";
- mes "free to come back if your";
- mes "needs change. Thank you~";
- }else if( .@FaithCost && .@faith < .@FaithCost ){
- mes "Oh... Your Loyalty rating";
- mes "with the "+.@name$+" Mercenary";
- mes "Guild isn't high enough to";
- mes "hire this Mercenary. Please";
- mes "come back after you earn";
- mes "" + .@FaithCost + " or more Loyalty with us.";
- }else if( BaseLevel < .@BaseLevel ){
- mes "I'm sorry, but your Base";
- mes "Level isn't high enough";
- mes "to hire this Mercenary.";
- mes "Please come back to me";
- mes "once you reach Base Level " + .@BaseLevel + ".";
- }else if( Zeny < .@ZenyCost * 1000 ){
- mes "I'm sorry, but you";
- mes "don't have enough zeny";
- mes "to hire this Mercenary.";
- mes "The hiring fee is " + .@ZenyCost + ",000 zeny.";
- }else{
- mes "Great! Our Mercenaries";
- mes "are sincere and devoted";
- mes "to protecting their clients.";
- mes "Summoned Mercenaries will";
- mes "offer their support to you for";
- mes "30 minutes. Take care now.";
- set Zeny, Zeny - (.@ZenyCost * 1000);
- if( .@type == 0 ) getitem ( 12152 + .@Grade ),1;
- else if( .@type == 1 ) getitem ( 12172 + .@Grade ),1;
- else getitem ( 12162 + .@Grade ),1;
- }
- break;
- Case 2:
- mes "Mercenaries are soldiers";
- mes "that will fight at your side";
- mes "on the battlefield, but there";
- mes "are a few terms and conditions";
- mes "you must fulfill to hire them.";
- next;
- mes "[Mercenary Manager]";
- mes "You must fulfill a level";
- mes "requirement and pay a zeny";
- mes "fee to hire a Mercenary.";
- mes "Higher grade Mercenaries";
- mes "will also require that you";
- mes "build a Loyalty rating with us.";
- next;
- mes "[Mercenary Manager]";
- mes "Mercenary contracts can't be";
- mes "transferred to other people,";
- mes "and we only allow a 5 Base Level difference between the Mercenary";
- mes "and client so you can't hire one much stronger than you.";
- next;
- mes "[Mercenary Manager]";
- mes "Well, you can figure out the";
- mes "details when you actually form";
- mes "a contract with one of our";
- mes "Mercenaries, and receive";
- mes "the Summon Scroll that will";
- mes "call a Mercenary to your side.";
- next;
- mes "[Mercenary Manager]";
- mes "You can't give this scroll";
- mes "to anyone else, and the";
- mes "Mercenary will only remain";
- mes "with you for 30 minutes after";
- mes "you summon him. Don't forget";
- mes "about the time limit, okay?";
- close;
- Case 3:
- mes "No? You didn't need any";
- mes "help? Well, feel free to";
- mes "ask me if you have any";
- mes "questions about Mercenaries.";
- close;
- Case 4:
- mes "10th Grade Mercenaries are";
- mes "the best we have to offer,";
- mes "and we use different criteria";
- mes "for our clients to hire them.";
- mes "There's no zeny fee, but you";
- mes "must have 500 Loyalty.";
- next;
- mes "[Mercenary Manager]";
- mes "Once you make a contract";
- mes "with a 10th Grade Mercenary,";
- mes "your Loyalty rating will be";
- mes "decreased by 400. In other";
- mes "words, you pay 400 Loyalty";
- mes "to hire a 10th Grade Mercenary.";
- next;
- mes "[Mercenary Manager]";
- mes "You must also be at";
- mes "Base Level 90 or higher to";
- mes "hire a 10th Grade Mercenary.";
- mes "Are you still interested in";
- mes "forming this contract?";
- next;
- .@option = select("Yes:No");
- mes "[Mercenary Manager]";
- if( .@option == 2 ){
- mes "I understand... It takes";
- mes "hard work and sacrifice to";
- mes "even reach the point where";
- mes "you can hire a 10th Grade";
- mes "Mercenary. Have you considered";
- mes "hiring a lower grade Mercenary?";
- }else if( .@faith < 500 ){
- mes "I'm sorry, but your";
- mes "Loyalty rating is too";
- mes "low to hire a 10th Grade";
- mes "Mercenary. You must have";
- mes "500 or more Loyalty to";
- mes "form a contract with one.";
- }else if( BaseLevel < 90 ){
- mes "I'm sorry, but you must";
- mes "be at Base Level 90 or";
- mes "higher to form a contract";
- mes "with a 10th Grade Mercenary.";
- }else{
- mes "Congratulations! It looks";
- mes "like you're planning in taking";
- mes "on some very dangerous work";
- mes "since you're hiring a 10th";
- mes "Grade Mercenary. I wish you";
- mes "the best of luck with him.";
- mercenary_set_faith .@type,-400;
- if( .@type == 0 ) getitem 12162,1;
- else if( .@type == 1 ) getitem 12182,1;
- else getitem 12172,1;
- }
- break;
- }
- return;
- }
- }
- // NPC for each Mercenary Guilds...
- prontera,41,337,5 script Mercenary Manager#Spear 105,{
- doevent "Mercenary::OnSpearmanMerc";
- }
- pay_arche,99,167,4 script Mercenary Manager#Bow 732,{
- doevent "Mercenary::OnBowmanMerc";
- }
- izlude,47,169,5 script Mercenary Manager#Sword 892,{
- doevent "Mercenary::OnSwordmanMerc";
- }
- // Mercenary Merchant NPCs
- //============================================================
- - script MercMerchant -1,{
- mes "[Mercenary Goods Merchant]";
- mes "Hello, I sell goods";
- mes "that Mercenaries can";
- mes "use. Is there anything";
- mes "in particular that";
- mes "you're looking for?";
- next;
- .@menu$ = "";
- for( .@i = 0; .@i < .item_size; .@i++ )
- .@menu$ = .@menu$ + getitemname( .merc_items[.@i] ) + ":";
- .@i = select( .@menu$ ) - 1 ;
- mes "[Mercenary Goods Merchant]";
- mes "^0055FF ~ "+getitemname( .merc_items[.@i] )+"^000000";
- mes "each cost ^FF0000"+.merc_costs[.@i]+"^000000 zeny.";
- mes "How many would you like?";
- input .@input,0,10000;
- if( !.@input ){
- mes "[Mercenary Goods Merchant]";
- mes "You changed your mind?";
- mes "Alright, feel free to come";
- mes "back to me whenever you want";
- mes "to buy any "+getitemname( .merc_items[.@i] )+".";
- }else if( set( .@total_po, .@input * .merc_costs[.@i] ) > Zeny ){
- mes "[Mercenary Goods Merchant]";
- mes "I'm sorry, but you don't";
- mes "have enough zeny for this";
- mes "many. Well, I'll be";
- mes "be here when you're ready";
- mes "to purchase something";
- mes "for your Mercenaries.";
- }else if( checkweight( .merc_items[.@i], .@input ) == 0 ){
- mes "[Mercenary Goods Merchant]";
- mes "If I gave you that many";
- mes "potions, you wouldn't be";
- mes "able to carry them with you.";
- mes "Please come back after";
- mes "you free up some space";
- mes "in your Inventory.";
- }else{
- mes "Here you are, this is exactly";
- mes .@input+" "+getitemname( .merc_items[.@i] )+".";
- mes "Thank you, and please come";
- mes "again when you need more";
- mes "for your Mercenaries.";
- Zeny -= .@total_po;
- getitem getarg(0), .@input;
- }
- close;
- OnInit:
- setarray .merc_items[0],12184,12185,12241,12242,12243;
- setarray .merc_costs[0],1750,3000,560,1050,2100;
- .item_size = getarraysize( .merc_items );
- end;
- }
- // NPC for each Mercenary Merchant...
- prontera,30,337,4 duplicate(MercMerchant) Mercenary Merchant#Spear 700
- pay_arche,102,167,5 duplicate(MercMerchant) Mercenary Merchant#Bow 879
- izlude,56,169,4 duplicate(MercMerchant) Mercenary Merchant#Sword 892
Advertisement
Add Comment
Please, Sign In to add comment