summaryrefslogtreecommitdiff
path: root/npc/055-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
commitcf18ce071c79ae37e14ea38943e0b1d88da70a7b (patch)
treef9159c9b60b3018300dd22ffba0d797bc5e828e5 /npc/055-1
parent8a4bf716002a017de77fe7df301ef8e4aaf00a2e (diff)
downloadserverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.gz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.bz2
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.xz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.zip
Override
Diffstat (limited to 'npc/055-1')
-rw-r--r--npc/055-1/_import.txt8
-rw-r--r--npc/055-1/_mobs.txt19
-rw-r--r--npc/055-1/_warps.txt9
-rwxr-xr-xnpc/055-1/flowerpentagram4.txt123
-rwxr-xr-xnpc/055-1/mapflags.txt1
-rwxr-xr-xnpc/055-1/pumpkins.txt150
-rwxr-xr-xnpc/055-1/traveler.txt7
7 files changed, 317 insertions, 0 deletions
diff --git a/npc/055-1/_import.txt b/npc/055-1/_import.txt
new file mode 100644
index 00000000..dcbfce99
--- /dev/null
+++ b/npc/055-1/_import.txt
@@ -0,0 +1,8 @@
+// Map 055-1: Woodland Hills
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/055-1/_mobs.txt",
+"npc/055-1/_warps.txt",
+"npc/055-1/flowerpentagram4.txt",
+"npc/055-1/mapflags.txt",
+"npc/055-1/pumpkins.txt",
+"npc/055-1/traveler.txt",
diff --git a/npc/055-1/_mobs.txt b/npc/055-1/_mobs.txt
new file mode 100644
index 00000000..7a165d71
--- /dev/null
+++ b/npc/055-1/_mobs.txt
@@ -0,0 +1,19 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 055-1: Woodland Hills mobs
+055-1,68,72,11,9 monster Amethyst Vein 1055,16,10000,85000
+055-1,87,29,27,7 monster Mana Bug 1035,15,10000,85000
+055-1,79,30,42,8 monster Gamboge Plant 1038,10,10000,45000
+055-1,0,0,0,0 monster Forest Maggot 1028,15,10000,85000
+055-1,91,49,3,2 monster Alizarin Plant 1037,1,10000,180000
+055-1,103,54,2,1 monster Alizarin Plant 1037,1,10000,180000
+055-1,64,75,13,8 monster Alizarin Plant 1037,1,10000,120000
+055-1,80,34,41,12 monster Squirrel 1041,3,10000,85000
+055-1,70,72,8,12 monster Butterfly 1032,2,10000,60000
+055-1,81,32,40,11 monster Butterfly 1032,2,10000,60000
+055-1,0,0,0,0 monster Bee 1029,7,10000,55000
+055-1,0,0,0,0 monster Pinkie 1030,3,10000,60000
+055-1,0,0,0,0 monster Log Head 1031,2,10000,60000
+055-1,116,60,2,1 monster CroconutMob 1014,1,10000,45000
+055-1,97,60,2,1 monster CroconutMob 1014,1,10000,45000
+055-1,64,73,11,8 monster CroconutMob 1014,1,10000,45000
+055-1,0,0,0,0 monster PumpkinMob 1019,7,10000,60000
diff --git a/npc/055-1/_warps.txt b/npc/055-1/_warps.txt
new file mode 100644
index 00000000..31dc2b47
--- /dev/null
+++ b/npc/055-1/_warps.txt
@@ -0,0 +1,9 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 055-1: Woodland Hills warps
+055-1,100,83,0 warp #055-1_100_83 0,0,055-3,30,27
+055-1,100,89,0 warp #055-1_100_89 0,0,055-3,50,42
+055-1,22,52,0 warp #055-1_22_52 0,3,013-1,135,51
+055-1,137,96,0 warp #055-1_137_96 0,0,055-3,76,39
+055-1,60,93,0 warp #055-1_60_93 0,0,055-3,96,70
+055-1,75,20,0 warp #055-1_75_20 1,0,017-1,188,103
+055-1,149,63,0 warp #055-1_149_63 0,2,057-1,20,63
diff --git a/npc/055-1/flowerpentagram4.txt b/npc/055-1/flowerpentagram4.txt
new file mode 100755
index 00000000..12e0f833
--- /dev/null
+++ b/npc/055-1/flowerpentagram4.txt
@@ -0,0 +1,123 @@
+
+055-1,141,89,0 script #FlowerPentagram4 NPC400,{
+ if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+
+ if (OrumQuest > 26) goto L_PlacedFourthFlower;
+ if (OrumQuest == 26) goto L_FourthFlower;
+
+ message strcharinfo(0), "Something is odd about this place.";
+ end;
+
+L_FourthFlower:
+ mes "This is the spot where you have to place the fourth of Orum's magical flowers.";
+ menu
+ "Place the flower.", L_PlaceTheFlower,
+ "Leave.", L_close;
+
+L_PlaceTheFlower:
+ if (isin("055-1", 140, 88, 142, 90))
+ goto L_Place;
+
+ mes "This isn't working, you're too far away.";
+ goto L_close;
+
+L_Place:
+ set @localMonsterCount,
+ mobcount("055-1", "#FlowerPentagram4::OnSquirrelDeath") +
+ mobcount("055-1", "#FlowerPentagram4::OnMushroomDeath") +
+ mobcount("055-1", "#FlowerPentagram4::OnBlueparDeath") +
+ mobcount("055-1", "#FlowerPentagram4::OnMoubooDeath") +
+ mobcount("055-1", "#FlowerPentagram4::OnScorpionDeath") +
+ mobcount("055-1", "#FlowerPentagram4::OnRScorpionDeath") +
+ mobcount("055-1", "#FlowerPentagram4::OnAScorpionDeath") +
+ mobcount("055-1", "#FlowerPentagram4::OnBScorpionDeath") +
+ 8; // the mobcount function has an offset of -1, so we add 8 to have the actual amount of monsters
+ if (@localMonsterCount > 4)
+ goto L_MonstersAlive;
+
+ if (countitem("YellowSummonFlower") < 1)
+ goto L_NoFlower;
+ delitem "YellowSummonFlower", 1;
+ mes "Worried about what will shift from the astral plane this time, you prepare yourself and put the flower in place.";
+ mes "As expected, you feel the magical tension building up. They're coming.";
+ OrumQuest = 27;
+ close2;
+ areamonster "055-1", 133, 87, 144, 99, "", 1105, 1, "#FlowerPentagram4::OnSquirrelDeath";
+ areamonster "055-1", 133, 87, 144, 99, "", 1106, 1, "#FlowerPentagram4::OnMushroomDeath";
+ areamonster "055-1", 133, 87, 144, 99, "", 1107, 2, "#FlowerPentagram4::OnBlueparDeath";
+ areamonster "055-1", 133, 87, 144, 99, "", 1104, 2, "#FlowerPentagram4::OnMoubooDeath";
+ areamonster "055-1", 133, 87, 144, 99, "", 1003, 2, "#FlowerPentagram4::OnScorpionDeath";
+ areamonster "055-1", 133, 87, 144, 99, "", 1004, 2, "#FlowerPentagram4::OnRScorpionDeath";
+ areamonster "055-1", 133, 87, 144, 99, "", 1057, 2, "#FlowerPentagram4::OnAScorpionDeath";
+ areamonster "055-1", 133, 87, 144, 99, "", 1009, 1, "#FlowerPentagram4::OnBScorpionDeath";
+ @value = 15;
+ callfunc "QuestSagathaAnnoy";
+ @value = 0;
+ end;
+
+OnSquirrelDeath:
+ @mobId = 1105;
+ callfunc "MobPoints";
+ end;
+
+OnMushroomDeath:
+ @mobId = 1106;
+ callfunc "MobPoints";
+ end;
+
+OnBlueparDeath:
+ @mobId = 1107;
+ callfunc "MobPoints";
+ end;
+
+OnMoubooDeath:
+ @mobId = 1104;
+ callfunc "MobPoints";
+ end;
+
+OnScorpionDeath:
+ @mobId = 1003;
+ callfunc "MobPoints";
+ end;
+
+OnRScorpionDeath:
+ @mobId = 1004;
+ callfunc "MobPoints";
+ end;
+
+OnAScorpionDeath:
+ @mobId = 1057;
+ callfunc "MobPoints";
+ end;
+
+OnBScorpionDeath:
+ @mobId = 1009;
+ callfunc "MobPoints";
+ end;
+
+L_MonstersAlive:
+ mes "As you get closer to the place, you feel an unnerving presence.";
+ mes "This place has recently been used to summon something! And the beings are still nearby!";
+ next;
+ mes "You should get rid of them before attempting the summoning yourself.";
+ goto L_close;
+
+L_NoFlower:
+ mes "You search your belongings for the magical flower. Where is it?";
+ mes "If you lost it, you should talk to Orum again.";
+ goto L_close;
+
+L_PlacedFourthFlower:
+ mes "You placed the fourth of Orum's magical flowers here.";
+ mes "You can still feel the magical power shimmering around this place, waiting to be unleashed.";
+ goto L_close;
+
+L_PlacedFifthFlower:
+ mes "This is where you placed the fourth of Orum's magical flowers.";
+ mes "However, now that the summoning spell has been cast, everything is back to normal here.";
+ goto L_close;
+
+L_close:
+ @localMonsterCount = 0;
+ close;
+}
diff --git a/npc/055-1/mapflags.txt b/npc/055-1/mapflags.txt
new file mode 100755
index 00000000..e47dd41a
--- /dev/null
+++ b/npc/055-1/mapflags.txt
@@ -0,0 +1 @@
+//055-1 mapflag resave 055-1,133,61
diff --git a/npc/055-1/pumpkins.txt b/npc/055-1/pumpkins.txt
new file mode 100755
index 00000000..8fc25eb3
--- /dev/null
+++ b/npc/055-1/pumpkins.txt
@@ -0,0 +1,150 @@
+055-1,0,0,0 script _N-Pumpkin NPC32767,{
+
+
+ set @distance_handler, 1; // silent
+ set @npc_distance, (1-2); // -1 means attack range
+ callfunc "PCtoNPCRange";
+ if (@npc_check) end;
+
+ if (Quest_Halloween != 1 || !(gettime(6) == 11 && (gettime(5) >= 4 && gettime(5) <= 30)))
+ goto L_HeavyPoison;
+ if (@discover_poisonous_pumpkin == 0)
+ message strcharinfo(0), "Pumpkin : Yuke, this pumpkin released some ugly poison gas!";
+ @discover_poisonous_pumpkin = 1;
+ misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0);
+ heal -15, 0;
+ sc_start SC_POISON, 1, 4;
+ if (rand(0,100) < 10)
+ getitem "PumpkinSeeds", 1;
+
+ if (countitem("PumpkinSeeds") >= $@halloween_num_seeds)
+ goto L_EnoughSeeds;
+
+ @mobId = 1063;
+ callfunc "MobPoints";
+ goto L_Destroy;
+
+L_EnoughSeeds:
+ message strcharinfo(0), "Pumpkin : " + $@halloween_num_seeds + " should be enough seeds for Oscar. And this pumpkin gas gets too bad to stand it any longer...";
+ Quest_Halloween = 2;
+ // Reset this to get the message for the "heavy" poison
+ @discover_poisonous_pumpkin = 0;
+ goto L_Destroy;
+
+L_HeavyPoison:
+ if (@discover_poisonous_pumpkin == 0)
+ goto L_HeavyPoison0;
+ if (@discover_poisonous_pumpkin == 1)
+ goto L_HeavyPoison1;
+ goto L_HeavyPoison2;
+
+L_HeavyPoison0:
+ @discover_poisonous_pumpkin = @discover_poisonous_pumpkin + 1;
+ message strcharinfo(0), "Pumpkin : Ouch, this pumpkin is totally poisonous! Let's get away from them!";
+ misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0);
+ heal -150,0;
+ sc_start SC_POISON, 1, 60;
+ goto L_Destroy;
+
+L_HeavyPoison1:
+ @discover_poisonous_pumpkin = @discover_poisonous_pumpkin + 1;
+ message strcharinfo(0), "Pumpkin : This is really awful! I should not touch them!";
+ misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0);
+ heal -350,0;
+ sc_start SC_POISON, 1, 120;
+ goto L_Destroy;
+
+L_HeavyPoison2:
+ @discover_poisonous_pumpkin = @discover_poisonous_pumpkin + 1;
+ misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0);
+ heal -Hp, 0;
+ goto L_Destroy;
+
+OnAppear:
+ fakenpcname strnpcinfo(0), strnpcinfo(0), 1063; // set the sprite (implies enablenpc)
+ end;
+
+L_Destroy:
+ disablenpc strnpcinfo(0); // makes the npc invisible, unclickable
+ addnpctimer .death_t, strnpcinfo(0) + "::OnReallyDestroy"; // schedule a respawn
+ end;
+
+OnReallyDestroy:
+ set .nodes[.i], get(.nodes[.i], "_N-Pumpkin") - 1, "_N-Pumpkin"; // tell the puppeteer we lost an egg
+ destroy;
+
+
+
+S_MakeNode:
+ set .nID, .nID + 1; // give the node an id
+ .@name$ = "#_Pkin" + chr(3) + .nID;
+ if (.nID == 2147483647)
+ set .nID, 0; // start over if id = 0x7FFFFFFF
+ goto S_FindXY;
+
+S_FindXY:
+ .@x = rand(.x1[.i], .x2[.i]);
+ .@y = rand(.y1[.i], .y2[.i]);
+ if (iscollision(.m$[.i], .@x, .@y) == 1)
+ goto S_FindXY;
+ goto S_ReallySpawn;
+
+S_ReallySpawn:
+ set .@p, puppet(.m$[.i], .@x, .@y, .@name$, 32767); // spawn the node (but not on map, because 32767)
+ if (.@p < 1) goto S_MakeNode; // silently retry
+ disablenpc .@name$; // make sure it can't be clicked by guessing the being id
+ set .i, .i, .@p; // tell the puppet what object contains it
+ set .death_t, rand(.death_t/2, .death_t), .@p; // tell the puppet when to die
+ set .@timer, if_then_else(.done_initial[.i], rand(.appear_t/2, .appear_t), 0); // timer depends on if first spawn or if respawned after death
+ addnpctimer .@timer, .@name$+"::OnAppear"; // we spawn the node instantly but it only appears after the timer
+ .nodes[.i] = .nodes[.i] + 1;
+ return;
+
+S_IterateObjects:
+ if (.min_nodes[.i] == 0)
+ .min_nodes[.i] = (.min * min(1, ((.x2[.i] - .x1[.i]) * (.y2[.i] - .y1[.i])) / .divisor));
+ if (.max_nodes[.i] == 0)
+ .max_nodes[.i] = (.max * max(1, ((.x2[.i] - .x1[.i]) * (.y2[.i] - .y1[.i])) / .divisor));
+
+ if (.nodes[.i] >= .max_nodes[.i])
+ goto S_NextObject;
+
+ callsub S_MakeNode;
+ if (.nodes[.i] < if_then_else(.done_initial[.i], .min_nodes[.i], .max_nodes[.i]))
+ goto S_IterateObjects;
+ goto S_NextObject;
+
+S_NextObject:
+ .done_initial[.i] = 1;
+ if (.i >= (.count - 1))
+ goto S_Return;
+ set .i, .i + 1; // object iterator++
+ goto S_IterateObjects;
+
+S_Return:
+ return;
+
+OnHeartbeat:
+ set .i, 0; // object iterator
+ freeloop 1;
+ callsub S_IterateObjects;
+ freeloop 0;
+ addnpctimer .spawn_t, strnpcinfo(0) + "::OnHeartbeat"; // heartbeat
+ end;
+
+OnMaybeStart:
+ if (.x1[1] == 0)
+ end;
+ set .min, 0; // relative min number of nodes per object => (min * (((x2 - x1) * (y2 - y1)) / divisor))
+ set .max, 5; // relative max number of nodes per object => (max * (((x2 - x1) * (y2 - y1)) / divisor))
+ set .divisor, 32; // see .min & .max ^
+ set .count, getarraysize(.x1); // number of nodes objects in TSX
+ set .spawn_t, 18000; // heartbeat rate
+ set .death_t, 1000; // rand(timer/2, timer) before a node triggers respawn after death
+ set .appear_t, 40000; // rand(timer/2, timer) before a node becomes visible after spawn
+ if (.started)
+ end;
+ .started = 1;
+ addnpctimer 10000, strnpcinfo(0)+"::OnHeartbeat"; // first heartbeat
+ end;
+}
diff --git a/npc/055-1/traveler.txt b/npc/055-1/traveler.txt
new file mode 100755
index 00000000..14c798ec
--- /dev/null
+++ b/npc/055-1/traveler.txt
@@ -0,0 +1,7 @@
+
+055-1,135,60,0 script Sherman the Traveler NPC103,{
+ @npcname$ = "Sherman";
+ @NpcTravelBit = $@hurns_farms_bit;
+ callfunc "Traveler";
+ end;
+}