summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2025-04-02 09:18:47 +0000
committerHoraK-FDF <horak-fdf@web.de>2025-04-02 09:18:47 +0000
commit386126856d018b9793db66b4f148cccb101c0bbb (patch)
tree1855ccaa40c1974538a911a2fa3c06ab69da0c67
parent92f29c04e41cfb4ef312b7d9ca131d2d29189ce0 (diff)
downloadserverdata-master.tar.gz
serverdata-master.tar.bz2
serverdata-master.tar.xz
serverdata-master.zip
SC_COOLDOWN_CGHEADmaster
serverdata changes for https://git.themanaworld.org/legacy/tmwa/-/merge_requests/298<br> <br> I also re enabled the stone golem (since its not op and even weaker than a guardian or tyrant) spell with that both spells take one of the matching items idk whats a fair amount to take any thoughts or just give it a test run and see if 1 is too less? Approved-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl> Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
-rw-r--r--world/map/db/const.txt1
-rw-r--r--world/map/npc/magic/_import.txt3
-rw-r--r--world/map/npc/magic/event-summon-coalgolem.txt75
-rw-r--r--world/map/npc/magic/event-summon-stonegolem.txt4
4 files changed, 80 insertions, 3 deletions
diff --git a/world/map/db/const.txt b/world/map/db/const.txt
index 2e1aef15..d9fb8eed 100644
--- a/world/map/db/const.txt
+++ b/world/map/db/const.txt
@@ -159,6 +159,7 @@ SC_COOLDOWN_ENCH 76
SC_COOLDOWN_KOY 77
SC_COOLDOWN_UPMARMU 78
SC_COOLDOWN_SG 79
+SC_COOLDOWN_CG 80
// Emotions
EMOTE_DISGUST 1
diff --git a/world/map/npc/magic/_import.txt b/world/map/npc/magic/_import.txt
index 42f316fe..6c71ec24 100644
--- a/world/map/npc/magic/_import.txt
+++ b/world/map/npc/magic/_import.txt
@@ -47,7 +47,8 @@ npc: npc/magic/level2-make-shirt.txt
npc: npc/magic/level3-necromancy.txt
npc: npc/magic/event-summon-managuardian.txt
npc: npc/magic/event-summon-manatyrant.txt
-//npc: npc/magic/event-summon-stonegolem.txt
+npc: npc/magic/event-summon-coalgolem.txt
+npc: npc/magic/event-summon-stonegolem.txt
//npc: npc/magic/event-summon-sunshroom.txt
npc: npc/magic/event-boss-powerup-lifedrain.txt
npc: npc/magic/event-boss-powerup-manadrain.txt
diff --git a/world/map/npc/magic/event-summon-coalgolem.txt b/world/map/npc/magic/event-summon-coalgolem.txt
new file mode 100644
index 00000000..1af16637
--- /dev/null
+++ b/world/map/npc/magic/event-summon-coalgolem.txt
@@ -0,0 +1,75 @@
+-|script|summon-cgolem|32767
+{
+ end;
+
+OnCast:
+ if(call("magic_checks")) end;
+ // FIXME: Incomplete check, should still work during sieges
+ if (getmapflag(getmap(), MF_TOWN)) end;
+ if (Sp < 100) end;
+ if (getskilllv(SKILL_MAGIC) < .level) end;
+ if (countitem("Coal") < 3) end;
+// if (!$DOOMSDAY_SUMMON) end;
+// if (@ddcooldown > gettimetick(2)) goto L_Cooldown;
+ if (sc_check(SC_COOLDOWN_CG)) goto L_Cooldown;
+ if (getmap() == "033-1") goto L_SpecialRules6;
+ goto L_Pay;
+
+L_Pay:
+ delitem "Coal", 3;
+ set @_M_BLOCK, 1; // block casting, until the timer clears it
+ addtimer 15000, "Magic Timer::OnClear"; // set the new debuff
+ sc_start SC_COOLDOWN, 15000, 0, BL_ID;
+ callfunc "adjust_spellpower";
+ set Sp, Sp - 100;
+ set CASTS, CASTS + 1;
+ if (CASTS < 0) set CASTS, 1; // overflow
+ misceffect FX_MAGIC_MAGGOT_CAST, strcharinfo(0);
+ callfunc "magic_exp";
+ set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID;
+ set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127);
+ if (.@puppet < 1) end;
+ set .master, BL_ID, .@puppet;
+ set .lifetime, (@spellpower*9)+60000, .@puppet;
+// set @ddcooldown, gettimetick(2)+70; // This is measured in seconds
+ sc_start SC_COOLDOWN_CG, (@spellpower*9)+70000, 0, BL_ID; // .lifetime + OnSummon
+ addnpctimer 10000, .@puppet$+"::OnSummon";
+ addnpctimer 11000, .@puppet$+"::OnDestroy";
+ end;
+
+OnSummon:
+ if (!(isloggedin(.master))) destroy;
+ if(get(Hp, .master) < 1) destroy; // destroy if master is missing
+ if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
+ specialeffect FX_MAGIC_MAGGOT_SPAWN;
+ set .@x, getnpcx();
+ set .@y, getnpcy();
+ set .@map$, strnpcinfo(3);
+ callsub S_SummonAll;
+ end;
+
+OnDestroy:
+ destroy;
+
+S_SummonAll:
+ summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, "Coal Golem Summon", CoalGolem, 2, .lifetime;
+ destroy;
+
+L_Cooldown:
+ message strcharinfo(0), "This skill is in forced cooldown; Please wait your first summon to expire.";
+ end;
+
+L_SpecialRules6:
+ if ($@KIMARR_EVENT < 1) goto L_Pay;
+ if ($@Fluffy_FighterID == BL_ID) goto L_Pay;
+ message strcharinfo(0), "You can't summon here unless hunting fluffies.";
+ end;
+
+OnInit:
+ set .school, SKILL_MAGIC_ASTRAL;
+ set .invocation$, chr(MAGIC_SYMBOL) + "colgolis"; // used in npcs that refer to this spell
+ void call("magic_register", "OnCast");
+ set .level, 1;
+ set .exp_gain, 1;
+ end;
+}
diff --git a/world/map/npc/magic/event-summon-stonegolem.txt b/world/map/npc/magic/event-summon-stonegolem.txt
index 873f4c1c..dd8e8c53 100644
--- a/world/map/npc/magic/event-summon-stonegolem.txt
+++ b/world/map/npc/magic/event-summon-stonegolem.txt
@@ -8,7 +8,7 @@ OnCast:
if (getmapflag(getmap(), MF_TOWN)) end;
if (Sp < 100) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
- if (countitem("Stone") < 5) end;
+ if (countitem("Stone") < 1) end;
// if (!$DOOMSDAY_SUMMON) end;
// if (@ddcooldown > gettimetick(2)) goto L_Cooldown;
if (sc_check(SC_COOLDOWN_SG)) goto L_Cooldown;
@@ -16,7 +16,7 @@ OnCast:
goto L_Pay;
L_Pay:
- delitem "Stone", 5;
+ delitem "Stone", 1;
set @_M_BLOCK, 1; // block casting, until the timer clears it
addtimer 15000, "Magic Timer::OnClear"; // set the new debuff
sc_start SC_COOLDOWN, 15000, 0, BL_ID;