summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-08 02:35:06 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-08 02:35:06 -0300
commit2026450460345dc0c26a26987f0f8c61dfb54480 (patch)
treec7d9940b71ed8ca103fdf1aec652d8054fa99a70
parent6c5f7dd6bc40a5c34c1fbf566ed804e3ea429f71 (diff)
downloadserverdata-2026450460345dc0c26a26987f0f8c61dfb54480.tar.gz
serverdata-2026450460345dc0c26a26987f0f8c61dfb54480.tar.bz2
serverdata-2026450460345dc0c26a26987f0f8c61dfb54480.tar.xz
serverdata-2026450460345dc0c26a26987f0f8c61dfb54480.zip
Okay, time to test Soren's Village Stage.
(Ugh, I still need to code the house, add the inner warp, and prepare final boss fight on a suitable map with a way back.)
-rw-r--r--npc/soren/main.txt253
1 files changed, 248 insertions, 5 deletions
diff --git a/npc/soren/main.txt b/npc/soren/main.txt
index af9a6259e..4239e48dd 100644
--- a/npc/soren/main.txt
+++ b/npc/soren/main.txt
@@ -34,7 +34,7 @@ soren,105,57,0 script Soren's House NPC_NO_SPRITE,0,0,{
OnTouch:
.@st1=getvariableofnpc(.lifetime, "Soren's Fountain")-gettimetick(2);
.@st2=getvariableofnpc(.lifetime, "Soren's Lake")-gettimetick(2);
- .@st3=getvariableofnpc(.lifetime, "Soren's Dizmo")-gettimetick(2);
+ .@st3=getvariableofnpc(.lifetime, "Soren's Gizmo")-gettimetick(2);
if (.@st1 > 0 && .@st2 > 0 && .@st3 > 0) {
compareandsetq HurnscaldQuest_Celestia, 3, 4;
warp "soren-2", 32, 36;
@@ -47,6 +47,7 @@ OnTouch:
mes col("Also, if I move away from the singularity during disarm process, it'll be lost.", 9);
mes col("The singularities keep arming themselves up again, so I have roughly five minutes between first disarm and entering here.", 9);
mes col("We should split our team, and have someone to protect our backs. Otherwise, we might not do it.", 9);
+ // Protip: stock Elixir Of Life if you need to do this quest with less than 3 team members
close;
}
end;
@@ -105,7 +106,7 @@ OnTimer31000:
.@val=-2;
if (getvariableofnpc(.casterId, "Soren's Lake") == .casterId)
.@val=.@val-10;
- if (getvariableofnpc(.casterId, "Soren's Dizmo") == .casterId)
+ if (getvariableofnpc(.casterId, "Soren's Gizmo") == .casterId)
.@val=.@val-10;
percentheal .@val, -15;
@@ -183,8 +184,127 @@ OnInit:
+
+
+
+
+
+
+
+
+
+
+
+
soren,104,143,0 script Soren's Lake NPC_NO_SPRITE,{
-
+ // Initial Checks
+ if (.lifetime > gettimetick(2)) {
+ npctalk l("This singularity will remain disarmed for @@ more!", FuzzyTime(.lifetime, 2, 2));
+ end;
+ }
+ if (.st) {
+ npctalk l("A disarm process is already running.");
+ end;
+ }
+
+ // Main menu
+ mes col("Attempt to disarm the singularity?", 9);
+ if (askyesno() == ASK_YES) {
+ .casterId=getcharid(3);
+ .st=1;
+ npctalk l("@@ started disarm process. Please stand by.", strcharinfo(0));
+ initnpctimer;
+ }
+ close;
+
+// Waves (total: 6 waves + 1 optional)
+OnTimer5000:
+OnTimer10300:
+OnTimer14000:
+OnTimer18000:
+OnTimer25000:
+OnTimer28000:
+OnTimer31000:
+ if (!attachrid(.casterId)) {
+ npctalk "Disarm process aborted: Disarmer is gone.";
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (!reachable(.x, .y, .distance)) {
+ npctalk l("Disarm process aborted: Disarmer is out of reach.");
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (Sp < MaxSp/100*15) {
+ npctalk l("Disarm process aborted: Insufficient mana to proceed.");
+ stopnpctimer; .st=0;
+ end;
+ }
+
+ // Penalty Handler.
+ .@val=-2;
+ if (getvariableofnpc(.casterId, "Soren's Fountain") == .casterId)
+ .@val=.@val-10;
+ if (getvariableofnpc(.casterId, "Soren's Gizmo") == .casterId)
+ .@val=.@val-10;
+
+ percentheal .@val, -15;
+
+ // Monster Gen. Lake spawns less
+ .@amount=rand(.st/3+1, .st/2+1);
+ .@mid=rand(1,3)+.st;
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@monsterId = CaveMaggot ; break;
+ case 3:
+ case 4:
+ case 5:
+ .@monsterId = LavaSlime ; break;
+ case 6:
+ case 7:
+ .@monsterId = MountainSnake ; break;
+ default: // case 8: case 9:
+ .@monsterId = Yeti ; break;
+ }
+ // Item Gen have a different mechanic here
+ .@mid=rand(.st, .st*2+1);
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@itemId = Acorn ; break;
+ case 3:
+ case 4:
+ .@itemId = ChocolateMouboo ; break;
+ case 5:
+ case 6:
+ .@itemId = OrangeCupcake ; break;
+ case 7:
+ case 8:
+ .@itemId = CherryCake ; break;
+ case 9:
+ case 10:
+ .@itemId = Chagashroom ; break;
+ case 11:
+ .@itemId = HastePotion ; break;
+ case 12:
+ .@itemId = rand(Diamond, Amethyst) ; break;
+ default: // case 13
+ .@itemId = rand(CopperOre, TitaniumOre) ; break;
+ }
+ // Defines for Lake are fixed
+ .@lx=104; .@ux=104;
+ .@ly=141; .@uy=141;
+
+ // Core function
+ areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount; makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy)); ++.st;
+
+ // If we're done with waves
+ if (.st >= 7) {
+ .lifetime=gettimetick(2)+300+rand(0, 60);
+ npctalk l("Disarmed with success for: @@", FuzzyTime(.lifetime, 2, 2));
+ stopnpctimer; .st=0;
+ }
end;
OnInit:
@@ -202,10 +322,133 @@ OnInit:
-soren,107,37,0 script Soren's Dizmo NPC_NO_SPRITE,{
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+soren,107,37,0 script Soren's Gizmo NPC_NO_SPRITE,{
+ // Initial Checks
+ if (.lifetime > gettimetick(2)) {
+ npctalk l("This singularity will remain disarmed for @@ more!", FuzzyTime(.lifetime, 2, 2));
+ end;
+ }
+ if (.st) {
+ npctalk l("A disarm process is already running.");
+ end;
+ }
+
+ // Main menu
+ mes col("Attempt to disarm the singularity?", 9);
+ if (askyesno() == ASK_YES) {
+ .casterId=getcharid(3);
+ .st=1;
+ npctalk l("@@ started disarm process. Please stand by.", strcharinfo(0));
+ initnpctimer;
+ }
+ close;
+
+// Waves (total: 6 waves + 1 optional)
+OnTimer5000:
+OnTimer10300:
+OnTimer14000:
+OnTimer18000:
+OnTimer25000:
+OnTimer28000:
+OnTimer31000:
+ if (!attachrid(.casterId)) {
+ npctalk "Disarm process aborted: Disarmer is gone.";
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (!reachable(.x, .y, .distance)) {
+ npctalk l("Disarm process aborted: Disarmer is out of reach.");
+ stopnpctimer; .st=0;
+ end;
+ }
+ if (Sp < MaxSp/100*15) {
+ npctalk l("Disarm process aborted: Insufficient mana to proceed.");
+ stopnpctimer; .st=0;
+ end;
+ }
+
+ // Penalty Handler.
+ .@val=-2;
+ if (getvariableofnpc(.casterId, "Soren's Lake") == .casterId)
+ .@val=.@val-10;
+ if (getvariableofnpc(.casterId, "Soren's Fountain") == .casterId)
+ .@val=.@val-10;
+
+ percentheal .@val, -15;
+
+ // Monster Gen. Gizmo spawns more monsters because you can move more
+ .@amount=rand(.st/2+2, .st+2);
+ .@mid=rand(1,3)+.st;
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@monsterId = CaveMaggot ; break;
+ case 3:
+ case 4:
+ case 5:
+ .@monsterId = LavaSlime ; break;
+ case 6:
+ case 7:
+ .@monsterId = MountainSnake ; break;
+ default: // case 8: case 9:
+ .@monsterId = Yeti ; break;
+ }
+ // Item Gen
+ .@mid=rand(1,7)+.st;
+ switch (.@mid) {
+ case 1:
+ case 2:
+ .@itemId = Acorn ; break;
+ case 3:
+ case 4:
+ .@itemId = ChocolateMouboo ; break;
+ case 5:
+ case 6:
+ .@itemId = OrangeCupcake ; break;
+ case 7:
+ case 8:
+ .@itemId = CherryCake ; break;
+ case 9:
+ case 10:
+ .@itemId = Chagashroom ; break;
+ case 11:
+ .@itemId = HastePotion ; break;
+ case 12:
+ .@itemId = rand(Diamond, Amethyst) ; break;
+ default: // case 13
+ .@itemId = rand(CopperOre, TitaniumOre) ; break;
+ }
+ // Defines
+ .@lx=.x-.distance;
+ .@ly=.y-.distance;
+ .@ux=.x+.distance;
+ .@uy=.y+.distance;
+
+ // Core function
+ areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount; makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy)); ++.st;
+
+ // If we're done with waves
+ if (.st >= 7) {
+ .lifetime=gettimetick(2)+300+rand(0, 60);
+ npctalk l("Disarmed with success for: @@", FuzzyTime(.lifetime, 2, 2));
+ stopnpctimer; .st=0;
+ }
end;
+
OnInit:
.sex = G_OTHER;
.distance = 3;