From 7922c819d4767ace993441bb27209f858e7bdb68 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Wed, 21 Jul 2010 22:57:04 -0400 Subject: Add the basics for candor Reviewed-by: Turmfalke --- data/029-1.wlk | Bin 0 -> 10004 bytes data/029-3.wlk | Bin 0 -> 10004 bytes data/resnametable.txt | 2 + db/const.txt | 1 + npc/029-1_Candor/_import.txt | 5 ++ npc/029-1_Candor/_mobs.txt | 43 +++++++++++ npc/029-1_Candor/_warps.txt | 2 + npc/029-1_Candor/barrier.txt | 8 ++ npc/029-1_Candor/dock.txt | 6 ++ npc/029-3_Fight_Cave/_import.txt | 6 ++ npc/029-3_Fight_Cave/_mobs.txt | 7 ++ npc/029-3_Fight_Cave/_warps.txt | 2 + npc/029-3_Fight_Cave/barrier.txt | 8 ++ npc/029-3_Fight_Cave/mapflags.txt | 1 + npc/029-3_Fight_Cave/parua.txt | 151 ++++++++++++++++++++++++++++++++++++++ npc/_import.txt | 2 + npc/functions/ferry.txt | 23 ++++++ 17 files changed, 267 insertions(+) create mode 100644 data/029-1.wlk create mode 100644 data/029-3.wlk create mode 100644 npc/029-1_Candor/_import.txt create mode 100644 npc/029-1_Candor/_mobs.txt create mode 100644 npc/029-1_Candor/_warps.txt create mode 100644 npc/029-1_Candor/barrier.txt create mode 100644 npc/029-1_Candor/dock.txt create mode 100644 npc/029-3_Fight_Cave/_import.txt create mode 100644 npc/029-3_Fight_Cave/_mobs.txt create mode 100644 npc/029-3_Fight_Cave/_warps.txt create mode 100644 npc/029-3_Fight_Cave/barrier.txt create mode 100644 npc/029-3_Fight_Cave/mapflags.txt create mode 100644 npc/029-3_Fight_Cave/parua.txt diff --git a/data/029-1.wlk b/data/029-1.wlk new file mode 100644 index 00000000..a46bd3b6 Binary files /dev/null and b/data/029-1.wlk differ diff --git a/data/029-3.wlk b/data/029-3.wlk new file mode 100644 index 00000000..8a81c360 Binary files /dev/null and b/data/029-3.wlk differ diff --git a/data/resnametable.txt b/data/resnametable.txt index eba8855b..5da60146 100644 --- a/data/resnametable.txt +++ b/data/resnametable.txt @@ -59,4 +59,6 @@ 027-2.gat#027-2.wlk# 028-1.gat#028-1.wlk# 028-3.gat#028-3.wlk# +029-1.gat#029-1.wlk# +029-3.gat#029-3.wlk# botcheck.gat#botcheck.wlk# diff --git a/db/const.txt b/db/const.txt index 4bc17d62..8ea285f0 100644 --- a/db/const.txt +++ b/db/const.txt @@ -237,6 +237,7 @@ MFLAG_ELANORE_OMAR 32768 // Told Omar about Elanore's involvement DOCK_tulimshar 1 DOCK_hurnscald 2 +DOCK_candor 3 // ----------------- // -- Easter 2010 -- diff --git a/npc/029-1_Candor/_import.txt b/npc/029-1_Candor/_import.txt new file mode 100644 index 00000000..5f98ab91 --- /dev/null +++ b/npc/029-1_Candor/_import.txt @@ -0,0 +1,5 @@ +map: 029-1.gat +npc: npc/029-1_Candor/_mobs.txt +npc: npc/029-1_Candor/_warps.txt +npc: npc/029-1_Candor/barrier.txt +npc: npc/029-1_Candor/dock.txt diff --git a/npc/029-1_Candor/_mobs.txt b/npc/029-1_Candor/_mobs.txt new file mode 100644 index 00000000..32975e8a --- /dev/null +++ b/npc/029-1_Candor/_mobs.txt @@ -0,0 +1,43 @@ +// 029-1 Candor mobs + +029-1.gat,68,64,11,13 monster Evil Mushrooms 1013,4,20000,60000,Mob029-1::On1013 +029-1.gat,31,32,12,13 monster Squirrel 1038,3,30000,60000,Mob029-1::On1038 +029-1.gat,46,48,4,1 monster Clover Patch 1037,1,10000,120000,Mob029-1::On1037 +029-1.gat,36,59,22,20 monster Spiky Mushroom 1019,5,10000,30000,Mob029-1::On1019 +029-1.gat,53,35,17,17 monster Bats 1017,4,25000,30000,Mob029-1::On1017 +029-1.gat,59,51,13,9 monster Log heads 1025,2,25000,30000,Mob029-1::On1025 + + +029-1.gat,0,0,0 script Mob029-1 -1,{ +On1013: + set @mobID, 1013; + callfunc "MobPoints"; + break; + +On1017: + set @mobID, 1017; + callfunc "MobPoints"; + break; + +On1019: + set @mobID, 1019; + callfunc "MobPoints"; + break; + +On1025: + set @mobID, 1025; + callfunc "MobPoints"; + break; + +On1037: + set @mobID, 1037; + callfunc "MobPoints"; + break; + +On1038: + set @mobID, 1038; + callfunc "MobPoints"; + break; + + end; +} diff --git a/npc/029-1_Candor/_warps.txt b/npc/029-1_Candor/_warps.txt new file mode 100644 index 00000000..944ed16d --- /dev/null +++ b/npc/029-1_Candor/_warps.txt @@ -0,0 +1,2 @@ +// 029-1 Candor warps + diff --git a/npc/029-1_Candor/barrier.txt b/npc/029-1_Candor/barrier.txt new file mode 100644 index 00000000..cbbecaea --- /dev/null +++ b/npc/029-1_Candor/barrier.txt @@ -0,0 +1,8 @@ +029-1.gat,53,36,0 script #CandorBarrier 127,1,1,{ + if ($@FIGHT_CAVE_STATUS != 0) goto L_Block; + warp "029-3.gat", 47, 22; + end; + + L_Block: + message strcharinfo(0), "Some force seems to be blocking you from entering."; +} diff --git a/npc/029-1_Candor/dock.txt b/npc/029-1_Candor/dock.txt new file mode 100644 index 00000000..76cc8a16 --- /dev/null +++ b/npc/029-1_Candor/dock.txt @@ -0,0 +1,6 @@ +// The ferry dock + +029-1.gat,22,37,0 script #candordock 127,2,1,{ + set @loc, DOCK_candor; + callfunc "Ferry"; +} diff --git a/npc/029-3_Fight_Cave/_import.txt b/npc/029-3_Fight_Cave/_import.txt new file mode 100644 index 00000000..4bf1b3b0 --- /dev/null +++ b/npc/029-3_Fight_Cave/_import.txt @@ -0,0 +1,6 @@ +map: 029-3.gat +npc: npc/029-3_Fight_Cave/_mobs.txt +npc: npc/029-3_Fight_Cave/_warps.txt +npc: npc/029-3_Fight_Cave/barrier.txt +npc: npc/029-3_Fight_Cave/mapflags.txt +npc: npc/029-3_Fight_Cave/parua.txt diff --git a/npc/029-3_Fight_Cave/_mobs.txt b/npc/029-3_Fight_Cave/_mobs.txt new file mode 100644 index 00000000..0b0210e9 --- /dev/null +++ b/npc/029-3_Fight_Cave/_mobs.txt @@ -0,0 +1,7 @@ +// 029-3 Fight Cave mobs + + + +029-3.gat,0,0,0 script Mob029-3 -1,{ + end; +} diff --git a/npc/029-3_Fight_Cave/_warps.txt b/npc/029-3_Fight_Cave/_warps.txt new file mode 100644 index 00000000..feee2a26 --- /dev/null +++ b/npc/029-3_Fight_Cave/_warps.txt @@ -0,0 +1,2 @@ +// 029-3 Fight Cave warps + diff --git a/npc/029-3_Fight_Cave/barrier.txt b/npc/029-3_Fight_Cave/barrier.txt new file mode 100644 index 00000000..5afd8da9 --- /dev/null +++ b/npc/029-3_Fight_Cave/barrier.txt @@ -0,0 +1,8 @@ +029-3.gat,45,20,0 script #FightCaveBarrier 127,1,1,{ + if ($@FIGHT_CAVE_STATUS != 0) goto L_Block; + warp "029-1.gat", 55, 38; + end; + + L_Block: + message strcharinfo(0), "Some force seems to be blocking you from exiting."; +} diff --git a/npc/029-3_Fight_Cave/mapflags.txt b/npc/029-3_Fight_Cave/mapflags.txt new file mode 100644 index 00000000..845a0f01 --- /dev/null +++ b/npc/029-3_Fight_Cave/mapflags.txt @@ -0,0 +1 @@ +029-3.gat mapflag nosave 029-1,55,38; diff --git a/npc/029-3_Fight_Cave/parua.txt b/npc/029-3_Fight_Cave/parua.txt new file mode 100644 index 00000000..b3aca53e --- /dev/null +++ b/npc/029-3_Fight_Cave/parua.txt @@ -0,0 +1,151 @@ +// Parua's fight + +029-3.gat,50,25,0 script Parua 183,{ + if ($@FIGHT_CAVE_STATUS != 0) goto L_Enjoy; + mes "[Parua]"; + mes "\"Hello.\""; + next; + mes "[Parua]"; + mes "\"Do you dare challenge the powers that sleep here.\""; + menu "No, Ill let it sleep", L_Exit, + "Ha! Whats the worst it could do?", -; + mes "[Parua]"; + mes "\"Very well, for a fee of 20,000 gp Ill will awake the power.\""; + menu "No, what a ripoff", L_Exit, + "Fine, here you go", -; + + if (zeny < 20000) goto L_NotEnough; + if ($@FIGHT_CAVE_STATUS != 0) goto L_AlreadyStarted; + if (getareausers("029-3.gat", 20, 20, 70, 60) < 5) goto L_NotEnoughPlayers; + + set zeny, zeny - 20000; + npctalk "Let the battle begin!"; + set $@FIGHT_CAVE_STATUS, 1; + set $@FIGHT_CAVE_LEVEL, BaseLevel / 2; + set $@FIGHT_CAVE_PLAYER_COUNT, getareausers("029-3.gat", 20, 20, 70, 60); + goto L_Exit; + +L_Enjoy: + mes "[Parua]"; + mes "\"Enjoy the fight\""; + goto L_Exit; + +L_NotEnough: + mes "[Parua]"; + mes "\"Seems you can't meet my fee\""; + goto L_Exit; + +L_AlreadyStarted: + mes "[Parua]"; + mes "\"Seems your friend already paid me\""; + goto L_Exit; + +L_NotEnoughPlayers: + mes "[Parua]"; + mes "\"Maybe you should bring some friends with you, this will get messy\""; + goto L_Exit; + +L_Exit: + close; + end; + +// Fight logic +OnTimer5000: + setnpctimer 0; + if ($@FIGHT_CAVE_STATUS != 0) goto L_CaveLogic; +L_Return_1: + set $@FIGHT_CAVE_PLAYER_COUNT, 0; + areatimer "029-3.gat", 20, 20, 70, 60, 10, "Parua::onTick"; + end; + +L_CaveLogic: + if ($@FIGHT_CAVE_PLAYER_COUNT <= 0) goto L_CleanUp; + set $@FIGHT_CAVE_ROUND_TIMER, $@FIGHT_CAVE_ROUND_TIMER + 5; // Advance 5 seconds + if (mobcount("029-3.gat", "Parua::onPetDeath") <= 0) goto L_NextRound; + if ($@FIGHT_CAVE_ROUND_TIMER >= 120) goto L_NextRound; + goto L_Return_1; + +L_NextRound: + set $@FIGHT_CAVE_ROUND_TIMER, 0; + + set $@FIGHT_CAVE_LEVEL, $@FIGHT_CAVE_LEVEL + ($@FIGHT_CAVE_PLAYER_COUNT * 3); + if ($@FIGHT_CAVE_LEVEL >= 1200) L_CleanUp; + set $@FIGHT_CAVE_POINTS, $@FIGHT_CAVE_LEVEL; + + npctalk "Next round starting, round level is " + $@FIGHT_CAVE_LEVEL; + + set $@MOB_1_SUMMON, 0; + set $@MOB_2_SUMMON, 0; + set $@MOB_3_SUMMON, 0; + set $@MOB_4_SUMMON, 0; + set $@MOB_5_SUMMON, 0; + set $@MOB_6_SUMMON, 0; +L_Summon: + if ($@FIGHT_CAVE_POINTS >= 100 && $@MOB_1_SUMMON < 3) goto L_MOB1; + if ($@FIGHT_CAVE_POINTS >= 50 && $@MOB_2_SUMMON < 5) goto L_MOB2; + if ($@FIGHT_CAVE_POINTS >= 30 && $@MOB_3_SUMMON < 10) goto L_MOB3; + if ($@FIGHT_CAVE_POINTS >= 20 && $@MOB_4_SUMMON < 10) goto L_MOB4; + if ($@FIGHT_CAVE_POINTS >= 5 && $@MOB_5_SUMMON < 20) goto L_MOB5; + if ($@FIGHT_CAVE_POINTS >= 1 && $@MOB_6_SUMMON < 25) goto L_MOB6; + goto L_Return_1; + + +L_MOB1: + set $@MOB_1_SUMMON, $@MOB_1_SUMMON + 1; + set $@FIGHT_CAVE_POINTS, $@FIGHT_CAVE_POINTS - 100; + areamonster "029-3.gat", 20, 20, 70, 60, "", 1022, 1, "Parua::onPetDeath"; + goto L_Summon; + +L_MOB2: + set $@MOB_2_SUMMON, $@MOB_2_SUMMON + 1; + set $@FIGHT_CAVE_POINTS, $@FIGHT_CAVE_POINTS - 50; + areamonster "029-3.gat", 20, 20, 70, 60, "", 1045, 1, "Parua::onPetDeath"; + goto L_Summon; + +L_MOB3: + set $@MOB_3_SUMMON, $@MOB_3_SUMMON + 1; + set $@FIGHT_CAVE_POINTS, $@FIGHT_CAVE_POINTS - 30; + areamonster "029-3.gat", 20, 20, 70, 60, "", 1024, 1, "Parua::onPetDeath"; + goto L_Summon; + +L_MOB4: + set $@MOB_4_SUMMON, $@MOB_4_SUMMON + 1; + set $@FIGHT_CAVE_POINTS, $@FIGHT_CAVE_POINTS - 20; + areamonster "029-3.gat", 20, 20, 70, 60, "", 1043, 1, "Parua::onPetDeath"; + goto L_Summon; + +L_MOB5: + set $@MOB_5_SUMMON, $@MOB_5_SUMMON + 1; + set $@FIGHT_CAVE_POINTS, $@FIGHT_CAVE_POINTS - 5; + areamonster "029-3.gat", 20, 20, 70, 60, "", 1010, 1, "Parua::onPetDeath"; + goto L_Summon; + +L_MOB6: + set $@MOB_6_SUMMON, $@MOB_6_SUMMON + 1; + set $@FIGHT_CAVE_POINTS, $@FIGHT_CAVE_POINTS - 1; + areamonster "029-3.gat", 20, 20, 70, 60, "", 1008, 1, "Parua::onPetDeath"; + goto L_Summon; + +// Called on each player once every 5 seconds +onTick: + if (isdead(0)) end; + set $@FIGHT_CAVE_PLAYER_COUNT, $@FIGHT_CAVE_PLAYER_COUNT + 1; + end; + +onPetDeath: + end; + +onInit: + initnpctimer; + startnpctimer; +L_CleanUp: + npctalk "Game Over"; + mapannounce "029-1.gat", "Parua: The dungeon is now ready for its next victims.", 0; + set $@FIGHT_CAVE_STATUS, 0; + set $@FIGHT_CAVE_PLAYER_COUNT, 0; + set $@FIGHT_CAVE_LEVEL, 1; + set $@FIGHT_CAVE_ROUND_TIMER, 0; + killmonster "029-3.gat", "Parua::onPetDeath"; + end; + +} diff --git a/npc/_import.txt b/npc/_import.txt index 2a19bc45..36ade972 100644 --- a/npc/_import.txt +++ b/npc/_import.txt @@ -56,4 +56,6 @@ import: npc/027-1_Graveyard/_import.txt import: npc/027-2_Caretakers_House/_import.txt import: npc/028-1/_import.txt import: npc/028-3/_import.txt +import: npc/029-1_Candor/_import.txt +import: npc/029-3_Fight_Cave/_import.txt import: npc/botcheck/_import.txt diff --git a/npc/functions/ferry.txt b/npc/functions/ferry.txt index 9bc3eea2..d0fcd04f 100644 --- a/npc/functions/ferry.txt +++ b/npc/functions/ferry.txt @@ -3,12 +3,25 @@ function script Ferry { set @cost_tulimshar, 1000; set @cost_hurnscald, 1000; + set @cost_candor, 3000; mes "Where would you like to go?"; next; + if (BaseLevel < 40) goto L_PlainMenu; + goto L_MenuWithCandor; + +L_PlainMenu: + menu + "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar, + "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald, + "Nevermind", -; + close; + +L_MenuWithCandor: menu "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar, "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald, + "Candor (" + @cost_candor + "GP)", L_Candor, "Nevermind", -; close; @@ -32,6 +45,16 @@ L_Hurnscald: warp "008-1.gat", 137, 64; close; +L_Candor: + if (@loc == DOCK_candor) + goto L_AlreadyThere; + if (zeny < @cost_candor) + goto L_NotEnoughGP; + + set zeny, zeny - @cost_candor; + warp "029-1.gat", 25, 37; + close; + L_AlreadyThere: mes "You're already here!"; close; -- cgit v1.2.3-60-g2f50