diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-01-01 20:46:43 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-01-01 20:46:43 -0300 |
commit | 1b20e2026bfbb7c72a6ce530bf0ca15005e2c3a0 (patch) | |
tree | 5b1264a924ba3fc124f1d51311144eda4b3656fd /npc/020-1 | |
parent | 5407e674a17f91c2bdfdcee7ad1efa4ebb6c3046 (diff) | |
download | serverdata-1b20e2026bfbb7c72a6ce530bf0ca15005e2c3a0.tar.gz serverdata-1b20e2026bfbb7c72a6ce530bf0ca15005e2c3a0.tar.bz2 serverdata-1b20e2026bfbb7c72a6ce530bf0ca15005e2c3a0.tar.xz serverdata-1b20e2026bfbb7c72a6ce530bf0ca15005e2c3a0.zip |
Mercenary banalization prototype
Diffstat (limited to 'npc/020-1')
-rw-r--r-- | npc/020-1/_import.txt | 1 | ||||
-rw-r--r-- | npc/020-1/trainer.txt | 147 |
2 files changed, 148 insertions, 0 deletions
diff --git a/npc/020-1/_import.txt b/npc/020-1/_import.txt index ca7a3e6a9..2eb1208d0 100644 --- a/npc/020-1/_import.txt +++ b/npc/020-1/_import.txt @@ -8,5 +8,6 @@ "npc/020-1/serge.txt", "npc/020-1/siege.txt", "npc/020-1/town.txt", +"npc/020-1/trainer.txt", "npc/020-1/wateranimation.txt", "npc/020-1/well.txt", diff --git a/npc/020-1/trainer.txt b/npc/020-1/trainer.txt new file mode 100644 index 000000000..79f589ea7 --- /dev/null +++ b/npc/020-1/trainer.txt @@ -0,0 +1,147 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// Mercenary Trainer + +020-1,39,89,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."); + 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: + if (!is_staff()) { + mesc l("ERROR: Unknown error"), 1; + break; + } + menuint + l("[%d GP] [Lv 1~25] Hire for one hour", 2500), 1, + l("[%d GP] [Lv 26~40] Hire for one hour", 7500), 2, + l("[%d GP] [Lv 41~60] Hire for one hour", 15000), 3, + l("[%d GP] [Lv 61~79] Hire for one hour", 30000), 4, + l("[%d GP] [Lv 80~100] Hire for one hour", 50000), 5, + l("I've changed my mind"), 0; + switch (@menuret) { + case 1: + .@gp=max(2000, POL_AdjustPrice(2500)); + 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=max(7000, POL_AdjustPrice(7500)); + 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=max(14000, POL_AdjustPrice(15000)); + 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=max(27000, POL_AdjustPrice(30000)); + 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=max(45000, POL_AdjustPrice(50000)); + 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: + mesc l("ERROR: Unknown error"), 1; + break; + // Leave + default: + closeclientdialog; + goodbye; + close; + break; + } + goto L_Main; + +OnInit: + tradertype(NST_MARKET); + sellitem MercBoxEE, 25000, 1; + sellitem MercBoxDD, 15000, 2; + sellitem MercBoxCC, 7500, 3; + sellitem MercBoxBB, 3750, 4; + sellitem MercBoxAA, 1250, 5; + + .distance=5; + .sex=G_MALE; + end; + +OnClock0001: +OnClock1201: + restoreshopitem MercBoxEE, 25000, 1; + restoreshopitem MercBoxDD, 15000, 2; + restoreshopitem MercBoxCC, 7500, 3; + restoreshopitem MercBoxBB, 3750, 4; + restoreshopitem MercBoxAA, 1250, 5; + end; + +// Pay your taxes! +OnBuyItem: + debugmes("Purchase confirmed"); + PurchaseTaxes("Nival"); + end; + +OnSellItem: + debugmes("Sale confirmed"); + PurchaseTaxes("Nival"); + end; + +} + |