From cb8a91761ff1a521591b5003bac8277ca58ef251 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 3 Jul 2018 12:59:16 -0300 Subject: 008-2 prototype --- conf/map/maps.conf | 1 + db/map_index.txt | 67 +++++++++++----------- maps/re/008-2.mcache | Bin 0 -> 1338 bytes npc/008-0/master.txt | 1 + npc/008-1/master.txt | 36 ++++++------ npc/008-2/_import.txt | 3 + npc/008-2/master.txt | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++ npc/_import.txt | 1 + 8 files changed, 212 insertions(+), 50 deletions(-) create mode 100644 maps/re/008-2.mcache create mode 100644 npc/008-2/_import.txt create mode 100644 npc/008-2/master.txt diff --git a/conf/map/maps.conf b/conf/map/maps.conf index 89c3b408a..2432f8fb5 100644 --- a/conf/map/maps.conf +++ b/conf/map/maps.conf @@ -49,6 +49,7 @@ map_list: ( "007-1", "008-0", "008-1", + "008-2", "009-1", "009-2", "009-3", diff --git a/db/map_index.txt b/db/map_index.txt index 62c3eb382..c5c76e3e0 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -46,36 +46,37 @@ 007-1 46 008-0 47 008-1 48 -009-1 49 -009-2 50 -009-3 51 -009-4 52 -009-5 53 -010-1-1 54 -010-1 55 -010-2 56 -011-1 57 -011-2 58 -012-1 59 -012-2 60 -012-3 61 -012-4 62 -012-5 63 -012-6 64 -012-7 65 -014-1 66 -014-2 67 -014-3 68 -015-1 69 -015-2 70 -015-3 71 -016-1 72 -016-6 73 -016-7 74 -boss 75 -botcheck 76 -sec_pri 77 -soren-2 78 -soren 79 -test 80 -testbg 81 +008-2 49 +009-1 50 +009-2 51 +009-3 52 +009-4 53 +009-5 54 +010-1-1 55 +010-1 56 +010-2 57 +011-1 58 +011-2 59 +012-1 60 +012-2 61 +012-3 62 +012-4 63 +012-5 64 +012-6 65 +012-7 66 +014-1 67 +014-2 68 +014-3 69 +015-1 70 +015-2 71 +015-3 72 +016-1 73 +016-6 74 +016-7 75 +boss 76 +botcheck 77 +sec_pri 78 +soren-2 79 +soren 80 +test 81 +testbg 82 diff --git a/maps/re/008-2.mcache b/maps/re/008-2.mcache new file mode 100644 index 000000000..6effe6859 Binary files /dev/null and b/maps/re/008-2.mcache differ diff --git a/npc/008-0/master.txt b/npc/008-0/master.txt index 7a7f3ed8c..4c6fecea4 100644 --- a/npc/008-0/master.txt +++ b/npc/008-0/master.txt @@ -3,6 +3,7 @@ // Jesusalva // Description: // This NPC is a work on progress. It measures all players equal. +// Controls the whole dungeon feature. 008-0,47,63,0 script Party Master NPC_BRGUARD_SWORD,{ mesn; diff --git a/npc/008-1/master.txt b/npc/008-1/master.txt index a3394581f..ad9f1d53b 100644 --- a/npc/008-1/master.txt +++ b/npc/008-1/master.txt @@ -3,8 +3,9 @@ // Jesusalva // Description: // This NPC is a work on progress. It measures all players equal. +// Controls the first floor, but not many things to control. -008-1,48,117,0 script #FPDM1 NPC_HIDDEN,0,0,{ +008-1,48,117,0 script #FPDM12 NPC_HIDDEN,0,0,{ end; OnTouch: // IMPORTANT: Prevent party master from returning here @@ -16,13 +17,14 @@ OnTouch: mobcount("008-1", "First Dungeon Master::OnBossDeath") == 0 && @pmloop) { dispbottom l("Go and follow @@, your party leader!", getpartyleader(getcharid(1))); - warp "008-1", 176, 20; // 008-2 + warp "008-2", 135, 20; } else if (BaseLevel > 20) { dispbottom l("If I bring @@, my party leader, and the boss is defeated, I can go you in.", getpartyleader(getcharid(1))); } else { mesc l("I cannot pass, because I am only level @@.", BaseLevel); mesc l("Newbies can only get past their limits once, with their party leader level help! If they die, they can't rejoin!"); - // I thought it would be better this way. There was at least three different ways to prevent that. + // I thought it would be better to allow first passage based on leader level. + // Parties are not meant to be permanent, and this helps a lot. } end; } @@ -47,6 +49,7 @@ OnTouch: mesq l("I can summon the BOSS for the level 0~20 area."); next; if (strcharinfo(0) != getpartyleader(getcharid(1))) goto L_NotYou; + if (BaseLevel < 20) goto L_TooWeak; mesn; mesq l("He is strong though, so keep your party togheter!"); next; @@ -106,35 +109,34 @@ L_TooSmall: mesq l("However, I need to see at least three volunteers here, to allow you in."); close; -// Second Floor special monsters -OnMobTime: - getmapxy(.@m$, .@x, .@y, 0); - areatimer(.@m$, .@x-4, .@y-4, .@x+4, .@y+4, 10, "Party Master::OnAddTime"); - end; +// Must have level to face boss +L_TooWeak: + mesn; + mesq l("This is the end for your party, as the leader doesn't have sufficient level."); + close; +// Second Floor special monsters OnReward: Zeny=Zeny+200; getexp 200, 20; dispbottom l("Reward: 200 GP, 200 XP"); -OnAddTime: - @pmloop=60; - end; +// Boss death causes 008-2 to be set OnBossDeath: // Give every party member in map a reward partytimer("008-1", 200, "First Dungeon Master::OnReward", getcharid(1)); // Warp everyone and add timers - warpparty("008-1", 176, 20, getcharid(1), "008-1", true); + warpparty("008-2", 135, 20, getcharid(1), "008-1", true); // Bonus Monsters - monster("008-1", 90, 69, "Time Bonus", Scorpion, 1, "Party Master::OnMobTime"); + monster("008-2", 90, 69, "Time Bonus", Scorpion, 1, "Party Master::OnMobTime"); // Four Chests - monster("008-1", 38, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); - monster("008-1", 41, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); - monster("008-1", 44, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); - monster("008-1", 47, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); + monster("008-2", 38, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); + monster("008-2", 41, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); + monster("008-2", 44, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); + monster("008-2", 47, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); end; OnInit: diff --git a/npc/008-2/_import.txt b/npc/008-2/_import.txt new file mode 100644 index 000000000..f5787ded6 --- /dev/null +++ b/npc/008-2/_import.txt @@ -0,0 +1,3 @@ +// Map 008-2: 2nd Floor - Party Dungeon +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/008-2/master.txt", diff --git a/npc/008-2/master.txt b/npc/008-2/master.txt new file mode 100644 index 000000000..89044832b --- /dev/null +++ b/npc/008-2/master.txt @@ -0,0 +1,153 @@ +// TMW-2 Script +// Author: +// Jesusalva +// Description: +// This NPC is a work on progress. It measures all players equal. +// Controls the second floor + +// 21: From 2 to 1 +008-2,135,19,0 script #FPDM21 NPC_HIDDEN,0,0,{ + end; +OnTouch: + // Party leader cannot retreat + if (strcharinfo(0) == getpartyleader(getcharid(1))) + dispbottom l("As the leader of your party, you can only go forward."); + else + warp "008-1", 43, 104; + end; +} + +008-2,135,19,0 script #FPDM23 NPC_HIDDEN,0,0,{ + end; +OnTouch: + // IMPORTANT: Prevent party master from returning here + getmapxy(.@m$, .@x, .@y, 0, getpartyleader(getcharid(1))); + if (.@m$ ~= "008-*" && + .@m$ != "008-0" && + .@m$ != "008-1" && + BaseLevel > 20 && + mobcount("008-1", "First Dungeon Master::OnBossDeath") == 0 && + @pmloop) { + dispbottom l("Go and follow @@, your party leader!", getpartyleader(getcharid(1))); + warp "008-1", 176, 20; // 008-2 + } else if (BaseLevel > 20) { + dispbottom l("If I bring @@, my party leader, and the boss is defeated, I can go you in.", getpartyleader(getcharid(1))); + } else { + mesc l("I cannot pass, because I am only level @@.", BaseLevel); + mesc l("Newbies can only get past their limits once, with their party leader level help! If they die, they can't rejoin!"); + // I thought it would be better this way. There was at least three different ways to prevent that. + } + end; +} + +008-2,0,0,0 script Second Dungeon Master NPC_BRGUARD_SWORD,{ + // Double-check, you should have been flung out long ago. + if (getcharid(1) <= 0) { + mesn; + mesq l("Leaving your party? LAME."); + warp "SavePoint",0,0; + } + if (mobcount("008-1", "First Dungeon Master::OnBossDeath") > 0) { + npctalk3 l("What are you doing? Fight!"); + end; + } + + mesn; + mesq l("Compliments reaching this far, @@ from the @@ party!", strcharinfo(0), getpartyname(getcharid(1))); + next; + + mesn; + mesq l("I can summon the BOSS for the level 0~20 area."); + next; + if (strcharinfo(0) != getpartyleader(getcharid(1))) goto L_NotYou; + mesn; + mesq l("He is strong though, so keep your party togheter!"); + next; + // Get info about your party, and backup it + getpartymember(getcharid(1)); + .@count = $@partymembercount; + copyarray(.@name$[0], $@partymembername$[0], $@partymembercount); + copyarray(.@aid[0], $@partymemberaid[0], $@partymembercount); + copyarray(.@cid[0], $@partymembercid[0], $@partymembercount); + .@count_online=0; + + if (.@count < 3 && !$@GM_OVERRIDE) goto L_TooSmall; + mesn; + mesc l("Are you and your party ready?"), 1; + if (askyesno() != ASK_YES) + close; + + // Loop though party to see if you can start + for (.@i = 0; .@i < .@count; ++.@i) { + // Online? + if (isloggedin(.@aid[.@i], .@cid[.@i])) { + getmapxy(.@m$, .@x, .@y, 0, .@name$[.@i]); + // Here? + if (.@m$ == .map$) + .@count_online++; + } + } + + // How many are logged in and here? + if (.@count_online < 3 && !$@GM_OVERRIDE) goto L_TooSmall; + + // TODO: Query if exp sharing is enabled + // TODO: Instance for party + // TODO: Second Floor + npctalk l("@@: Fight!", getpartyname(getcharid(1))); + monster "008-1", rand(37,54), rand(109,122), "First Dungeon Boss", Sarracenus, 1, "First Dungeon Master::OnBossDeath"; + close; + + + + + + + + + + +// Only the party leader can start this. +L_NotYou: + mesn; + dispbottom l("Go and fetch @@, the party leader!", getpartyleader(getcharid(1))); + close; + +// Minimum 3 players +L_TooSmall: + mesn; + mesq l("However, I need to see at least three volunteers here, to allow you in."); + close; + +// Second Floor special monsters +OnReward: + Zeny=Zeny+200; + getexp 200, 20; + dispbottom l("Reward: 200 GP, 200 XP"); +OnAddTime: + @pmloop=60; + end; + +OnBossDeath: + // Give every party member in map a reward + partytimer("008-1", 200, "First Dungeon Master::OnReward", getcharid(1)); + + // Warp everyone and add timers + warpparty("008-1", 176, 20, getcharid(1), "008-1", true); + + // Bonus Monsters + monster("008-1", 90, 69, "Time Bonus", Scorpion, 1, "Party Master::OnMobTime"); + + // Four Chests + monster("008-1", 38, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); + monster("008-1", 41, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); + monster("008-1", 44, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); + monster("008-1", 47, 104, "Mysterious Chest", any(BronzeChest, BronzeMimic), 1); + end; + +OnInit: + .sex = G_MALE; + .distance = 5; + end; +} + diff --git a/npc/_import.txt b/npc/_import.txt index 52dca225c..a95cc10b9 100644 --- a/npc/_import.txt +++ b/npc/_import.txt @@ -48,6 +48,7 @@ @include "npc/007-1/_import.txt" @include "npc/008-0/_import.txt" @include "npc/008-1/_import.txt" +@include "npc/008-2/_import.txt" @include "npc/009-1/_import.txt" @include "npc/009-2/_import.txt" @include "npc/009-3/_import.txt" -- cgit v1.2.3-70-g09d2