diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-06-22 18:11:10 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-06-22 18:11:10 -0300 |
commit | f6aa539309218be5cfbc2cf5cae4e6e5cb94de4c (patch) | |
tree | 699db5786239f83ad395fb14aaefb503d1746c36 /npc/016-1/captain.txt | |
parent | 8a93d1ecdf1cd88e53bd8345b354b76c1dd6566f (diff) | |
download | serverdata-f6aa539309218be5cfbc2cf5cae4e6e5cb94de4c.tar.gz serverdata-f6aa539309218be5cfbc2cf5cae4e6e5cb94de4c.tar.bz2 serverdata-f6aa539309218be5cfbc2cf5cae4e6e5cb94de4c.tar.xz serverdata-f6aa539309218be5cfbc2cf5cae4e6e5cb94de4c.zip |
Adjust travel prices Tulim<->Hurns. Move file.
Diffstat (limited to 'npc/016-1/captain.txt')
-rw-r--r-- | npc/016-1/captain.txt | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/npc/016-1/captain.txt b/npc/016-1/captain.txt new file mode 100644 index 000000000..e31c9fa28 --- /dev/null +++ b/npc/016-1/captain.txt @@ -0,0 +1,158 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// Temporary, placeholder. + +016-1,19,29,0 script Captain NPC_NARD,{ + .@price=2000; + if (BaseLevel < 20) + goto L_TooWeak; + + mesn; + mesq l("Hi @@.", strcharinfo(0)); + next; + mesq l("You are currently at @@.", LOCATION$); + mes ""; + + menu + rif(LOCATION$ != "Tulim", l("To Tulimshar.")), L_TTulim, + rif(LOCATION$ != "Hurns", l("To Hurnscald.")), L_THurns, + l("No, I'll save my money."), -; + + close; + +L_THurns: + .@x=marine_reputation("Hurns"); + + if (.@x >= 5) + .@price-=1750; + else if (.@x >= 4) + .@price-=1600; + else if (.@x >= 3) + .@price-=1200; + else if (.@x >= 2) + .@price-=800; + else if (.@x >= 1) + .@price-=400; + + mes ""; + mesn; + mesq l("It'll cost you @@ GP.", .@price); + mes ""; + + if (Zeny < .@price) { + mes l("You still need @@ GP to afford it.", (.@price-Zeny)); + close; + } + + if (askyesno() != ASK_YES) + close; + + Zeny=Zeny-.@price; + PC_DEST$="Hurns"; + + mes ""; + mesn; + mesq l("Hurnscald? Small farming towns are always nice to visit."); + next; + mesq l("I was planning to go there soon, anyway. All aboard!"); + close2; + addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent"; + @timer_navio_running = 1; + warp "016-6", 40, 32; + + // 10% base chance of Pirate Attack! + // Each level INCREASES this in 0.1%. + // So for a level 40 player, chances are 14%. + if (rand(1, 10000) < 1000+(BaseLevel*10)) + addtimer rand(3000,6000), "#MarineShipAttack::OnEvent"; + end; + + + + + + + + +L_TTulim: + .@x=marine_reputation("Tulim"); + + if (.@x >= 12) + .@price-=1750; + else if (.@x >= 10) + .@price-=1500; + else if (.@x >= 8) + .@price-=1000; + else if (.@x >= 6) + .@price-=750; + else if (.@x >= 4) + .@price-=500; + else if (.@x >= 2) + .@price-=250; + + mes ""; + mesn; + mesq l("It'll cost you @@ GP.", .@price); + mes ""; + + if (Zeny < .@price) { + mes l("You still need @@ GP to afford it.", (.@price-Zeny)); + close; + } + + if (askyesno() != ASK_YES) + close; + + Zeny=Zeny-.@price; + PC_DEST$="Tulim"; + @timer_navio_running = 1; + + mes ""; + mesn; + mesq l("Tulimshar, right? The oldest human city-state!"); + next; + mesq l("I was planning to go there soon, anyway. All aboard!"); + close2; + addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent"; + @timer_navio_running = 1; + warp "016-6", 40, 32; + + // 10% base chance of Pirate Attack! + // Each level INCREASES this in 0.1%. + // So for a level 40 player, chances are 14%. + if (rand(1, 10000) < 1000+(BaseLevel*10)) + addtimer rand(3000,6000), "#MarineShipAttack::OnEvent"; + end; + +L_TooWeak: + mesn; + mesq l("The sea route I take is very dangerous, and full of pirates. You're too weak to travel with me."); + close; + +L_Close: + close; + +OnInit: + .sex = G_MALE; + .distance = 5; + end; + + +OnInterIfInit: + // Tulim Instance + .TULIM_INSTID = instance_create("016-1@TulimInst", 0, IOT_NONE); + instance_attachmap("016-1", .TULIM_INSTID, 0, "016-1@Tulim"); + instance_set_timeout(1000000, 1000000, .TULIM_INSTID); + instance_init(.TULIM_INSTID); + end; + + // Hurns Instance + .HURNS_INSTID = instance_create("016-1@HurnsInst", 0, IOT_NONE); + instance_attachmap("016-1", .HURNS_INSTID, 0, "016-1@Hurns"); + instance_set_timeout(1000000, 1000000, .HURNS_INSTID); + instance_init(.HURNS_INSTID); + end; + +} |