summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-04 16:58:50 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-04 16:58:50 -0300
commitc5e6890892c81b378a8000e05a549d3dd63be0b8 (patch)
tree1d128309a0dc301b6f88db670c59a89af0c1a389 /npc
parent6f066697c4ae4634bd3f2303b1671df736e223cb (diff)
downloadserverdata-c5e6890892c81b378a8000e05a549d3dd63be0b8.tar.gz
serverdata-c5e6890892c81b378a8000e05a549d3dd63be0b8.tar.bz2
serverdata-c5e6890892c81b378a8000e05a549d3dd63be0b8.tar.xz
serverdata-c5e6890892c81b378a8000e05a549d3dd63be0b8.zip
Entirely experimental, Candor Battle
Diffstat (limited to 'npc')
-rw-r--r--npc/005-1/warpcandorbattle.txt12
-rw-r--r--npc/006-1/_import.txt5
-rw-r--r--npc/006-1/barrier.txt14
-rw-r--r--npc/006-1/crazyfefe.txt230
-rw-r--r--npc/006-1/mapflags.txt2
-rw-r--r--npc/012-5/_import.txt1
-rw-r--r--npc/012-5/nicholas.txt8
-rw-r--r--npc/_import.txt1
8 files changed, 270 insertions, 3 deletions
diff --git a/npc/005-1/warpcandorbattle.txt b/npc/005-1/warpcandorbattle.txt
index c79830276..964aff26c 100644
--- a/npc/005-1/warpcandorbattle.txt
+++ b/npc/005-1/warpcandorbattle.txt
@@ -1,11 +1,17 @@
+// TMW2 Script
// Author:
// Crazyfefe
+// Jesusalva
005-1,59,52,0 script Magic Barrier NPC_HIDDEN,0,0,{
+ end;
OnTouch:
- if(BaseLevel >= 40)
- warp "005-1", 59, 66;
+ if (BaseLevel >= 40 && !$@FIGHT_CAVE_LEVEL)
+ warp "006-1", 49, 53;
+ else if (BaseLevel >= 40)
+ npctalk l("You don't have the required level to pass this barrier.");
else
- npctalk l("You don't have the required level to pass this door.");
+ npctalk l("You can't pass this barrier while people are fighting inside!");
+ end;
}
diff --git a/npc/006-1/_import.txt b/npc/006-1/_import.txt
new file mode 100644
index 000000000..c5c393844
--- /dev/null
+++ b/npc/006-1/_import.txt
@@ -0,0 +1,5 @@
+// Map 006-1: Crazyfefe's Cave
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/006-1/barrier.txt",
+"npc/006-1/crazyfefe.txt",
+"npc/006-1/mapflags.txt",
diff --git a/npc/006-1/barrier.txt b/npc/006-1/barrier.txt
new file mode 100644
index 000000000..279211b1c
--- /dev/null
+++ b/npc/006-1/barrier.txt
@@ -0,0 +1,14 @@
+// TMW2 Script
+// Author:
+// Crazyfefe
+// Jesusalva
+
+006-1,49,54,0 script #FightCaveBarrier NPC_NO_SPRITE,0,0,{
+ if ($@FIGHT_CAVE_LEVEL) goto L_Block;
+ warp "005-1", 59, 53;
+ end;
+
+L_Block:
+ dispbottom l("Your coward outer self fails to convince you to leave.");
+ end;
+}
diff --git a/npc/006-1/crazyfefe.txt b/npc/006-1/crazyfefe.txt
new file mode 100644
index 000000000..d41a145a1
--- /dev/null
+++ b/npc/006-1/crazyfefe.txt
@@ -0,0 +1,230 @@
+// TMW2 Script
+// Author:
+// TMW Org. (original code)
+// Jesusalva
+// Description:
+// Crazyfefe will wake up when he smells battle
+// Variables:
+// $@FIGHT_CAVE_LEVEL
+// Tracks if a fight is going on, and the current round if true.
+// $@FEFE_DELAY
+// Tracks the delay between challenges. Also used to start the combat.
+// $@FIGHT_CAVE_HERO$
+// Whoever started a fight. Also used to know if a fight is about to begin.
+// $@FIGHT_CAVE_PLAYER_COUNT
+// How many players are there
+
+006-1,50,52,0 script Crazyfefe NPC_STATUE_EVILMAN,{
+ if ($@FIGHT_CAVE_LEVEL) goto L_Enjoy;
+ if ($@FEFE_DELAY < gettimetick(2)) goto L_Wait;
+ mesn;
+ mesq l("Who dares to disturb my slumber?");
+ next;
+ menu
+ l("Sorry, sorry! Please rest, great Crazyfefe!"), L_Exit,
+ l("I do. I want to challenge the Candor Cave!"), L_Next,
+ l("What is this place anyway?"), L_Explain;
+
+L_Next:
+ mesn;
+ mesq l("Very well, but for a fee of @@ GP. There's no free lunch, after all!", .price);
+ select
+ l("Sorry, I misclicked the first button. Have a nice nap, great Crazyfefe!"),
+ l("Yeah, I have money to throw away. Give me ##Bfive##b minutes, and Bring it on!"),
+ l("Yeah, I have money to throw away. Give me ##Bten##b minutes, and Bring it on!"),
+ l("Yeah, I have money to throw away. Give me ##Bfifteen##b minutes, and Bring it on!"),
+ "","",
+ rif(is_gm(), l("I'm GM and got the money. Gimme HALF HOUR to invite everybody!"));
+
+ // Cancel?
+ if (@menu == 1)
+ goto L_Exit;
+
+ // Already started?
+ if ($@FIGHT_CAVE_LEVEL || $@FIGHT_CAVE_HERO$ != "")
+ goto L_AlreadyStarted;
+
+ // Enough money?
+ if (Zeny < .price)
+ goto L_NotEnough;
+
+ Zeny = Zeny - .price;
+ // Time delay
+ $@FEFE_DELAY = gettimetick(2)+300*(@menu-1);
+ $@FIGHT_CAVE_HERO$ = strcharinfo(0);
+ initnpctimer;
+ mesn;
+ mesq l("Please wait the designed time.");
+ close;
+
+L_StartFight:
+ if (getmapusers("006-1") < 3)
+ goto L_NotEnoughPlayers;
+ $@FIGHT_CAVE_LEVEL = 1;
+ $@FEFE_DELAY = gettimetick(2)+.delay;
+ $@FIGHT_CAVE_PLAYER_COUNT = getmapusers("006-1");
+ mapannounce("006-1", "Let the battle begin!", bc_map);
+ initnpctimer;
+ end;
+
+L_Enjoy:
+ npctalk3 l("Pay attention to the fight, @@!", strcharinfo(0));
+ end;
+
+L_NotEnough:
+ mesn;
+ mesq l("You lack money. Go sell your stuff. And don't ask why a statue needs money!");
+ close;
+
+L_AlreadyStarted:
+ mesn;
+ mesq l("Sorry, @@ already started the fight.", $@FIGHT_CAVE_HERO$);
+ close;
+
+L_Wait:
+ .@time$=FuzzyTime($@FEFE_DELAY,2,2);
+ mesn;
+ mesq l("Be Patient... You still need to wait @@.", .@time$);
+ goto L_Exit;
+
+L_NotEnoughPlayers:
+ mapannounce("006-1", "Oh noes! There's not enough players. Fight aborted, no refunds!", bc_map);
+ goto L_CleanUp;
+
+L_Explain:
+ mesn;
+ mesq l("I am @@, guardian of Candor Cave. Below this cave, lies the legendary Fefe, arch-wizard from the Great War.", .name$);
+ next;
+ mesn;
+ mesq l("During the war, the Monster King cursed the place where he died, but he fought back, and cursed the curse.");
+ next;
+ mesn;
+ mesq l("For short, they had a fight with curses, and now there's a talking statue over his grave which can spawn monsters here.");
+ next;
+ mesn;
+ mesq l("If you pay the fee, I'll spawn them. You should not fight alone, instead, you need a group of at least three, because, you know, the curse. Or something.");
+ next;
+ menu
+ l("I need to think about this."), L_Exit,
+ l("I'm interested."), L_Next;
+
+L_Exit:
+ close;
+
+
+
+
+
+
+
+// Check if we're ready for next wave. Otherwise, do this check again after 5 seconds.
+L_CaveLogic:
+ $@FIGHT_CAVE_PLAYER_COUNT = getmapusers("006-1");
+ if (mobcount("006-1", "Crazyfefe::OnPetDeath") <= 0)
+ goto L_NextRound;
+ // reset timer
+ initnpctimer;
+ end;
+
+// TODO
+L_NextRound:
+ $@FIGHT_CAVE_LEVEL = $@FIGHT_CAVE_LEVEL + $@FIGHT_CAVE_PLAYER_COUNT;
+ if ($@FIGHT_CAVE_LEVEL >= 2200)
+ goto L_CleanUp;
+
+ mapannounce "006-1", "The next round, with level " + $@FIGHT_CAVE_LEVEL + ", is starting with " + $@FIGHT_CAVE_PLAYER_COUNT + " player(s) left alive." , 0;
+ goto L_Summon;
+
+// TODO
+L_Summon:
+ .@amount=($@FIGHT_CAVE_LEVEL/3);
+ for (.@i = 0; .@i < .@amount; ++.@i) {
+ .@mid=rand(1,15);
+ .@monsterId=Piou;
+ switch (.@mid) {
+ case 1:
+ .@monsterId = CaveMaggot ; break;
+ case 2:
+ .@monsterId = Wolvern ; break;
+ case 3:
+ .@monsterId = DarkLizard ; break;
+ case 4:
+ .@monsterId = MagicGoblin ; break;
+ case 5:
+ .@monsterId = Bandit ; break;
+ case 6:
+ .@monsterId = GreenSlime ; break;
+ case 7:
+ .@monsterId = LavaSlime ; break;
+ case 8:
+ .@monsterId = Snake ; break;
+ case 9:
+ .@monsterId = DesertBandit ; break;
+ case 10:
+ .@monsterId = Sarracenus ; break;
+ case 11:
+ .@monsterId = AngryRedScorpion ; break;
+ case 12:
+ .@monsterId = BlackScorpion ; break;
+ case 13:
+ .@monsterId = FallenGuard1 ; break;
+ case 14:
+ .@monsterId = Yeti ; break;
+ default:
+ .@monsterId = AngryScorpion ; break;
+ }
+ areamonster "006-1", 20, 20, 70, 60, "", .@monsterId, .@amount, "Crazyfefe::OnPetDeath";
+ }
+ close;
+
+L_CleanUp:
+ npctalk3 "Game Over!";
+ mapannounce "006-1", "Who will be the next to fall on Crazyfefe's Cave?", 0;
+
+ areatimer 0, "006-1", 20, 20, 70, 60, 10, "Crazyfefe::OnReward";
+ $@FIGHT_CAVE_LEVEL = 0;
+ $@FIGHT_CAVE_HERO$ = "";
+ killmonster "006-1", "Crazyfefe::OnPetDeath";
+ stopnpctimer;
+ end;
+
+
+
+
+
+
+
+
+// Rewards surviving players, according to performance
+OnReward:
+ if (ispcdead())
+ end;
+ // TODO
+ Zeny=Zeny+($@FIGHT_CAVE_LEVEL);
+ getexp $@FIGHT_CAVE_LEVEL, 0;
+ dispbottom l("You've gained @@ GP and EXP", ($@FIGHT_CAVE_LEVEL));
+ end;
+
+// Announces and attempts to start the fight once time run out
+OnTimer300000:
+ if ($@FEFE_DELAY <= gettimetick(2)) goto L_StartFight;
+ announce $@FIGHT_CAVE_HERO$+" invites everyone to a challenge against Candor Cave. It'll start in "+FuzzyTime($@FEFE_DELAY,2,2)+". Prepare yourselves!", bc_all|bc_npc;
+ inittimer;
+ end;
+
+// Every 5 seconds, handle cave, if fighting. Does nothing when waiting.
+OnTimer5000:
+ if ($@FIGHT_CAVE_LEVEL)
+ goto L_CaveLogic;
+ end;
+
+OnPetDeath:
+ end;
+
+OnInit:
+ .sex=G_OTHER;
+ .distance=5;
+ .price=8000;
+ .delay=(60*60*4);
+ end;
+}
diff --git a/npc/006-1/mapflags.txt b/npc/006-1/mapflags.txt
new file mode 100644
index 000000000..7493f64db
--- /dev/null
+++ b/npc/006-1/mapflags.txt
@@ -0,0 +1,2 @@
+006-1 mapflag nosave 005-1,61,54
+006-1 mapflag nopenalty
diff --git a/npc/012-5/_import.txt b/npc/012-5/_import.txt
index e65d06a2c..a6b89d2c1 100644
--- a/npc/012-5/_import.txt
+++ b/npc/012-5/_import.txt
@@ -1,3 +1,4 @@
// Map 012-5: Indoors
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/012-5/_warps.txt",
+"npc/012-5/nicholas.txt",
diff --git a/npc/012-5/nicholas.txt b/npc/012-5/nicholas.txt
new file mode 100644
index 000000000..a98c0de94
--- /dev/null
+++ b/npc/012-5/nicholas.txt
@@ -0,0 +1,8 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Nicholas is Hurnscald's blakcsmith. He forges stuff, and sell ammo.
+
+
+
diff --git a/npc/_import.txt b/npc/_import.txt
index 711de6aeb..970ee235c 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -39,6 +39,7 @@
@include "npc/005-5/_import.txt"
@include "npc/005-6/_import.txt"
@include "npc/005-7/_import.txt"
+@include "npc/006-1/_import.txt"
@include "npc/007-1/_import.txt"
@include "npc/009-1/_import.txt"
@include "npc/010-1-1/_import.txt"