summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-01-14 16:50:48 -0300
committerJesusaves <cpntb1@ymail.com>2021-01-14 16:50:48 -0300
commit5717ba53de1b2c015e5ee774567fbaa956f0700e (patch)
tree4130f94727b93ef06eb96df837bcca2e29007e0d /npc
parent6e256b1581d73d84653dcc41894dd0e8d422dcb1 (diff)
downloadserverdata-5717ba53de1b2c015e5ee774567fbaa956f0700e.tar.gz
serverdata-5717ba53de1b2c015e5ee774567fbaa956f0700e.tar.bz2
serverdata-5717ba53de1b2c015e5ee774567fbaa956f0700e.tar.xz
serverdata-5717ba53de1b2c015e5ee774567fbaa956f0700e.zip
Nothing like testing to spot dirty bugs
Diffstat (limited to 'npc')
-rw-r--r--npc/025-1/ctrl.c58
1 files changed, 33 insertions, 25 deletions
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c
index ce5a992e7..8dbb9630c 100644
--- a/npc/025-1/ctrl.c
+++ b/npc/025-1/ctrl.c
@@ -45,10 +45,10 @@ function script FTCleanup {
killmonsterall("025-1");
// Main gate
if ($FORTRESS_STATE) {
- disablenpc "Fortress";
+ hideonnpc "Gate#F";
donpcevent "#025-1_99_112::OnDisable";
} else {
- enablenpc "Fortress";
+ hideoffnpc "Gate#F";
donpcevent "#025-1_99_112::OnEnable";
mapwarp("025-1", "025-2", 100, 27);
}
@@ -77,7 +77,7 @@ function script FTStatue {
if ($@FORTRESS_STATUE & .@id)
return false;
sc_start SC_STUN, 10000, 1;
- doevent("Fortress::OnStatueBreach");
+ doevent("Gate#F::OnStatueBreach");
mapannounce("025-1", strcharinfo(0)+" has broken a statue!", bc_map);
$@FORTRESS_STATUE=$@FORTRESS_STATUE|.@id;
return true;
@@ -99,7 +99,7 @@ function script FTStatue {
// NPC SCRIPTS
// Main gate - Also where the World Hero can begin the siege
-025-1,99,112,0 script Fortress NPC_NO_SPRITE,{
+025-1,99,112,0 script Gate#F NPC_NO_SPRITE,{
function spawnMob;
function spawnCore;
// Main Story block - WHAT
@@ -126,7 +126,7 @@ function script FTStatue {
close;
// FIRE THE EVENT
- disablenpc .name$;
+ hideonnpc "Gate#F";
disablenpc "#025-1_100_123";
initnpctimer;
@@ -134,20 +134,20 @@ function script FTStatue {
$@FORTRESS_STATUE=2048;
// Spawn the gate
- monster("025-1", 99, 113, "Fortress Gate", FortressGate, 1, .name$+"::OnOpenGate");
+ monster("025-1", 99, 113, strmobinfo(1, FortressGate), FortressGate, 1, "Gate#F::OnSesame");
// Initial defending waves
spawnCore(true);
spawnCore(false);
// Player blacklist (unable to use 025-2 warp)
- maptimer2("025-1", 10, "Fortress::OnMPBlacklist");
+ maptimer2("025-1", 10, "Gate#F::OnMPBlacklist");
kamibroadcast($MOST_HEROIC$+"'s team has begun a siege on Fortress Town. Will they prevail?");
close;
/////////////////////////////////////////////////////////
-OnOpenGate:
- // FIXME Broken
+OnSesame:
+ debugmes("[INFO] FORTRESS TOWN WAS BREACHED");
$@FORTRESS_STATUE = $@FORTRESS_STATUE|1024;
donpcevent "#025-1_99_112::OnDisable";
kamibroadcast("The Fortress Town Gate has been breached!");
@@ -175,7 +175,17 @@ OnTimer30000:
spawnCore(.@breach);
// Summon reinforcements
- maptimer2("025-1", 10, "Fortress::OnMPReinforce");
+ maptimer2("025-1", 10, "Gate#F::OnMPReinforce");
+
+ // Front Gate Guardians (Lv 70~80)
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@x1=.@x-5;
+ .@x2=.@x+5;
+ .@y1=.@y-5;
+ .@y2=.@y+5;
+ for (.@i = 0; .@i < 4; ++.@i) {
+ spawnMob(any(AzulSkullSlime, YellowSkullSlime, Forain, GreenDragon, Michel, EliteDuck, Troll, Moonshroom, Terranite), .@x1, .@y1, .@x2, .@y2);
+ }
// Restart timer
initnpctimer;
@@ -197,6 +207,7 @@ OnMPReinforce:
end;
OnStatueBreach:
+ debugmes "STATUE BROKEN";
spawnCore(true);
getmapxy(.@m$, .@x, .@y, 0);
.@x1=.@x-5;
@@ -207,13 +218,16 @@ OnStatueBreach:
for (.@i = 0; .@i < 6; ++.@i) {
spawnMob(any(AzulSkullSlime, YellowSkullSlime, Forain, GreenDragon, Michel, EliteDuck, Troll, Moonshroom, Terranite, JackO, BlackMamba, Centaur, GoboBear, TerraniteProtector), .@x1, .@y1, .@x2, .@y2);
}
+ debugmes "STATUE FINISHED";
//TODO: Maybe spawn monster governor
end;
/////////////////////////////////////////////////////////
// spawnMob(Mob, X1, Y1, X2, Y2)
function spawnMob {
- .@mob=areamonster("025-1", getarg(1), getarg(2), getarg(3), getarg(4), strmobinfo(1, getarg(0)), getarg(0), 1);
+ //.@mob=monster("025-1", rand2(getarg(1), getarg(3)), rand2(getarg(2), getarg(4)), strmobinfo(1, getarg(0)), getarg(0), 1);
+ .@mob=areamonster("025-1", getarg(1), getarg(2), getarg(3), getarg(4),
+ strmobinfo(1, getarg(0)), getarg(0), 1);
.@opt=getunitdata(.@mob, UDT_MODE);
// Make aggressive
.@opt=.@opt|MD_AGGRESSIVE;
@@ -221,7 +235,7 @@ function spawnMob {
if (.@opt & MD_NOKNOCKBACK)
.@opt=.@opt^MD_NOKNOCKBACK;
// Save new options
- setunitdata(.@ob, UDT_MODE, .@opt);
+ setunitdata(.@mob, UDT_MODE, .@opt);
// Increase health in 1%+1% per siege
.@bhp=getunitdata(.@mob, UDT_MAXHP);
@@ -258,7 +272,7 @@ function spawnCore {
freeloop(true);
// Level 40~60 Section
for (.@i = 0; .@i < .@am*3; ++.@i) {
- spawnMob(any(Tipiou, Pollet, Wolvern, FireSkull, DarkLizard, BlackScorpion, EarthFairy, FireFairy, WaterFairy, WindFairy, NatureFairy, DustGatling, DustRifle, DustRevolver, MountainSnake, HoodedNinja, ForestMushroom, GoldenScorpion, Yeti), .@x1, .@y1, .@x2, .@y2);
+ spawnMob(any(Tipiou, Pollet, Wolvern, FireSkull, DarkLizard, BlackScorpion, EarthFairy, FireFairy, WaterFairy, WindFairy, PoisonFairy, DustGatling, DustRifle, DustRevolver, MountainSnake, HoodedNinja, ForestMushroom, GoldenScorpion, Yeti), .@x1, .@y1, .@x2, .@y2);
}
// Level 60~80 Section
for (.@i = 0; .@i < .@am*2; ++.@i) {
@@ -285,7 +299,11 @@ function spawnCore {
/////////////////////////////////////////////////////////
OnInit:
FTCleanup($FORTRESS_STATE);
- end;
+ setarray .@a, Tipiou, Pollet, Wolvern, FireSkull, DarkLizard, BlackScorpion, EarthFairy, FireFairy, WaterFairy, WindFairy, PoisonFairy, DustGatling, DustRifle, DustRevolver, MountainSnake, HoodedNinja, ForestMushroom, GoldenScorpion, Yeti;
+ setarray .@b, Yeti, WickedMushroom, Archant, Scar, Crafty, AzulSkullSlime, YellowSkullSlime, Forain, GreenDragon, Michel, EliteDuck, Troll, Moonshroom, Terranite;
+ setarray .@c, RedSkullSlime, Terranite, JackO, BlackMamba, GreenSkullSlime, Centaur, GoboBear, TerraniteProtector;
+ setarray .@d, GreenSlimeMother, BlueSlimeMother, YellowSlimeMother, RedSlimeMother, WhiteSlimeMother, AzulSlimeMother, LavaSlimeMother, BlackSlimeMother;
+ setarray .@e, VanityPixie, HolyPixie, ShadowPixie, NulityPixie, Reaper, BlackSkullSlime, NightmareDragon, WhirlyBird, PinkieSuseran;
OnTue0000:
FTCleanup(false);
@@ -301,7 +319,7 @@ OnConquest:
/////////////////////////////////////////////////////////
-// TODO: Statue NPCs
+// Statue NPCs
025-1,32,55,0 script Magic Statue#1 NPC_STATUE_WIZARD,{
.@b=FTStatue(strnpcinfo(2, "0"));
if (.@b)
@@ -323,16 +341,6 @@ OnInit:
/////////////////////////////////////////////////////////
-// This exit must work even if gate is closed (bugfix)
-025-1,99,111,0 script #FortressTownOut NPC_HIDDEN,1,0,{
- end;
-
-OnTouch:
- if (!$FORTRESS_STATE)
- slide 100, 114;
- end;
-}
-
// TODO: 100,20 - The Impregnable Fortress Gate
// And don't forget the curse timer